]> git.hungrycats.org Git - linux/commitdiff
balance-resume: TESTING: write-back is conditional; no-unmount resume check
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 6 Nov 2026 10:42:58 +0000 (05:42 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 6 Nov 2026 10:42:58 +0000 (05:42 -0500)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
topics/balance-resume/TESTING.md

index ab59e1656db5cbcaf2e6ede74356390fe08f24c6..22c119e8856b9b6ec18de5cdf3465bd9f179ead5 100644 (file)
@@ -185,9 +185,10 @@ the floor is set (the floor is still 0, so the bound is the end of the
 last chunk): a type without a vrange gets 0..end, a vend above end is
 lowered.  If that changed the arguments, `btrfs_balance()` writes them to
 the existing item once when the resume starts (`update_balance_item()`,
-one transaction, before any relocation); an item from a patched kernel
-whose vend is already <= end is not written, so a balance started on a
-patched kernel still writes its item only at insert and delete.  Patch 3
+one transaction, before any relocation).  Nothing is written when the
+recovered args are unchanged, which for an item from a patched kernel is
+the usual case: its vend changes only if relocation deleted the highest
+chunks without allocating above them before the unmount.  Patch 3
 now decides the legacy filters at recovery, from the on-disk args, before
 the bound is added, and they are written back with it.
 
@@ -195,8 +196,9 @@ A pause and resume without an unmount (ioctl resume) reuses the
 in-memory bctl, bounded at mount or at start, and the floor stays set
 through the pause (`reset_balance_state()` does not run for a paused
 balance), so no clamp is needed there; the ro->rw remount resume uses the
-bctl recovered at mount.  Checked in the code; `balance-resume-test.sh`
-covers the ioctl resume.
+bctl recovered at mount.  Checked in the code, and by `vm-scripts/fl1106/nounmount-check.sh`
+(table below); the harness balance-resume tests all unmount between the
+pause and the resume.
 
 Kernels: 6.18 zb64 candidate 876b62099832 (#319, KASAN inline + lockdep
 + BTRFS_ASSERT, bzImage md5 776c478274227a504d1517e3c653835d) on bhive
@@ -231,6 +233,7 @@ below E is relocated; a new balance gets a vrange.  New variant
 | legacy plain/convert/vrange/convert-vrange, negative control | the detector sees the unbounded resume | - | 1 min each | FAIL as expected on #318 (bhive, ahive) and #67 (dhive, ehive): no vrange added, 1 TiB kept, not persisted ("after the second interruption the bound is 'vrange=0..1099511627776'"), allocations reach 1105954078720; usage/soft assertions PASS.  `vrange-max` was not run on the controls | #318, #67 |
 | `balance-resume-convert-test.sh` x2, `balance-resume-test.sh`, `balance-resume-reuse-test.sh` | as above; the bound after a remount is expected to be min(stored end, end of last chunk) | 2 | 1-2 min each | PASS on all four (ahive convert run 2 SKIPped on timing, no "balance: start" line within 5 s; rerun x2 PASS); also PASS on the controls #318 (bhive) and #67 (dhive) | #319, #68 |
 | `remap-balance-resume-test.sh`, `remap-balance-leak-test.sh` | as above | 1, 2 | 2 min each | PASS on #68 (dhive, ehive) and #67 (dhive); SKIP on 6.18 as expected | #68 |
+| `vm-scripts/fl1106/nounmount-check.sh` (new, not in the harness) | pause after 3 block groups, `btrfs balance resume` on the same mount: the resume line shows the bound set at start, no chunk the first run allocated (3, at and above the bound) is relocated, every chunk allocated during the balance is at or above the bound, every data chunk below it relocated once | 2 | 1 min | PASS on #319 (bhive) and #68 (dhive): "balance: resume -dvrange=0..11036262400", 11/11 relocated.  Not run on the controls (the floor was already in #318/#67) | #319, #68 |
 
 Not covered: in the new-kernel tests the interrupted run always
 allocated, so the bound was never lowered at mount for an item written