Commit 368fd89
btrfs: scrub: add cancel/pause/removed bg checks for raid56 parity stripes
For raid56, data and parity stripes are handled differently.
For data stripes they are handled just like regular RAID1/RAID10 stripes,
going through the regular scrub_simple_mirror().
But for parity stripes we have to read out all involved data stripes and
do any needed verification and repair, then scrub the parity stripe.
This process will take a much longer time than a regular stripe, but
unlike scrub_simple_mirror(), we do not check if we should cancel/pause
or the block group is already removed.
Aligned the behavior of scrub_raid56_parity_stripe() to
scrub_simple_mirror(), by adding:
- Cancel check
- Pause check
- Removed block group check
Since those checks are the same from the scrub_simple_mirror(), also
update the comments of scrub_simple_mirror() by:
- Remove too obvious comments
We do not need extra comments on what we're checking, it's really too
obvious.
- Remove a stale comment about pausing
Now the scrub is always queuing all involved stripes, and submit them
in one go, there is no more submission part during pausing.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 4e3c05b commit 368fd89
1 file changed
+17
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2094 | 2108 | | |
2095 | 2109 | | |
2096 | 2110 | | |
| |||
2261 | 2275 | | |
2262 | 2276 | | |
2263 | 2277 | | |
2264 | | - | |
2265 | 2278 | | |
2266 | 2279 | | |
2267 | 2280 | | |
2268 | 2281 | | |
2269 | 2282 | | |
2270 | | - | |
2271 | | - | |
2272 | | - | |
| 2283 | + | |
| 2284 | + | |
2273 | 2285 | | |
2274 | | - | |
2275 | | - | |
| 2286 | + | |
2276 | 2287 | | |
2277 | 2288 | | |
2278 | 2289 | | |
| |||
0 commit comments