]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
btrfs: defrag with regular and preallocated extents
authorQu Wenruo <wqu@suse.com>
Fri, 28 Jan 2022 00:26:59 +0000 (08:26 +0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 13 Feb 2022 17:15:38 +0000 (01:15 +0800)
commitd8639e1632ab3fe1d8044702699350ddf2499b12
treeac897faeb9d86cb083b3d64f0c9e3e9e787f1d9f
parentcd99a4999bfb273319b6494c8e9497b063684059
btrfs: defrag with regular and preallocated extents

Recent v5.16 has some regression around btrfs autodefrag mount
option, and the extra scrutiny around defrag code exposes some
questionable behavior from the old code.

One behavior is to defrag extents along with the next preallocated
extent.

This behavior will cause extra IO and convert all the preallocated
extent to regular zero filled extents, rendering the preallocated
extent useless.

The kernel fix is titled:

  btrfs: defrag: don't try to merge regular extents with preallocated extents

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