* [PATCH] btrfs/301: test nested squota teardown
@ 2025-08-21 21:59 Boris Burkov
2025-08-21 22:07 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Boris Burkov @ 2025-08-21 21:59 UTC (permalink / raw)
To: linux-btrfs, fstests, kernel-team
---
tests/btrfs/301 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/btrfs/301 b/tests/btrfs/301
index 7f676001..4c0ba119 100755
--- a/tests/btrfs/301
+++ b/tests/btrfs/301
@@ -21,6 +21,8 @@ _require_no_compress
_fixed_by_kernel_commit XXXXXXXXXXXX \
"btrfs: fix iteration bug in __qgroup_excl_accounting()"
+_fixed_by_kernel_commit XXXXXXXXXXXX \
+ "btrfs: fix squota _cmpr stats leak"
subv=$SCRATCH_MNT/subv
nested=$SCRATCH_MNT/subv/nested
@@ -393,6 +395,13 @@ nested_accounting()
check_qgroup_usage 2/100 $(($subv_usage + $nested_usage))
do_enospc_falloc $nested/large_falloc 2G
do_enospc_write $nested/large 2G
+ # ensure we can tear everything down in the nested scenario
+ $BTRFS_UTIL_PROG qgroup limit none 1/100 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG subvolume delete $nested >> $seqres.full
+ $BTRFS_UTIL_PROG subvolume delete $subv >> $seqres.full
+ trigger_cleaner
+ $BTRFS_UTIL_PROG qgroup destroy 1/100 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG qgroup destroy 2/100 $SCRATCH_MNT
_scratch_unmount
}
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs/301: test nested squota teardown
2025-08-21 21:59 [PATCH] btrfs/301: test nested squota teardown Boris Burkov
@ 2025-08-21 22:07 ` Qu Wenruo
2025-08-21 23:35 ` [PATCH v2] " Boris Burkov
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2025-08-21 22:07 UTC (permalink / raw)
To: Boris Burkov, linux-btrfs, fstests, kernel-team
在 2025/8/22 07:29, Boris Burkov 写道:
> ---
Since this is adding a new coverage, some commit message would be
appreciated.
Otherwise looks good to me.
Thanks,
Qu
> tests/btrfs/301 | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tests/btrfs/301 b/tests/btrfs/301
> index 7f676001..4c0ba119 100755
> --- a/tests/btrfs/301
> +++ b/tests/btrfs/301
> @@ -21,6 +21,8 @@ _require_no_compress
>
> _fixed_by_kernel_commit XXXXXXXXXXXX \
> "btrfs: fix iteration bug in __qgroup_excl_accounting()"
> +_fixed_by_kernel_commit XXXXXXXXXXXX \
> + "btrfs: fix squota _cmpr stats leak"
>
> subv=$SCRATCH_MNT/subv
> nested=$SCRATCH_MNT/subv/nested
> @@ -393,6 +395,13 @@ nested_accounting()
> check_qgroup_usage 2/100 $(($subv_usage + $nested_usage))
> do_enospc_falloc $nested/large_falloc 2G
> do_enospc_write $nested/large 2G
> + # ensure we can tear everything down in the nested scenario
> + $BTRFS_UTIL_PROG qgroup limit none 1/100 $SCRATCH_MNT
> + $BTRFS_UTIL_PROG subvolume delete $nested >> $seqres.full
> + $BTRFS_UTIL_PROG subvolume delete $subv >> $seqres.full
> + trigger_cleaner
> + $BTRFS_UTIL_PROG qgroup destroy 1/100 $SCRATCH_MNT
> + $BTRFS_UTIL_PROG qgroup destroy 2/100 $SCRATCH_MNT
> _scratch_unmount
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] btrfs/301: test nested squota teardown
2025-08-21 22:07 ` Qu Wenruo
@ 2025-08-21 23:35 ` Boris Burkov
2025-08-22 0:32 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Boris Burkov @ 2025-08-21 23:35 UTC (permalink / raw)
To: linux-btrfs, fstests, kernel-team
Nested squotas with snapshots is the most complicated case, so add some
extra checks to it. Specifically, ensure that full tear down of the
subvols and parent qgroups works properly.
Signed-off-by: Boris Burkov <boris@bur.io>
---
tests/btrfs/301 | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/btrfs/301 b/tests/btrfs/301
index 7f676001..4c0ba119 100755
--- a/tests/btrfs/301
+++ b/tests/btrfs/301
@@ -21,6 +21,8 @@ _require_no_compress
_fixed_by_kernel_commit XXXXXXXXXXXX \
"btrfs: fix iteration bug in __qgroup_excl_accounting()"
+_fixed_by_kernel_commit XXXXXXXXXXXX \
+ "btrfs: fix squota _cmpr stats leak"
subv=$SCRATCH_MNT/subv
nested=$SCRATCH_MNT/subv/nested
@@ -393,6 +395,13 @@ nested_accounting()
check_qgroup_usage 2/100 $(($subv_usage + $nested_usage))
do_enospc_falloc $nested/large_falloc 2G
do_enospc_write $nested/large 2G
+ # ensure we can tear everything down in the nested scenario
+ $BTRFS_UTIL_PROG qgroup limit none 1/100 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG subvolume delete $nested >> $seqres.full
+ $BTRFS_UTIL_PROG subvolume delete $subv >> $seqres.full
+ trigger_cleaner
+ $BTRFS_UTIL_PROG qgroup destroy 1/100 $SCRATCH_MNT
+ $BTRFS_UTIL_PROG qgroup destroy 2/100 $SCRATCH_MNT
_scratch_unmount
}
--
2.50.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] btrfs/301: test nested squota teardown
2025-08-21 23:35 ` [PATCH v2] " Boris Burkov
@ 2025-08-22 0:32 ` Qu Wenruo
0 siblings, 0 replies; 4+ messages in thread
From: Qu Wenruo @ 2025-08-22 0:32 UTC (permalink / raw)
To: Boris Burkov, linux-btrfs, fstests, kernel-team
在 2025/8/22 09:05, Boris Burkov 写道:
> Nested squotas with snapshots is the most complicated case, so add some
> extra checks to it. Specifically, ensure that full tear down of the
> subvols and parent qgroups works properly.
>
> Signed-off-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> tests/btrfs/301 | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/tests/btrfs/301 b/tests/btrfs/301
> index 7f676001..4c0ba119 100755
> --- a/tests/btrfs/301
> +++ b/tests/btrfs/301
> @@ -21,6 +21,8 @@ _require_no_compress
>
> _fixed_by_kernel_commit XXXXXXXXXXXX \
> "btrfs: fix iteration bug in __qgroup_excl_accounting()"
> +_fixed_by_kernel_commit XXXXXXXXXXXX \
> + "btrfs: fix squota _cmpr stats leak"
>
> subv=$SCRATCH_MNT/subv
> nested=$SCRATCH_MNT/subv/nested
> @@ -393,6 +395,13 @@ nested_accounting()
> check_qgroup_usage 2/100 $(($subv_usage + $nested_usage))
> do_enospc_falloc $nested/large_falloc 2G
> do_enospc_write $nested/large 2G
> + # ensure we can tear everything down in the nested scenario
> + $BTRFS_UTIL_PROG qgroup limit none 1/100 $SCRATCH_MNT
> + $BTRFS_UTIL_PROG subvolume delete $nested >> $seqres.full
> + $BTRFS_UTIL_PROG subvolume delete $subv >> $seqres.full
> + trigger_cleaner
> + $BTRFS_UTIL_PROG qgroup destroy 1/100 $SCRATCH_MNT
> + $BTRFS_UTIL_PROG qgroup destroy 2/100 $SCRATCH_MNT
> _scratch_unmount
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-22 0:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-21 21:59 [PATCH] btrfs/301: test nested squota teardown Boris Burkov
2025-08-21 22:07 ` Qu Wenruo
2025-08-21 23:35 ` [PATCH v2] " Boris Burkov
2025-08-22 0:32 ` Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).