blk_update_request — Special helper function for request stacking drivers
boolblk_update_request( | struct request *req, |
| interror, | |
unsigned intnr_bytes); |
struct request * reqthe request being processed
int error0 for success, <0 for error
unsigned int nr_bytes number of bytes to completereq
Ends I/O on a number of bytes attached toreq, but doesn't complete the request structure even ifreq doesn't have leftover. Ifreq has leftover, sets it up for the next range of segments.
This special helper function is only for request stacking drivers (e.g. request-based dm) so that they can handle partial completion. Actual device drivers should use blk_end_request instead.
Passing the result ofblk_rq_bytes asnr_bytes guaranteesfalse return from this function.