aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c3
-rw-r--r--drivers/md/raid1.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 763ecab34813..21e2a7b08841 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3724,6 +3724,7 @@ static int add_new_disk(mddev_t * mddev, mdu_disk_info_t *info)
3724 if (err) 3724 if (err)
3725 export_rdev(rdev); 3725 export_rdev(rdev);
3726 3726
3727 md_update_sb(mddev, 1);
3727 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 3728 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
3728 md_wakeup_thread(mddev->thread); 3729 md_wakeup_thread(mddev->thread);
3729 return err; 3730 return err;
@@ -5275,7 +5276,6 @@ void md_do_sync(mddev_t *mddev)
5275 mddev->pers->sync_request(mddev, max_sectors, &skipped, 1); 5276 mddev->pers->sync_request(mddev, max_sectors, &skipped, 1);
5276 5277
5277 if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) && 5278 if (!test_bit(MD_RECOVERY_ERR, &mddev->recovery) &&
5278 test_bit(MD_RECOVERY_SYNC, &mddev->recovery) &&
5279 !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) && 5279 !test_bit(MD_RECOVERY_CHECK, &mddev->recovery) &&
5280 mddev->curr_resync > 2) { 5280 mddev->curr_resync > 2) {
5281 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) { 5281 if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery)) {
@@ -5299,6 +5299,7 @@ void md_do_sync(mddev_t *mddev)
5299 rdev->recovery_offset = mddev->curr_resync; 5299 rdev->recovery_offset = mddev->curr_resync;
5300 } 5300 }
5301 } 5301 }
5302 set_bit(MD_CHANGE_DEVS, &mddev->flags);
5302 5303
5303 skip: 5304 skip:
5304 mddev->curr_resync = 0; 5305 mddev->curr_resync = 0;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 656fae912fe3..b3c5e12f081d 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1951,6 +1951,7 @@ static int run(mddev_t *mddev)
1951 !test_bit(In_sync, &disk->rdev->flags)) { 1951 !test_bit(In_sync, &disk->rdev->flags)) {
1952 disk->head_position = 0; 1952 disk->head_position = 0;
1953 mddev->degraded++; 1953 mddev->degraded++;
1954 conf->fullsync = 1;
1954 } 1955 }
1955 } 1956 }
1956 if (mddev->degraded == conf->raid_disks) { 1957 if (mddev->degraded == conf->raid_disks) {