logo       

Re: [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c: msg#00064

linux.raid

Subject: Re: [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c

On 2003-03-13T12:00:10,
NeilBrown <neilb@xxxxxxxxxxxxxxx> said:

> Lars Marowsky-Bree <lmb@xxxxxxx> 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@xxxxxxx>

--
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise