]> git.hungrycats.org Git - linux/commit
DO-NOT-UPSTREAM: btrfs: raid56: debug knob for the rbio stripe cache size
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Thu, 1 Oct 2026 07:54:55 +0000 (03:54 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 21 Oct 2026 02:27:02 +0000 (22:27 -0400)
commitf7e693d10be20b7f83d5ba52569425bc68c36807
tree1a0de52ababd233e152a4c2d2238e10f19b5ff3e
parent95d142c556b58d28b69c8c9aa579470eddce6d19
DO-NOT-UPSTREAM: btrfs: raid56: debug knob for the rbio stripe cache size

Test fixture, not for submission.  A read-modify-write whose stripe is
still in the rbio stripe cache takes the other strips from memory instead
of reading them, so a test that injects faults into reads (dm-stripfault)
cannot reach the RMW read path for recently written stripes.

With CONFIG_BTRFS_DEBUG, /sys/fs/btrfs/<uuid>/debug/rbio_cache_size
replaces the RBIO_CACHE_SIZE limit (default unchanged, 1024); 0 disables
the cache.  Lowering it empties the cache, and the prune in cache_rbio()
now loops so a lowered limit holds.

Assisted-by: Claude:claude-opus-5-5
fs/btrfs/fs.h
fs/btrfs/raid56.c
fs/btrfs/raid56.h
fs/btrfs/sysfs.c