* [PATCH] md - 3 of 10 - Make sure an interrupted resync doesn't seem to have completed.
@ 2004-01-16 1:19 NeilBrown
0 siblings, 0 replies; only message in thread
From: NeilBrown @ 2004-01-16 1:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-raid
If the raid1 or raid5 thread gets to run md_check_recovery
after the recovery thread has been interupted, but before
do_md_stop completes, a spare drive can be incorporated into
an array befure it is up-to-date.
This patch corrects the relevant test.
----------- Diffstat output ------------
./drivers/md/md.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2004-01-16 11:59:05.000000000 +1100
+++ ./drivers/md/md.c 2004-01-16 11:59:46.000000000 +1100
@@ -3379,7 +3379,8 @@ void md_check_recovery(mddev_t *mddev)
/* resync has finished, collect result */
md_unregister_thread(mddev->sync_thread);
mddev->sync_thread = NULL;
- if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery)) {
+ if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) &&
+ !test_bit(MD_RECOVERY_INTR, &mddev->recovery)) {
/* success...*/
/* activate any spares */
mddev->pers->spare_active(mddev);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-16 1:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-16 1:19 [PATCH] md - 3 of 10 - Make sure an interrupted resync doesn't seem to have completed NeilBrown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).