From: Dave Chinner Date: Wed, 20 Jun 2018 02:04:15 +0000 (+1000) Subject: src/aio-dio-regress/: spdx license conversion X-Git-Tag: v2022.05.01~1483 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=09faacc1291dc4b396e913505d7ced17c6457f84 src/aio-dio-regress/: spdx license conversion The license headers all had to be manually editted into a consistent format, then converted to spdx tags via scripting. Manually added tag to Makefile. Notes for future reference and research: - quoted source repositories for aio-dio suite no longer exist - src/aio-dio-regress/aiodio_sparse2.c has no explicit license statement, so need to find original source to determine actual license before tagging. Signed-off-by: Dave Chinner --- diff --git a/src/aio-dio-regress/Makefile b/src/aio-dio-regress/Makefile index 79dd55d8..bd8b4b5d 100644 --- a/src/aio-dio-regress/Makefile +++ b/src/aio-dio-regress/Makefile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0 + TOPDIR = ../.. include $(TOPDIR)/include/builddefs diff --git a/src/aio-dio-regress/aio-dio-append-write-read-race.c b/src/aio-dio-regress/aio-dio-append-write-read-race.c index 44399477..911f2723 100644 --- a/src/aio-dio-regress/aio-dio-append-write-read-race.c +++ b/src/aio-dio-regress/aio-dio-append-write-read-race.c @@ -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'. diff --git a/src/aio-dio-regress/aio-dio-cow-race.c b/src/aio-dio-regress/aio-dio-cow-race.c old mode 100755 new mode 100644 index 9fdce4da..cb5030e6 --- a/src/aio-dio-regress/aio-dio-cow-race.c +++ b/src/aio-dio-regress/aio-dio-cow-race.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-cycle-write.c b/src/aio-dio-regress/aio-dio-cycle-write.c index 3236e6b9..bbf21760 100644 --- a/src/aio-dio-regress/aio-dio-cycle-write.c +++ b/src/aio-dio-regress/aio-dio-cycle-write.c @@ -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 #include #include diff --git a/src/aio-dio-regress/aio-dio-eof-race.c b/src/aio-dio-regress/aio-dio-eof-race.c index 04479035..04d79be1 100644 --- a/src/aio-dio-regress/aio-dio-eof-race.c +++ b/src/aio-dio-regress/aio-dio-eof-race.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-extend-stat.c b/src/aio-dio-regress/aio-dio-extend-stat.c index 7733f510..6d607d57 100644 --- a/src/aio-dio-regress/aio-dio-extend-stat.c +++ b/src/aio-dio-regress/aio-dio-extend-stat.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-fcntl-race.c b/src/aio-dio-regress/aio-dio-fcntl-race.c index 88a27472..d9e55156 100644 --- a/src/aio-dio-regress/aio-dio-fcntl-race.c +++ b/src/aio-dio-regress/aio-dio-fcntl-race.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-hole-filling-race.c b/src/aio-dio-regress/aio-dio-hole-filling-race.c index f79c0469..81967e27 100644 --- a/src/aio-dio-regress/aio-dio-hole-filling-race.c +++ b/src/aio-dio-regress/aio-dio-hole-filling-race.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-invalidate-failure.c b/src/aio-dio-regress/aio-dio-invalidate-failure.c index 24f3e3c6..3df96118 100644 --- a/src/aio-dio-regress/aio-dio-invalidate-failure.c +++ b/src/aio-dio-regress/aio-dio-invalidate-failure.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-invalidate-readahead.c b/src/aio-dio-regress/aio-dio-invalidate-readahead.c index 58ea8c0c..2ac41514 100644 --- a/src/aio-dio-regress/aio-dio-invalidate-readahead.c +++ b/src/aio-dio-regress/aio-dio-invalidate-readahead.c @@ -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 #include diff --git a/src/aio-dio-regress/aio-dio-subblock-eof-read.c b/src/aio-dio-regress/aio-dio-subblock-eof-read.c index 00bd0f13..6f35b0e8 100644 --- a/src/aio-dio-regress/aio-dio-subblock-eof-read.c +++ b/src/aio-dio-regress/aio-dio-subblock-eof-read.c @@ -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 diff --git a/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c b/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c index f133fc0d..7e8189f0 100644 --- a/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c +++ b/src/aio-dio-regress/aio-free-ring-with-bogus-nr-pages.c @@ -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. * diff --git a/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c b/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c index af381177..39e0e7d4 100644 --- a/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c +++ b/src/aio-dio-regress/aio-io-setup-with-nonwritable-context-pointer.c @@ -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 diff --git a/src/aio-dio-regress/aio-last-ref-held-by-io.c b/src/aio-dio-regress/aio-last-ref-held-by-io.c index 7633831e..a70f2a9b 100644 --- a/src/aio-dio-regress/aio-last-ref-held-by-io.c +++ b/src/aio-dio-regress/aio-last-ref-held-by-io.c @@ -1,21 +1,8 @@ -/* Copyright (C) 2010, Matthew E. Cross +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2010, Matthew E. Cross * - * 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' diff --git a/src/aio-dio-regress/aiocp.c b/src/aio-dio-regress/aiocp.c index ccab2ac2..7e71cc5c 100644 --- a/src/aio-dio-regress/aiocp.c +++ b/src/aio-dio-regress/aiocp.c @@ -1,48 +1,30 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2004 Daniel McNeil * 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 * Modified by Daniel McNeil 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