]> git.hungrycats.org Git - linux/commit
btrfs: raid56: pass REQ_META to per-device bios
authorMark Korenberg <socketpair@gmail.com>
Fri, 6 Nov 2026 17:33:10 +0000 (22:33 +0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 7 Nov 2026 23:03:58 +0000 (18:03 -0500)
commitfe6a1eae48521a97e28fe07e6dd9cec7b98cb223
treed097e2a210f0b25691d6ee026b1b545933694282
parent0d7deca675a23bf11bc0d94db826811bcfbfd890
btrfs: raid56: pass REQ_META to per-device bios

RAID5/6 writes, and reads that need a rebuild, go through an rbio,
which builds new per-device bios from a bare REQ_OP_READ or
REQ_OP_WRITE.  So all tree block writes on RAID5/6 lose REQ_META, while
on the other profiles the per-device bios are clones and keep it.  The
same goes for a tree block read rebuilt from the other stripes, for
example with a missing device.

Pass REQ_META on to all per-device bios of an rbio, data and P/Q alike,
if any bio it serves has it.  Scrub and relocation do not set REQ_META,
so their rbios stay untagged, as do rbios that only serve file data.

Signed-off-by: Mark Korenberg <socketpair@gmail.com>
Link: https://lore.kernel.org/r/20261106-btrfs-sb-read-req-meta-v2-2-71c1afaf5c67@gmail.com
fs/btrfs/raid56.c
fs/btrfs/raid56.h