From 1a8983e340f09279bd6be607bb8d8f2165c8cb37 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 10 Aug 2006 09:00:21 +0200 Subject: [PATCH] --- yaml --- r: 37547 b: refs/heads/master c: e6a1c874a064e7d07f24986aba7cd537b7f4a25d h: refs/heads/master i: 37545: 310346840d925b4a81803073ea97ae5b0bfdb5b5 37543: 2688df8576127cbddcc9253eaec0153e9222038e v: v3 --- [refs] | 2 +- trunk/include/linux/blkdev.h | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 3ecb22a6b067..b62c12769a6a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 51da90fcb6acd580e87280eaf4eb1f788021807d +refs/heads/master: e6a1c874a064e7d07f24986aba7cd537b7f4a25d diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index 8a3e309e0842..a1e288069e2e 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -211,6 +211,8 @@ struct request { struct list_head queuelist; struct list_head donelist; + request_queue_t *q; + unsigned int cmd_flags; enum rq_cmd_type_bits cmd_type; @@ -219,12 +221,12 @@ struct request { */ sector_t sector; /* next sector to submit */ + sector_t hard_sector; /* next sector to complete */ unsigned long nr_sectors; /* no. of sectors left to submit */ + unsigned long hard_nr_sectors; /* no. of sectors left to complete */ /* no. of sectors left to submit in the current segment */ unsigned int current_nr_sectors; - sector_t hard_sector; /* next sector to complete */ - unsigned long hard_nr_sectors; /* no. of sectors left to complete */ /* no. of sectors left to complete in the current segment */ unsigned int hard_cur_sectors; @@ -232,7 +234,15 @@ struct request { struct bio *biotail; struct hlist_node hash; /* merge hash */ - struct rb_node rb_node; /* sort/lookup */ + /* + * The rb_node is only used inside the io scheduler, requests + * are pruned when moved to the dispatch queue. So let the + * completion_data share space with the rb_node. + */ + union { + struct rb_node rb_node; /* sort/lookup */ + void *completion_data; + }; /* * two pointers are available for the IO schedulers, if they need @@ -241,8 +251,6 @@ struct request { void *elevator_private; void *elevator_private2; - void *completion_data; - struct gendisk *rq_disk; unsigned long start_time; @@ -260,8 +268,6 @@ struct request { unsigned short ioprio; - request_queue_t *q; - void *special; char *buffer;