]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
btrfs: add test for cleaner thread under seed-sprout
authorBoris Burkov <boris@bur.io>
Wed, 16 Oct 2024 17:54:33 +0000 (10:54 -0700)
committerZorro Lang <zlang@kernel.org>
Wed, 23 Oct 2024 03:14:23 +0000 (11:14 +0800)
commit9eda73ff46959ab6f0504c46062f9071a8cedc3b
tree42fc17683638ca07529ff9c23d828d31b347b50e
parent891f4995ab07ee0a07eca156915ed87ab5f479f6
btrfs: add test for cleaner thread under seed-sprout

We have a longstanding bug that creating a seed sprout fs with the
ro->rw transition done with

mount -o remount,rw $mnt

instead of

umount $mnt
mount $sprout_dev $mnt

results in an fs without BTRFS_FS_OPEN set, which fails to ever run the
critical btrfs cleaner thread.

This test reproduces that bug and detects it by creating and deleting a
subvolume, then triggering the cleaner thread. The expected behavior is
for the cleaner thread to delete the stale subvolume and for the list to
show no entries. Without the fix, we see a DELETED entry for the subvol.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/323 [new file with mode: 0755]
tests/btrfs/323.out [new file with mode: 0644]