]> Git Repo - linux.git/commit - fs/btrfs/volumes.h
btrfs: scrub: implement raid stripe tree support
authorJohannes Thumshirn <[email protected]>
Thu, 14 Sep 2023 16:07:01 +0000 (09:07 -0700)
committerDavid Sterba <[email protected]>
Thu, 12 Oct 2023 14:44:09 +0000 (16:44 +0200)
commit9acaa64187f9b4cbb75622883c96ea1a893d5431
tree49b678991588de37505fa00be1b48dbfbaaea79d
parent10e27980f2ff66ba0c6da55f33b4814d5bc86573
btrfs: scrub: implement raid stripe tree support

A filesystem that uses the raid stripe tree for logical to physical
address translation can't use the regular scrub path, that reads all
stripes and then checks if a sector is unused afterwards.

When using the raid stripe tree, this will result in lookup errors, as
the stripe tree doesn't know the requested logical addresses.

In case we're scrubbing a filesystem which uses the RAID stripe tree for
multi-device logical to physical address translation, perform an extra
block mapping step to get the real on-disk stripe length from the stripe
tree when scrubbing the sectors.

This prevents a double completion of the btrfs_bio caused by splitting the
underlying bio and ultimately a use-after-free.

Signed-off-by: Johannes Thumshirn <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/bio.c
fs/btrfs/raid-stripe-tree.c
fs/btrfs/scrub.c
fs/btrfs/volumes.h
This page took 0.05734 seconds and 4 git commands to generate.