---
name: "blk_end_io"
section: "9"
platform: "linux"
package: "linux-manual-2.6.26"
version: "2.6.26-29"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/blk_end_io"
---

# blk\_end\_io(9)

Generic end\_io function to complete a request.

## NAME

blk\_end\_io - Generic end\_io function to complete a request.

## SYNOPSIS

**int blk\_end\_io(struct request \*** *rq***, int** *error***, unsigned int** *nr\_bytes***, unsigned int** *bidi\_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 *rq*

*bidi\_bytes*

number of bytes to complete *rq*-\>next\_rq

*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* and *rq*-\>next\_rq. If *rq* has leftover, sets it up for the next range of segments.

## RETURN

0 - we are done with this request 1 - this request is not freed yet, it still has pending buffers.

## COPYRIGHT
