On Mon, Jun 01, 2015 at 01:19:13AM +0000, Junichi Nomura wrote: > For example, blk_update_request() does this: > > > while (req->bio) { > > struct bio *bio = req->bio; > > unsigned bio_bytes = min(bio->bi_iter.bi_size, nr_bytes); > > > > if (bio_bytes == bio->bi_iter.bi_size) > > req->bio = bio->bi_next; > > if bi_iter.bi_size is not correct, we possibly fail > to move the req->bio pointer. > > So other test case could be: > > 1. Create a bio with 1MB size > 2. Submit a request with the bio > 3. From lower driver, > firstly partial complete 512KB with error, > secondly partial complete 512KB without error > 4. The I/O should complete successfully. It will be returned to the upper layer after the first completion as mentioned in my previous mail. Same for the other test. Think of partial completion as a way for SCSI targets to chunk transfers, higher layers will only see full success/failure cases. For that reason we also removed the bytes completed argument to ->bi_end_io because the callers should not care about these details. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel