Design-Question: end_that_request_* and bh->b_end_io hooks

From: Carsten Otte (
Date: Tue Jul 24 2001 - 12:20:46 EST

Hi Folks,

as you are deeper into block-devices & filesystems than me,
here are my two simple questions in short:
Is it legal for a filesystem (or whatever) to install a hook into
which calls generic_make_request?
Do block drivers need or are they allowed to hold the io_request_lock or
other (local)
locks when calling end_that_request_*?

Rational / Explanation:
We encountered a problem with our block device driver (dasd on arch=s390)
together with JFS:
In our bottom half ,we grab the io_request_lock & disable interrupts and
other stuff) call end_that_request* for finalized requests. Afterwards we
the lock and enable again.
The problem is, that JFS hooks into bh->b_end_io and calls
generic_make_request then.
Note that generic_make_request grabs the io_request_lock, may call schedule
(in __get_request_wait), and may call the do_request function of the block
device driver.
Do you think that this hook is legal (and we have to change the device
driver to
call end_that_request from outside the bottom half -scheduling in
interrupt!- without
holding the io_request_lock) or does the fs need to be changed?
Do other filesystems (esp. ReiserFS) require or grab the io_request_lock in
b_end_io hooks?

Please CC: answers directly me since I do not read the FS-Lists regulary.

mit freundlichem Gruß / with kind regards
Carsten Otte

IBM Deutschland Entwicklung GmbH
Linux for 390/zSeries Development - Device Driver Team
Phone: +49/07031/16-4076
IBM internal phone: *120-4076

We are Linux.
Resistance indicates that you're missing the point!

- 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 : Tue Jul 31 2001 - 21:00:17 EST