Skip to content

Commit

Permalink
NVMe: Reduce maximum queue depth by 1
Browse files Browse the repository at this point in the history
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: Matthew Wilcox <matthew.r.wilcox@intel.com>
  • Loading branch information
Matthew Wilcox committed Nov 4, 2011
1 parent d8ee9d6 commit e6d15f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
unsigned timeout)
{
int depth = nvmeq->q_depth;
int depth = nvmeq->q_depth - 1;
struct nvme_cmd_info *info = nvme_cmd_info(nvmeq);
int cmdid;

Expand Down

0 comments on commit e6d15f7

Please sign in to comment.