linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: raz ben yehuda <raziebe@gmail.com>
Cc: linux raid <linux-raid@vger.kernel.org>,
	yaron <yaronp@bitband.com>, ofer <ofer@bitband.com>
Subject: Re: Subject: [PATCH 006/009]: raid1: chunk size check in run
Date: Wed, 20 May 2009 11:45:17 +1000	[thread overview]
Message-ID: <18963.24749.218732.45333@notabene.brown> (raw)
In-Reply-To: message from raz ben yehuda on Tuesday May 19

On Tuesday May 19, raziebe@gmail.com wrote:
> have raid1 check chunk size in run method instead of in md

I dropped this patch.  chunk_size is not meaningful for raid1.

NeilBrown

>  raid1.c |    9 +++++++++
>  1 file changed, 9 insertions(+)
> Signed-off-by: raziebe@gmail.com
> ---
> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
> index 2c8d9e6..8609506 100644
> --- a/drivers/md/raid1.c
> +++ b/drivers/md/raid1.c
> @@ -1942,6 +1942,15 @@ static int run(mddev_t *mddev)
>  		       mdname(mddev), mddev->level);
>  		goto out;
>  	}
> +	/*
> +	 * chunk-size has to be a power of 2
> +	 */
> +	if ((1 << ffz(~mddev->chunk_size)) != mddev->chunk_size) {
> +		printk(KERN_ERR "%s chunk_size of %d not valid\n",
> +			mdname(mddev),
> +			mddev->chunk_size);
> +		return -EINVAL;
> +	}
>  	if (mddev->reshape_position != MaxSector) {
>  		printk("raid1: %s: reshape_position set but not supported\n",
>  		       mdname(mddev));
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-05-20  1:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19 16:04 Subject: [PATCH 006/009]: raid1: chunk size check in run raz ben yehuda
2009-05-20  1:45 ` Neil Brown [this message]
2009-05-20 13:50   ` raz ben yehuda
2009-05-21  3:11     ` Neil Brown
2009-05-21 13:32       ` raz ben yehuda
2009-05-21 11:33         ` Neil Brown

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=18963.24749.218732.45333@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=ofer@bitband.com \
    --cc=raziebe@gmail.com \
    --cc=yaronp@bitband.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).