summaryrefslogtreecommitdiff
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-11-07 10:32:30 +0300
committerDavid Sterba <dsterba@suse.com>2022-12-05 20:00:55 +0300
commit75b47033296595efb208cc563cbb8cf4fb7c3ebc (patch)
treefd6875fa4e07cd145a21b38a1fbd5671f154f8cf /fs/btrfs/dev-replace.c
parent2942a50dea74126bf3395b3060a808fb046136fc (diff)
downloadlinux-75b47033296595efb208cc563cbb8cf4fb7c3ebc.tar.xz
btrfs: raid56: migrate recovery and scrub recovery path to use error_bitmap
Since we have rbio::error_bitmap to indicate exactly where the errors are (including read error and csum mismatch error), we can make recovery path more accurate. For example: 0 32K 64K Data 1 |XXXXXXXX| | Data 2 | |XXXXXXXXX| Parity | | | 1) Get csum mismatch when reading data 1 [0, 32K) 2) Mark corresponding range error The old code will mark the whole data 1 stripe as error. While the new code will only mark data 1 [0, 32K) as error. 3) Recovery path The old code will recover data 1 [0, 64K), all using Data 2 and parity. This means, Data 1 [32K, 64K) will be corrupted data, as data 2 [32K, 64K) is already corrupted. While the new code will only recover data 1 [0, 32K), as only that range has error so far. This new behavior can avoid populating rbio cache with incorrect data. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions