diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2021-06-17 21:06:47 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2021-06-29 07:16:25 +0200 |
commit | 38f4ac65ac88ebf4f1869c1361f40b1817b4a39c (patch) | |
tree | 9fdad6e6b8b8f6b3f8924eaacd23c416f7690bb0 /hw/nvme/nvme.h | |
parent | 3276dde4f262588f3645f2adbc84d07cb6981d3e (diff) | |
download | qemu-38f4ac65ac88ebf4f1869c1361f40b1817b4a39c.zip qemu-38f4ac65ac88ebf4f1869c1361f40b1817b4a39c.tar.gz qemu-38f4ac65ac88ebf4f1869c1361f40b1817b4a39c.tar.bz2 |
hw/nvme: reimplement flush to allow cancellation
Prior to this patch, a broadcast flush would result in submitting
multiple "fire and forget" aios (no reference saved to the aiocbs
returned from the blk_aio_flush calls).
Fix this by issuing the flushes one after another.
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'hw/nvme/nvme.h')
-rw-r--r-- | hw/nvme/nvme.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h index 371ac9b..7f3d0a1 100644 --- a/hw/nvme/nvme.h +++ b/hw/nvme/nvme.h @@ -28,6 +28,8 @@ #define NVME_MAX_NAMESPACES 256 #define NVME_EUI64_DEFAULT ((uint64_t)0x5254000000000000) +QEMU_BUILD_BUG_ON(NVME_MAX_NAMESPACES > NVME_NSID_BROADCAST - 1); + typedef struct NvmeCtrl NvmeCtrl; typedef struct NvmeNamespace NvmeNamespace; |