Message ID | 1465389066-19119-12-git-send-email-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Looks fine,
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Would be nice to reduce the number of arguments
passed to __nvme_submit_sync_cmd() at some point..
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jun 08, 2016 at 04:55:41PM +0300, Sagi Grimberg wrote: > Looks fine, > > Reviewed-by: Sagi Grimberg <sagi@grimberg.me> > > Would be nice to reduce the number of arguments > passed to __nvme_submit_sync_cmd() at some point.. We're only adding them in our series.. But I agree that the number of arguments is a bit of a mess, but I couldn't really come up with something better. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index ee4b7f1..225a732 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -378,11 +378,10 @@ int nvmf_connect_admin_queue(struct nvme_ctrl *ctrl) ret = __nvme_submit_sync_cmd(ctrl->admin_q, &cmd, &cqe, data, sizeof(*data), 0, NVME_QID_ANY, 1, - BLK_MQ_REQ_RESERVED); + BLK_MQ_REQ_RESERVED | BLK_MQ_REQ_NOWAIT); if (ret) { - nvmf_log_connect_error(ctrl, - ret, le32_to_cpu(cqe.result), - &cmd, data); + nvmf_log_connect_error(ctrl, ret, le32_to_cpu(cqe.result), + &cmd, data); goto out_free_data; } @@ -437,12 +436,12 @@ int nvmf_connect_io_queue(struct nvme_ctrl *ctrl, u16 qid) strncpy(data->hostnqn, ctrl->opts->host->nqn, NVMF_NQN_SIZE); ret = __nvme_submit_sync_cmd(ctrl->connect_q, &cmd, &cqe, - data, sizeof(*data), 0, qid, 1, BLK_MQ_REQ_RESERVED); - if (ret) - nvmf_log_connect_error(ctrl, - ret, le32_to_cpu(cqe.result), - &cmd, data); - + data, sizeof(*data), 0, qid, 1, + BLK_MQ_REQ_RESERVED | BLK_MQ_REQ_NOWAIT); + if (ret) { + nvmf_log_connect_error(ctrl, ret, le32_to_cpu(cqe.result), + &cmd, data); + } kfree(data); return ret; }
Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/nvme/host/fabrics.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)