Hi Andrew, Today's linux-next merge of the akpm tree got a conflict in fs/bio.c between commit 0a82a8d132b2 ("Revert "block: add missing block_bio_complete() tracepoint"") from Linus' tree and commit "block, aio: batch completion for bios/kiocbs" from the akpm tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx diff --cc fs/bio.c index e082907,a8081ae..0000000 --- a/fs/bio.c +++ b/fs/bio.c @@@ -1688,31 -1689,42 +1689,40 @@@ void bio_flush_dcache_pages(struct bio EXPORT_SYMBOL(bio_flush_dcache_pages); #endif - /** - * bio_endio - end I/O on a bio - * @bio: bio - * @error: error, if any - * - * Description: - * bio_endio() will end I/O on the whole bio. bio_endio() is the - * preferred way to end I/O on a bio, it takes care of 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. No one should call bi_end_io() directly on a - * bio unless they own it and thus know that it has an end_io - * function. - **/ - void bio_endio(struct bio *bio, int error) + static inline void __bio_endio(struct bio *bio, struct batch_complete *batch) { - if (error) + if (bio->bi_error) clear_bit(BIO_UPTODATE, &bio->bi_flags); else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) - error = -EIO; + bio->bi_error = -EIO; if (bio->bi_end_io) - bio->bi_end_io(bio, error, NULL); + bio->bi_end_io(bio, bio->bi_error, batch); + } + + void bio_endio_batch(struct bio *bio, int error, struct batch_complete *batch) + { + if (error) + bio->bi_error = error; + - trace_block_bio_complete(bio, error); - + if (batch) + bio_list_add(&batch->bio, bio); + else + __bio_endio(bio, batch); + + } + EXPORT_SYMBOL(bio_endio_batch); + + void batch_complete(struct batch_complete *batch) + { + struct bio *bio; + + while ((bio = bio_list_pop(&batch->bio))) + __bio_endio(bio, batch); + + batch_complete_aio(batch); } - EXPORT_SYMBOL(bio_endio); + EXPORT_SYMBOL(batch_complete); void bio_pair_release(struct bio_pair *bp) {
Attachment:
pgpVdVlP1klQG.pgp
Description: PGP signature