提交 e6d15f79 编写于 作者: M Matthew Wilcox

NVMe: Reduce maximum queue depth by 1

The spec says we're not allowed to completely fill the submission queue.
Solve this by reducing the number of allocatable cmdids by 1.
Signed-off-by: NMatthew Wilcox <matthew.r.wilcox@intel.com>
上级 d8ee9d69
...@@ -156,7 +156,7 @@ static struct nvme_cmd_info *nvme_cmd_info(struct nvme_queue *nvmeq) ...@@ -156,7 +156,7 @@ static struct nvme_cmd_info *nvme_cmd_info(struct nvme_queue *nvmeq)
static int alloc_cmdid(struct nvme_queue *nvmeq, void *ctx, int handler, static int alloc_cmdid(struct nvme_queue *nvmeq, void *ctx, int handler,
unsigned timeout) unsigned timeout)
{ {
int depth = nvmeq->q_depth; int depth = nvmeq->q_depth - 1;
struct nvme_cmd_info *info = nvme_cmd_info(nvmeq); struct nvme_cmd_info *info = nvme_cmd_info(nvmeq);
int cmdid; int cmdid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册