diff options
| author | Qu Wenruo <[email protected]> | 2022-11-07 15:32:30 +0800 | 
|---|---|---|
| committer | David Sterba <[email protected]> | 2022-12-05 18:00:55 +0100 | 
| commit | 75b47033296595efb208cc563cbb8cf4fb7c3ebc (patch) | |
| tree | fd6875fa4e07cd145a21b38a1fbd5671f154f8cf /fs/btrfs/dev-replace.c | |
| parent | 2942a50dea74126bf3395b3060a808fb046136fc (diff) | |
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 <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
0 files changed, 0 insertions, 0 deletions