]> git.hungrycats.org Git - linux/commitdiff
allocator-hints: summarize the space reproducer in the cover; TESTING.md closed list
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 12 Nov 2026 19:40:16 +0000 (14:40 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 12 Nov 2026 19:40:16 +0000 (14:40 -0500)
The cover described patch 12's reproducer only by a harness script name,
which reviewers cannot see; it now says what the test does.  TESTING.md
names the script and records it as the fstests candidate, counts four
follow-ups (9-12), and moves the fixed and done items out of "Not
covered / open" into a new "Closed" list (Zygo 2026-11-12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
topics/allocator-hints/0000-cover-letter.patch
topics/allocator-hints/TESTING.md

index ee708e3994f3c0c317091ac347bcccf31ed4bb80..827ff2d865255adb6db82d685fb3973f9b1d5fc9 100644 (file)
@@ -51,8 +51,17 @@ rules between the allocator and the estimates, which are kept separately
 for data and metadata.  With it the same fill ends in a clean ENOSPC.
 In statfs only f_bavail (df Avail) changes; f_blocks and f_bfree (df
 Size and Used) still count every device.
-Reproducer: alloc-hints-space-test.sh.  Kai, this patch doubles as the
-bug report for your series.
+
+To reproduce: make raid1 data and metadata on 6, 3 and 6 GiB devices,
+set the third to NONE_ONLY and run a full balance so it holds no
+chunks.  Write 64 MiB files until ENOSPC, then create 2000-byte files
+from four writers until each gets ENOSPC, sync, balance the metadata,
+remount and read everything back.  Without the patch the metadata fill
+aborts the transaction and the files created since the last commit are
+lost; with it the fill ends in ENOSPC and every file reads back.  A
+control filesystem with the same usable space but no third device and
+no hints already ends cleanly.  Kai, this patch doubles as the bug
+report for your series.
 
 Changes for the current base: btrfs_update_device() is already
 non-static upstream (the prototype is not re-added), and
index cd2a8d49e4811a2422b00505a1048c819271419f..130bab08f778ee98db9c8bf84d58b27d810489ca 100644 (file)
@@ -1,7 +1,7 @@
 # Testing: allocator-hints
 
 Kai Krakow's allocator hint series (patches 1-7), KeinNiemand's fixed-width
-mirror fix (8) and three follow-ups (9-11).  A per-device hint in the
+mirror fix (8) and four follow-ups (9-12).  A per-device hint in the
 DEV_ITEM `type` field, shown and set through
 `/sys/fs/btrfs/<uuid>/devinfo/<devid>/type` (CONFIG_BTRFS_ALLOCATOR_HINTS),
 steers the chunk allocator: preferred/only for data or metadata, avoid new
@@ -167,6 +167,14 @@ PREFERRED_NONE are expected to show the same blindness to a lesser degree,
 not tested.  Not shown on a kernel without the series: without hints the
 device takes chunks, so the control is the device-less filesystem instead.
 
+The cover summarizes this test instead of naming it.  It is the
+candidate to adapt for fstests (a btrfs/ test) once the hints are
+merged: it is deterministic, needs only three scratch devices of
+unequal size (or `btrfs filesystem resize <devid>:<size>`) and the
+`devinfo/<devid>/type` sysfs file, and its control arm needs no hints.
+Its verification and statfs report would carry over; the 14 min run
+would need a smaller fill to fit the quick group.
+
 ## Fixed-width mirror coverage and negative control (2026-11-06, ah1106)
 
 New arms of `alloc-hints-test.sh` (harness 03d60649) for patch 8: e3 (e2
@@ -249,23 +257,6 @@ Build checks (bhive, vm-scripts `uh1112/run-uh1112.sh`):
   exercised.
 
 ## Not covered / open
-
-- **KERNEL BUG (found 2026-10-18): space estimates ignore the hints.**  See
-  `alloc-hints-space-test.sh` above: deterministic ENOSPC transaction
-  aborts and a statfs that reports gigabytes free on a full filesystem when
-  a NONE_ONLY device has unallocated space.  **Fixed** by patch 12
-  (promoted on both lanes 2026-10-18).
-- **6.18 finding (separate from the hints): metadata overcommit is wrong
-  for unequal devices.**  On the 6.18 lane kernel the no-hint control
-  (raid1 on 6 + 3 GiB) aborts exactly like the hint arm: 6.18's
-  `calc_available_free_space()` divides the unallocated space of all devices
-  by the copy count (3 GiB / 2 here) although devid 1 alone cannot hold a
-  raid1 chunk.  Upstream fixed this in v7.1 (Qu Wenruo's per-profile
-  estimate, "This leads to various ENOSPC related transaction abort and
-  flips the fs read-only"); the 6.18 candidate carries those three commits
-  and passes both arms.  Loss class: ENOSPC transaction abort, un-fsynced
-  data only (the abort hit while the writers were still writing; data
-  synced before survived).
 - The fallback to `free_chunk_space` (zoned, or a failed estimate) and the
   dynamic reclaim thresholds that read it stay hint-blind (not used by
   these tests).
@@ -285,11 +276,30 @@ Build checks (bhive, vm-scripts `uh1112/run-uh1112.sh`):
   layout, so the loop did not reproduce it.  The deterministic
   `alloc-hints-space-test.sh` reproduces what is very likely the same
   defect.
-- e2 (patch 8) negative control: done 2026-11-06 (ah1106, above).
-- `make headers_install` on the series (patch 9): done 2026-11-12, above.
 - Striped profiles (raid0/10/5/6) and stripe_alloc data under hints: not
   tested.
 
+## Closed
+
+- **KERNEL BUG (found 2026-10-18): space estimates ignore the hints.**  See
+  `alloc-hints-space-test.sh` above: deterministic ENOSPC transaction
+  aborts and a statfs that reports gigabytes free on a full filesystem when
+  a NONE_ONLY device has unallocated space.  **Fixed** by patch 12
+  (promoted on both lanes 2026-10-18).
+- **6.18 finding (separate from the hints): metadata overcommit is wrong
+  for unequal devices.**  On the 6.18 lane kernel the no-hint control
+  (raid1 on 6 + 3 GiB) aborts exactly like the hint arm: 6.18's
+  `calc_available_free_space()` divides the unallocated space of all devices
+  by the copy count (3 GiB / 2 here) although devid 1 alone cannot hold a
+  raid1 chunk.  Upstream fixed this in v7.1 (Qu Wenruo's per-profile
+  estimate, "This leads to various ENOSPC related transaction abort and
+  flips the fs read-only"); the 6.18 candidate carries those three commits
+  and passes both arms.  Loss class: ENOSPC transaction abort, un-fsynced
+  data only (the abort hit while the writers were still writing; data
+  synced before survived).
+- e2 (patch 8) negative control: done 2026-11-06 (ah1106, above).
+- `make headers_install` on the series (patch 9): done 2026-11-12, above.
+
 **Questions for Zygo**
 
 Answered 2026-10-18: fix it in the series (the fix is the report to Kai);