diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 860e7a485a5f..d0cac8b58de7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -22,6 +22,7 @@ typedef struct request_queue request_queue_t; | |||
22 | struct elevator_queue; | 22 | struct elevator_queue; |
23 | typedef struct elevator_queue elevator_t; | 23 | typedef struct elevator_queue elevator_t; |
24 | struct request_pm_state; | 24 | struct request_pm_state; |
25 | struct blk_trace; | ||
25 | 26 | ||
26 | #define BLKDEV_MIN_RQ 4 | 27 | #define BLKDEV_MIN_RQ 4 |
27 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ | 28 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ |
@@ -54,23 +55,29 @@ struct as_io_context { | |||
54 | 55 | ||
55 | struct cfq_queue; | 56 | struct cfq_queue; |
56 | struct cfq_io_context { | 57 | struct cfq_io_context { |
57 | /* | 58 | struct rb_node rb_node; |
58 | * circular list of cfq_io_contexts belonging to a process io context | ||
59 | */ | ||
60 | struct list_head list; | ||
61 | struct cfq_queue *cfqq; | ||
62 | void *key; | 59 | void *key; |
63 | 60 | ||
61 | struct cfq_queue *cfqq[2]; | ||
62 | |||
64 | struct io_context *ioc; | 63 | struct io_context *ioc; |
65 | 64 | ||
66 | unsigned long last_end_request; | 65 | unsigned long last_end_request; |
67 | unsigned long last_queue; | 66 | sector_t last_request_pos; |
67 | unsigned long last_queue; | ||
68 | |||
68 | unsigned long ttime_total; | 69 | unsigned long ttime_total; |
69 | unsigned long ttime_samples; | 70 | unsigned long ttime_samples; |
70 | unsigned long ttime_mean; | 71 | unsigned long ttime_mean; |
71 | 72 | ||
72 | void (*dtor)(struct cfq_io_context *); | 73 | unsigned int seek_samples; |
73 | void (*exit)(struct cfq_io_context *); | 74 | u64 seek_total; |
75 | sector_t seek_mean; | ||
76 | |||
77 | struct list_head queue_list; | ||
78 | |||
79 | void (*dtor)(struct io_context *); /* destructor */ | ||
80 | void (*exit)(struct io_context *); /* called on task exit */ | ||
74 | }; | 81 | }; |
75 | 82 | ||
76 | /* | 83 | /* |
@@ -91,7 +98,7 @@ struct io_context { | |||
91 | int nr_batch_requests; /* Number of requests left in the batch */ | 98 | int nr_batch_requests; /* Number of requests left in the batch */ |
92 | 99 | ||
93 | struct as_io_context *aic; | 100 | struct as_io_context *aic; |
94 | struct cfq_io_context *cic; | 101 | struct rb_root cic_root; |
95 | }; | 102 | }; |
96 | 103 | ||
97 | void put_io_context(struct io_context *ioc); | 104 | void put_io_context(struct io_context *ioc); |
@@ -404,8 +411,6 @@ struct request_queue | |||
404 | 411 | ||
405 | struct blk_queue_tag *queue_tags; | 412 | struct blk_queue_tag *queue_tags; |
406 | 413 | ||
407 | atomic_t refcnt; | ||
408 | |||
409 | unsigned int nr_sorted; | 414 | unsigned int nr_sorted; |
410 | unsigned int in_flight; | 415 | unsigned int in_flight; |
411 | 416 | ||
@@ -416,6 +421,8 @@ struct request_queue | |||
416 | unsigned int sg_reserved_size; | 421 | unsigned int sg_reserved_size; |
417 | int node; | 422 | int node; |
418 | 423 | ||
424 | struct blk_trace *blk_trace; | ||
425 | |||
419 | /* | 426 | /* |
420 | * reserved for flush operations | 427 | * reserved for flush operations |
421 | */ | 428 | */ |
@@ -424,6 +431,8 @@ struct request_queue | |||
424 | struct request pre_flush_rq, bar_rq, post_flush_rq; | 431 | struct request pre_flush_rq, bar_rq, post_flush_rq; |
425 | struct request *orig_bar_rq; | 432 | struct request *orig_bar_rq; |
426 | unsigned int bi_size; | 433 | unsigned int bi_size; |
434 | |||
435 | struct mutex sysfs_lock; | ||
427 | }; | 436 | }; |
428 | 437 | ||
429 | #define RQ_INACTIVE (-1) | 438 | #define RQ_INACTIVE (-1) |
@@ -725,7 +734,7 @@ extern long nr_blockdev_pages(void); | |||
725 | int blk_get_queue(request_queue_t *); | 734 | int blk_get_queue(request_queue_t *); |
726 | request_queue_t *blk_alloc_queue(gfp_t); | 735 | request_queue_t *blk_alloc_queue(gfp_t); |
727 | request_queue_t *blk_alloc_queue_node(gfp_t, int); | 736 | request_queue_t *blk_alloc_queue_node(gfp_t, int); |
728 | #define blk_put_queue(q) blk_cleanup_queue((q)) | 737 | extern void blk_put_queue(request_queue_t *); |
729 | 738 | ||
730 | /* | 739 | /* |
731 | * tag stuff | 740 | * tag stuff |