Skip to content

btrfs: defrag: don't defrag extents already at their max capacity, then remove an ambiguous check

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: defrag: don't defrag extents which is already at its max capacityfs/btrfs/ioctl.c+20 -01 reply
2/2btrfs: defrag: remove an ambiguous condition for rejectionfs/btrfs/ioctl.c+0 -41 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchFilipe Manana
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] btrfs: defrag: don't defrag extents already at their max capacity, then remove an ambiguous check

Thanks to the report from Filipe where he found a new bug in compressed defrag, that we will try to defrag all compressed extents even it's already at its max compacity.

This behavior is from the beginning of btrfs defrag.

The first patch is to fix the behavior, by just rejecting extents which are already at their max capacity, nor allowing extents to be merged with extents at their max capacity.

The second patch is to remove an ambiguous rejection condition. The condition is believed to reject compressed extent, but it never really works due to the check is > 128K, not >= 128K.

And the physically adajcent check may prevent users to reduce the number of extents.

Qu Wenruo (2):
btrfs: defrag: don't defrag extents which is already at its max
capacity
btrfs: defrag: remove an ambiguous condition for rejection

 fs/btrfs/ioctl.c | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1