aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/md.c5
-rw-r--r--drivers/md/raid5.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8d11cd1a0d8b..6eb95451f161 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4639,6 +4639,11 @@ static int update_size(mddev_t *mddev, sector_t num_sectors)
4639 */ 4639 */
4640 if (mddev->sync_thread) 4640 if (mddev->sync_thread)
4641 return -EBUSY; 4641 return -EBUSY;
4642 if (mddev->bitmap)
4643 /* Sorry, cannot grow a bitmap yet, just remove it,
4644 * grow, and re-add.
4645 */
4646 return -EBUSY;
4642 rdev_for_each(rdev, tmp, mddev) { 4647 rdev_for_each(rdev, tmp, mddev) {
4643 sector_t avail; 4648 sector_t avail;
4644 avail = rdev->size * 2; 4649 avail = rdev->size * 2;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 40e939675657..17e0953c3c06 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4446,6 +4446,9 @@ static int raid5_check_reshape(mddev_t *mddev)
4446 return -EINVAL; /* Cannot shrink array or change level yet */ 4446 return -EINVAL; /* Cannot shrink array or change level yet */
4447 if (mddev->delta_disks == 0) 4447 if (mddev->delta_disks == 0)
4448 return 0; /* nothing to do */ 4448 return 0; /* nothing to do */
4449 if (mddev->bitmap)
4450 /* Cannot grow a bitmap yet */
4451 return -EBUSY;
4449 4452
4450 /* Can only proceed if there are plenty of stripe_heads. 4453 /* Can only proceed if there are plenty of stripe_heads.
4451 * We need a minimum of one full stripe,, and for sensible progress 4454 * We need a minimum of one full stripe,, and for sensible progress