Re: PATCH for 2.3.29: block device setup cleanup.

Linus Torvalds (torvalds@transmeta.com)
Mon, 6 Dec 1999 11:17:26 -0800 (PST)


On Mon, 6 Dec 1999, Marcin Dalecki wrote:
>
> I'm aimin at the whole issure from the bottom (read device handling part)
> instead of starting by the top (kdev_t type and passing semantics).
> This is becouse I think that the lower level stuff is just a prerequsite
> for the second. Surely at the finish line I see too that kdev_t (or whatever
> name we end up....) will be vanishing.

Note that you don't have to start it from the bottom. In many cases it is
_easier_ to start it from the top: make a simple "device structure" that
in the first incarnation has nothing but (a) major/minor number and (b) a
reference count (we need the latter to make sure that we get the dynamic
behaviour right).

Then, all old code can be used pretty much without any changes, because
they still use MAJOR(kdev)/MINOR(kdev), and that's trivial to implement.

After that, we can migrate things one concept at a time over to just be
included directly in the device structure - things like hardware blocks
sizes, size of the device etc etc. The initial thing doesn't have to be
very large at all.

Linus

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