Commit ca755175f245b91f72cfa474aaa8acd9c26996f4
Exists in
ti-lsk-linux-4.1.y
and in
12 other branches
Merge tag 'md/3.15-fixes' of git://neil.brown.name/md
Pull two md bugfixes from Neil Brown: "Two md bugfixes for possible corruption when restarting reshape If a raid5/6 reshape is restarted (After stopping and re-assembling the array) and the array is marked read-only (or read-auto), then the reshape will appear to complete immediately, without actually moving anything around. This can result in corruption. There are two patches which do much the same thing in different places. They are separate because one is an older bug and so can be applied to more -stable kernels" * tag 'md/3.15-fixes' of git://neil.brown.name/md: md: always set MD_RECOVERY_INTR when interrupting a reshape thread. md: always set MD_RECOVERY_INTR when aborting a reshape or other "resync".
Showing 1 changed file Side-by-side Diff
drivers/md/md.c
... | ... | @@ -7381,8 +7381,10 @@ |
7381 | 7381 | /* just incase thread restarts... */ |
7382 | 7382 | if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) |
7383 | 7383 | return; |
7384 | - if (mddev->ro) /* never try to sync a read-only array */ | |
7384 | + if (mddev->ro) {/* never try to sync a read-only array */ | |
7385 | + set_bit(MD_RECOVERY_INTR, &mddev->recovery); | |
7385 | 7386 | return; |
7387 | + } | |
7386 | 7388 | |
7387 | 7389 | if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { |
7388 | 7390 | if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) { |
... | ... | @@ -7824,6 +7826,7 @@ |
7824 | 7826 | /* There is no thread, but we need to call |
7825 | 7827 | * ->spare_active and clear saved_raid_disk |
7826 | 7828 | */ |
7829 | + set_bit(MD_RECOVERY_INTR, &mddev->recovery); | |
7827 | 7830 | md_reap_sync_thread(mddev); |
7828 | 7831 | clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); |
7829 | 7832 | goto unlock; |