blk_end_request_callback

Langue: en

Autres versions - même langue

Version: June 2009 (debian - 07/07/09)

Section: 9 (Appels noyau Linux)

NAME

blk_end_request_callback - Special helper function for tricky drivers

SYNOPSIS

int blk_end_request_callback(struct request * rq, int error, unsigned int nr_bytes, int ()(struct request *) drv_callback);

ARGUMENTS

rq

the request being processed

error

0 for success, < 0 for error

nr_bytes

number of bytes to complete

drv_callback

function called between completion of bios in the request and completion of the request. If the callback returns non 0, this helper returns without completion of the request.

DESCRIPTION

Ends I/O on a number of bytes attached to rq. If rq has leftover, sets it up for the next range of segments.

This special helper function is used only for existing tricky drivers. (e.g. cdrom_newpc_intr of ide-cd) This interface will be removed when such drivers are rewritten. Don't use this interface in other places anymore.

RETURN

0 - we are done with this request 1 - this request is not freed yet. this request still has pending buffers or the driver doesn't want to finish this request yet.