Re: Block device interface could use some work

Peter Denison (
Tue, 5 Nov 1996 18:53:05 +0000 (GMT)

On Mon, 4 Nov 1996, Theodre Ts'o wrote:

[ Block device driver abstraction ]
> After looking at the code (fortunately, I had not just eaten), I've come
> to the conclusion that the block driver code could use some serious
> rototilling. Unlike the tty or SCSI abstraction, there are
> device-dependent sections of code in blk.h, ll_rw_blk.h, and other
> routines spread across the block device abstraction. The abstraction
> boundary itself is not particularily clean, as the SCSI devices, the
> CD-ROM devices, and the IDE device drivers feel free to violate the
> abstraction boundary and directly muck with the request queue directly,
> for performance reasons. (What this probably means is that some of the
> things they are trying to do should be incorporated into the blk.h
> abstraction.) As a final example, the end_request() function is a
> statically defined function defined in blk.h, which is replicated for
> each device driver.
Here, here. I wouldn't regard myself as competent enough to do it,
but I certainly could use it being done. In trying to write the driver for
Promise IDE cards, I have come across the problem that I need to issue a
request for more than 127 sectors to the interface in two halves. I could
not work out how to fit that in to the current "scheme of things".

> The bottom line is that the Linux block driver abstraction is screaming
> for a re-write. I currently have too many Linux projects on my plate
> (including the aforementioned USELINUX tutorial which caused me to
> notice this problem in the first place), so I'm settling for writing a
> note to linux-kernel pointing out the problem. Perhaps some of the
> people who are currently maintaining block devices would be willing to
> take a look at this? Linus? What do you think?
> - Ted
I'll help if I can, but I'll need some direction from those "in
the know"

Peter Denison <>
Currently (still) working on a driver for Promise cards under Linux.