From: Lars Marowsky-Bree <lmb@suse.de>
To: NeilBrown <neilb@cse.unsw.edu.au>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c
Date: Thu, 13 Mar 2003 10:22:09 +0100 [thread overview]
Message-ID: <20030313092209.GD32759@marowsky-bree.de> (raw)
In-Reply-To: <E18tH4s-0008ID-00@notabene.cse.unsw.edu.au>
On 2003-03-13T12:00:10,
NeilBrown <neilb@cse.unsw.edu.au> said:
> Lars Marowsky-Bree <lmb@suse.de> noted that we shouldn't
> be using blk_size for a device before calling bd_get.
> This code rearrangement fixes this little issue.
>
>
> ----------- Diffstat output ------------
> ./drivers/md/md.c | 15 ++++++++-------
> 1 files changed, 8 insertions(+), 7 deletions(-)
>
> diff ./drivers/md/md.c~current~ ./drivers/md/md.c
> --- ./drivers/md/md.c~current~ 2003-03-13 10:47:13.000000000 +1100
> +++ ./drivers/md/md.c 2003-03-13 11:46:25.000000000 +1100
> @@ -2395,13 +2395,6 @@ static int hot_add_disk(mddev_t * mddev,
> }
>
> persistent = !mddev->sb->not_persistent;
> - size = calc_dev_size(dev, mddev, persistent);
> -
> - if (size < mddev->sb->size) {
> - printk(KERN_WARNING "md%d: disk size %d blocks < array size %d\n",
> - mdidx(mddev), size, mddev->sb->size);
> - return -ENOSPC;
> - }
>
> rdev = find_rdev(mddev, dev);
> if (rdev)
> @@ -2423,6 +2416,14 @@ static int hot_add_disk(mddev_t * mddev,
> err = -EINVAL;
> goto abort_export;
> }
> + size = calc_dev_size(dev, mddev, persistent);
> +
> + if (size < mddev->sb->size) {
> + printk(KERN_WARNING "md%d: disk size %d blocks < array size %d\n",
> + mdidx(mddev), size, mddev->sb->size);
> + err = -ENOSPC;
> + gotot abort_export;
Hi Neil, the patch seems to have gotten mangled here, I'm reasonably sure
"gotot" won't compile at least ;-)
Sincerely,
Lars Marowsky-Brée <lmb@suse.de>
--
Principal Squirrel
SuSE Labs - Research & Development, SuSE Linux AG
"If anything can go wrong, it will." "Chance favors the prepared (mind)."
-- Capt. Edward A. Murphy -- Louis Pasteur
-
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
next prev parent reply other threads:[~2003-03-13 9:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-13 1:00 [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c NeilBrown
2003-03-13 9:22 ` Lars Marowsky-Bree [this message]
2003-03-13 9:38 ` Neil Brown
2003-03-19 19:13 ` Marcelo Tosatti
2003-03-19 23:37 ` 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=20030313092209.GD32759@marowsky-bree.de \
--to=lmb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=neilb@cse.unsw.edu.au \
/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).