.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "BIO_ENDIO" "" "06 October 2005" "" ""
.SH NAME
bio_endio \- end I/O on a bio
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
void bio_endio (struct bio * \fIbio\fB, unsigned int \fIbytes_done\fB, int \fIerror\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIbio\fB\fR
bio
.TP
\fB\fIbytes_done\fB\fR
number of bytes completed
.TP
\fB\fIerror\fB\fR
error, if any
.SH "DESCRIPTION"
.PP
\fBbio_endio\fR will end I/O on \fIbytes_done\fR number of bytes. This may be
just a partial part of the bio, or it may be the whole bio. \fBbio_endio\fR
is the preferred way to end I/O on a bio, it takes care of decrementing
bi_size and clearing BIO_UPTODATE on error. \fIerror\fR is 0 on success, and
and one of the established -Exxxx (-EIO, for instance) error values in
case something went wrong. Noone should call \fBbi_end_io\fR directly on
a bio unless they own it and thus know that it has an end_io function.