aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-11 15:49:15 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:26:59 -0400
commit1fbfdfcddff4df188b24d9d05271a76a85064583 (patch)
treeb975a9e9ea5a20750b14ae593eca1d9b2609c29d /include
parentb8aca35af5e9fbc2e41a3ba1b2e66f24e80ca9b6 (diff)
[PATCH] elevator: introduce a way to reuse rq for internal FIFO handling
The io schedulers can use this instead of having to allocate space for it themselves. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/elevator.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 95b2a04b969c..0e7b1a733919 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -166,4 +166,16 @@ enum {
166#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors) 166#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
167#define rb_entry_rq(node) rb_entry((node), struct request, rb_node) 167#define rb_entry_rq(node) rb_entry((node), struct request, rb_node)
168 168
169/*
170 * Hack to reuse the donelist list_head as the fifo time holder while
171 * the request is in the io scheduler. Saves an unsigned long in rq.
172 */
173#define rq_fifo_time(rq) ((unsigned long) (rq)->donelist.next)
174#define rq_set_fifo_time(rq,exp) ((rq)->donelist.next = (void *) (exp))
175#define rq_entry_fifo(ptr) list_entry((ptr), struct request, queuelist)
176#define rq_fifo_clear(rq) do { \
177 list_del_init(&(rq)->queuelist); \
178 INIT_LIST_HEAD(&(rq)->donelist); \
179 } while (0)
180
169#endif 181#endif