btrfs/024: Remove no longer valid test
PATCH 1/3 btrfs/024: Remove no longer valid test
Kernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test.
--- tests/btrfs/024 | 7 ------- 1 file changed, 7 deletions(-)
tests/btrfs/024 +0 -7
@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"
Signature · 1 line
2.17.1
PATCH 2/3 btrfs/173: Adjust compress file check
Following kernel commit "btrfs: add missing check for nocow and compression inode flags" the enforcement of "can't set +c on a +C" file has been moved to the ioctl code. Modify the test to account for this.
--- tests/btrfs/173 | 4 +--- tests/btrfs/173.out | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)
tests/btrfs/173 +1 -3
@@ -48,9 +48,7 @@ swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 echo "Compressed file" rm -f "$SCRATCH_MNT/swap" _format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) -$CHATTR_PROG +c "$SCRATCH_MNT/swap" -swapon "$SCRATCH_MNT/swap" 2>&1 | _filter_scratch -swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 +$CHATTR_PROG +c "$SCRATCH_MNT/swap" 2>&1 | grep -o "Invalid argument while setting flags" status=0 exit
tests/btrfs/173.out +1 -1
@@ -2,4 +2,4 @@ QA output created by 173 COW file swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument Compressed file -swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument +Invalid argument while setting flags
Signature · 1 line
2.17.1
Re: [PATCH 2/3] btrfs/173: Adjust compress file check
Quoted 2 lines · Nikolay Borisov
Following kernel commit "btrfs: add missing check for nocow and compression inode flags"
Can you add this to the test case header.
Otherwise looks good.
Quoted 38 lines
the enforcement of "can't set +c on a +C" file
has been moved to the ioctl code. Modify the test to account for this.Signed-off-by Nikolay Borisov <[email protected]>--- tests/btrfs/173 | 4 +--- tests/btrfs/173.out | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-)tests/btrfs/173 +1
-3@@ -48,9 +48,7 @@ swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 echo "Compressed file" rm -f "$SCRATCH_MNT/swap" _format_swapfile "$SCRATCH_MNT/swap" $(($(get_page_size) * 10)) -$CHATTR_PROG +c "$SCRATCH_MNT/swap" -swapon "$SCRATCH_MNT/swap" 2>&1 | _filter_scratch -swapoff "$SCRATCH_MNT/swap" >/dev/null 2>&1 +$CHATTR_PROG +c "$SCRATCH_MNT/swap" 2>&1 | grep -o "Invalid argument while setting flags"status=0
exittests/btrfs/173.out +1
-1@@ -2,4 +2,4 @@ QA output created by 173 COW file swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument Compressed file -swapon: SCRATCH_MNT/swap: swapon failed: Invalid argument +Invalid argument while setting flags
PATCH 3/3 btrfs/174: Adjust error message when setting compressed flag
In reply to Nikolay BorisovFollowing kernel commit "btrfs: add missing check for nocow and compression inode flags" btrfs refuses setting +c on +C files during validation of the args. Account for this by adjusting the expected error message.
--- tests/btrfs/174 | 2 +- tests/btrfs/174.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tests/btrfs/174 +1 -1
@@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces # Compression we reject outright. echo "Enable compression" -$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Text file busy" +$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Invalid argument while setting flags" $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces echo "Snapshot"
tests/btrfs/174.out +1 -1
@@ -2,7 +2,7 @@ QA output created by 174 Disable nocow SCRATCH_MNT/swapvol/swap No_COW Enable compression -Text file busy +Invalid argument while setting flags SCRATCH_MNT/swapvol/swap No_COW Snapshot Text file busy
Signature · 1 line
2.17.1
Re: [PATCH 3/3] btrfs/174: Adjust error message when setting compressed flag
Quoted 2 lines · Nikolay Borisov
Following kernel commit "btrfs: add missing check for nocow and compression inode flags"
Here too, can you pls add this to the test case header.
Otherwise looks good.
Quoted 36 lines
btrfs refuses setting +c on +C files during
validation of the args. Account for this by adjusting the expected error message.Quoted 1 line
Signed-off-by Nikolay Borisov <[email protected]>--- tests/btrfs/174 | 2 +- tests/btrfs/174.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tests/btrfs/174 +1
-1@@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces # Compression we reject outright. echo "Enable compression" -$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Text file busy" +$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Invalid argument while setting flags" $LSATTR_PROG -l "$swapfile" | _filter_scratch | _filter_spaces echo "Snapshot"tests/btrfs/174.out +1
-1@@ -2,7 +2,7 @@ QA output created by 174 Disable nocow SCRATCH_MNT/swapvol/swap No_COW Enable compression -Text file busy +Invalid argument while setting flags SCRATCH_MNT/swapvol/swap No_COW Snapshot Text file busy
Re: [PATCH 3/3] btrfs/174: Adjust error message when setting compressed flag
In reply to Nikolay BorisovQuoted 4 lines · Nikolay Borisov
Following kernel commit "btrfs: add missing check for nocow and compression inode flags" btrfs refuses setting +c on +C files during validation of the args. Account for this by adjusting the expected error message.
LGTM, so
Quoted 35 lines
Signed-off-by Nikolay Borisov <[email protected]>--- tests/btrfs/174 | 2 +- tests/btrfs/174.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tests/btrfs/174 +0
-0@@ -47,7 +47,7 @@ $LSATTR_PROG -l "$swapfile" | _filter_scratch |
_filter_spaces# Compression we reject outright.
echo "Enable compression"
-$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Text file busy" +$CHATTR_PROG +c "$swapfile" 2>&1 | grep -o "Invalid argument while setting flags"
$LSATTR_PROG -l "$swapfile" |_filter_scratch|_filter_spacesecho "Snapshot"
tests/btrfs/174.out +1
-1@@ -2,7 +2,7 @@ QA output created by 174 Disable nocow SCRATCH_MNT/swapvol/swap No_COW Enable compression -Text file busy +Invalid argument while setting flags SCRATCH_MNT/swapvol/swap No_COW Snapshot Text file busy
Quoted 5 lines · Nikolay Borisov
Kernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test.
Signed-off-by Nikolay Borisov <[email protected]>
This patch is missing the removal of the respective output from 024.out. I'll be sending a fixed up version later.
Quoted 23 lines
--- tests/btrfs/024 | 7 ------- 1 file changed, 7 deletions(-)tests/btrfs/024 +0
-7@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"
PATCH v2 1/1 btrfs/024: Remove no longer valid test
In reply to Nikolay BorisovKernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test.
---
V2:
* Also remove the output
tests/btrfs/024 | 7 ------- tests/btrfs/024.out | 3 --- 2 files changed, 10 deletions(-)
tests/btrfs/024 +0 -7
@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"
tests/btrfs/024.out +0 -3
@@ -1,7 +1,4 @@ QA output created by 024 -*** test nodatacow -wrote 1048576/1048576 bytes at offset 0 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** test compress=no wrote 1048576/1048576 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
--
2.17.1
Quoted 5 lines · Nikolay Borisov
Kernel commit "btrfs: add missing check for nocow and compression inode
flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test
LGTM, so:
Quoted 45 lines
.
Signed-off-by Nikolay Borisov <[email protected]>---
V2:
* Also remove the outputtests/btrfs/024 | 7 ------- tests/btrfs/024.out | 3 --- 2 files changed, 10 deletions(-)tests/btrfs/024 +0
-0@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file |
_filter_xfs_io
}tests/btrfs/024 +0
-7-echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"tests/btrfs/024.out +0
-4@@ -1,7 +1,4 @@ QA output created by 024 -*** test nodatacow -wrote 1048576/1048576 bytes at offset 0 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** test compress=no wrote 1048576/1048576 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --2.17.1
Hi Nikolay,
Quoted 5 lines · Nikolay Borisov
Kernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test.
Signed-off-by Nikolay Borisov <[email protected]>
I applied this patch, but left patch 2 and 3, as Anand suggested minor updates, and I assume you'll send new version of patch 2 and 3 :)
Thanks,
Eryu
Quoted 40 lines
---
V2:
* Also remove the outputtests/btrfs/024 | 7 ------- tests/btrfs/024.out | 3 --- 2 files changed, 10 deletions(-)tests/btrfs/024 +0
-7@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"tests/btrfs/024.out +0
-4@@ -1,7 +1,4 @@ QA output created by 024 -*** test nodatacow -wrote 1048576/1048576 bytes at offset 0 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** test compress=no wrote 1048576/1048576 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --2.17.1
Quoted 11 lines · Eryu Guan
Hi Nikolay,
Quoted 5 lines · Nikolay Borisov
Kernel commit "btrfs: add missing check for nocow and compression inode flags" invalidates the "file compressed, fs mounted with nodatacow" mode due to doing more rigorous flags validation, just remove the test.
Signed-off-by Nikolay Borisov <[email protected]>I applied this patch, but left patch 2 and 3, as Anand suggested minor updates, and I assume you'll send new version of patch 2 and 3 :)
Please merge the patches as is, I don't intend on sending v2.
Quoted 45 lines
Thanks,
EryuQuoted 40 lines
---
V2:
* Also remove the outputtests/btrfs/024 | 7 ------- tests/btrfs/024.out | 3 --- 2 files changed, 10 deletions(-)tests/btrfs/024 +0
-7@@ -42,13 +42,6 @@ __workout() $XFS_IO_PROG -f -c "pwrite 0 1M" -c "fsync" $work_file | _filter_xfs_io } -echo "*** test nodatacow" -_scratch_mkfs > /dev/null 2>&1 -_scratch_mount "-o nodatacow" -__workout -_scratch_unmount -_check_scratch_fs - echo "*** test compress=no" _scratch_mkfs > /dev/null 2>&1 _scratch_mount "-o compress=no"tests/btrfs/024.out +0
-4@@ -1,7 +1,4 @@ QA output created by 024 -*** test nodatacow -wrote 1048576/1048576 bytes at offset 0 -XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) *** test compress=no wrote 1048576/1048576 bytes at offset 0 XXX Bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) --2.17.1