Commit 16c75b8a authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Gerrit Code Review
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent c0ebf12e
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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));
	}