All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs: defrag related to corncer case handling
@ 2026-11-16 21:29 Qu Wenruo
  2026-11-16 21:29 ` [PATCH 1/2] btrfs: defrag: break the loop early in defrag_get_extent() Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2026-11-16 21:29 UTC (permalink / raw)
  To: linux-btrfs

The first one is a Sashiko report that we can step into the next inode
and continue looping unnecessarily. Fix it by re-ordering the checks.

The second one is another minor corner case where if the defrag range
starts inside the last extent, we may skip a valid defrag target.
Fix it by doing the backward search properly.

Qu Wenruo (2):
  btrfs: defrag: break the loop early in defrag_get_extent()
  btrfs: defrag: fix missed extent when the lookup lands on the next
    inode

 fs/btrfs/defrag.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17 15:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-16 21:29 [PATCH 0/2] btrfs: defrag related to corncer case handling Qu Wenruo
2026-11-16 21:29 ` [PATCH 1/2] btrfs: defrag: break the loop early in defrag_get_extent() Qu Wenruo
2026-11-16 21:29 ` [PATCH 2/2] btrfs: defrag: fix missed extent when the lookup lands on the next inode Qu Wenruo
2026-11-17 15:49 ` [PATCH 0/2] btrfs: defrag related to corncer case handling Filipe Manana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.