Re: [PATCH] add_partition silently ignored errors

From: Dirk Hohndel
Date: Fri Nov 02 2007 - 15:29:58 EST


On Fri, Nov 02, 2007 at 02:04:39PM +0100, Jens Axboe wrote:
> > >
> > > > > > IIRC, Al recently vetoed a similar patch. As far as I'm concerned, with
> > > > > > the correct return values, the patch then looks fine to me.
> >
> > So Al, are you ok with this one?

Still haven't seen feedback from Al...

> > [FILESYSTEM] add_partition ignores errors
>
> Looks good to me. One final return value note:
>
> > @@ -554,8 +573,11 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
> > if (from + size > get_capacity(disk)) {
> > printk(" %s: p%d exceeds device capacity\n",
> > disk->disk_name, p);
> > + return -EBUSY;
> > }
>
> -EBUSY seems a bit confusing here, although I don't know what the best
> value to return would be (and it probably doesn't matter). -EOVERFLOW?
> -ENOSPC?

I was wondering about that myself - EBUSY seemed to be used in a couple of
other cases where there wasn't a clear match, but I think EOVERFLOW actually
might make more sense. Opinions?

/D
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/