From 23f72839061d32f49a6ea5ee252ce004e82945de Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 6 Oct 2019 22:10:31 +0000 Subject: [PATCH] scst/include/scst.h: Reduce the size of struct scst_cmd Reduce the size of struct scst_cmd by reordering its structure members such that there are two holes less in this data structure. This change has been verified with the help of the 'pahole' tool. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8606 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index e6c1ea087..4aecce44c 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2135,12 +2135,12 @@ struct scst_cmd { /* Assigned processing thread (for better CPU affinity) */ struct scst_cmd_thread_t *cmd_thr; - atomic_t cmd_ref; - struct scst_session *sess; /* corresponding session */ atomic_t *cpu_cmd_counter; + atomic_t cmd_ref; + /* Cmd state, one of SCST_CMD_STATE_* constants */ enum scst_cmd_state state; @@ -2357,9 +2357,6 @@ struct scst_cmd { /* List entry for tgt_dev's deferred (SN, ACA, etc.) lists */ struct list_head deferred_cmd_list_entry; - /* Cmd's serial number, used to execute cmd's in order of arrival */ - unsigned int sn; - /* The corresponding sn_slot in tgt_dev->sn_slots */ atomic_t *sn_slot; @@ -2372,6 +2369,9 @@ struct scst_cmd { */ uint64_t tag; + /* Cmd's serial number, used to execute cmd's in order of arrival */ + unsigned int sn; + uint32_t tgt_sn; /* SN set by target driver (for TM purposes) */ uint8_t *cdb; /* Pointer on CDB. Points on cdb_buf for small CDBs. */