every device, counts every uncorrectable sector and repairs later
correctable ones, on raid5 and raid6.
-Candidate patches 9 and 10 (2026-10-20, g-nds, not promoted;
-refs/cand/g-nds/{mn,618}/topic = this topic + 9 + 10, zb64 = misc-next
-1abd06ba2980 / 6.18 62d25601cf19 + 9 + 10). Patch 9 (Zygo: "Repair
+Patches 9 and 10 (2026-10-20, g-nds) were promoted on 2026-10-20.
+Candidates of 2026-10-21 (g-nds, not promoted; refs/cand/g-nds-count/
+{mn,618}/topic = this topic up to patch 8 + R + 9 + 10 + L + U; zb64 =
+misc-next aa5e2b4c73c0 / 6.18 3f42997e8a63 + R + L + U): R "do not write
+raid56 parity in a read-only scrub" goes before 9, so no commit of the
+series rebuilds data in a read-only scrub. 9 and 10 are unchanged except
+for R's read-only check in their code. L "name the device a raid56 data
+sector was read from" (the per-sector log lines named the full stripe's
+first data device), U "count the raid56 data repairs made by a parity
+scrub" (Zygo: "fix scrub undercounting": the P/Q holder's scrub repaired
+data silently). To verify (R): after a read-only mount and scrub -r every
+member image is byte-identical, and the damage is still counted; (L): every
+per-sector line names the damaged member; (U): every damaged sector is
+counted once (scrub csum_errors over all devices, dev stats on the damaged
+member), whatever the order of the device scrubs, read-only too.
+
+Patches 9 and 10, as first proposed (2026-10-20): Patch 9 (Zygo: "Repair
nodatasum data"): when the scrubbed P or Q does not match the data, raid6
decodes P and Q together, and if every differing byte shows one data
stripe off (dQ = g^z dP, the same z), rebuilds that data stripe and writes
| `nodatasum-scrub-repair-test.sh` raid6 `NSR_ARM=W NSR_K=1`, stock and `NSR_SA=1` | nodatasum files, one member failing writes (dm-flakey error_writes) during each file's writeback in turn, then scrub: no stale sector or parity mismatch left, every file reads back with no member / each member / each pair missing; corruption_errs per member = its stale sectors | 9, 10 (candidates) | ~2-3 min per arm | **candidate: PASS** (stock and stripe_alloc): stale 160 -> 0, 80/80 reads, corruption_errs +32 on each of the 5 members = their stale sectors, Corrected 160. **#5: FAIL**: scrub kept the 6 stale data strips and rewrote P and Q from them, 64/80 reads wrong after, 20 of them correct before the scrub (lost by scrub), no counter moved, "no errors found". The first candidate build (both the P and the Q scrub rebuilt a located strip) repaired everything too but charged some sectors twice (48 instead of 32 on 3 members), fixed in the final version | 2026-10-20 | candidate: misc-next zb64 1abd06ba2980 + raid56-fixes stats candidate + 9 + 10 (dhive `7.3.0-rc7+ #6`, KASAN, tree e530992d8ec6); #5 568c45b64012 (dhive) | f243dfd | raid56-wh-harness forensics/g-nds-20261020/ (cand-test4, mn5-b, mn5-c) |
| `nodatasum-scrub-repair-test.sh` raid6 `NSR_K=2`, raid5 `NSR_K=1`, controls `NSR_ARM=C` | the cases 9 cannot locate, and no change without a fault | 9, 10 (candidates) | ~2 min per arm | raid6 C and raid5 C PASS on both kernels. raid6 K=2 and raid5 K=1 **FAIL on both** (expected: two stale strips per row, or a single parity, cannot be located; scrub still rewrites the parity from the stale data: raid6 K=2 160/160 reads wrong after, 10 lost by scrub; raid5 K=1 20/20, 4 lost by scrub). With 10 these rewrites are now counted (corruption_errs on the parity members) | 2026-10-20 | same | f243dfd | same |
| `raid56-devstats-test.sh` arm P (raid5, raid6) | 4 sectors of a P strip (raid6 also 4 of a Q strip, other rows) overwritten offline, scrub: corruption_errs +4 on exactly those members, nothing else moves, Corrected 4 (8), a second scrub finds nothing | 10 (candidate) | ~2.5 min per profile | **candidate: PASS** both profiles. **#5: FAIL**: parity repaired but nothing counted, "no errors found" | 2026-10-20 | candidate (dhive #6, and #4: same patch 10); #5 | f243dfd | forensics/g-nds-20261020/ (cand-test4, cand-test3, mn5-c) |
+| `scrub-blame-test.sh` (i-scrub; COUNT/SB_RO/IMAGES verdicts g-nds a8c61a4) arms D, W, P, orders all / T first / T last, raid5 and raid6 | U: every damaged sector counted once in every order, dev stats on T only; L: every per-sector line names T; 10: damaged parity counted on T | L, U (candidates), 10 | ~12 min | **candidate: PASS** every case (D 8/8, W 288/288 raid5 and 224/224 raid6 csum + parity 384 on T, P 8 on T). **#5: FAIL**: COUNT 7/8 and 2/8 with all devices at once, 0/8, 0/288, 0/224 with T last; MESSAGES 1-8 of up to 10 lines name another device (the predicted stripes[0]); P not counted. Before L, U (dhive #6): the same COUNT and MESSAGES failures | 2026-10-21 | candidate: misc-next zb64 aa5e2b4c73c0 + R + L + U (ehive `7.3.0-rc7+ #3`, KASAN, bzImage md5 220f311f...); #6 on dhive; #5 568c45b64012 (ehive) | f5bc4b2 | raid56-wh-harness forensics/g-nds-20261020/ (final9, mn5-ehive, count-k6-before) |
+| `scrub-blame-test.sh` `SB_RO=1` (read-only mount, scrub -r), arms D (all orders), P | R: images byte-identical; U: counted once in read-only scrubs too | R, U (candidates) | ~3 min | **candidate: PASS**: IMAGES byte-identical in every case, D 8/8 counted, P 8 counted on T, nothing restored. **#5: P arm IMAGES FAIL** (the read-only scrub rewrote the damaged parity: one member image changed), D byte-identical. The first R (returned before the write submission round) **hung** the lane kernel at the first read-only scrub (rbio_wait_io; forensics final8-hang); fixed by going through submit_write with no bios | 2026-10-21 | same; #5 (dhive) | f5bc4b2 | final9, ro-mn5-dhive, final8-hang |
+| `failing-member-scrub-test.sh` (i-scrub; COUNT verdict g-nds) raid5, raid6 | U under load: S1 csum_errors over all members == damaged csummed sectors | U (candidate) | ~8 min per profile | **candidate: PASS**: raid5 36128/36128, raid6 30231/30231; raid5 PARITY_CHARGES (information) devid 3: 1313, devid 4: 727 -- raid5 parity mismatches charged to the parity member where nothing locates the stale strip (10's ambiguity; raid6 locates them). **#5: COUNT WRONG** 26519/40556, 11049/30723 | 2026-10-21 | same; #5 (ehive) | f5bc4b2 | final9, mn5-ehive |
+| `unwritten-readback-test.sh` raid5, raid6 (scrub oracle updated, g-nds a8c61a4) | 10: scrub corrects exactly the stale tail-row P/Q sectors of the never-written stripes, nothing else | 10 | ~2 min per profile | **candidate: PASS**: corrected 216 / 432 = expected. #5: PASS with `URB_PARITY_COUNTED=0` (0 corrected, the old behaviour), FAIL with the default (0 vs 216 / 240). Before the oracle change, the promoted 10 made the old "no errors" check fail (j-devstat) | 2026-10-21 | same; #5 (dhive, ehive) | f5bc4b2 | final9, ro-mn5-dhive, mn5-ehive |
+| final-candidate reruns: `nodatasum-scrub-repair-test.sh` raid6 W1 / raid5 W1 / raid6 C, `raid56-devstats-test.sh` P, `scrub-uncorrectable-rc-test.sh`, replace retrofit short set | R, L, U keep 9's and 10's results | all | ~1.5 h | PASS (raid5 W1 FAIL as expected): raid6 W1 stale 160 -> 0, 80/80; devstats P raid5/raid6 PASS; scrubrc every device ret 0, finished; retrofit replaceu, rs, rcp rc 0, MISPLACED 0, unwritten-with-live-data 0. No KASAN/WARN/BUG/lockdep/hung task | 2026-10-21 | same | f5bc4b2 | final9 |
| reruns on the candidate: `scrub-uncorrectable-rc-test.sh`, `scripts/replace-retrofit-validate.sh` (`RV_SKIP="ra ahr"`: replace-uncorrectable, replace-status, replace-cancel-persist) | 9 and 10 keep the topic's results | 1-8, 9, 10 | ~3 min + ~70 min | **PASS** on dhive #6 and #4: every raid5/raid6 device ret 0 and finished, uncorrectable 1+1+2 / 1+2+1+1+1 as on #5, later blocks repaired; corrected now includes the planted parity mismatch CP (raid5 devid 1: corrected 2 = C + CP on #6; 1 on #4, where a parity scrub repaired C first and counted it nowhere -- the undercounting being fixed next; 0 on ahive #5). Retrofit: replaceu, rs, rcp rc 0; TARGETCHECK raid5 / raid6 / unc-raid5 MISPLACED 0, unwritten-with-live-data 0. No KASAN/WARN/BUG | 2026-10-20 | same | f243dfd | forensics/g-nds-20261020/cand-test4/, cand-test3/ |
-W=1: each candidate commit and the test trees compiled with `make W=1
+W=1 (2026-10-21): every commit of the reordered candidate topic and both
+zb64 candidates, both lanes, adds no warning (topic 1 / 2, zb64 2 / 3
+pre-existing); both bzImages link.
+
+W=1 (2026-10-20): each candidate commit and the test trees compiled with `make W=1
fs/btrfs/` (objects rebuilt from scratch), both lanes, no new warnings
(misc-next 1, 6.18 2 pre-existing on the topic; zb64 2 / 3, among them
`stripe_whole_bytes` unused on 6.18); misc-next and 6.18 test-tree