Re: [PATCH] register_blkdev

From: Greg KH (greg@kroah.com)
Date: Sat Mar 08 2003 - 14:37:22 EST


On Sat, Mar 08, 2003 at 03:11:42PM +0000, Alan Cox wrote:
> On Sat, 2003-03-08 at 00:50, Greg KH wrote:
> > > So we need a maxminors flag in the register for 2.6 I guess ?
> >
> > Do you mean to only increase the number of majors, and not minors then?
>
> How about an interface that looks like
>
> register_chr_device(blah. blah, MY_MAX_MINOR);
>
> and we can delete all the if < 0 || >= MAX return logic from the drivers
> as we go. Right now each driver checks and several in the past had off
> by one errors.

That's a good start, but why not change that to a simple,
HOW_MANY_MINORS_I_WANT, which will work the same way now, but allow us
to change to a pure dynamic major/minor allocation scheme in the future
by only modifying the register_chr_device() code. Same thing for
register_blkdev().

Although if we increase the width of dev_t then a need for dynamic
major/minors is pretty much gone...

thanks,

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



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:16 EST