[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 22/42] nvme: memset preallocated requests structures
From: |
Klaus Jensen |
Subject: |
[PATCH v6 22/42] nvme: memset preallocated requests structures |
Date: |
Mon, 16 Mar 2020 07:29:08 -0700 |
From: Klaus Jensen <address@hidden>
This is preparatory to subsequent patches that change how QSGs/IOVs are
handled. It is important that the qsg and iov members of the NvmeRequest
are initially zeroed.
Signed-off-by: Klaus Jensen <address@hidden>
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 26c4b6e69f72..08267e847671 100644
--- a/hw/block/nvme.c
+++ b/hw/block/nvme.c
@@ -597,7 +597,7 @@ static void nvme_init_sq(NvmeSQueue *sq, NvmeCtrl *n,
uint64_t dma_addr,
sq->size = size;
sq->cqid = cqid;
sq->head = sq->tail = 0;
- sq->io_req = g_new(NvmeRequest, sq->size);
+ sq->io_req = g_new0(NvmeRequest, sq->size);
QTAILQ_INIT(&sq->req_list);
QTAILQ_INIT(&sq->out_req_list);
--
2.25.1
- Re: [PATCH v6 15/42] nvme: additional tracing, (continued)
- [PATCH v6 14/42] nvme: add missing mandatory features, Klaus Jensen, 2020/03/16
- [PATCH v6 13/42] nvme: add support for the asynchronous event request command, Klaus Jensen, 2020/03/16
- [PATCH v6 20/42] nvme: provide the mandatory subnqn field, Klaus Jensen, 2020/03/16
- [PATCH v6 21/42] nvme: bump supported version to v1.3, Klaus Jensen, 2020/03/16
- [PATCH v6 22/42] nvme: memset preallocated requests structures,
Klaus Jensen <=
- [PATCH v6 19/42] nvme: enforce valid queue creation sequence, Klaus Jensen, 2020/03/16
- [PATCH v6 24/42] nvme: remove redundant has_sg member, Klaus Jensen, 2020/03/16
[PATCH v6 26/42] nvme: pass request along for tracing, Klaus Jensen, 2020/03/16