.TH "ll_rw_block" 9 "ll_rw_block" "25 May 1998" "Kernel Hacker's Manual" LINUX .SH NAME ll_rw_block \- level access to block devices .SH SYNOPSIS .B "void" ll_rw_block .BI "(int " rw "," .BI "int " nr "," .BI "struct buffer_head * *" bhs ");" .SH ARGUMENTS .IP "rw" 12 whether to READ or WRITE or maybe READA (readahead) .IP "nr" 12 number of \fBstruct\fP buffer_heads in the array .IP "bhs" 12 array of pointers to \fBstruct\fP buffer_head .SH "DESCRIPTION" \fBll_rw_block\fP takes an array of pointers to \fBstruct\fP 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 \fBgeneric_make_request\fP which \fBll_rw_block\fP calls. This function provides extra functionality that is not in \fBgeneric_make_request\fP 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 \fBsubmit_bh\fP (or \fBgeneric_make_request\fP) directly. .SH "CAVEAT" All of the buffers must be for the same device, and must also be