aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
-rw-r--r--drivers/md/raid1.c2
-rw-r--r--drivers/md/raid5.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 5469ae35ee15..aa640a85bb21 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3324,7 +3324,7 @@ resync_start_store(mddev_t *mddev, const char *buf, size_t len)
3324 char *e; 3324 char *e;
3325 unsigned long long n = simple_strtoull(buf, &e, 10); 3325 unsigned long long n = simple_strtoull(buf, &e, 10);
3326 3326
3327 if (mddev->pers) 3327 if (mddev->pers && !test_bit(MD_RECOVERY_FROZEN, &mddev->recovery))
3328 return -EBUSY; 3328 return -EBUSY;
3329 if (cmd_match(buf, "none")) 3329 if (cmd_match(buf, "none"))
3330 n = MaxSector; 3330 n = MaxSector;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 779abbd2bb1d..5d096096f958 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -2061,7 +2061,7 @@ static int raid1_resize(mddev_t *mddev, sector_t sectors)
2061 set_capacity(mddev->gendisk, mddev->array_sectors); 2061 set_capacity(mddev->gendisk, mddev->array_sectors);
2062 revalidate_disk(mddev->gendisk); 2062 revalidate_disk(mddev->gendisk);
2063 if (sectors > mddev->dev_sectors && 2063 if (sectors > mddev->dev_sectors &&
2064 mddev->recovery_cp == MaxSector) { 2064 mddev->recovery_cp > mddev->dev_sectors) {
2065 mddev->recovery_cp = mddev->dev_sectors; 2065 mddev->recovery_cp = mddev->dev_sectors;
2066 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 2066 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
2067 } 2067 }
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 51af7f3bfe52..34dd54539f7b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -5389,7 +5389,8 @@ static int raid5_resize(mddev_t *mddev, sector_t sectors)
5389 return -EINVAL; 5389 return -EINVAL;
5390 set_capacity(mddev->gendisk, mddev->array_sectors); 5390 set_capacity(mddev->gendisk, mddev->array_sectors);
5391 revalidate_disk(mddev->gendisk); 5391 revalidate_disk(mddev->gendisk);
5392 if (sectors > mddev->dev_sectors && mddev->recovery_cp == MaxSector) { 5392 if (sectors > mddev->dev_sectors &&
5393 mddev->recovery_cp > mddev->dev_sectors) {
5393 mddev->recovery_cp = mddev->dev_sectors; 5394 mddev->recovery_cp = mddev->dev_sectors;
5394 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery); 5395 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
5395 } 5396 }