Re: 2.5.70 add_disk(disk) re-registering disk->queue->elevator.kobj (bug?!)

From: Andrew Morton (
Date: Tue Jun 03 2003 - 20:00:02 EST

Lou Langholtz <> wrote:
> >The ramdisk driver was recently changed to do exactly this. From what
> >you say it appears that nbd needs the same treatment.
> >
> >
> I noticed that too but thought surely that couldn't be why the rd driver
> was changes. Cause... then it would seem via 'grep blk_init_queue
> drivers/block/*.c' that most of the block drivers need to be changed.
> And having a request_queue structure for every disk that's often (in
> these drivers) every minor device, seems like a lot of unneeded memory
> usage too. I'm afraid to ask this, but are you sure that each disk
> really is supposed to have its own request queue now? That seems less
> sensible than inverting the kobject parenting logic so that the
> request_queue.elevator kobject is the parent of the disk kobject. After
> all, makes more sense for multiple gen_disk objects to belong to the
> same elevator than for multiple elevators to belong to the same gen_disk
> no???

According to Al, we have a significant number of drivers in the tree in
which multiple gendisks shared the same queue. Sometimes because that's a
logical mapping onto how the hardware behaves.

As far as I know, the new queue-per-gendisk requirement is purely because
of this sysfs hierarchy problem.

So yes, perhaps you are right and we need to rethink things from the sysfs
angle rather than reworking the drivers. Along the lines which you

This isn't my area. Perhaps Jens, Greg or Pat could comment?
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:22 EST