diff options
| author | Dan Aloni | 2017-05-28 15:06:49 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2017-08-29 17:54:40 +0200 |
| commit | cdd346371e09709be8e46398bb097dc690a746f2 (patch) | |
| tree | aa68fa10037095d0ba23b0ca1465ed9296e6063b /include/exec/exec-all.h | |
| parent | Update version for v2.10.0-rc4 release (diff) | |
| download | qemu-cdd346371e09709be8e46398bb097dc690a746f2.tar.gz qemu-cdd346371e09709be8e46398bb097dc690a746f2.tar.xz qemu-cdd346371e09709be8e46398bb097dc690a746f2.zip | |
nvme: Fix get/set number of queues feature, again
The number of queues that should be return by the admin command should:
1) Only mention the number of non-admin queues.
2) It is zero-based, meaning that '0 == one non-admin queue',
'1 == two non-admin queues', and so forth.
Because our `num_queues` means the number of queues _plus_ the admin
queue, then the right calculation for the number returned from the admin
command is `num_queues - 2`, combining the two requirements mentioned.
The issue was discovered by reducing num_queues from 64 to 8 and running
a Linux VM with an SMP parameter larger than that (e.g. 22). It tries to
utilize all queues, and therefore fails with an invalid queue number
when trying to queue I/Os on the last queue.
Signed-off-by: Dan Aloni <dan@kernelim.com>
CC: Alex Friedman <alex@e8storage.com>
CC: Keith Busch <keith.busch@intel.com>
CC: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/exec/exec-all.h')
0 files changed, 0 insertions, 0 deletions
