diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 2aa24664a5b5..07954b05b86c 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1,9 +1,10 @@ | |||
1 | #ifndef _LINUX_BLKDEV_H | 1 | #ifndef _LINUX_BLKDEV_H |
2 | #define _LINUX_BLKDEV_H | 2 | #define _LINUX_BLKDEV_H |
3 | 3 | ||
4 | #include <linux/sched.h> | ||
5 | |||
4 | #ifdef CONFIG_BLOCK | 6 | #ifdef CONFIG_BLOCK |
5 | 7 | ||
6 | #include <linux/sched.h> | ||
7 | #include <linux/major.h> | 8 | #include <linux/major.h> |
8 | #include <linux/genhd.h> | 9 | #include <linux/genhd.h> |
9 | #include <linux/list.h> | 10 | #include <linux/list.h> |
@@ -31,10 +32,17 @@ struct blk_trace; | |||
31 | struct request; | 32 | struct request; |
32 | struct sg_io_hdr; | 33 | struct sg_io_hdr; |
33 | struct bsg_job; | 34 | struct bsg_job; |
35 | struct blkcg_gq; | ||
34 | 36 | ||
35 | #define BLKDEV_MIN_RQ 4 | 37 | #define BLKDEV_MIN_RQ 4 |
36 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ | 38 | #define BLKDEV_MAX_RQ 128 /* Default maximum */ |
37 | 39 | ||
40 | /* | ||
41 | * Maximum number of blkcg policies allowed to be registered concurrently. | ||
42 | * Defined here to simplify include dependency. | ||
43 | */ | ||
44 | #define BLKCG_MAX_POLS 2 | ||
45 | |||
38 | struct request; | 46 | struct request; |
39 | typedef void (rq_end_io_fn)(struct request *, int); | 47 | typedef void (rq_end_io_fn)(struct request *, int); |
40 | 48 | ||
@@ -362,6 +370,11 @@ struct request_queue { | |||
362 | struct list_head timeout_list; | 370 | struct list_head timeout_list; |
363 | 371 | ||
364 | struct list_head icq_list; | 372 | struct list_head icq_list; |
373 | #ifdef CONFIG_BLK_CGROUP | ||
374 | DECLARE_BITMAP (blkcg_pols, BLKCG_MAX_POLS); | ||
375 | struct blkcg_gq *root_blkg; | ||
376 | struct list_head blkg_list; | ||
377 | #endif | ||
365 | 378 | ||
366 | struct queue_limits limits; | 379 | struct queue_limits limits; |
367 | 380 | ||
@@ -389,12 +402,17 @@ struct request_queue { | |||
389 | 402 | ||
390 | struct mutex sysfs_lock; | 403 | struct mutex sysfs_lock; |
391 | 404 | ||
405 | int bypass_depth; | ||
406 | |||
392 | #if defined(CONFIG_BLK_DEV_BSG) | 407 | #if defined(CONFIG_BLK_DEV_BSG) |
393 | bsg_job_fn *bsg_job_fn; | 408 | bsg_job_fn *bsg_job_fn; |
394 | int bsg_job_size; | 409 | int bsg_job_size; |
395 | struct bsg_class_device bsg_dev; | 410 | struct bsg_class_device bsg_dev; |
396 | #endif | 411 | #endif |
397 | 412 | ||
413 | #ifdef CONFIG_BLK_CGROUP | ||
414 | struct list_head all_q_node; | ||
415 | #endif | ||
398 | #ifdef CONFIG_BLK_DEV_THROTTLING | 416 | #ifdef CONFIG_BLK_DEV_THROTTLING |
399 | /* Throttle data */ | 417 | /* Throttle data */ |
400 | struct throtl_data *td; | 418 | struct throtl_data *td; |
@@ -406,7 +424,7 @@ struct request_queue { | |||
406 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ | 424 | #define QUEUE_FLAG_SYNCFULL 3 /* read queue has been filled */ |
407 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ | 425 | #define QUEUE_FLAG_ASYNCFULL 4 /* write queue has been filled */ |
408 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ | 426 | #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ |
409 | #define QUEUE_FLAG_ELVSWITCH 6 /* don't use elevator, just do FIFO */ | 427 | #define QUEUE_FLAG_BYPASS 6 /* act as dumb FIFO queue */ |
410 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ | 428 | #define QUEUE_FLAG_BIDI 7 /* queue supports bidi requests */ |
411 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ | 429 | #define QUEUE_FLAG_NOMERGES 8 /* disable merge attempts */ |
412 | #define QUEUE_FLAG_SAME_COMP 9 /* complete on same CPU-group */ | 430 | #define QUEUE_FLAG_SAME_COMP 9 /* complete on same CPU-group */ |
@@ -490,6 +508,7 @@ static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | |||
490 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) | 508 | #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) |
491 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 509 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
492 | #define blk_queue_dead(q) test_bit(QUEUE_FLAG_DEAD, &(q)->queue_flags) | 510 | #define blk_queue_dead(q) test_bit(QUEUE_FLAG_DEAD, &(q)->queue_flags) |
511 | #define blk_queue_bypass(q) test_bit(QUEUE_FLAG_BYPASS, &(q)->queue_flags) | ||
493 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 512 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
494 | #define blk_queue_noxmerges(q) \ | 513 | #define blk_queue_noxmerges(q) \ |
495 | test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags) | 514 | test_bit(QUEUE_FLAG_NOXMERGES, &(q)->queue_flags) |
@@ -808,7 +827,6 @@ extern bool __blk_end_request_err(struct request *rq, int error); | |||
808 | extern void blk_complete_request(struct request *); | 827 | extern void blk_complete_request(struct request *); |
809 | extern void __blk_complete_request(struct request *); | 828 | extern void __blk_complete_request(struct request *); |
810 | extern void blk_abort_request(struct request *); | 829 | extern void blk_abort_request(struct request *); |
811 | extern void blk_abort_queue(struct request_queue *); | ||
812 | extern void blk_unprep_request(struct request *); | 830 | extern void blk_unprep_request(struct request *); |
813 | 831 | ||
814 | /* | 832 | /* |