diff options
author | NeilBrown <neilb@suse.de> | 2013-02-20 23:50:07 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-02-25 19:58:44 -0500 |
commit | f96c9f305c24a0d4a075e2c75aa6b417aa238687 (patch) | |
tree | d0da42d7d60fbb920c3d8e5027596ed310c0ab9c /drivers/md | |
parent | 58ebb34c49fcfcaa029e4b1c1453d92583900f9a (diff) |
md/raid0: improve error message when converting RAID4-with-spares to RAID0
Mentioning "bad disk number -1" exposes irrelevant internal detail.
Just say they are inactive and must be removed.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid0.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index d9babda582b9..0505452de8d6 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -175,7 +175,13 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf) | |||
175 | rdev1->new_raid_disk = j; | 175 | rdev1->new_raid_disk = j; |
176 | } | 176 | } |
177 | 177 | ||
178 | if (j < 0 || j >= mddev->raid_disks) { | 178 | if (j < 0) { |
179 | printk(KERN_ERR | ||
180 | "md/raid0:%s: remove inactive devices before converting to RAID0\n", | ||
181 | mdname(mddev)); | ||
182 | goto abort; | ||
183 | } | ||
184 | if (j >= mddev->raid_disks) { | ||
179 | printk(KERN_ERR "md/raid0:%s: bad disk number %d - " | 185 | printk(KERN_ERR "md/raid0:%s: bad disk number %d - " |
180 | "aborting!\n", mdname(mddev), j); | 186 | "aborting!\n", mdname(mddev), j); |
181 | goto abort; | 187 | goto abort; |