xfs: renumber tests after merge
authorEryu Guan <eguan@redhat.com>
Sat, 8 Oct 2016 06:02:04 +0000 (14:02 +0800)
committerEryu Guan <eguan@redhat.com>
Sat, 8 Oct 2016 06:02:04 +0000 (14:02 +0800)
Tests were merged with high seq numbers to avoid conflicts with
other tests. Now renumber them to contiguous numbers, as all other
tests have been merged correctly. This is easier to do than
assigning the final seq numbers at commit time.

Signed-off-by: Eryu Guan <eguan@redhat.com>
69 files changed:
tests/xfs/331 [new file with mode: 0755]
tests/xfs/331.out [new file with mode: 0644]
tests/xfs/332 [new file with mode: 0755]
tests/xfs/332.out [new file with mode: 0644]
tests/xfs/333 [new file with mode: 0755]
tests/xfs/333.out [new file with mode: 0644]
tests/xfs/334 [new file with mode: 0755]
tests/xfs/334.out [new file with mode: 0644]
tests/xfs/335 [new file with mode: 0755]
tests/xfs/335.out [new file with mode: 0644]
tests/xfs/336 [new file with mode: 0755]
tests/xfs/336.out [new file with mode: 0644]
tests/xfs/337 [new file with mode: 0755]
tests/xfs/337.out [new file with mode: 0644]
tests/xfs/338 [new file with mode: 0755]
tests/xfs/338.out [new file with mode: 0644]
tests/xfs/339 [new file with mode: 0755]
tests/xfs/339.out [new file with mode: 0644]
tests/xfs/340 [new file with mode: 0755]
tests/xfs/340.out [new file with mode: 0644]
tests/xfs/341 [new file with mode: 0755]
tests/xfs/341.out [new file with mode: 0644]
tests/xfs/342 [new file with mode: 0755]
tests/xfs/342.out [new file with mode: 0644]
tests/xfs/343 [new file with mode: 0755]
tests/xfs/343.out [new file with mode: 0644]
tests/xfs/344 [new file with mode: 0755]
tests/xfs/344.out [new file with mode: 0644]
tests/xfs/345 [new file with mode: 0755]
tests/xfs/345.out [new file with mode: 0644]
tests/xfs/346 [new file with mode: 0755]
tests/xfs/346.out [new file with mode: 0644]
tests/xfs/347 [new file with mode: 0755]
tests/xfs/347.out [new file with mode: 0644]
tests/xfs/876 [deleted file]
tests/xfs/876.out [deleted file]
tests/xfs/877 [deleted file]
tests/xfs/877.out [deleted file]
tests/xfs/878 [deleted file]
tests/xfs/878.out [deleted file]
tests/xfs/879 [deleted file]
tests/xfs/879.out [deleted file]
tests/xfs/880 [deleted file]
tests/xfs/880.out [deleted file]
tests/xfs/881 [deleted file]
tests/xfs/881.out [deleted file]
tests/xfs/882 [deleted file]
tests/xfs/882.out [deleted file]
tests/xfs/883 [deleted file]
tests/xfs/883.out [deleted file]
tests/xfs/884 [deleted file]
tests/xfs/884.out [deleted file]
tests/xfs/885 [deleted file]
tests/xfs/885.out [deleted file]
tests/xfs/886 [deleted file]
tests/xfs/886.out [deleted file]
tests/xfs/887 [deleted file]
tests/xfs/887.out [deleted file]
tests/xfs/888 [deleted file]
tests/xfs/888.out [deleted file]
tests/xfs/897 [deleted file]
tests/xfs/897.out [deleted file]
tests/xfs/898 [deleted file]
tests/xfs/898.out [deleted file]
tests/xfs/899 [deleted file]
tests/xfs/899.out [deleted file]
tests/xfs/900 [deleted file]
tests/xfs/900.out [deleted file]
tests/xfs/group

diff --git a/tests/xfs/331 b/tests/xfs/331
new file mode 100755 (executable)
index 0000000..8a7692d
--- /dev/null
@@ -0,0 +1,78 @@
+#! /bin/bash
+# FS QA Test No. 331
+#
+# Create a big enough rmapbt that we tickle a fdblocks accounting bug.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_scratch
+_require_xfs_scratch_rmapbt
+_require_scratch_reflink
+_require_test_program "punch-alternating"
+
+rm -f "$seqres.full"
+
+echo "+ create scratch fs"
+_scratch_mkfs > "$seqres.full" 2>&1
+
+echo "+ mount fs image"
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+# btree header is 56 bytes; an rmapbt record is 24 bytes; and
+# a rmapbt key/pointer pair is 44 bytes.
+bt_ptrs=$(( (blksz - 56) / 44 ))
+bt_recs=$(( (blksz - 56) / 24 ))
+
+blocks=$((bt_ptrs * bt_recs + 1))
+# Need (2 * blocks * blksz) bytes for files, and 20% for metadata
+_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
+len=$((blocks * blksz))
+
+echo "+ make some files"
+$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/331.out b/tests/xfs/331.out
new file mode 100644 (file)
index 0000000..fed4025
--- /dev/null
@@ -0,0 +1,4 @@
+QA output created by 331
++ create scratch fs
++ mount fs image
++ make some files
diff --git a/tests/xfs/332 b/tests/xfs/332
new file mode 100755 (executable)
index 0000000..e10c53b
--- /dev/null
@@ -0,0 +1,92 @@
+#! /bin/bash
+# FS QA Test No. 332
+#
+# Make sure query_range returns -EINVAL if lowkey > highkey.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/attr
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_xfs_scratch_rmapbt
+_require_command "$XFS_DB_PROG" "xfs_db"
+_require_xfs_io_command "falloc"
+_require_xfs_io_command "fpunch"
+_require_xfs_io_command "fzero"
+_require_xfs_io_command "fcollapse"
+_require_xfs_io_command "finsert"
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz=65536
+blocks=16
+len=$((blocks * blksz))
+
+echo "Create some files"
+$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+
+echo "Manipulate file"
+$XFS_IO_PROG -c "fpunch $blksz $blksz" \
+       -c "fzero $((3 * blksz)) $blksz" \
+       -c "pwrite -S 0x69 $((5 * blksz)) $blksz" \
+       -c "fpunch $((7 * blksz)) $blksz" \
+       -c "fsync" \
+       -c "pwrite -S 0x70 $((7 * blksz)) $blksz" \
+       -c "fcollapse $((9 * blksz)) $blksz" \
+       -c "finsert $((10 * blksz)) $blksz" $SCRATCH_MNT/f1 >> $seqres.full
+
+echo "Check file"
+md5sum $SCRATCH_MNT/f1 | _filter_scratch
+od -tx1 -Ad -c $SCRATCH_MNT/f1 >> $seqres.full
+
+echo "Unmount"
+_scratch_unmount
+
+echo "Try a regular fsmap"
+_scratch_xfs_db -c 'fsmap' >> $seqres.full
+_scratch_xfs_db -c 'fsmap 0 5' >> $seqres.full
+
+echo "Try a bad fsmap"
+_scratch_xfs_db -c 'fsmap 5 4'
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/332.out b/tests/xfs/332.out
new file mode 100644 (file)
index 0000000..9beff7c
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 332
+Format and mount
+Create some files
+Manipulate file
+Check file
+e45c5707fcf6817e914ffb6ce37a0ac7  SCRATCH_MNT/f1
+Unmount
+Try a regular fsmap
+Try a bad fsmap
+Error 22 while querying fsmap btree.
diff --git a/tests/xfs/333 b/tests/xfs/333
new file mode 100755 (executable)
index 0000000..f7f233d
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/bash
+# FS QA Test No. 333
+#
+# Set rrmapino to another inode on an non-rt rmap fs and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_xfs_scratch_rmapbt
+_disable_dmesg_check
+
+rm -f "$seqres.full"
+
+unset SCRATCH_RTDEV
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+
+echo "Create some files"
+$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
+echo garbage > $SCRATCH_MNT/f3
+ino=$(stat -c '%i' $SCRATCH_MNT/f3)
+_scratch_unmount
+
+echo "Corrupt fs"
+_scratch_xfs_db -x -c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
+_scratch_mount
+
+echo "Check files"
+md5sum $SCRATCH_MNT/f1 2>&1 | _filter_scratch
+
+echo "Try to create more files"
+$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f3 >> $seqres.full 2>&1
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/333.out b/tests/xfs/333.out
new file mode 100644 (file)
index 0000000..bee9bbc
--- /dev/null
@@ -0,0 +1,9 @@
+QA output created by 333
+Format and mount
+Create some files
+Corrupt fs
+Check files
+8f27047948255cb84872e2dd7c0bc56d  SCRATCH_MNT/f1
+Try to create more files
+Repair fs
+Try to create more files (again)
diff --git a/tests/xfs/334 b/tests/xfs/334
new file mode 100755 (executable)
index 0000000..1eb1e38
--- /dev/null
@@ -0,0 +1,67 @@
+#! /bin/bash
+# FS QA Test No. 334
+#
+# Ensure that we can create a few realtime files on a rmapbt filesystem.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+
+echo "Create a few files"
+$XFS_IO_PROG -f -R -c 'pwrite -S 0x67 0 50000' -c fsync $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c 'pwrite -S 0x67 0 50000' -c fsync $SCRATCH_MNT/f2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Grab contents"
+md5sum $SCRATCH_MNT/f1 $SCRATCH_MNT/f2 | _filter_scratch
+
+echo "Remove one file"
+rm -rf $SCRATCH_MNT/f2
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/334.out b/tests/xfs/334.out
new file mode 100644 (file)
index 0000000..fea41f9
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 334
+Format and mount
+Create a few files
+Grab contents
+10abe2628d19eb1c2ebe18aad7b14820  SCRATCH_MNT/f1
+10abe2628d19eb1c2ebe18aad7b14820  SCRATCH_MNT/f2
+Remove one file
diff --git a/tests/xfs/335 b/tests/xfs/335
new file mode 100755 (executable)
index 0000000..5e48f59
--- /dev/null
@@ -0,0 +1,89 @@
+#! /bin/bash
+# FS QA Test No. 335
+#
+# Exercise expanding and shrinking the realtime rmap btree.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_test_program "punch-alternating"
+_require_xfs_io_command "falloc"
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+echo "Create a three-level rtrmapbt"
+# inode core size is at least 176 bytes; btree header is 56 bytes;
+# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+i_ptrs=$(( (isize - 176) / 56 ))
+bt_ptrs=$(( (blksz - 56) / 56 ))
+bt_recs=$(( (blksz - 56) / 32 ))
+
+blocks=$((i_ptrs * bt_ptrs * bt_recs))
+# Need (2 * blocks * blksz) bytes for files, and 20% more for metadata
+_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
+len=$((blocks * rtextsz))
+
+echo "Create big file"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+
+echo "Explode the rtrmapbt"
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+_scratch_cycle_mount
+
+echo "Remove half the records"
+rm -rf $SCRATCH_MNT/f1
+_scratch_cycle_mount
+
+echo "Remove the rest of the records"
+rm -rf $SCRATCH_MNT/f2
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/335.out b/tests/xfs/335.out
new file mode 100644 (file)
index 0000000..e7bc0b9
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 335
+Format and mount
+Create a three-level rtrmapbt
+Create big file
+Explode the rtrmapbt
+Remove half the records
+Remove the rest of the records
diff --git a/tests/xfs/336 b/tests/xfs/336
new file mode 100755 (executable)
index 0000000..b3b703d
--- /dev/null
@@ -0,0 +1,97 @@
+#! /bin/bash
+# FS QA Test No. 336
+#
+# Exercise metadump on realtime rmapbt preservation.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".* $metadump_file
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_test_program "punch-alternating"
+_require_xfs_io_command "falloc"
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+metadump_file=$TEST_DIR/${seq}_metadump
+rm -rf $metadump_file
+
+echo "Create a three-level rtrmapbt"
+# inode core size is at least 176 bytes; btree header is 56 bytes;
+# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+i_ptrs=$(( (isize - 176) / 56 ))
+bt_ptrs=$(( (blksz - 56) / 56 ))
+bt_recs=$(( (blksz - 56) / 32 ))
+
+blocks=$((i_ptrs * bt_ptrs * bt_recs))
+_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
+len=$((blocks * rtextsz))
+
+echo "Create big file"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+
+echo "Explode the rtrmapbt"
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+_scratch_cycle_mount
+
+echo "Create metadump file"
+_scratch_unmount
+_scratch_metadump $metadump_file
+
+# Now restore the obfuscated one back and take a look around
+echo "Restore metadump"
+xfs_mdrestore $metadump_file $TEST_DIR/image
+SCRATCH_DEV=$TEST_DIR/image _scratch_mount
+SCRATCH_DEV=$TEST_DIR/image _scratch_unmount
+
+echo "Check restored fs"
+_check_scratch_fs $TEST_DIR/image
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/336.out b/tests/xfs/336.out
new file mode 100644 (file)
index 0000000..aa61973
--- /dev/null
@@ -0,0 +1,8 @@
+QA output created by 336
+Format and mount
+Create a three-level rtrmapbt
+Create big file
+Explode the rtrmapbt
+Create metadump file
+Restore metadump
+Check restored fs
diff --git a/tests/xfs/337 b/tests/xfs/337
new file mode 100755 (executable)
index 0000000..96a7be0
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/bash
+# FS QA Test No. 337
+#
+# Corrupt the realtime rmapbt and see how the kernel and xfs_repair deal.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_test_program "punch-alternating"
+_require_xfs_io_command "falloc"
+_disable_dmesg_check
+
+rm -f "$seqres.full"
+
+echo "+ create scratch fs"
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs > "$seqres.full" 2>&1
+
+echo "+ mount fs image"
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+# inode core size is at least 176 bytes; btree header is 56 bytes;
+# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+i_ptrs=$(( (isize - 176) / 56 ))
+bt_ptrs=$(( (blksz - 56) / 56 ))
+bt_recs=$(( (blksz - 56) / 32 ))
+
+blocks=$((i_ptrs * bt_ptrs * bt_recs + 1))
+_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
+len=$((blocks * blksz))
+
+echo "+ make some files"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+_scratch_unmount
+
+echo "+ check fs"
+_scratch_xfs_repair -n >> $seqres.full 2>&1 || echo "xfs_repair should not fail"
+
+echo "+ corrupt image"
+_scratch_xfs_db -x -c "sb" -c "addr rrmapino" -c "addr u3.rtrmapbt.ptrs[1]" \
+       -c "stack" -c "blocktrash -x 4096 -y 4096 -n 8 -3 -z" \
+       >> $seqres.full 2>&1
+
+echo "+ mount image"
+_scratch_mount
+
+echo "+ copy more"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e3 >> $seqres.full 2>&1
+test -s ${SCRATCH_MNT}/f3 && echo "should not be able to copy with busted rtrmap btree"
+_scratch_unmount
+
+echo "+ repair fs"
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "+ mount image (2)"
+_scratch_mount
+
+echo "+ copy more (2)"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/337.out b/tests/xfs/337.out
new file mode 100644 (file)
index 0000000..1ee2db7
--- /dev/null
@@ -0,0 +1,11 @@
+QA output created by 337
++ create scratch fs
++ mount fs image
++ make some files
++ check fs
++ corrupt image
++ mount image
++ copy more
++ repair fs
++ mount image (2)
++ copy more (2)
diff --git a/tests/xfs/338 b/tests/xfs/338
new file mode 100755 (executable)
index 0000000..755510c
--- /dev/null
@@ -0,0 +1,75 @@
+#! /bin/bash
+# FS QA Test No. 338
+#
+# Set rrmapino to zero on an rtrmap fs and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
+_scratch_unmount
+
+echo "Corrupt fs"
+_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
+       -c 'write core.nlinkv2 0' -c 'write core.mode 0' -c 'sb 0' \
+       -c 'write rrmapino 0' >> $seqres.full
+_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/338.out b/tests/xfs/338.out
new file mode 100644 (file)
index 0000000..751d87b
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 338
+Format and mount
+Create some files
+Corrupt fs
+Repair fs
+umount: SCRATCH_DEV: not mounted
+Try to create more files (again)
diff --git a/tests/xfs/339 b/tests/xfs/339
new file mode 100755 (executable)
index 0000000..734d47b
--- /dev/null
@@ -0,0 +1,83 @@
+#! /bin/bash
+# FS QA Test No. 339
+#
+# Link rrmapino into the rootdir on an rtrmap fs and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
+echo garbage > $SCRATCH_MNT/f3
+ln $SCRATCH_MNT/f3 $SCRATCH_MNT/f4
+_scratch_unmount
+
+echo "Corrupt fs"
+rrmapino=$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' | awk '{print $3}')
+_scratch_xfs_db -x -c 'sb 0' -c 'addr rootino' \
+       -c "write u3.sfdir3.list[3].inumber.i4 $rrmapino" >> $seqres.full
+_scratch_mount
+
+echo "Check files"
+md5sum $SCRATCH_MNT/f1 2>&1 | _filter_scratch
+
+echo "Try to create more files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/339.out b/tests/xfs/339.out
new file mode 100644 (file)
index 0000000..7b0a775
--- /dev/null
@@ -0,0 +1,9 @@
+QA output created by 339
+Format and mount
+Create some files
+Corrupt fs
+Check files
+8f27047948255cb84872e2dd7c0bc56d  SCRATCH_MNT/f1
+Try to create more files
+Repair fs
+Try to create more files (again)
diff --git a/tests/xfs/340 b/tests/xfs/340
new file mode 100755 (executable)
index 0000000..8cc50a2
--- /dev/null
@@ -0,0 +1,80 @@
+#! /bin/bash
+# FS QA Test No. 340
+#
+# Set rrmapino to another inode on an rtrmap fs and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
+echo garbage > $SCRATCH_MNT/f3
+ino=$(stat -c '%i' $SCRATCH_MNT/f3)
+_scratch_unmount
+
+echo "Corrupt fs"
+rrmapino=$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' | awk '{print $3}')
+_scratch_xfs_db -x -c "inode $rrmapino" \
+       -c 'write core.format 2' -c 'write core.size 0' \
+       -c 'write core.nblocks 0' -c 'sb 0' -c 'addr rootino' \
+       -c "write u3.sfdir3.list[2].inumber.i4 $rrmapino" \
+       -c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
+_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/340.out b/tests/xfs/340.out
new file mode 100644 (file)
index 0000000..2f1e411
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 340
+Format and mount
+Create some files
+Corrupt fs
+Repair fs
+umount: SCRATCH_DEV: not mounted
+Try to create more files (again)
diff --git a/tests/xfs/341 b/tests/xfs/341
new file mode 100755 (executable)
index 0000000..8a47b77
--- /dev/null
@@ -0,0 +1,98 @@
+#! /bin/bash
+# FS QA Test No. 341
+#
+# Cross-link file block into rtrmapbt and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_test_program "punch-alternating"
+_disable_dmesg_check
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+# inode core size is at least 176 bytes; btree header is 56 bytes;
+# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+i_ptrs=$(( (isize - 176) / 56 ))
+bt_recs=$(( (blksz - 56) / 32 ))
+
+blocks=$((i_ptrs * bt_recs + 1))
+len=$((blocks * rtextsz))
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+echo garbage > $SCRATCH_MNT/f3
+ino=$(stat -c '%i' $SCRATCH_MNT/f3)
+_scratch_unmount
+
+echo "Corrupt fs"
+fsbno=$(_scratch_xfs_db -c "inode $ino" -c 'bmap' | \
+       sed -e 's/^.*startblock \([0-9]*\) .*$/\1/g')
+
+_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
+       -c "write u3.rtrmapbt.ptrs[1] $fsbno" -c 'p' >> $seqres.full
+_scratch_mount
+
+echo "Try to create more files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
+test -e $SCRATCH_MNT/f5 && echo "should not have been able to write f5"
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/341.out b/tests/xfs/341.out
new file mode 100644 (file)
index 0000000..75a5bc6
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 341
+Format and mount
+Create some files
+Corrupt fs
+Try to create more files
+Repair fs
+Try to create more files (again)
diff --git a/tests/xfs/342 b/tests/xfs/342
new file mode 100755 (executable)
index 0000000..e0d2f33
--- /dev/null
@@ -0,0 +1,99 @@
+#! /bin/bash
+# FS QA Test No. 342
+#
+# Cross-link rtrmapbt block into a file and see if repair fixes it.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_test_program "punch-alternating"
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+. $tmp.mkfs
+cat $tmp.mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz="$(get_block_size $SCRATCH_MNT)"
+
+# inode core size is at least 176 bytes; btree header is 56 bytes;
+# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
+i_ptrs=$(( (isize - 176) / 56 ))
+bt_recs=$(( (blksz - 56) / 32 ))
+
+blocks=$((i_ptrs * bt_recs + 1))
+len=$((blocks * rtextsz))
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
+./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
+./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
+echo garbage > $SCRATCH_MNT/f3
+ino=$(stat -c '%i' $SCRATCH_MNT/f3)
+_scratch_unmount
+
+echo "Corrupt fs"
+_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' -c 'p u3.rtrmapbt.ptrs[1]' >> $seqres.full
+
+fsbno=$(_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' \
+       -c 'p u3.rtrmapbt.ptrs[1]' | sed -e 's/^.*://g')
+_scratch_xfs_db -x -c "inode $ino" -c "write u3.bmx[0].startblock $fsbno" >> $seqres.full
+_scratch_mount
+
+od -tx1 -Ad -c $SCRATCH_MNT/f3 >> $seqres.full
+
+echo "Try to create more files"
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
+test ! -e $SCRATCH_MNT/f5 && echo "should have been able to write f5"
+
+echo "Repair fs"
+_scratch_unmount 2>&1 | _filter_scratch
+_repair_scratch_fs >> $seqres.full 2>&1
+
+echo "Try to create more files (again)"
+_scratch_mount
+$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/342.out b/tests/xfs/342.out
new file mode 100644 (file)
index 0000000..340ab9d
--- /dev/null
@@ -0,0 +1,7 @@
+QA output created by 342
+Format and mount
+Create some files
+Corrupt fs
+Try to create more files
+Repair fs
+Try to create more files (again)
diff --git a/tests/xfs/343 b/tests/xfs/343
new file mode 100755 (executable)
index 0000000..19b3c8c
--- /dev/null
@@ -0,0 +1,81 @@
+#! /bin/bash
+# FS QA Test No. 343
+#
+# Basic rmap manipulation tests for realtime files.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename "$0"`
+seqres="$RESULT_DIR/$seq"
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf "$tmp".*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_realtime
+_require_xfs_scratch_rmapbt
+_require_xfs_io_command "falloc"
+_require_xfs_io_command "fpunch"
+_require_xfs_io_command "fzero"
+_require_xfs_io_command "fcollapse"
+_require_xfs_io_command "finsert"
+
+rm -f "$seqres.full"
+
+echo "Format and mount"
+_scratch_mkfs > "$seqres.full" 2>&1
+_scratch_mount
+blksz=65536
+blocks=16
+len=$((blocks * blksz))
+
+echo "Create some files"
+$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
+
+echo "Manipulate file"
+$XFS_IO_PROG -c "fpunch $blksz $blksz" \
+       -c "fzero $((3 * blksz)) $blksz" \
+       -c "pwrite -S 0x69 $((5 * blksz)) $blksz" \
+       -c "fpunch $((7 * blksz)) $blksz" \
+       -c "fsync" \
+       -c "pwrite -S 0x70 $((7 * blksz)) $blksz" \
+       -c "fcollapse $((9 * blksz)) $blksz" \
+       -c "finsert $((10 * blksz)) $blksz" $SCRATCH_MNT/f1 >> $seqres.full
+
+echo "Check file"
+md5sum $SCRATCH_MNT/f1 | _filter_scratch
+od -tx1 -Ad -c $SCRATCH_MNT/f1 >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/343.out b/tests/xfs/343.out
new file mode 100644 (file)
index 0000000..b26afd5
--- /dev/null
@@ -0,0 +1,6 @@
+QA output created by 343
+Format and mount
+Create some files
+Manipulate file
+Check file
+e45c5707fcf6817e914ffb6ce37a0ac7  SCRATCH_MNT/f1
diff --git a/tests/xfs/344 b/tests/xfs/344
new file mode 100755 (executable)
index 0000000..25bff1a
--- /dev/null
@@ -0,0 +1,104 @@
+#! /bin/bash
+# FS QA Test No. 344
+#
+# Test fragmentation after a lot of random CoW:
+# - Create two reflinked files.  Set zero extsz hint on second file.
+# - Directio write to random offsets to scatter CoW reservations.
+# - falloc the whole file to unshare blocks.
+# - Check the number of extents.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_scratch_reflink
+_require_cp_reflink
+_require_fiemap
+_require_xfs_io_command "cowextsize"
+_require_odirect
+
+rm -f $seqres.full
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+
+blksz=65536
+nr=128
+filesize=$((blksz * nr))
+bufnr=16
+bufsize=$((blksz * bufnr))
+
+_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
+real_blksz=$(get_block_size $testdir)
+internal_blks=$((filesize / real_blksz))
+
+echo "Create the original files"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
+$XFS_IO_PROG -f -c "cowextsize $real_blksz" $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+
+echo "CoW and unmount"
+$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -d -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+
+echo "Check extent counts"
+old_extents=$(_count_extents $testdir/file1)
+new_extents=$(_count_extents $testdir/file2)
+
+echo "old extents: $old_extents" >> $seqres.full
+echo "new extents: $new_extents" >> $seqres.full
+echo "maximum extents: $internal_blks" >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/344.out b/tests/xfs/344.out
new file mode 100644 (file)
index 0000000..50fffc9
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 344
+Format and mount
+Create the original files
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-344/file1
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-344/file2
+CoW and unmount
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-344/file1
+Check extent counts
diff --git a/tests/xfs/345 b/tests/xfs/345
new file mode 100755 (executable)
index 0000000..edb4443
--- /dev/null
@@ -0,0 +1,102 @@
+#! /bin/bash
+# FS QA Test No. 345
+#
+# Test fragmentation after a lot of random CoW:
+# - Create two reflinked files.  Set zero extsz hint on second file.
+# - Buffered write to random offsets to scatter CoW reservations.
+# - Check the number of extents.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_scratch_reflink
+_require_cp_reflink
+_require_fiemap
+_require_xfs_io_command "cowextsize"
+
+rm -f $seqres.full
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+
+blksz=65536
+nr=128
+filesize=$((blksz * nr))
+bufnr=16
+bufsize=$((blksz * bufnr))
+
+_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
+real_blksz=$(get_block_size $testdir)
+internal_blks=$((filesize / real_blksz))
+
+echo "Create the original files"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
+$XFS_IO_PROG -f -c "cowextsize $real_blksz" $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+
+echo "CoW and unmount"
+$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
+$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+
+echo "Check extent counts"
+old_extents=$(_count_extents $testdir/file1)
+new_extents=$(_count_extents $testdir/file2)
+
+echo "old extents: $old_extents" >> $seqres.full
+echo "new extents: $new_extents" >> $seqres.full
+echo "maximum extents: $internal_blks" >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/345.out b/tests/xfs/345.out
new file mode 100644 (file)
index 0000000..ebb90b4
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 345
+Format and mount
+Create the original files
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-345/file1
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-345/file2
+CoW and unmount
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-345/file1
+Check extent counts
diff --git a/tests/xfs/346 b/tests/xfs/346
new file mode 100755 (executable)
index 0000000..d0463eb
--- /dev/null
@@ -0,0 +1,107 @@
+#! /bin/bash
+# FS QA Test No. 346
+#
+# Test fragmentation after writing and dropping CoW extent hint reservation:
+# - Create two reflinked files.  Set extsz hint on second file.
+# - Directio write to random offsets to scatter CoW reservations.
+# - Unmount, remount, repeat (twice more).
+# - Check the number of extents.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_scratch_reflink
+_require_cp_reflink
+_require_fiemap
+_require_xfs_io_command "cowextsize"
+_require_odirect
+
+rm -f $seqres.full
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+
+blksz=65536
+nr=128
+filesize=$((blksz * nr))
+bufnr=8
+bufsize=$((blksz * bufnr))
+
+_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
+real_blksz=$(get_block_size $testdir)
+internal_blks=$((filesize / real_blksz))
+
+echo "Create the original files"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
+$XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+
+echo "CoW and unmount"
+$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
+seq 1 10 | while read i; do
+       $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
+       _scratch_cycle_mount
+done
+$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+
+echo "Check extent counts"
+old_extents=$(_count_extents $testdir/file1)
+new_extents=$(_count_extents $testdir/file2)
+
+echo "old extents: $old_extents" >> $seqres.full
+echo "new extents: $new_extents" >> $seqres.full
+echo "maximum extents: $internal_blks" >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/346.out b/tests/xfs/346.out
new file mode 100644 (file)
index 0000000..17d2c4e
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 346
+Format and mount
+Create the original files
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-346/file1
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-346/file2
+CoW and unmount
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-346/file1
+Check extent counts
diff --git a/tests/xfs/347 b/tests/xfs/347
new file mode 100755 (executable)
index 0000000..1578216
--- /dev/null
@@ -0,0 +1,106 @@
+#! /bin/bash
+# FS QA Test No. 347
+#
+# Test fragmentation after writing and dropping CoW extent hint reservation:
+# - Create two reflinked files.  Set extsz hint on second file.
+# - Buffered write to random offsets to scatter CoW reservations.
+# - Unmount, remount, repeat (twice more).
+# - Check the number of extents.
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2016, Oracle and/or its affiliates.  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
+#-----------------------------------------------------------------------
+
+seq=`basename $0`
+seqres=$RESULT_DIR/$seq
+echo "QA output created by $seq"
+
+here=`pwd`
+tmp=/tmp/$$
+status=1    # failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+       cd /
+       rm -rf $tmp.*
+}
+
+# get standard environment, filters and checks
+. ./common/rc
+. ./common/filter
+. ./common/reflink
+
+# real QA test starts here
+_supported_os Linux
+_supported_fs xfs
+_require_scratch_reflink
+_require_cp_reflink
+_require_fiemap
+_require_xfs_io_command "cowextsize"
+
+rm -f $seqres.full
+
+echo "Format and mount"
+_scratch_mkfs > $seqres.full 2>&1
+_scratch_mount >> $seqres.full 2>&1
+
+testdir=$SCRATCH_MNT/test-$seq
+mkdir $testdir
+
+blksz=65536
+nr=128
+filesize=$((blksz * nr))
+bufnr=8
+bufsize=$((blksz * bufnr))
+
+_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
+real_blksz=$(get_block_size $testdir)
+internal_blks=$((filesize / real_blksz))
+
+echo "Create the original files"
+$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
+$XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
+_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+md5sum $testdir/file2 | _filter_scratch
+
+echo "CoW and unmount"
+$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
+seq 1 10 | while read i; do
+       $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
+       _scratch_cycle_mount
+done
+$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
+_scratch_cycle_mount
+
+echo "Compare files"
+md5sum $testdir/file1 | _filter_scratch
+
+echo "Check extent counts"
+old_extents=$(_count_extents $testdir/file1)
+new_extents=$(_count_extents $testdir/file2)
+
+echo "old extents: $old_extents" >> $seqres.full
+echo "new extents: $new_extents" >> $seqres.full
+echo "maximum extents: $internal_blks" >> $seqres.full
+
+# success, all done
+status=0
+exit
diff --git a/tests/xfs/347.out b/tests/xfs/347.out
new file mode 100644 (file)
index 0000000..08c1e0e
--- /dev/null
@@ -0,0 +1,10 @@
+QA output created by 347
+Format and mount
+Create the original files
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-347/file1
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-347/file2
+CoW and unmount
+Compare files
+2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-347/file1
+Check extent counts
diff --git a/tests/xfs/876 b/tests/xfs/876
deleted file mode 100755 (executable)
index dae3f3a..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 876
-#
-# Create a big enough rmapbt that we tickle a fdblocks accounting bug.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_scratch
-_require_xfs_scratch_rmapbt
-_require_scratch_reflink
-_require_test_program "punch-alternating"
-
-rm -f "$seqres.full"
-
-echo "+ create scratch fs"
-_scratch_mkfs > "$seqres.full" 2>&1
-
-echo "+ mount fs image"
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-# btree header is 56 bytes; an rmapbt record is 24 bytes; and
-# a rmapbt key/pointer pair is 44 bytes.
-bt_ptrs=$(( (blksz - 56) / 44 ))
-bt_recs=$(( (blksz - 56) / 24 ))
-
-blocks=$((bt_ptrs * bt_recs + 1))
-# Need (2 * blocks * blksz) bytes for files, and 20% for metadata
-_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
-len=$((blocks * blksz))
-
-echo "+ make some files"
-$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/876.out b/tests/xfs/876.out
deleted file mode 100644 (file)
index 96c1970..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-QA output created by 876
-+ create scratch fs
-+ mount fs image
-+ make some files
diff --git a/tests/xfs/877 b/tests/xfs/877
deleted file mode 100755 (executable)
index 04fdb4c..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 877
-#
-# Make sure query_range returns -EINVAL if lowkey > highkey.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/attr
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_xfs_scratch_rmapbt
-_require_command "$XFS_DB_PROG" "xfs_db"
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
-_require_xfs_io_command "fzero"
-_require_xfs_io_command "fcollapse"
-_require_xfs_io_command "finsert"
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz=65536
-blocks=16
-len=$((blocks * blksz))
-
-echo "Create some files"
-$XFS_IO_PROG -f -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-
-echo "Manipulate file"
-$XFS_IO_PROG -c "fpunch $blksz $blksz" \
-       -c "fzero $((3 * blksz)) $blksz" \
-       -c "pwrite -S 0x69 $((5 * blksz)) $blksz" \
-       -c "fpunch $((7 * blksz)) $blksz" \
-       -c "fsync" \
-       -c "pwrite -S 0x70 $((7 * blksz)) $blksz" \
-       -c "fcollapse $((9 * blksz)) $blksz" \
-       -c "finsert $((10 * blksz)) $blksz" $SCRATCH_MNT/f1 >> $seqres.full
-
-echo "Check file"
-md5sum $SCRATCH_MNT/f1 | _filter_scratch
-od -tx1 -Ad -c $SCRATCH_MNT/f1 >> $seqres.full
-
-echo "Unmount"
-_scratch_unmount
-
-echo "Try a regular fsmap"
-_scratch_xfs_db -c 'fsmap' >> $seqres.full
-_scratch_xfs_db -c 'fsmap 0 5' >> $seqres.full
-
-echo "Try a bad fsmap"
-_scratch_xfs_db -c 'fsmap 5 4'
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/877.out b/tests/xfs/877.out
deleted file mode 100644 (file)
index 4a2242f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 877
-Format and mount
-Create some files
-Manipulate file
-Check file
-e45c5707fcf6817e914ffb6ce37a0ac7  SCRATCH_MNT/f1
-Unmount
-Try a regular fsmap
-Try a bad fsmap
-Error 22 while querying fsmap btree.
diff --git a/tests/xfs/878 b/tests/xfs/878
deleted file mode 100755 (executable)
index c9ec8c6..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 878
-#
-# Set rrmapino to another inode on an non-rt rmap fs and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_xfs_scratch_rmapbt
-_disable_dmesg_check
-
-rm -f "$seqres.full"
-
-unset SCRATCH_RTDEV
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-
-echo "Create some files"
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
-echo garbage > $SCRATCH_MNT/f3
-ino=$(stat -c '%i' $SCRATCH_MNT/f3)
-_scratch_unmount
-
-echo "Corrupt fs"
-_scratch_xfs_db -x -c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
-_scratch_mount
-
-echo "Check files"
-md5sum $SCRATCH_MNT/f1 2>&1 | _filter_scratch
-
-echo "Try to create more files"
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f3 >> $seqres.full 2>&1
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/878.out b/tests/xfs/878.out
deleted file mode 100644 (file)
index e134506..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-QA output created by 878
-Format and mount
-Create some files
-Corrupt fs
-Check files
-8f27047948255cb84872e2dd7c0bc56d  SCRATCH_MNT/f1
-Try to create more files
-Repair fs
-Try to create more files (again)
diff --git a/tests/xfs/879 b/tests/xfs/879
deleted file mode 100755 (executable)
index 247b3af..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 879
-#
-# Ensure that we can create a few realtime files on a rmapbt filesystem.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-
-echo "Create a few files"
-$XFS_IO_PROG -f -R -c 'pwrite -S 0x67 0 50000' -c fsync $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c 'pwrite -S 0x67 0 50000' -c fsync $SCRATCH_MNT/f2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Grab contents"
-md5sum $SCRATCH_MNT/f1 $SCRATCH_MNT/f2 | _filter_scratch
-
-echo "Remove one file"
-rm -rf $SCRATCH_MNT/f2
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/879.out b/tests/xfs/879.out
deleted file mode 100644 (file)
index 9dfe48b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 879
-Format and mount
-Create a few files
-Grab contents
-10abe2628d19eb1c2ebe18aad7b14820  SCRATCH_MNT/f1
-10abe2628d19eb1c2ebe18aad7b14820  SCRATCH_MNT/f2
-Remove one file
diff --git a/tests/xfs/880 b/tests/xfs/880
deleted file mode 100755 (executable)
index 7c3879e..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 880
-#
-# Exercise expanding and shrinking the realtime rmap btree.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_test_program "punch-alternating"
-_require_xfs_io_command "falloc"
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
-. $tmp.mkfs
-cat $tmp.mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-echo "Create a three-level rtrmapbt"
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
-i_ptrs=$(( (isize - 176) / 56 ))
-bt_ptrs=$(( (blksz - 56) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
-
-blocks=$((i_ptrs * bt_ptrs * bt_recs))
-# Need (2 * blocks * blksz) bytes for files, and 20% more for metadata
-_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
-len=$((blocks * rtextsz))
-
-echo "Create big file"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-
-echo "Explode the rtrmapbt"
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-_scratch_cycle_mount
-
-echo "Remove half the records"
-rm -rf $SCRATCH_MNT/f1
-_scratch_cycle_mount
-
-echo "Remove the rest of the records"
-rm -rf $SCRATCH_MNT/f2
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/880.out b/tests/xfs/880.out
deleted file mode 100644 (file)
index b87665b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 880
-Format and mount
-Create a three-level rtrmapbt
-Create big file
-Explode the rtrmapbt
-Remove half the records
-Remove the rest of the records
diff --git a/tests/xfs/881 b/tests/xfs/881
deleted file mode 100755 (executable)
index 437895c..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 881
-#
-# Exercise metadump on realtime rmapbt preservation.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".* $metadump_file
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_test_program "punch-alternating"
-_require_xfs_io_command "falloc"
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
-. $tmp.mkfs
-cat $tmp.mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-metadump_file=$TEST_DIR/${seq}_metadump
-rm -rf $metadump_file
-
-echo "Create a three-level rtrmapbt"
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
-i_ptrs=$(( (isize - 176) / 56 ))
-bt_ptrs=$(( (blksz - 56) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
-
-blocks=$((i_ptrs * bt_ptrs * bt_recs))
-_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
-len=$((blocks * rtextsz))
-
-echo "Create big file"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-
-echo "Explode the rtrmapbt"
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-_scratch_cycle_mount
-
-echo "Create metadump file"
-_scratch_unmount
-_scratch_metadump $metadump_file
-
-# Now restore the obfuscated one back and take a look around
-echo "Restore metadump"
-xfs_mdrestore $metadump_file $TEST_DIR/image
-SCRATCH_DEV=$TEST_DIR/image _scratch_mount
-SCRATCH_DEV=$TEST_DIR/image _scratch_unmount
-
-echo "Check restored fs"
-_check_scratch_fs $TEST_DIR/image
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/881.out b/tests/xfs/881.out
deleted file mode 100644 (file)
index 6ad156c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-QA output created by 881
-Format and mount
-Create a three-level rtrmapbt
-Create big file
-Explode the rtrmapbt
-Create metadump file
-Restore metadump
-Check restored fs
diff --git a/tests/xfs/882 b/tests/xfs/882
deleted file mode 100755 (executable)
index 17bd4f0..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 882
-#
-# Corrupt the realtime rmapbt and see how the kernel and xfs_repair deal.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_test_program "punch-alternating"
-_require_xfs_io_command "falloc"
-_disable_dmesg_check
-
-rm -f "$seqres.full"
-
-echo "+ create scratch fs"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
-. $tmp.mkfs
-cat $tmp.mkfs > "$seqres.full" 2>&1
-
-echo "+ mount fs image"
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
-i_ptrs=$(( (isize - 176) / 56 ))
-bt_ptrs=$(( (blksz - 56) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
-
-blocks=$((i_ptrs * bt_ptrs * bt_recs + 1))
-_require_fs_space $SCRATCH_MNT $(( (2 * blocks * blksz) * 5 / 4096 ))
-len=$((blocks * blksz))
-
-echo "+ make some files"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-_scratch_unmount
-
-echo "+ check fs"
-_scratch_xfs_repair -n >> $seqres.full 2>&1 || echo "xfs_repair should not fail"
-
-echo "+ corrupt image"
-_scratch_xfs_db -x -c "sb" -c "addr rrmapino" -c "addr u3.rtrmapbt.ptrs[1]" \
-       -c "stack" -c "blocktrash -x 4096 -y 4096 -n 8 -3 -z" \
-       >> $seqres.full 2>&1
-
-echo "+ mount image"
-_scratch_mount
-
-echo "+ copy more"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e3 >> $seqres.full 2>&1
-test -s ${SCRATCH_MNT}/f3 && echo "should not be able to copy with busted rtrmap btree"
-_scratch_unmount
-
-echo "+ repair fs"
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "+ mount image (2)"
-_scratch_mount
-
-echo "+ copy more (2)"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 1" $SCRATCH_MNT/e4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/882.out b/tests/xfs/882.out
deleted file mode 100644 (file)
index 5ebe620..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-QA output created by 882
-+ create scratch fs
-+ mount fs image
-+ make some files
-+ check fs
-+ corrupt image
-+ mount image
-+ copy more
-+ repair fs
-+ mount image (2)
-+ copy more (2)
diff --git a/tests/xfs/883 b/tests/xfs/883
deleted file mode 100755 (executable)
index 8b20b2b..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 883
-#
-# Set rrmapino to zero on an rtrmap fs and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
-_scratch_unmount
-
-echo "Corrupt fs"
-_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
-       -c 'write core.nlinkv2 0' -c 'write core.mode 0' -c 'sb 0' \
-       -c 'write rrmapino 0' >> $seqres.full
-_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/883.out b/tests/xfs/883.out
deleted file mode 100644 (file)
index ac5117f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 883
-Format and mount
-Create some files
-Corrupt fs
-Repair fs
-umount: SCRATCH_DEV: not mounted
-Try to create more files (again)
diff --git a/tests/xfs/884 b/tests/xfs/884
deleted file mode 100755 (executable)
index 3097fa0..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 884
-#
-# Link rrmapino into the rootdir on an rtrmap fs and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
-echo garbage > $SCRATCH_MNT/f3
-ln $SCRATCH_MNT/f3 $SCRATCH_MNT/f4
-_scratch_unmount
-
-echo "Corrupt fs"
-rrmapino=$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' | awk '{print $3}')
-_scratch_xfs_db -x -c 'sb 0' -c 'addr rootino' \
-       -c "write u3.sfdir3.list[3].inumber.i4 $rrmapino" >> $seqres.full
-_scratch_mount
-
-echo "Check files"
-md5sum $SCRATCH_MNT/f1 2>&1 | _filter_scratch
-
-echo "Try to create more files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/884.out b/tests/xfs/884.out
deleted file mode 100644 (file)
index 17a73ef..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-QA output created by 884
-Format and mount
-Create some files
-Corrupt fs
-Check files
-8f27047948255cb84872e2dd7c0bc56d  SCRATCH_MNT/f1
-Try to create more files
-Repair fs
-Try to create more files (again)
diff --git a/tests/xfs/885 b/tests/xfs/885
deleted file mode 100755 (executable)
index 3e8aba9..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 885
-#
-# Set rrmapino to another inode on an rtrmap fs and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f2 >> $seqres.full
-echo garbage > $SCRATCH_MNT/f3
-ino=$(stat -c '%i' $SCRATCH_MNT/f3)
-_scratch_unmount
-
-echo "Corrupt fs"
-rrmapino=$(_scratch_xfs_db -c 'sb 0' -c 'p rrmapino' | awk '{print $3}')
-_scratch_xfs_db -x -c "inode $rrmapino" \
-       -c 'write core.format 2' -c 'write core.size 0' \
-       -c 'write core.nblocks 0' -c 'sb 0' -c 'addr rootino' \
-       -c "write u3.sfdir3.list[2].inumber.i4 $rrmapino" \
-       -c 'sb 0' -c "write rrmapino $ino" >> $seqres.full
-_scratch_mount >> $seqres.full 2>&1 && echo "mount should have failed"
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/885.out b/tests/xfs/885.out
deleted file mode 100644 (file)
index 8bfd9b3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 885
-Format and mount
-Create some files
-Corrupt fs
-Repair fs
-umount: SCRATCH_DEV: not mounted
-Try to create more files (again)
diff --git a/tests/xfs/886 b/tests/xfs/886
deleted file mode 100755 (executable)
index 59704c7..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 886
-#
-# Cross-link file block into rtrmapbt and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_test_program "punch-alternating"
-_disable_dmesg_check
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
-. $tmp.mkfs
-cat $tmp.mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
-i_ptrs=$(( (isize - 176) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
-
-blocks=$((i_ptrs * bt_recs + 1))
-len=$((blocks * rtextsz))
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-echo garbage > $SCRATCH_MNT/f3
-ino=$(stat -c '%i' $SCRATCH_MNT/f3)
-_scratch_unmount
-
-echo "Corrupt fs"
-fsbno=$(_scratch_xfs_db -c "inode $ino" -c 'bmap' | \
-       sed -e 's/^.*startblock \([0-9]*\) .*$/\1/g')
-
-_scratch_xfs_db -x -c 'sb 0' -c 'addr rrmapino' \
-       -c "write u3.rtrmapbt.ptrs[1] $fsbno" -c 'p' >> $seqres.full
-_scratch_mount
-
-echo "Try to create more files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
-test -e $SCRATCH_MNT/f5 && echo "should not have been able to write f5"
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/886.out b/tests/xfs/886.out
deleted file mode 100644 (file)
index 7f00c5d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 886
-Format and mount
-Create some files
-Corrupt fs
-Try to create more files
-Repair fs
-Try to create more files (again)
diff --git a/tests/xfs/887 b/tests/xfs/887
deleted file mode 100755 (executable)
index 9a14543..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 887
-#
-# Cross-link rtrmapbt block into a file and see if repair fixes it.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_test_program "punch-alternating"
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
-. $tmp.mkfs
-cat $tmp.mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz="$(get_block_size $SCRATCH_MNT)"
-
-# inode core size is at least 176 bytes; btree header is 56 bytes;
-# rtrmap record is 32 bytes; and rtrmap key/pointer are 56 bytes.
-i_ptrs=$(( (isize - 176) / 56 ))
-bt_recs=$(( (blksz - 56) / 32 ))
-
-blocks=$((i_ptrs * bt_recs + 1))
-len=$((blocks * rtextsz))
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f2 >> $seqres.full
-./src/punch-alternating $SCRATCH_MNT/f1 >> "$seqres.full"
-./src/punch-alternating $SCRATCH_MNT/f2 >> "$seqres.full"
-echo garbage > $SCRATCH_MNT/f3
-ino=$(stat -c '%i' $SCRATCH_MNT/f3)
-_scratch_unmount
-
-echo "Corrupt fs"
-_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' -c 'p u3.rtrmapbt.ptrs[1]' >> $seqres.full
-
-fsbno=$(_scratch_xfs_db -c 'sb 0' -c 'addr rrmapino' \
-       -c 'p u3.rtrmapbt.ptrs[1]' | sed -e 's/^.*://g')
-_scratch_xfs_db -x -c "inode $ino" -c "write u3.bmx[0].startblock $fsbno" >> $seqres.full
-_scratch_mount
-
-od -tx1 -Ad -c $SCRATCH_MNT/f3 >> $seqres.full
-
-echo "Try to create more files"
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f5 >> $seqres.full 2>&1
-test ! -e $SCRATCH_MNT/f5 && echo "should have been able to write f5"
-
-echo "Repair fs"
-_scratch_unmount 2>&1 | _filter_scratch
-_repair_scratch_fs >> $seqres.full 2>&1
-
-echo "Try to create more files (again)"
-_scratch_mount
-$XFS_IO_PROG -f -R -c "pwrite -S 0x68 0 9999" $SCRATCH_MNT/f4 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/887.out b/tests/xfs/887.out
deleted file mode 100644 (file)
index 30cf032..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 887
-Format and mount
-Create some files
-Corrupt fs
-Try to create more files
-Repair fs
-Try to create more files (again)
diff --git a/tests/xfs/888 b/tests/xfs/888
deleted file mode 100755 (executable)
index 2441bfd..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 888
-#
-# Basic rmap manipulation tests for realtime files.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf "$tmp".*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_realtime
-_require_xfs_scratch_rmapbt
-_require_xfs_io_command "falloc"
-_require_xfs_io_command "fpunch"
-_require_xfs_io_command "fzero"
-_require_xfs_io_command "fcollapse"
-_require_xfs_io_command "finsert"
-
-rm -f "$seqres.full"
-
-echo "Format and mount"
-_scratch_mkfs > "$seqres.full" 2>&1
-_scratch_mount
-blksz=65536
-blocks=16
-len=$((blocks * blksz))
-
-echo "Create some files"
-$XFS_IO_PROG -f -R -c "falloc 0 $len" -c "pwrite -S 0x68 -b 1048576 0 $len" $SCRATCH_MNT/f1 >> $seqres.full
-
-echo "Manipulate file"
-$XFS_IO_PROG -c "fpunch $blksz $blksz" \
-       -c "fzero $((3 * blksz)) $blksz" \
-       -c "pwrite -S 0x69 $((5 * blksz)) $blksz" \
-       -c "fpunch $((7 * blksz)) $blksz" \
-       -c "fsync" \
-       -c "pwrite -S 0x70 $((7 * blksz)) $blksz" \
-       -c "fcollapse $((9 * blksz)) $blksz" \
-       -c "finsert $((10 * blksz)) $blksz" $SCRATCH_MNT/f1 >> $seqres.full
-
-echo "Check file"
-md5sum $SCRATCH_MNT/f1 | _filter_scratch
-od -tx1 -Ad -c $SCRATCH_MNT/f1 >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/888.out b/tests/xfs/888.out
deleted file mode 100644 (file)
index 2587697..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-QA output created by 888
-Format and mount
-Create some files
-Manipulate file
-Check file
-e45c5707fcf6817e914ffb6ce37a0ac7  SCRATCH_MNT/f1
diff --git a/tests/xfs/897 b/tests/xfs/897
deleted file mode 100755 (executable)
index e7da5c0..0000000
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 897
-#
-# Test fragmentation after a lot of random CoW:
-# - Create two reflinked files.  Set zero extsz hint on second file.
-# - Directio write to random offsets to scatter CoW reservations.
-# - falloc the whole file to unshare blocks.
-# - Check the number of extents.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_scratch_reflink
-_require_cp_reflink
-_require_fiemap
-_require_xfs_io_command "cowextsize"
-_require_odirect
-
-rm -f $seqres.full
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-
-blksz=65536
-nr=128
-filesize=$((blksz * nr))
-bufnr=16
-bufsize=$((blksz * bufnr))
-
-_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
-internal_blks=$((filesize / real_blksz))
-
-echo "Create the original files"
-$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
-$XFS_IO_PROG -f -c "cowextsize $real_blksz" $testdir/file2
-_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-md5sum $testdir/file2 | _filter_scratch
-
-echo "CoW and unmount"
-$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
-$XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
-$XFS_IO_PROG -d -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-
-echo "Check extent counts"
-old_extents=$(_count_extents $testdir/file1)
-new_extents=$(_count_extents $testdir/file2)
-
-echo "old extents: $old_extents" >> $seqres.full
-echo "new extents: $new_extents" >> $seqres.full
-echo "maximum extents: $internal_blks" >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/897.out b/tests/xfs/897.out
deleted file mode 100644 (file)
index b418552..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 897
-Format and mount
-Create the original files
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-897/file1
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-897/file2
-CoW and unmount
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-897/file1
-Check extent counts
diff --git a/tests/xfs/898 b/tests/xfs/898
deleted file mode 100755 (executable)
index aa62ee2..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 898
-#
-# Test fragmentation after a lot of random CoW:
-# - Create two reflinked files.  Set zero extsz hint on second file.
-# - Buffered write to random offsets to scatter CoW reservations.
-# - Check the number of extents.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_scratch_reflink
-_require_cp_reflink
-_require_fiemap
-_require_xfs_io_command "cowextsize"
-
-rm -f $seqres.full
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-
-blksz=65536
-nr=128
-filesize=$((blksz * nr))
-bufnr=16
-bufsize=$((blksz * bufnr))
-
-_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
-internal_blks=$((filesize / real_blksz))
-
-echo "Create the original files"
-$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
-$XFS_IO_PROG -f -c "cowextsize $real_blksz" $testdir/file2
-_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-md5sum $testdir/file2 | _filter_scratch
-
-echo "CoW and unmount"
-$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
-$XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
-$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-
-echo "Check extent counts"
-old_extents=$(_count_extents $testdir/file1)
-new_extents=$(_count_extents $testdir/file2)
-
-echo "old extents: $old_extents" >> $seqres.full
-echo "new extents: $new_extents" >> $seqres.full
-echo "maximum extents: $internal_blks" >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/898.out b/tests/xfs/898.out
deleted file mode 100644 (file)
index e50bb3b..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 898
-Format and mount
-Create the original files
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-898/file1
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-898/file2
-CoW and unmount
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-898/file1
-Check extent counts
diff --git a/tests/xfs/899 b/tests/xfs/899
deleted file mode 100755 (executable)
index 0eea915..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 899
-#
-# Test fragmentation after writing and dropping CoW extent hint reservation:
-# - Create two reflinked files.  Set extsz hint on second file.
-# - Directio write to random offsets to scatter CoW reservations.
-# - Unmount, remount, repeat (twice more).
-# - Check the number of extents.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_scratch_reflink
-_require_cp_reflink
-_require_fiemap
-_require_xfs_io_command "cowextsize"
-_require_odirect
-
-rm -f $seqres.full
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-
-blksz=65536
-nr=128
-filesize=$((blksz * nr))
-bufnr=8
-bufsize=$((blksz * bufnr))
-
-_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
-internal_blks=$((filesize / real_blksz))
-
-echo "Create the original files"
-$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
-$XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
-_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-md5sum $testdir/file2 | _filter_scratch
-
-echo "CoW and unmount"
-$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
-seq 1 10 | while read i; do
-       $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
-       _scratch_cycle_mount
-done
-$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-
-echo "Check extent counts"
-old_extents=$(_count_extents $testdir/file1)
-new_extents=$(_count_extents $testdir/file2)
-
-echo "old extents: $old_extents" >> $seqres.full
-echo "new extents: $new_extents" >> $seqres.full
-echo "maximum extents: $internal_blks" >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/899.out b/tests/xfs/899.out
deleted file mode 100644 (file)
index fd3d7fe..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 899
-Format and mount
-Create the original files
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-899/file1
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-899/file2
-CoW and unmount
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-899/file1
-Check extent counts
diff --git a/tests/xfs/900 b/tests/xfs/900
deleted file mode 100755 (executable)
index 659ca23..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#! /bin/bash
-# FS QA Test No. 900
-#
-# Test fragmentation after writing and dropping CoW extent hint reservation:
-# - Create two reflinked files.  Set extsz hint on second file.
-# - Buffered write to random offsets to scatter CoW reservations.
-# - Unmount, remount, repeat (twice more).
-# - Check the number of extents.
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2016, Oracle and/or its affiliates.  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
-#-----------------------------------------------------------------------
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1    # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
-       cd /
-       rm -rf $tmp.*
-}
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-. ./common/reflink
-
-# real QA test starts here
-_supported_os Linux
-_supported_fs xfs
-_require_scratch_reflink
-_require_cp_reflink
-_require_fiemap
-_require_xfs_io_command "cowextsize"
-
-rm -f $seqres.full
-
-echo "Format and mount"
-_scratch_mkfs > $seqres.full 2>&1
-_scratch_mount >> $seqres.full 2>&1
-
-testdir=$SCRATCH_MNT/test-$seq
-mkdir $testdir
-
-blksz=65536
-nr=128
-filesize=$((blksz * nr))
-bufnr=8
-bufsize=$((blksz * bufnr))
-
-_require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
-real_blksz=$(get_block_size $testdir)
-internal_blks=$((filesize / real_blksz))
-
-echo "Create the original files"
-$XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
-$XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
-_cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-md5sum $testdir/file2 | _filter_scratch
-
-echo "CoW and unmount"
-$XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
-seq 1 10 | while read i; do
-       $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
-       _scratch_cycle_mount
-done
-$XFS_IO_PROG -f -c "falloc -u 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_cycle_mount
-
-echo "Compare files"
-md5sum $testdir/file1 | _filter_scratch
-
-echo "Check extent counts"
-old_extents=$(_count_extents $testdir/file1)
-new_extents=$(_count_extents $testdir/file2)
-
-echo "old extents: $old_extents" >> $seqres.full
-echo "new extents: $new_extents" >> $seqres.full
-echo "maximum extents: $internal_blks" >> $seqres.full
-
-# success, all done
-status=0
-exit
diff --git a/tests/xfs/900.out b/tests/xfs/900.out
deleted file mode 100644 (file)
index 5ebf3e9..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-QA output created by 900
-Format and mount
-Create the original files
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-900/file1
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-900/file2
-CoW and unmount
-Compare files
-2909feb63a37b0e95fe5cfb7f274f7b1  SCRATCH_MNT/test-900/file1
-Check extent counts
index 02e34dc198bca77b03f9520dd0f13416d72330f3..3296eb984cc897fef0f323c5ae156289686c9096 100644 (file)
 328 auto quick clone fsr
 329 auto quick clone fsr
 330 auto quick clone fsr quota
-876 auto quick rmap clone
-877 auto quick rmap clone
-878 auto quick rmap
-879 auto quick rmap
-880 auto rmap
-881 auto rmap
-882 fuzzers rmap
-883 auto quick rmap
-884 auto quick rmap
-885 auto quick rmap
-886 auto quick rmap
-887 auto quick rmap
-888 auto quick rmap
-897 auto quick clone
-898 auto quick clone
-899 auto quick clone
-900 auto quick clone
+331 auto quick rmap clone
+332 auto quick rmap clone
+333 auto quick rmap
+334 auto quick rmap
+335 auto rmap
+336 auto rmap
+337 fuzzers rmap
+338 auto quick rmap
+339 auto quick rmap
+340 auto quick rmap
+341 auto quick rmap
+342 auto quick rmap
+343 auto quick rmap
+344 auto quick clone
+345 auto quick clone
+346 auto quick clone
+347 auto quick clone