diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-14 09:42:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-22 18:47:39 +0200 |
commit | bdf8710d69f82ee6fd41b0166300c3306898b3c1 (patch) | |
tree | 6c000bb2ac29bc058304faf583d58628cb97b34f /block/blk-merge.c | |
parent | block: move dma drain handling to scsi (diff) | |
download | linux-bdf8710d69f82ee6fd41b0166300c3306898b3c1.tar.xz linux-bdf8710d69f82ee6fd41b0166300c3306898b3c1.zip |
block: move dma_pad handling from blk_rq_map_sg into the callers
There are only two callers of blk_rq_map_sg/__blk_rq_map_sg that set
the dma_pad value in the queue. Move the handling into those callers
instead of burdening the common code, and move the ->extra_len field
from struct request to struct scsi_cmnd.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 25f5a5e00ee6..c49eb3bdd0be 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -531,14 +531,6 @@ int __blk_rq_map_sg(struct request_queue *q, struct request *rq, else if (rq->bio) nsegs = __blk_bios_map_sg(q, rq->bio, sglist, last_sg); - if (blk_rq_bytes(rq) && (blk_rq_bytes(rq) & q->dma_pad_mask)) { - unsigned int pad_len = - (q->dma_pad_mask & ~blk_rq_bytes(rq)) + 1; - - (*last_sg)->length += pad_len; - rq->extra_len += pad_len; - } - if (*last_sg) sg_mark_end(*last_sg); |