Fix wrong sqsize settings in fabrics
Subsystems (3)
Sagi Grimberg
maintainercover Fix wrong sqsize settings in fabrics
This should have been fixed by now, but apparently it wasn't.
Sagi Grimberg (3):
nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability
nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability
nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability
drivers/nvme/host/fc.c | 2 +- drivers/nvme/host/rdma.c | 2 +- drivers/nvme/target/loop.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
Sagi Grimberg
maintainerPATCH 1/3 nvme-loop: Fix sqsize wrong assignment based on ctrl MQES capability
both our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong.
--- drivers/nvme/target/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/loop.c +1 -1
@@ -408,7 +408,7 @@ static int nvme_loop_configure_admin_queue(struct nvme_loop_ctrl *ctrl) } ctrl->ctrl.sqsize = -min_t (int,NVME_CAP_MQES (ctrl->cap) +1 , ctrl->ctrl.sqsize); +min_t (int,NVME_CAP_MQES (ctrl->cap), ctrl->ctrl.sqsize); error =nvme_enable_ctrl (&ctrl->ctrl, ctrl->cap);if (error)
Signature · 1 line
2.7.4
Sagi Grimberg
maintainerPATCH 2/3 nvme-rdma: Fix sqsize wrong assignment based on ctrl MQES capability
In reply to Sagi Grimbergboth our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong.
--- drivers/nvme/host/rdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/rdma.c +1 -1
@@ -1600,7 +1600,7 @@ static int nvme_rdma_configure_admin_queue(struct nvme_rdma_ctrl *ctrl) } ctrl->ctrl.sqsize = -min_t (int,NVME_CAP_MQES (ctrl->cap) +1 , ctrl->ctrl.sqsize); +min_t (int,NVME_CAP_MQES (ctrl->cap), ctrl->ctrl.sqsize); error =nvme_enable_ctrl (&ctrl->ctrl, ctrl->cap);if (error)
Signature · 1 line
2.7.4
Sagi Grimberg
maintainerPATCH 3/3 nvme-fc: Fix sqsize wrong assignment based on ctrl MQES capability
In reply to Sagi Grimbergboth our sqsize and the controller MQES cap are a 0 based value, so making it 1 based is wrong.
--- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fc.c +1 -1
@@ -2011,7 +2011,7 @@ nvme_fc_configure_admin_queue(struct nvme_fc_ctrl *ctrl) } ctrl->ctrl.sqsize = -min_t (int,NVME_CAP_MQES (ctrl->cap) +1 , ctrl->ctrl.sqsize); +min_t (int,NVME_CAP_MQES (ctrl->cap), ctrl->ctrl.sqsize); error =nvme_enable_ctrl (&ctrl->ctrl, ctrl->cap);if (error)
Signature · 1 line
2.7.4
Christoph Hellwig
maintainercover Fix wrong sqsize settings in fabrics
In reply to Sagi GrimbergAll the fixes looks good:
But this duplicate code really screams for factoring it into helper..
Sagi Grimberg
maintainercover Fix wrong sqsize settings in fabrics
In reply to Sagi GrimbergQuoted 2 lines
This should have been fixed by now, but apparently it wasn't.
Jens, care to pick it up for your next rc pull-request?
Jens Axboe
maintainercover Fix wrong sqsize settings in fabrics
Quoted 4 lines · Sagi Grimberg
Quoted 2 lines
This should have been fixed by now, but apparently it wasn't.
Jens, care to pick it up for your next rc pull-request?
Yep, added, thanks.
Signature · 1 line
Jens Axboe