Blob Blame History Raw
From: Jens Axboe <axboe@kernel.dk>
Date: Tue, 29 May 2018 08:47:57 -0600
Subject: [PATCH] block: move ->timeout request member
Git-commit: 0b7576d8eb4c5634276ada359bfdb72e69eebc25
Patch-mainline: v4.18-rc1
References: bsc#1104967,FATE#325924

After the recent timeout handling changes, we have two holes in
the struct. Move the timeout near the deadline, killing both,
and moving related members closer together. On my config on
x86-64, this shrinks struct request from 312 to 304 bytes.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Hannes Reinecke <hare@suse.com>
---
 include/linux/blkdev.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 9f06b29adaa4..4efd9af62e25 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -237,8 +237,6 @@ struct request {
 	unsigned short write_hint;
 	unsigned short ioprio;
 
-	unsigned int timeout;
-
 	void *special;		/* opaque pointer available for LLD use */
 
 	unsigned int extra_len;	/* length of alignment and padding */
@@ -246,6 +244,8 @@ struct request {
 	enum mq_rq_state state;
 	refcount_t ref;
 
+	unsigned int timeout;
+
 	/* access through blk_rq_set_deadline, blk_rq_deadline */
 	unsigned long __deadline;
 
-- 
2.16.4