[RFC] change of ->bd_op->open() semantics

Alexander Viro (viro@math.psu.edu)
Fri, 24 May 2002 16:12:39 -0400 (EDT)


Folks, I propose to cache the result of blk_get_queue() in
struct block_device upon ->open().

We already have struct block_device * whenever we are looking for
a queue. So the only real problem arises if value of blk_get_queue()
changes while device is opened. AFAICS nothing in the kernel pulls
such tricks (and to support them we would need to take care of a lot
of things, so changing the cached value wouldn't be a problem anyway).

Yes, it means updating every instance of ->open() for block
devices. All 30-odd of them. I can do that in a single pass - changes
are trivial.

It has an additional benefit of killing the array of default
queues on the same pass - a thing we will need to do sooner or later
anyway.

Does anybody see a problem with that?

-
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/