aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-11-11 18:59:04 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-11-11 18:59:04 -0500
commit0526484aa345adbf790d1201a6f5d09be0a648a3 (patch)
tree8da37ac2858a960e80dc59ebc4afc460935724f4 /drivers/md/md.c
parente0ea8b2c0677e6cc44a0e5b867be48867f91de5b (diff)
parentaa021baa3295fa6e3f367d80f8955dd5176656eb (diff)
Merge commit 'origin/master' into next
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 26ba42a79129..e64c971038d1 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -2631,7 +2631,7 @@ static void analyze_sbs(mddev_t * mddev)
2631 rdev->desc_nr = i++; 2631 rdev->desc_nr = i++;
2632 rdev->raid_disk = rdev->desc_nr; 2632 rdev->raid_disk = rdev->desc_nr;
2633 set_bit(In_sync, &rdev->flags); 2633 set_bit(In_sync, &rdev->flags);
2634 } else if (rdev->raid_disk >= mddev->raid_disks) { 2634 } else if (rdev->raid_disk >= (mddev->raid_disks - min(0, mddev->delta_disks))) {
2635 rdev->raid_disk = -1; 2635 rdev->raid_disk = -1;
2636 clear_bit(In_sync, &rdev->flags); 2636 clear_bit(In_sync, &rdev->flags);
2637 } 2637 }
@@ -6504,8 +6504,9 @@ void md_do_sync(mddev_t *mddev)
6504 skip: 6504 skip:
6505 mddev->curr_resync = 0; 6505 mddev->curr_resync = 0;
6506 mddev->curr_resync_completed = 0; 6506 mddev->curr_resync_completed = 0;
6507 mddev->resync_min = 0; 6507 if (!test_bit(MD_RECOVERY_INTR, &mddev->recovery))
6508 mddev->resync_max = MaxSector; 6508 /* We completed so max setting can be forgotten. */
6509 mddev->resync_max = MaxSector;
6509 sysfs_notify(&mddev->kobj, NULL, "sync_completed"); 6510 sysfs_notify(&mddev->kobj, NULL, "sync_completed");
6510 wake_up(&resync_wait); 6511 wake_up(&resync_wait);
6511 set_bit(MD_RECOVERY_DONE, &mddev->recovery); 6512 set_bit(MD_RECOVERY_DONE, &mddev->recovery);