diff options
author | NeilBrown <[email protected]> | 2014-12-03 16:07:58 +1100 |
---|---|---|
committer | NeilBrown <[email protected]> | 2014-12-03 16:07:58 +1100 |
commit | 108cef3aa41669610e1836fe638812dd067d72de (patch) | |
tree | 65d0fe1bbfbfbaf5bee3eff388e89c6cd420b360 /lib/memory-notifier-error-inject.c | |
parent | 3a18ca061311f2f1ee9c44012f89c7436d392117 (diff) |
md/raid5: fetch_block must fetch all the blocks handle_stripe_dirtying wants.
It is critical that fetch_block() and handle_stripe_dirtying()
are consistent in their analysis of what needs to be loaded.
Otherwise raid5 can wait forever for a block that won't be loaded.
Currently when writing to a RAID5 that is resyncing, to a location
beyond the resync offset, handle_stripe_dirtying chooses a
reconstruct-write cycle, but fetch_block() assumes a
read-modify-write, and a lockup can happen.
So treat that case just like RAID6, just as we do in
handle_stripe_dirtying. RAID6 always does reconstruct-write.
This bug was introduced when the behaviour of handle_stripe_dirtying
was changed in 3.7, so the patch is suitable for any kernel since,
though it will need careful merging for some versions.
Cc: [email protected] (v3.7+)
Fixes: a7854487cd7128a30a7f4f5259de9f67d5efb95f
Reported-by: Henry Cai <[email protected]>
Signed-off-by: NeilBrown <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions