Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx> --- drivers/md/raid1.c | 4 ++-- drivers/md/raid5.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8034fbd..e2f3783 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -2799,12 +2799,12 @@ static int run(struct mddev *mddev) if (mddev->level != 1) { printk(KERN_ERR "md/raid1:%s: raid level not set to mirroring (%d)\n", mdname(mddev), mddev->level); - return -EIO; + return -EINVAL; } if (mddev->reshape_position != MaxSector) { printk(KERN_ERR "md/raid1:%s: reshape_position set but not supported\n", mdname(mddev)); - return -EIO; + return -EINVAL; } /* * copy the already verified devices into our private RAID1 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index c5439dc..684ca76 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -5088,7 +5088,7 @@ static struct r5conf *setup_conf(struct mddev *mddev) && mddev->new_level != 6) { printk(KERN_ERR "md/raid:%s: raid level not set to 4/5/6 (%d)\n", mdname(mddev), mddev->new_level); - return ERR_PTR(-EIO); + return ERR_PTR(-EINVAL); } if ((mddev->new_level == 5 && !algorithm_valid_raid5(mddev->new_layout)) || @@ -5096,7 +5096,7 @@ static struct r5conf *setup_conf(struct mddev *mddev) && !algorithm_valid_raid6(mddev->new_layout))) { printk(KERN_ERR "md/raid:%s: layout %d not supported\n", mdname(mddev), mddev->new_layout); - return ERR_PTR(-EIO); + return ERR_PTR(-EINVAL); } if (mddev->new_level == 6 && mddev->raid_disks < 4) { printk(KERN_ERR "md/raid:%s: not enough configured devices (%d, minimum 4)\n", -- 1.7.9.5 ?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f