Hi Andrew, Today's linux-next merge of the akpm tree got a conflict in block/blk-core.c between commit f79ea4161434 ("block: Refactor blk_update_request()") from the block 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@canb.auug.org.au diff --cc block/blk-core.c index f224d17,186603b..0000000 --- a/block/blk-core.c +++ b/block/blk-core.c @@@ -2280,9 -2251,11 +2281,10 @@@ EXPORT_SYMBOL(blk_fetch_request) * %false - this request doesn't have any more data * %true - this request has more data **/ - bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) + bool blk_update_request(struct request *req, int error, unsigned int nr_bytes, + struct batch_complete *batch) { - int total_bytes, bio_nbytes, next_idx = 0; - struct bio *bio; + int total_bytes; if (!req->bio) return false; @@@ -2328,21 -2301,56 +2330,21 @@@ blk_account_io_completion(req, nr_bytes); - total_bytes = bio_nbytes = 0; - while ((bio = req->bio) != NULL) { - int nbytes; + total_bytes = 0; + while (req->bio) { + struct bio *bio = req->bio; + unsigned bio_bytes = min(bio->bi_size, nr_bytes); - if (nr_bytes >= bio->bi_size) { + if (bio_bytes == bio->bi_size) req->bio = bio->bi_next; - nbytes = bio->bi_size; - req_bio_endio(req, bio, nbytes, error, batch); - next_idx = 0; - bio_nbytes = 0; - } else { - int idx = bio->bi_idx + next_idx; - req_bio_endio(req, bio, bio_bytes, error); - if (unlikely(idx >= bio->bi_vcnt)) { - blk_dump_rq_flags(req, "__end_that"); - printk(KERN_ERR "%s: bio idx %d >= vcnt %d\n", - __func__, idx, bio->bi_vcnt); - break; - } ++ req_bio_endio(req, bio, bio_bytes, error, batch); - nbytes = bio_iovec_idx(bio, idx)->bv_len; - BIO_BUG_ON(nbytes > bio->bi_size); + total_bytes += bio_bytes; + nr_bytes -= bio_bytes; - /* - * not a complete bvec done - */ - if (unlikely(nbytes > nr_bytes)) { - bio_nbytes += nr_bytes; - total_bytes += nr_bytes; - break; - } - - /* - * advance to the next vector - */ - next_idx++; - bio_nbytes += nbytes; - } - - total_bytes += nbytes; - nr_bytes -= nbytes; - - bio = req->bio; - if (bio) { - /* - * end more in this run, or just return 'not-done' - */ - if (unlikely(nr_bytes <= 0)) - break; - } + if (!nr_bytes) + break; } /*