]> git.hungrycats.org Git - linux/commitdiff
balance-resume: mention bitrot in heuristics, not keeping up with new balance filters
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 01:34:01 +0000 (20:34 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 01:34:01 +0000 (20:34 -0500)
topics/balance-resume/0000-cover-letter.patch

index 7263a8c4c225e7639cb18422da176df8fb595469..b09ea8ebb375aa2d036b78508d01e80f07fda7aa 100644 (file)
@@ -11,16 +11,21 @@ filter to a converting balance.  This can cause the resumed balance
 to repeat work the interrupted balance already did, or skip work that
 the interrupted balance intended to do.
 
-Historically, we have advised users to avoid relying on balance
-resume, and instead mount with `-o skip_balance`, cancel any paused
-balance unconditionally after a mount, and start a new balance using
-an idempotent filter, or manage the entire balancing process with a
-userspace controller.
+Over the years, as more balance filters were added, the heuristics
+were not updated.  A resumed balance with a new filter, like
+`devid=7,stripes=1..4` (used in striped-profile array reshapes
+when an old device is replaced with a larger one) becomes
+`devid=7,stripes=1..4,usage=90`.  When this filter is used correctly,
+it is already idempotent, and does not need to be changed on resume.
+Adding `usage=90` skips most of the work requested, and the user must
+restart it with the original parameters to complete the reshape.
 
 Since balance works from highest block group bytenr to lowest, and new
 block groups are (usually) created with higher bytenrs than the highest
 existing block group, all balance filters can be made idempotent by
-adding a `vrange` filter.
+adding a `vrange` filter or limiting the end of an existing vrange,
+without changing any other filter parameter.  This eliminates the need
+for guesswork and guarantees a correct balance resume result.
 
 Patch 2 in this series removes the surprising heuristics and replaces
 them with a `vrange` filter, leaving the remaining filter parameters