Skip to content

Commit 18ecd97

Browse files
author
Christoph Hellwig
committed
nvme-fc: keep ctrl->sqsize in sync with opts->queue_size
Also update the sqsize field when capping the queue size, and remove the check a queue size that is larger than sqsize given that sqsize is only initialized from opts->queue_size. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Reviewed-by: James Smart <[email protected]>
1 parent cefa103 commit 18ecd97

File tree

1 file changed

+1
-9
lines changed
  • drivers/nvme/host

1 file changed

+1
-9
lines changed

drivers/nvme/host/fc.c

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3165,15 +3165,7 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)
31653165
"to maxcmd\n",
31663166
opts->queue_size, ctrl->ctrl.maxcmd);
31673167
opts->queue_size = ctrl->ctrl.maxcmd;
3168-
}
3169-
3170-
if (opts->queue_size > ctrl->ctrl.sqsize + 1) {
3171-
/* warn if sqsize is lower than queue_size */
3172-
dev_warn(ctrl->ctrl.device,
3173-
"queue_size %zu > ctrl sqsize %u, reducing "
3174-
"to sqsize\n",
3175-
opts->queue_size, ctrl->ctrl.sqsize + 1);
3176-
opts->queue_size = ctrl->ctrl.sqsize + 1;
3168+
ctrl->ctrl.sqsize = opts->queue_size - 1;
31773169
}
31783170

31793171
ret = nvme_fc_init_aen_ops(ctrl);

0 commit comments

Comments
 (0)