Provided by: kernel-doc-2.4.27_2.4.27-12_all
ll_rw_block - level access to block devices
void ll_rw_block (int rw, int nr, struct buffer_head * *bhs);
rw whether to READ or WRITE or maybe READA (readahead)
nr number of struct buffer_heads in the array
bhs array of pointers to struct buffer_head
ll_rw_block takes an array of pointers to struct buffer_heads, and
requests an I/O operation on them, either a READ or a WRITE. The third
READA option is described in the documentation for generic_make_request
which ll_rw_block calls.
This function provides extra functionality that is not in
generic_make_request that is relevant to buffers in the buffer cache or
page cache. In particular it drops any buffer that it cannot get a
lock on (with the BH_Lock state bit), any buffer that appears to be
clean when doing a write request, and any buffer that appears to be up-
to-date when doing read request. Further it marks as clean buffers
that are processed for writing (the buffer cache wont assume that they
are actually clean until the buffer gets unlocked).
ll_rw_block sets b_end_io to simple completion handler that marks the
buffer up-to-date (if approriate), unlocks the buffer and wakes any
waiters. As client that needs a more interesting completion routine
should call submit_bh (or generic_make_request) directly.
All of the buffers must be for the same device, and must also be