Re: [bk/patch] driver model update: device_unregister()

From: Patrick Mochel (mochel@osdl.org)
Date: Wed Oct 09 2002 - 12:24:38 EST


On Wed, 9 Oct 2002, Linus Torvalds wrote:

>
> On Wed, 9 Oct 2002, Patrick Mochel wrote:
> >
> > No problem; I'll do that today. But, I also think some of the stuff in
> > fs/partitions/check.c is bogus and should die. Partitions are not devices,
> > and shouldn't be treated as such.
>
> I think that is a valid argument as long as it's called "driverfs" or
> something, but since the thing is clearly evolving into a "kernelfs" and
> has drivers and devices as only a part of its structure knowledge, and is
> used to expose various kernel hierarchies and relationships, I actually
> think that it makes sense to expose the relationship of partitions to
> devices.
>
> (Not that it has to use "struct device" to do so, of course, although I
> don't see any major reason why it couldn't..)

I agree that it is useful to expose the partitions of devices via the
filesystem, but struct device seems way too heavy-handed to describe them.
I think they would be better off as a single attribute file that dumped
the partition data about the disk.

You would have something like:

/sys/class/disk/
|-- devices
| | `-- 0 -> ../../../root/wherever

and in 'wherever':

/sys/root/wherever/
|-- partitions

I dunno about the format; or if we would want one file or one per
partition.

> What's the oops due to?

Sorry, I take it back. It wasn't an oops; it was a backtrace due to the
partitions being removed during an illegal context.

        -pat

-
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 : Tue Oct 15 2002 - 22:00:31 EST