linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Lukasz Orlowski <lukasz.orlowski@intel.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH 1/3] Create: Allow to create two volumes of different sizes within one container
Date: Wed, 21 Sep 2011 13:31:23 +1000	[thread overview]
Message-ID: <20110921133123.05d03613@notabene.brown> (raw)
In-Reply-To: <20110919165230.9239.4775.stgit@gklab-128-192.igk.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1858 bytes --]

On Mon, 19 Sep 2011 18:52:31 +0200 Lukasz Orlowski
<lukasz.orlowski@intel.com> wrote:

> Allows to create RAID 5 volume on 3 disks and then RAID 1 volume on 2
> disks withing the same container.
> 
> Signed-off-by: Lukasz Orlowski <lukasz.orlowski@intel.com>
> ---
>  super-intel.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index a78d723..616853b 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5041,6 +5041,12 @@ static int validate_geometry_imsm_volume(struct supertype *st, int level,
>  	if (!super)
>  		return 0;
>  
> +	if (mpb->num_raid_devs > 0 && mpb->num_disks != raiddisks) {
> +		fprintf(stderr, Name ": the option-rom requires all "
> +			"member disks to be a member of all volumes.\n");
> +		return 0;
> +	}
> +
>  	if (!validate_geometry_imsm_orom(super, level, layout, raiddisks, chunk, verbose)) {
>  		fprintf(stderr, Name ": RAID gemetry validation failed. "
>  			"Cannot proceed with the action(s).\n");
> 

This patch doesn't make sense.

Firstly the description seems backwards.  The purpose of this patch seems to
disallow the creation of two volumes with different numbers of devices, but
the description seems to say that it allows it.  But that is a small point.

->num_disks is the number of devices in the container including spares.  This
patch would allow the first array in a container to have fewer devices than
the container with the rest being spares.  However the second array would have
to have the same number of devices as the container - even if this is more
than the first array.

Presumably what you really want to do is:
  if num_raid_devs > 0, then find the relevant imsm_map, and then check if
     map->num_members == raiddisks
  and fail if they are not equal.

??

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

  reply	other threads:[~2011-09-21  3:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 16:52 [PATCH 0/3] Series short description Lukasz Orlowski
2011-09-19 16:52 ` [PATCH 1/3] Create: Allow to create two volumes of different sizes within one container Lukasz Orlowski
2011-09-21  3:31   ` NeilBrown [this message]
2011-09-21  6:31     ` Dan Williams
2011-09-21  6:55       ` NeilBrown
2011-12-14 18:15         ` Dan Williams
2011-09-19 16:52 ` [PATCH 2/3] Create: Unnecessary prompt about device being busy Lukasz Orlowski
2011-09-21  3:36   ` NeilBrown
2011-09-19 16:52 ` [PATCH 3/3] Create: Incorrect message when creating a volume with explicit md dev name Lukasz Orlowski
2011-09-21  3:48   ` NeilBrown

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=20110921133123.05d03613@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=lukasz.orlowski@intel.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;
as well as URLs for NNTP newsgroup(s).