Name

bio_endio — end I/O on a bio

Synopsis

void bio_endio (struct bio * bio, unsigned int bytes_done, int error);

Arguments

bio

bio

bytes_done

number of bytes completed

error

error, if any

Description

bio_endio will end I/O on bytes_done number of bytes. This may be just a partial part of the bio, or it may be the whole bio. bio_endio is the preferred way to end I/O on a bio, it takes care of decrementing bi_size and clearing BIO_UPTODATE on error. error is 0 on success, and and one of the established -Exxxx (-EIO, for instance) error values in case something went wrong. Noone should call bi_end_io directly on a bio unless they own it and thus know that it has an end_io function.