aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2011-02-11 05:08:00 -0500
committerJens Axboe <jaxboe@fusionio.com>2011-02-11 05:08:00 -0500
commitc186794dbb466b45cf40f942f2d09d6d5b4b0e42 (patch)
tree07ccd819bb6cced2c19053d2ed97ebaac88f824e /include/linux
parent9d5a4e946ce5352f19400b6370f4cd8e72806278 (diff)
block: share request flush fields with elevator_private
Flush requests are never put on the IO scheduler. Convert request structure's elevator_private* into an array and have the flush fields share a union with it. Reclaim the space lost in 'struct request' by moving 'completion_data' back in the union with 'rb_node'. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6d7e9afd08c3..12bb426949e9 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -99,25 +99,26 @@ struct request {
99 /* 99 /*
100 * The rb_node is only used inside the io scheduler, requests 100 * The rb_node is only used inside the io scheduler, requests
101 * are pruned when moved to the dispatch queue. So let the 101 * are pruned when moved to the dispatch queue. So let the
102 * flush fields share space with the rb_node. 102 * completion_data share space with the rb_node.
103 */ 103 */
104 union { 104 union {
105 struct rb_node rb_node; /* sort/lookup */ 105 struct rb_node rb_node; /* sort/lookup */
106 struct { 106 void *completion_data;
107 unsigned int seq;
108 struct list_head list;
109 } flush;
110 }; 107 };
111 108
112 void *completion_data;
113
114 /* 109 /*
115 * Three pointers are available for the IO schedulers, if they need 110 * Three pointers are available for the IO schedulers, if they need
116 * more they have to dynamically allocate it. 111 * more they have to dynamically allocate it. Flush requests are
112 * never put on the IO scheduler. So let the flush fields share
113 * space with the three elevator_private pointers.
117 */ 114 */
118 void *elevator_private; 115 union {
119 void *elevator_private2; 116 void *elevator_private[3];
120 void *elevator_private3; 117 struct {
118 unsigned int seq;
119 struct list_head list;
120 } flush;
121 };
121 122
122 struct gendisk *rq_disk; 123 struct gendisk *rq_disk;
123 unsigned long start_time; 124 unsigned long start_time;