diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 7541ddbd9..a83d78c39 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -106,11 +106,6 @@ struct nvme_request { struct nvme_command cmd; - /** - * Points to a parent request if part of a split request, - * NULL otherwise. - */ - struct nvme_request *parent; union { void *payload; } u; @@ -148,6 +143,12 @@ struct nvme_request { */ TAILQ_ENTRY(nvme_request) child_tailq; + /** + * Points to a parent request if part of a split request, + * NULL otherwise. + */ + struct nvme_request *parent; + /** * Completion status for a parent request. Initialized to all 0's * (SUCCESS) before child requests are submitted. If a child diff --git a/lib/nvme/nvme_ns_cmd.c b/lib/nvme/nvme_ns_cmd.c index 65446800c..7e94878dd 100644 --- a/lib/nvme/nvme_ns_cmd.c +++ b/lib/nvme/nvme_ns_cmd.c @@ -75,6 +75,7 @@ nvme_request_add_child(struct nvme_request *parent, struct nvme_request *child) * relatively rare. */ TAILQ_INIT(&parent->children); + parent->parent = NULL; memset(&parent->parent_status, 0, sizeof(struct nvme_completion)); }