OSDN Git Service

block: enable multi-page bvec for passthrough IO
authorMing Lei <ming.lei@redhat.com>
Fri, 29 Mar 2019 07:08:00 +0000 (15:08 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Apr 2019 18:11:39 +0000 (12:11 -0600)
commit489fbbcb51d0249569d863f9220de69cb31f1922
tree755f9dc717057372d6b6e6207887c714b2a6c311
parent190470871ae28da7bdb3909f6124385c8472fc97
block: enable multi-page bvec for passthrough IO

Now block IO stack is basically ready for supporting multi-page bvec,
however it isn't enabled on passthrough IO.

One reason is that passthrough IO is dispatched to LLD directly and bio
split is bypassed, so the bio has to be built correctly for dispatch to
LLD from the beginning.

Implement multi-page support for passthrough IO by limitting each bvec
as block device's segment and applying all kinds of queue limit in
blk_add_pc_page(). Then we don't need to calculate segments any more for
passthrough IO any more, turns out code is simplified much.

Cc: Omar Sandoval <osandov@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c