stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for v5.15 0/2] Defrag fixes for v5.15
@ 2022-02-16  7:09 Qu Wenruo
  2022-02-16  7:09 ` [PATCH for v5.15 1/2] btrfs: don't hold CPU for too long when defragging a file Qu Wenruo
  2022-02-16  7:09 ` [PATCH for v5.15 2/2] btrfs: defrag: use the same cluster size for defrag ioctl and autodefrag Qu Wenruo
  0 siblings, 2 replies; 9+ messages in thread
From: Qu Wenruo @ 2022-02-16  7:09 UTC (permalink / raw)
  To: stable; +Cc: linux-btrfs

In v5.16 btrfs had a big rework (originally considered as a refactor
only) on defrag, which brings quite some regressions.

With those regressions, extra scrutiny is brought to defrag code, and
some existing bugs are exposed.

For v5.15, there are those patches need to be backported:
(Tracked through github issue:
https://github.com/btrfs/linux/issues/422)

- Already upstreamed:
  "btrfs: don't hold CPU for too long when defragging a file"
  The first patch.

- In maintainer's tree
  btrfs: defrag: don't try to merge regular extents with preallocated extents
  btrfs: defrag: don't defrag extents which are already at max capacity
  btrfs: defrag: remove an ambiguous condition for rejection

  Those will be backported when they get merged upstream.

- One special fix for v5.15
  The 2nd patch.

  The problem is, that patch has no upstream commit, since v5.16
  reworked the defrag code and fix the problem unintentionally.
  It's not a good idea to bring the whole rework (along with its bugs)
  to stable kernel.

  So here I crafted a small fix for v5.15 only.

  Not sure if this is conflicted with any stable policy.

Qu Wenruo (2):
  btrfs: don't hold CPU for too long when defragging a file
  btrfs: defrag: use the same cluster size for defrag ioctl and
    autodefrag

 fs/btrfs/ioctl.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

-- 
2.35.1


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

end of thread, other threads:[~2022-02-18  0:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16  7:09 [PATCH for v5.15 0/2] Defrag fixes for v5.15 Qu Wenruo
2022-02-16  7:09 ` [PATCH for v5.15 1/2] btrfs: don't hold CPU for too long when defragging a file Qu Wenruo
2022-02-17 19:01   ` Greg KH
2022-02-17 19:41     ` Holger Hoffstätte
2022-02-17 19:48       ` Greg KH
2022-02-18  0:06         ` Qu Wenruo
2022-02-16  7:09 ` [PATCH for v5.15 2/2] btrfs: defrag: use the same cluster size for defrag ioctl and autodefrag Qu Wenruo
2022-02-16 12:37   ` David Sterba
2022-02-16 12:49     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).