提交 4348309a 编写于 作者: H Heinz Mauelshagen 提交者: Mike Snitzer

dm raid: also reject size change during recovery

Signed-off-by: NHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
上级 f6895fd5
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册