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>