]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs/228: sync filesystem after creating subvolume
authorFilipe Manana <fdmanana@suse.com>
Wed, 10 May 2023 10:55:59 +0000 (11:55 +0100)
committerZorro Lang <zlang@kernel.org>
Fri, 12 May 2023 12:21:10 +0000 (20:21 +0800)
commite35817daa103d6c8dd670fc0acef7f2247e10a9f
treef5ad24d41d8145499b617ecaf02c4d31daff99bc
parent802f42f7a5b24f89b64fbbb1316927cc5009d45e
btrfs/228: sync filesystem after creating subvolume

Test case btrfs/228 creates a subvolume and then calls the dump-tree
command from btrfs-progs. The tree dumping accesses the device directly
and therefore can only see committed metadata - this used to work because
subvolume creation used to commit the transaction that was used to create
the subvolume, however it is no longer the case after a recent patch that
currently is only on the btrfs integration branch "misc-next". That patch
has the following subject:

   "btrfs: don't commit transaction for every subvol create"

So explicitly sync the filesystem before calling the dump-tree command,
commenting why we do it. This way the test works before and after that
patch, for any kernel release.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/228