ll_rw_block (9) - Linux Manuals
ll_rw_block: level access to block devices (DEPRECATED)
ll_rw_block - level access to block devices (DEPRECATED)
op, int op_flags, int nr, struct buffer_head *bhs);
- whether to READ or WRITE
- number of struct buffer_heads in the array
- 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 REQ_OP_READ or a REQ_OP_WRITE. op_flags contains flags modifying the detailed I/O behavior, most notably REQ_RAHEAD.
This function 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 won't 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 appropriate), unlocks the buffer and wakes any waiters.