small fixes for 4.16 and -stable
Subsystems (2)
Christoph Hellwig
maintainerFix a regression when using built-in transport drivers, and fix special payload commands on rdma and loop.
Christoph Hellwig
maintainerPATCH 1/3 nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
THIS_MODULE evaluates to NULL when used from code built into the kernel, thus breaking built-in transport modules. Remove the bogus check.
--- drivers/nvme/host/fabrics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fabrics.c +1 -1
@@ -493,7 +493,7 @@ EXPORT_SYMBOL_GPL(nvmf_should_reconnect);*/ int nvmf_register_transport (struct nvmf_transport_ops *ops) { -if (!ops->create_ctrl || !ops->module) +if (!ops->create_ctrl)return -EINVAL ;down_write (&nvmf_transports_rwsem);
Signature · 1 line
2.14.2
PATCH 1/3 nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
Quoted 5 lines · Christoph Hellwig
THIS_MODULEevaluates to NULL when used from code built into the kernel, thus breaking built-in transport modules. Remove the bogus check.Fixes 0de5cd36 ("nvme-fabrics: protect against module unload during create_ctrl")Signed-off-by Christoph Hellwig <hch at lst.de>
Looks good.
Sagi Grimberg
maintainerPATCH 1/3 nvme-fabrics: don't check for non-NULL module in nvmf_register_transport
In reply to Christoph HellwigSorry :)
Christoph Hellwig
maintainerPATCH 2/3 nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
In reply to Christoph Hellwigblk_rq_bytes does the wrong thing for special payloads like discards and might cause the driver to not set up a SGL.
--- drivers/nvme/host/rdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/host/rdma.c +2 -2
@@ -1051,7 +1051,7 @@ static void nvme_rdma_unmap_data(struct nvme_rdma_queue *queue,struct nvme_rdma_device *dev = queue->device;struct ib_device *ibdev = dev->dev; -if (!blk_rq_bytes (rq)) +if (!blk_rq_payload_bytes (rq))return ;if (req->mr) {
@@ -1166,7 +1166,7 @@ static int nvme_rdma_map_data(struct nvme_rdma_queue *queue, c->common.flags |=NVME_CMD_SGL_METABUF ; -if (!blk_rq_bytes (rq)) +if (!blk_rq_payload_bytes (rq))return nvme_rdma_set_sg_null (c); req->sg_table.sgl = req->first_sgl;
Signature · 1 line
2.14.2
PATCH 2/3 nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
Quoted 4 lines · Christoph Hellwig
blk_rq_bytesdoes the wrong thing for special payloads like discards and might cause the driver to not set up a SGL.Signed-off-by Christoph Hellwig <hch at lst.de>
Looks good.
Sagi Grimberg
maintainerPATCH 2/3 nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
In reply to Christoph HellwigPATCH 2/3 nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
In reply to Christoph HellwigLooks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 2/3 nvme-rdma: use blk_rq_payload_bytes instead of blk_rq_bytes
In reply to Christoph HellwigQuoted 2 lines · Christoph Hellwig
blk_rq_bytesdoes the wrong thing for special payloads like discards and might cause the driver to not set up a SGL.
Should "Fixes:" and "Cc: stable" tags be added to this patch?
Thanks,
Bart.
Christoph Hellwig
maintainerPATCH 3/3 nvmet-loop: use blk_rq_payload_bytes for sgl selection
In reply to Christoph Hellwigblk_rq_bytes does the wrong thing for special payloads like discards and might cause the driver to not set up a SGL.
--- drivers/nvme/target/loop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvme/target/loop.c +2 -2
@@ -184,7 +184,7 @@ static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx,return BLK_STS_OK ; } -if (blk_rq_bytes (req)) { +if (blk_rq_payload_bytes (req)) { iod->sg_table.sgl = iod->first_sgl; if (sg_alloc_table_chained(&iod->sg_table, blk_rq_nr_phys_segments(req),
@@ -193,7 +193,7 @@ static blk_status_t nvme_loop_queue_rq(struct blk_mq_hw_ctx *hctx, iod->req.sg = iod->sg_table.sgl; iod->req.sg_cnt =blk_rq_map_sg (req->q, req, iod->sg_table.sgl); - iod->req.transfer_len =blk_rq_bytes (req); + iod->req.transfer_len =blk_rq_payload_bytes (req); }blk_mq_start_request (req);
Signature · 1 line
2.14.2
PATCH 3/3 nvmet-loop: use blk_rq_payload_bytes for sgl selection
Quoted 4 lines · Christoph Hellwig
blk_rq_bytesdoes the wrong thing for special payloads like discards and might cause the driver to not set up a SGL.Signed-off-by Christoph Hellwig <hch at lst.de>
Looks good.
Sagi Grimberg
maintainerPATCH 3/3 nvmet-loop: use blk_rq_payload_bytes for sgl selection
In reply to Christoph HellwigPATCH 3/3 nvmet-loop: use blk_rq_payload_bytes for sgl selection
In reply to Christoph HellwigLooks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn Storage jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850