summaryrefslogtreecommitdiffstats
path: root/super0.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-07-02 08:10:27 +0200
committerNeilBrown <neilb@suse.de>2013-07-02 08:10:27 +0200
commitefb3994e4829f35e74b422e61c37eba79561fd4c (patch)
treee4091d9739ba23e2d8d3c98eb40a5eff4a22080c /super0.c
parentsysfs: fix bugs in new sysfs_wait function. (diff)
downloadmdadm-efb3994e4829f35e74b422e61c37eba79561fd4c.tar.xz
mdadm-efb3994e4829f35e74b422e61c37eba79561fd4c.zip
revert-reshape: only impose reshape_position tests on raid[456]
This test is irrelevant for RAID10, so restrict it to those levels in which it is meaningful. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super0.c')
-rw-r--r--super0.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/super0.c b/super0.c
index b2019dfa..e7d86d87 100644
--- a/super0.c
+++ b/super0.c
@@ -650,14 +650,15 @@ static int update_super0(struct supertype *st, struct mdinfo *info,
pr_err("No active reshape to revert on %s\n",
devname);
else if (sb->delta_disks == 0)
- pr_err("%s: Can on revert reshape which changes number of devices\n",
+ pr_err("%s: Can only revert reshape which changes number of devices\n",
devname);
else {
int tmp;
int parity = sb->level == 6 ? 2 : 1;
rv = 0;
- if (sb->reshape_position % (
+ if (sb->level >= 4 && sb->level <= 6 &&
+ sb->reshape_position % (
sb->new_chunk/512 *
(sb->raid_disks - sb->delta_disks - parity))) {
pr_err("Reshape position is not suitably aligned.\n");