]> git.hungrycats.org Git - linux/commitdiff
balance-resume: cover: record the intent for failed item writes
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 04:01:53 +0000 (23:01 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 9 Nov 2026 04:01:53 +0000 (23:01 -0500)
Zygo (2026-11-08): keep the error handling consistent with the existing
code (a failed write-back at resume or limit update ends the balance and
deletes its item), but record the intent in the cover.

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

index 6fc2f3e20db34f201ac6cb33261305ee36328929..475d4f92381a564a8e89891f3cbb66a52dcd7d6d 100644 (file)
@@ -88,6 +88,18 @@ with the removal or after it, never before.  A crash between the two
 can make the resumed balance relocate one chunk more than requested,
 never fewer.
 
+If one of the new balance item writes fails (the one-time write-back of
+a bounded item at resume in patch 1, or a limit update after a chunk in
+patch 2), the balance ends with the error and its item is deleted, the
+same as for any other error at that point in the existing code.  We
+considered keeping the item and leaving the balance paused so the
+resume could be retried, but chose to stay consistent with the existing
+error handling.  Nothing is lost by ending the balance: a failed
+write-back at resume happens before anything is relocated, and after a
+failed limit update the chunks already relocated stay relocated.  The
+failed write-back at resume is logged, because the mount-time resume
+thread would otherwise drop the error silently.
+
 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.