@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
TOPDIR = ../..
include $(TOPDIR)/include/builddefs
@@ -1,23 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2013 Alibaba Group.
* Copyright (c) 2017 Red Hat Inc.
* All Rights Reserved.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/*
* This is a normal case that we do some append dio writes and meanwhile
* we do some dio reads. Currently in vfs we don't ensure that i_size
* is updated properly. Hence the reader will read some data with '0'.
old mode 100755
new mode 100644
@@ -1,18 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) Christoph Hellwig. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it would be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <sys/stat.h>
#include <sys/types.h>
@@ -1,24 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * Directly AIO re-write a file with different content again and again.
- * And check the data integrity.
- *
* Copyright (C) 2017 Red Hat, Inc. All Rights reserved.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Directly AIO re-write a file with different content again and again.
+ * And check the data integrity.
*/
-
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * Launch 4 sub-block AIOs past EOF and ensure that we don't see
- * corruption from racing sub-block zeroing when they're complete.
- *
* Copyright (C) 2015 Red Hat, Inc. All Rights reserved.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Launch 4 sub-block AIOs past EOF and ensure that we don't see
+ * corruption from racing sub-block zeroing when they're complete.
*/
#include <sys/stat.h>
#include <sys/types.h>
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-dio-extend-stat - test race in dio aio completion
- * Copyright (C) 2006 Rafal Wijata
+ * Copyright (C) 2006 Rafal Wijata
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Test race in dio aio completion
*/
-
#define __USE_GNU
#include <stdio.h>
#include <stdlib.h>
@@ -1,25 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
+ * Copyright (c) 2014 Dmitry Monakhov. All Rights Reserved.
+ *
* Perform aio writes to file and toggle O_DIRECT flag concurrently
* this may trigger race between file->f_flags read and modification
* unuligned aio allow to makes race window wider.
* Regression test for https://lkml.org/lkml/2014/10/8/545 CVE-2014-8086
* Patch proposed: http://www.spinics.net/lists/linux-ext4/msg45683.html
- *
- * Copyright (c) 2014 Dmitry Monakhov. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <sys/stat.h>
#include <sys/types.h>
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * Read from a sparse file immedialy after filling a hole to test for races
- * in unwritten extent conversion.
- *
* Copyright (C) 2010 Red Hat, Inc. All Rights reserved.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Read from a sparse file immedialy after filling a hole to test for races
+ * in unwritten extent conversion.
*/
#include <sys/stat.h>
#include <sys/types.h>
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-dio-invalidate-failure - test race in read cache invalidation
- * Copyright (C) 2007 Zach Brown
+ * Copyright (C) 2007 Zach Brown
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Test race in read cache invalidation
*/
-
#define _XOPEN_SOURCE 500 /* pwrite */
#include <unistd.h>
#include <stdio.h>
@@ -1,22 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-dio-invalidate-readahead - test sync DIO invalidation of readahead
- * Copyright (C) 2007 Zach Brown
+ * Copyright (C) 2007 Zach Brown
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Test sync DIO invalidation of readahead
*/
-
#define _XOPEN_SOURCE 500 /* pwrite */
#include <unistd.h>
#include <stdio.h>
@@ -1,23 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-dio-subblock-eof-read - test AIO read of last block of DIO file
- * Copyright (C) 2005 Jeff Moyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2005 Jeff Moyer
*/
-
+
/*
+ * Test AIO read of last block of DIO file
+ *
* Code taken from an example posted to linux-aio at kvack.org
* http://marc.info/?l=linux-aio&m=112263621431161&w=2
* Original Author: Drangon Zhou
@@ -1,26 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-free-ring-with-bogus-nr-pages - test aio_setup_ring with bad nr_pages
- * Copyright (C) 2006 Kostantin Khorenko
- * Copyright (C) 2006 Jeff Moyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2006 Kostantin Khorenko
+ * Copyright (C) 2006 Jeff Moyer
*/
-
+
/*
- * Code taken from an example posted to Red Hat bugzilla #220971
+ * Test aio_setup_ring with bad nr_pages
*
+ * Code taken from an example posted to Red Hat bugzilla #220971
* Original Author: Kostantin Khorenko from OpenVZ/Virtuozzo
* Munged by Jeff Moyer.
*
@@ -1,25 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
- * aio-io-setup-with-nonwritable-context-pointer -
- * Test what happens when a non-writable context pointer is passed to io_setup
- * Copyright (C) 2007 Jeff Moyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ * Copyright (C) 2007 Jeff Moyer
*/
-
+
/*
- * Author: Jeff Moyer
+ * Test what happens when a non-writable context pointer is passed to io_setup
*
* Description: Pass a non-writable context pointer to io_setup to see if
* the kernel deals with it correctly. In the past, the reference counting
@@ -1,21 +1,8 @@
-/* Copyright (C) 2010, Matthew E. Cross <matt.cross@gmail.com>
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2010, Matthew E. Cross <matt.cross@gmail.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/* Code to reproduce the aio lockup.
+ * Code to reproduce an aio lockup.
*
* Make a test file that is at least 4MB long. Something like this:
* 'dd if=/dev/zero of=/tmp/testfile bs=1M count=10'
@@ -1,48 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2004 Daniel McNeil <daniel@osdl.org>
* 2004 Open Source Development Lab
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
- * the GNU General Public License for more details.
+ * Copy file by using a async I/O state machine.
+ * 1. Start read request
+ * 2. When read completes turn it into a write request
+ * 3. When write completes decrement counter and free resources
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Usage: aiocp [-b blksize] -n [num_aio] [-w] [-z] [-s filesize]
+ * [-f DIRECT|TRUNC|CREAT|SYNC|LARGEFILE] src dest
*
- * Module: .c
- */
-
-/*
* Change History:
*
- *
* version of copy command using async i/o
* From: Stephen Hemminger <shemminger@osdl.org>
* Modified by Daniel McNeil <daniel@osdl.org> for testing aio.
* - added -a alignment
- * - added -b blksize option
+ * - added -b blksize option
* _ added -s size option
* - added -f open_flag option
* - added -w (no write) option (reads from source only)
- * - added -n (num aio) option
+ * - added -n (num aio) option
* - added -z (zero dest) opton (writes zeros to dest only)
* - added -D delay_ms option
* - 2/2004 Marty Ridgeway (mridge@us.ibm.com) Changes to adapt to LTP
- *
- * Copy file by using a async I/O state machine.
- * 1. Start read request
- * 2. When read completes turn it into a write request
- * 3. When write completes decrement counter and free resources
- *
- *
- * Usage: aiocp [-b blksize] -n [num_aio] [-w] [-z] [-s filesize]
- * [-f DIRECT|TRUNC|CREAT|SYNC|LARGEFILE] src dest
*/
//#define _GNU_SOURCE