diff options
author | Sagi Grimberg <sagi@lightbitslabs.com> | 2018-12-03 17:52:11 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-12-13 09:58:55 +0100 |
commit | 1672ddb8d691e4433806373ec4104f37a86efab0 (patch) | |
tree | 7484da0625817b0d42d83b05fbd41d783a39b425 /drivers/nvme/target/fabrics-cmd.c | |
parent | 65d69e2505bb64f6a8d7f417f6e46e2a351174c6 (diff) |
nvmet: Add install_queue callout
nvmet-tcp will implement it to allocate queue commands which
are only known at nvmf connect time (sq size).
Signed-off-by: Sagi Grimberg <sagi@lightbitslabs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/fabrics-cmd.c')
-rw-r--r-- | drivers/nvme/target/fabrics-cmd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c index 328ae46d8344..ee7d84621d65 100644 --- a/drivers/nvme/target/fabrics-cmd.c +++ b/drivers/nvme/target/fabrics-cmd.c @@ -121,6 +121,16 @@ static u16 nvmet_install_queue(struct nvmet_ctrl *ctrl, struct nvmet_req *req) req->rsp->sq_head = cpu_to_le16(0xffff); } + if (ctrl->ops->install_queue) { + u16 ret = ctrl->ops->install_queue(req->sq); + + if (ret) { + pr_err("failed to install queue %d cntlid %d ret %x\n", + qid, ret, ctrl->cntlid); + return ret; + } + } + return 0; } |