diff options
author | Qu Wenruo <wqu@suse.com> | 2024-02-26 14:32:34 +1030 |
---|---|---|
committer | Zorro Lang <zlang@kernel.org> | 2024-03-01 19:22:36 +0800 |
commit | 779ae21a305df5ef7133f26e02aa72d2416262ca (patch) | |
tree | 17b85da9c6d4df4af2ce4be7968f09031de8b3ca | |
parent | 00989655e212ccbbd71847c6c8cd664a38ca3999 (diff) | |
download | xfstests-dev-779ae21a305df5ef7133f26e02aa72d2416262ca.tar.gz |
btrfs: btrfs/224 do not assign snapshot to a subvolume qgroup
For "btrfs subvolume snapshot -i <qgroupid>", we only expect the target
qgroup to be a higher level one.
Assigning a 0 level qgroup to another 0 level qgroup is only going to
cause confusion, and I'm planning to do extra sanity checks both in
kernel and btrfs-progs to reject such behavior.
So change the test case to do regular higher level qgroup assignment
only.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
-rwxr-xr-x | tests/btrfs/224 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/btrfs/224 b/tests/btrfs/224 index de10942fe7..611df3ab42 100755 --- a/tests/btrfs/224 +++ b/tests/btrfs/224 @@ -67,7 +67,7 @@ assign_no_shared_test() _check_scratch_fs } -# Test snapshot with assigning qgroup for submodule +# Test snapshot with assigning qgroup for higher level qgroup snapshot_test() { _scratch_mkfs > /dev/null 2>&1 @@ -78,9 +78,9 @@ snapshot_test() _qgroup_rescan $SCRATCH_MNT >> $seqres.full $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/a >> $seqres.full + $BTRFS_UTIL_PROG qgroup create 1/0 $SCRATCH_MNT >> $seqres.full _ddt of="$SCRATCH_MNT"/a/file1 bs=1M count=1 >> $seqres.full 2>&1 - subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT a) - $BTRFS_UTIL_PROG subvolume snapshot -i 0/$subvolid $SCRATCH_MNT/a $SCRATCH_MNT/b >> $seqres.full + $BTRFS_UTIL_PROG subvolume snapshot -i 1/0 $SCRATCH_MNT/a $SCRATCH_MNT/b >> $seqres.full _scratch_unmount _check_scratch_fs |