]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: make sure btrfs can create compressed inline extent
authorQu Wenruo <wqu@suse.com>
Thu, 26 Aug 2021 05:34:32 +0000 (13:34 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 29 Aug 2021 14:23:55 +0000 (22:23 +0800)
commitea1962cc9eaaf732652867e62c6f21b0d7ece5bf
treee7c238cfd8b492a2cf76a66e73c9298f65d7e67b
parentd3cbdabffc4cb28850e97bc7bd8a7a1460db94e5
btrfs: make sure btrfs can create compressed inline extent

Btrfs has the ability to inline small file extents into its metadata,
and such inlined extents can be further compressed if needed.

The new test case is for a regression caused by commit f2165627319f
("btrfs: compression: don't try to compress if we don't have enough
pages").

That commit prevents btrfs from creating compressed inline extents, even
"-o compress,max_inline=2048" is specified, only uncompressed inline
extents can be created.

The test case will make sure that the content of the small file is
consistent between cycle mount, then use "btrfs inspect dump-tree" to
verify the created extent is both inlined and compressed.

The regression is fixed by commit 4e9655763b82 ("Revert "btrfs:
compression: don't try to compress if we don't have enough pages"")

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/btrfs/246 [new file with mode: 0755]
tests/btrfs/246.out [new file with mode: 0644]