|
Re: [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c: msg#00064linux.raid
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> |
|---|---|---|
| Previous by Date: | Re: [PATCH] 2.4.18-26.7.x /proc/mdstat seq_file: 00064, Kevin P. Fleming |
|---|---|
| Next by Date: | multipath enhancements to md 2.4 + mdadm fixes: 00064, Lars Marowsky-Bree |
| Previous by Thread: | [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.ci: 00064, NeilBrown |
| Next by Thread: | Re: [PATCH] md - 3 of 3 - Don't check a device size before bd_get in md.c: 00064, Neil Brown |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |