]> git.hungrycats.org Git - linux/commitdiff
balance-resume: cover: new series shape (remap fix leaves, limit patch added)
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 02:32:41 +0000 (21:32 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 02:32:41 +0000 (21:32 -0500)
The remap fix becomes its own one-patch series: drop its paragraph.  The
series is now vrange (1), limit writeback (2), legacy heuristics (3):
renumber the patch references, update the shortlog and the diffstat
(misc-next candidate refs/cand/bl1108/misc-next/balance-resume).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
topics/balance-resume/0000-cover-letter.patch

index afebc1bce4aacfaf3155dd0c28f4947baae04c37..423b71a4fd0685bf0011d15b18fedf6826fab1df 100644 (file)
@@ -28,7 +28,7 @@ without changing any other filter parameter.  This eliminates the need
 for guesswork, and with the floor described below, this guarantees a
 correct balance resume result.
 
-Patch 2 in this series removes the surprising heuristics and replaces
+Patch 1 in this series removes the surprising heuristics and replaces
 them with a `vrange` filter, leaving the remaining filter parameters
 unmodified.  Before the balance item is written, the vrange filter of
 each chunk type is limited to the addresses below the next chunk to be
@@ -63,21 +63,12 @@ The vrange filter has been present in btrfs since balance filters were
 introduced in 2012, so there is no compatibility issue arising from
 its use.
 
-Patch 1 is an independent fix that showed up in LLM review:
-__btrfs_balance() queues METADATA_REMAP chunks on a local list that
-only balance_remap_chunks() frees, so every early exit from the walk
-(pause, cancel, errors) leaks the entries queued so far.  It carries
-a Fixes tag and can go in on its own.  Note that this patch only fixes
-the immediately visible memory leak; no other recovery is needed,
-because nothing is done to a queued chunk until balance_remap_chunks(),
-which undoes its own state on failure.
-
 Patch 3 is optional.  I offer it for completeness, but there's a tradeoff
 that might not be worth the cost.  It can be dropped without breaking
 the rest of the series.
 
 A balance item written by an older kernel has no vrange, so with patch
-2, a balance that starts on an old kernel and resumes on a new kernel
+1, a balance that starts on an old kernel and resumes on a new kernel
 restarts from the beginning, redoing much of the work already done.
 That behavior may be an unpleasant surprise for some users, so for each
 chunk type without a `vrange` filter, patch 3 resumes with the old
@@ -135,14 +126,14 @@ Testing (KASAN kernels):
    started on the patched kernel must get the vrange and no usage filter.
 
 Zygo Blaxell (3):
-  btrfs: free queued remap chunks when balance bails out
   btrfs: replace the balance resume heuristics with a vrange bound
+  btrfs: write the remaining balance limits back to the balance item
   btrfs: keep the old resume filters for balance items without a vrange
 
  fs/btrfs/fs.h      |   6 ++
- fs/btrfs/volumes.c | 215 +++++++++++++++++++++++++++++++++++----------
+ fs/btrfs/volumes.c | 255 +++++++++++++++++++++++++++++++++++++--------
  fs/btrfs/volumes.h |   6 ++
- 3 files changed, 181 insertions(+), 46 deletions(-)
+ 3 files changed, 221 insertions(+), 46 deletions(-)
 
 
 --