Merge branches (11 topics incl. logical-ino-costs) into 6.18/testing
2026-09-21: 6.18/topics/logical-ino-costs combines the former backref-hang,
delayed-ref-fixes and logical-ino topics into one three-patch series
(reducing LOGICAL_INO costs): the add_all_parents() rewind-cycle hang, the
quadratic delayed-ref merge walk, and BTRFS_LOGICAL_INO_ARGS_COMMIT_ROOT.
Tree unchanged by the restructure.
Also merges '6.18/topics/low-space' (topics/low-space: generic low-space behaviour improvements (reclaim errno)).
Integration of topics/low-space with topics/stripe-alloc, in block-group.c
and space-info.c (octopus only from 2026-09-29; since 2026-10-29 it lives in
topics/low-space, which is restacked on topics/stripe-alloc: "btrfs: hold
block groups free for relocation" carries it; Zygo: "they all have to be
submitted in some order as patches, not merges"):
- a group held for relocation counts only its claimable whole stripes
as reserve (resynced at each commit-time stripe rescan); its trapped
space is in bytes_stripe_unusable already, and counting it twice made
the metadata space_info read over-full on a full raid6 filesystem;
- ordinary data writers' whole-stripe admission excludes the held
groups' stripes; relocation still sees them.
stripe_meta's bytes_stripe_reserve is NOT reduced by the held groups: it
is an admission margin that keeps tree blocks off the reserve's emergency
fallback, and without it a metadata fill consumed the reserve before any
relocation (dhive sresmn raid5/raid5, 2026-09-29).
Also merges '6.18/topics/nocmtime' (topics/nocmtime: Jeff Layton's "btrfs: fix FMODE_NOCMTIME handling in btrfs", 4 patches; it replaces topics/dedupe-mtime, whose fix its patch 2 contains).
Also merges '6.18/topics/dm-stripfault' (topics/dm-stripfault: the stripfault dm target, a raid56 RMW test fixture; drop before upstream).
Also merges '6.18/topics/allocator-hints' (topics/allocator-hints: Kai
Krakow's allocator hint series from kakra/rebase-6.18/btrfs-patches,
replacing the four hint patches formerly carried on zygo-6.18.x-zb64, plus
the UAPI-header fix and the device-replace fix).
Also merges '6.18/topics/read-policies' (topics/read-policies: Kai Krakow's
read policies and per-device read stats: CONFIG_BTRFS_READ_POLICIES,
queue and queue-adaptive policies, CONFIG_BTRFS_PER_DEVICE_IO_STATS).
Kconfig and sysfs.c conflicts with allocator-hints resolved as the union,
in kakra's order.
6.18/topics/logical-ino-costs gains kakra's "btrfs: avoid RCU stall during
backref list construction" (cond_resched in add_inline_refs/add_keyed_refs).
2026-10-10 (Zygo): topics/raid6-fixes replaced by 6.18/topics/raid56-disguise, the
6.18 backport of upstream
49ba3a3c0d67 ("btrfs: disguise single-data-RAID56 as
RAID1/RAID1C3"): btrfs maps 2-device RAID5 and 3-device RAID6 chunks as
RAID1/RAID1C3 and never calls lib/raid6 with three disks, so the x1
gen_syndrome fix and the raid6_pq.algo= test knob are no longer needed.
2026-10-10: topics/stripe-alloc gains the 2026-10-09 review (26 patches):
fixes for the review findings F01-F14 and M01-M12 (run owner keyed by
subvolume, ended ordered extents marked written, unused-group cleanup with
open runs, commit-time and read-only metadata drains without timeout
escapes, stats removals), the comment cleanup, the unwritten-on-end log,
and skipping single-data-stripe RAID5/6 groups with their free space
counted in write admission. Validated on cand/review-1009/6.18-zb64
fe5e27622f64: KASAN sanity + directed and full r6c3.
2026-10-11: topics/stripe-alloc gains "account claimable stripes while a
trim has them out" (1 patch): fstrim and async discard took free ranges
out of the tree without touching stripe_claimable, so a rescan in the
window found the incremental count above its scan. Validated on
cand/trimclaim2/6.18-zb64
386d7080f95b: KASAN directed
(incl. trim-claimable-race-test), claimable solo, corrupt-churn x3 (6.18).
2026-10-16: + 6.18/topics/replace-fixes (commit the canceled state when a device replace fails or is canceled).
2026-10-17: the raid56 scrub/replace commits move from
6.18/topics/raid56-fixes to a new 6.18/topics/raid56-scrub-replace, in safe order:
per-row parity check (unrepaired full stripes still fail with -EIO),
copy original parity of unrepairable rows to the replace target, copy
unrepaired data sectors, copy every sector of raid56 data stripes, avoid
the replace source only for its own stripes, read no-extent sectors from
the replace source, and last the return-0 flip, so there is no bisect
window where replace silently drops P/Q. 6.18/topics/replace-fixes gains
the dev-replace error-accounting series (uncorrectable read and target
write error counts, cancel progress, resumed-replace WARN fix) and the
ABORT_ON_UNCORRECTABLE start flag. Tree identical to the tested
candidate refs/cand/r5fix-618/testing.
2026-10-17: 6.18/topics/raid56-scrub-replace commit messages aligned with misc-next
(misc-next starts the topic with Filipe Manana's -EIO fix; 6.18 already returns
-EIO there). Tree unchanged.
Also merges '6.18/topics/dev-stats' (topics/dev-stats: write dirty device stats when no transaction is running; a behaviour change reviewers may reject, kept droppable on its own).
Also merges '6.18/topics/resize-missing' (topics/resize-missing: allow shrinking a missing device so a smaller replacement fits; Qu Wenruo's 2019 patch, rewritten).
Merge topic read-repair-fixes (repair bio end_io for submit failures)
Also merges '6.18/topics/reflink-inline-fixes' (copy_inline_to_page() fixes:
zeroing offset in large folios/subpage, decompression error path).
2026-10-27 (Zygo: on 6.18, backports go at the head of the topic that uses
them): 6.18/topics/raid56-disguise is folded into the head of
6.18/topics/stripe-alloc and is no longer a separate parent; the upstream
backports in logical-ino-costs, raid56-fixes and read-repair-fixes move to
the head of their topics. Candidate: + wbkick v5 (stripe-alloc).
Also merges 6.18/topics/reclaim-fixes (topics/reclaim-fixes: generic block group
reclaim fixes split out of topics/stripe-alloc; its tip is an ancestor of
that topic, so it adds no tree change of its own).
2026-10-30 (Zygo 2026-10-29 rulings, restructure1030; tree unchanged but for the
BTRFS_DEBUG=n build fix folded into "optionally audit data
read-modify-writes against the committed extent tree"):
+ 6.18/topics/test-knobs, stacked on topics/stripe-alloc like a test
fixture: the reclaim exclusive-operation gap (from topics/reclaim-fixes)
and the rbio cache size debug knob (from topics/raid56-fixes), both
DO-NOT-UPSTREAM; the knob now carries its integration with stripe-alloc's
rbio pins and cache prune. topics/raid56-scrub-replace is restacked on
topics/read-repair-fixes, which now precedes it here; the abort gate
interplay (parity scrub reporting and counting, rebuilt-data writes) is
in its commits instead of this merge. deadlock-fixes: the relock fix is
folded into "never block on space reservations ..."; Qu's aligned-lock backport leads the topic.
Commit messages fixed in stripe-alloc, raid56-scrub-replace and
allocator-hints.
2026-10-30 (Zygo-approved, knobmv1030): in topics/test-knobs' rbio cache size
knob and in this merge, the knob's 3-line btrfs_set_rbio_cache_size()
declaration in raid56.h moves from above raid56-fixes'
btrfs_raid56_uncache_range() to after btrfs_rbio_unpin_stale(), so the
export's revert of the knob from testing applies cleanly. No other change.
Also merges '6.18/topics/replace-finish-deadlock' (topics/replace-finish-deadlock: two device replace
hangs at replace finishing, bio counter waits in the bio completion workers (read repair) and
across the data csum lookup; both since v6.3; stacked on 6.18/topics/read-repair-fixes).
Also merges '6.18/topics/scrub-commit-pause' (topics/scrub-commit-pause: scrub and dev-replace drain their queued stripes and drop their commit-root paths before letting a transaction commit pass; with discard=sync they read extents the commit freed (zeros), spurious scrub errors and a cancelled replace; since v6.6; independent of the other topics).
The merge conflicts in fs/btrfs/scrub.c, with two neighbours: the new
scrub_pause_point() goes in front of scrub_raid56_parity_stripe(), where
topics/raid56-scrub-replace adds scrub_raid56_copy_parity_rows() (both
kept, the copy helper first), and in scrub_simple_mirror() the pause
point follows topics/replace-fixes' BTRFS_FS_ERROR() stop (kept, then
the new pause point in place of the old pause check).