nvme: reorder parent member of struct nvme_request
The parent field is no longer used in the normal (non-split) I/O path, so move it down to the default-uninitialized part of struct nvme_request that is only touched for parent/child I/O. This also puts it closer to other related fields (children, child_tailq, parent_status) for improved readability. Change-Id: I120df1df0c967d2f74daa6e97c0bc83626e3be7f Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
c0ebf12e3e
commit
16c75b8af7
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user