Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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".

+4 -1
+4 -1
drivers/md/md.c
··· 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)) { ··· 7826 7824 /* There is no thread, but we need to call 7827 7825 * ->spare_active and clear saved_raid_disk 7828 7826 */ 7827 + set_bit(MD_RECOVERY_INTR, &mddev->recovery); 7829 7828 md_reap_sync_thread(mddev); 7830 7829 clear_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 7831 7830 goto unlock;