summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2016-06-24 01:36:06 +0200
committerMike Snitzer <snitzer@redhat.com>2016-07-18 21:37:26 +0200
commit4348309a8ba535dfb1d4f6510739b56ccf4afead (patch)
tree4ca7835289d9261601a7b168b3924c8bd0d3afcb /drivers/md/dm-raid.c
parentdm raid: fix new superblock/bitmap creation on disk addition (diff)
downloadlinux-4348309a8ba535dfb1d4f6510739b56ccf4afead.tar.xz
linux-4348309a8ba535dfb1d4f6510739b56ccf4afead.zip
dm raid: also reject size change during recovery
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index 5e41bf34eb87..7a33af9cb78b 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -2772,10 +2772,10 @@ static int raid_ctr(struct dm_target *ti, unsigned argc, char **argv)
return -EINVAL;
}
rs_setup_recovery(rs, 0);
- } else if (rs_is_reshaping(rs)) {
- /* Have to reject size change request during reshape */
+ } else if (rs_is_recovering(rs) || rs_is_reshaping(rs)) {
+ /* Have to reject size change request during recovery/reshape */
if (calculated_dev_sectors != rs->dev[0].rdev.sectors) {
- ti->error = "Can't resize a reshaping raid set";
+ ti->error = "Can't resize a recovering/reshaping raid set";
return -EPERM;
}
/* skip setup rs */