Commit f4330766 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe

nvme-rdma: use request to get integrity segments

The request tracks the integrity segments already, so no need to recount
the segments again.
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20240913182854.2445457-8-kbusch@meta.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 27c3785e
...@@ -1496,7 +1496,7 @@ static int nvme_rdma_dma_map_req(struct ib_device *ibdev, struct request *rq, ...@@ -1496,7 +1496,7 @@ static int nvme_rdma_dma_map_req(struct ib_device *ibdev, struct request *rq,
req->metadata_sgl->sg_table.sgl = req->metadata_sgl->sg_table.sgl =
(struct scatterlist *)(req->metadata_sgl + 1); (struct scatterlist *)(req->metadata_sgl + 1);
ret = sg_alloc_table_chained(&req->metadata_sgl->sg_table, ret = sg_alloc_table_chained(&req->metadata_sgl->sg_table,
blk_rq_count_integrity_sg(rq->q, rq->bio), rq->nr_integrity_segments,
req->metadata_sgl->sg_table.sgl, req->metadata_sgl->sg_table.sgl,
NVME_INLINE_METADATA_SG_CNT); NVME_INLINE_METADATA_SG_CNT);
if (unlikely(ret)) { if (unlikely(ret)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment