Skip to content

Commit ca75517

Browse files
committed
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".
2 parents 3b8d267 + 2ac295a commit ca75517

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/md/md.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7381,8 +7381,10 @@ void md_do_sync(struct md_thread *thread)
73817381
/* just incase thread restarts... */
73827382
if (test_bit(MD_RECOVERY_DONE, &mddev->recovery))
73837383
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);
73857386
return;
7387+
}
73867388

73877389
if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
73887390
if (test_bit(MD_RECOVERY_CHECK, &mddev->recovery)) {
@@ -7824,6 +7826,7 @@ void md_check_recovery(struct mddev *mddev)
78247826
/* There is no thread, but we need to call
78257827
* ->spare_active and clear saved_raid_disk
78267828
*/
7829+
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
78277830
md_reap_sync_thread(mddev);
78287831
clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
78297832
goto unlock;

0 commit comments

Comments
 (0)