aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/blkdev.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8a3e309e0842..a1e288069e2e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -211,6 +211,8 @@ struct request {
211 struct list_head queuelist; 211 struct list_head queuelist;
212 struct list_head donelist; 212 struct list_head donelist;
213 213
214 request_queue_t *q;
215
214 unsigned int cmd_flags; 216 unsigned int cmd_flags;
215 enum rq_cmd_type_bits cmd_type; 217 enum rq_cmd_type_bits cmd_type;
216 218
@@ -219,12 +221,12 @@ struct request {
219 */ 221 */
220 222
221 sector_t sector; /* next sector to submit */ 223 sector_t sector; /* next sector to submit */
224 sector_t hard_sector; /* next sector to complete */
222 unsigned long nr_sectors; /* no. of sectors left to submit */ 225 unsigned long nr_sectors; /* no. of sectors left to submit */
226 unsigned long hard_nr_sectors; /* no. of sectors left to complete */
223 /* no. of sectors left to submit in the current segment */ 227 /* no. of sectors left to submit in the current segment */
224 unsigned int current_nr_sectors; 228 unsigned int current_nr_sectors;
225 229
226 sector_t hard_sector; /* next sector to complete */
227 unsigned long hard_nr_sectors; /* no. of sectors left to complete */
228 /* no. of sectors left to complete in the current segment */ 230 /* no. of sectors left to complete in the current segment */
229 unsigned int hard_cur_sectors; 231 unsigned int hard_cur_sectors;
230 232
@@ -232,7 +234,15 @@ struct request {
232 struct bio *biotail; 234 struct bio *biotail;
233 235
234 struct hlist_node hash; /* merge hash */ 236 struct hlist_node hash; /* merge hash */
235 struct rb_node rb_node; /* sort/lookup */ 237 /*
238 * The rb_node is only used inside the io scheduler, requests
239 * are pruned when moved to the dispatch queue. So let the
240 * completion_data share space with the rb_node.
241 */
242 union {
243 struct rb_node rb_node; /* sort/lookup */
244 void *completion_data;
245 };
236 246
237 /* 247 /*
238 * two pointers are available for the IO schedulers, if they need 248 * two pointers are available for the IO schedulers, if they need
@@ -241,8 +251,6 @@ struct request {
241 void *elevator_private; 251 void *elevator_private;
242 void *elevator_private2; 252 void *elevator_private2;
243 253
244 void *completion_data;
245
246 struct gendisk *rq_disk; 254 struct gendisk *rq_disk;
247 unsigned long start_time; 255 unsigned long start_time;
248 256
@@ -260,8 +268,6 @@ struct request {
260 268
261 unsigned short ioprio; 269 unsigned short ioprio;
262 270
263 request_queue_t *q;
264
265 void *special; 271 void *special;
266 char *buffer; 272 char *buffer;
267 273