diff options
author | Ming Lin <ming.l@ssi.samsung.com> | 2016-03-22 00:24:44 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-04-12 13:13:23 -0600 |
commit | 37e58237a16b94fcd2c2d1b7e9c6e1ca661c231b (patch) | |
tree | 0225607142a78e0f110831626c033386e3c1694c /block/blk-core.c | |
parent | 81b76485afb54e3efeb1de5edbef761f4ad2830e (diff) | |
download | op-kernel-dev-37e58237a16b94fcd2c2d1b7e9c6e1ca661c231b.zip op-kernel-dev-37e58237a16b94fcd2c2d1b7e9c6e1ca661c231b.tar.gz |
block: add offset in blk_add_request_payload()
We could kmalloc() the payload, so need the offset in page.
Signed-off-by: Ming Lin <ming.l@ssi.samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b60537b..c502277 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1523,6 +1523,7 @@ EXPORT_SYMBOL(blk_put_request); * blk_add_request_payload - add a payload to a request * @rq: request to update * @page: page backing the payload + * @offset: offset in page * @len: length of the payload. * * This allows to later add a payload to an already submitted request by @@ -1533,12 +1534,12 @@ EXPORT_SYMBOL(blk_put_request); * discard requests should ever use it. */ void blk_add_request_payload(struct request *rq, struct page *page, - unsigned int len) + int offset, unsigned int len) { struct bio *bio = rq->bio; bio->bi_io_vec->bv_page = page; - bio->bi_io_vec->bv_offset = 0; + bio->bi_io_vec->bv_offset = offset; bio->bi_io_vec->bv_len = len; bio->bi_iter.bi_size = len; |