From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Yi Zhang <yizhan@redhat.com>
Cc: linux-raid@vger.kernel.org, neilb@suse.com, shli@kernel.org,
xni@redhat.com
Subject: Re: [PATCH] Grow: analyse_change add notification about only 2-device can be convert from RAID1 to RAID5
Date: Fri, 11 Mar 2016 12:41:44 -0500 [thread overview]
Message-ID: <wrfja8m47vzb.fsf@redhat.com> (raw)
In-Reply-To: <1457688400-12666-1-git-send-email-yizhan@redhat.com> (Yi Zhang's message of "Fri, 11 Mar 2016 17:26:40 +0800")
Yi Zhang <yizhan@redhat.com> writes:
> Notify "Can only convert a 2-device array to RAID5" instead of
> "Impossibly level change request for RAID1" when convert from
> RAID1 to RAID5 if the disk num is not equal two like RAID4/5->RAID1
> did.
>
> Signed-off-by: Yi Zhang <yizhan@redhat.com>
> ---
> Grow.c | 3 +++
> 1 file changed, 3 insertions(+)
Applied!
Thanks,
Jes
>
> diff --git a/Grow.c b/Grow.c
> index cf2750a..4e2fc08 100755
> --- a/Grow.c
> +++ b/Grow.c
> @@ -1077,6 +1077,9 @@ char *analyse_change(char *devname, struct mdinfo *info, struct reshape *re)
> re->level = 1;
> return NULL;
> }
> + if (info->array.raid_disks != 2 &&
> + info->new_level == 5)
> + return "Can only convert a 2-device array to RAID5";
> if (info->array.raid_disks == 2 &&
> info->new_level == 5) {
prev parent reply other threads:[~2016-03-11 17:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 9:26 [PATCH] Grow: analyse_change add notification about only 2-device can be convert from RAID1 to RAID5 Yi Zhang
2016-03-11 17:41 ` Jes Sorensen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wrfja8m47vzb.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.com \
--cc=shli@kernel.org \
--cc=xni@redhat.com \
--cc=yizhan@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox