aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 56bb6a4e15f3..d0cac8b58de7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -22,6 +22,7 @@ typedef struct request_queue request_queue_t;
22struct elevator_queue; 22struct elevator_queue;
23typedef struct elevator_queue elevator_t; 23typedef struct elevator_queue elevator_t;
24struct request_pm_state; 24struct request_pm_state;
25struct 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,25 +55,29 @@ struct as_io_context {
54 55
55struct cfq_queue; 56struct cfq_queue;
56struct cfq_io_context { 57struct 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[2];
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
73 unsigned int seek_samples;
74 u64 seek_total;
75 sector_t seek_mean;
76
72 struct list_head queue_list; 77 struct list_head queue_list;
73 78
74 void (*dtor)(struct cfq_io_context *); 79 void (*dtor)(struct io_context *); /* destructor */
75 void (*exit)(struct cfq_io_context *); 80 void (*exit)(struct io_context *); /* called on task exit */
76}; 81};
77 82
78/* 83/*
@@ -93,7 +98,7 @@ struct io_context {
93 int nr_batch_requests; /* Number of requests left in the batch */ 98 int nr_batch_requests; /* Number of requests left in the batch */
94 99
95 struct as_io_context *aic; 100 struct as_io_context *aic;
96 struct cfq_io_context *cic; 101 struct rb_root cic_root;
97}; 102};
98 103
99void put_io_context(struct io_context *ioc); 104void put_io_context(struct io_context *ioc);
@@ -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 */