aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2011-02-11 11:08:00 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-02-11 11:08:00 +0100
commitc186794dbb466b45cf40f942f2d09d6d5b4b0e42 (patch)
tree07ccd819bb6cced2c19053d2ed97ebaac88f824e /include/linux/blkdev.h
parent9d5a4e946ce5352f19400b6370f4cd8e72806278 (diff)
downloadkernel_samsung_smdk4412-c186794dbb466b45cf40f942f2d09d6d5b4b0e42.zip
kernel_samsung_smdk4412-c186794dbb466b45cf40f942f2d09d6d5b4b0e42.tar.gz
kernel_samsung_smdk4412-c186794dbb466b45cf40f942f2d09d6d5b4b0e42.tar.bz2
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/blkdev.h')
-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 6d7e9af..12bb426 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -99,25 +99,26 @@ struct request {
/*
* The rb_node is only used inside the io scheduler, requests
* are pruned when moved to the dispatch queue. So let the
- * flush fields share space with the rb_node.
+ * completion_data share space with the rb_node.
*/
union {
struct rb_node rb_node; /* sort/lookup */
- struct {
- unsigned int seq;
- struct list_head list;
- } flush;
+ void *completion_data;
};
- void *completion_data;
-
/*
* Three pointers are available for the IO schedulers, if they need
- * more they have to dynamically allocate it.
+ * more they have to dynamically allocate it. Flush requests are
+ * never put on the IO scheduler. So let the flush fields share
+ * space with the three elevator_private pointers.
*/
- void *elevator_private;
- void *elevator_private2;
- void *elevator_private3;
+ union {
+ void *elevator_private[3];
+ struct {
+ unsigned int seq;
+ struct list_head list;
+ } flush;
+ };
struct gendisk *rq_disk;
unsigned long start_time;