diff options
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 564445be7a6d..a967dd775dbd 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -404,7 +404,7 @@ struct request_queue | |||
404 | struct list_head tag_busy_list; | 404 | struct list_head tag_busy_list; |
405 | 405 | ||
406 | unsigned int nr_sorted; | 406 | unsigned int nr_sorted; |
407 | unsigned int in_flight; | 407 | unsigned int in_flight[2]; |
408 | 408 | ||
409 | unsigned int rq_timeout; | 409 | unsigned int rq_timeout; |
410 | struct timer_list timeout; | 410 | struct timer_list timeout; |
@@ -511,6 +511,11 @@ static inline void queue_flag_clear_unlocked(unsigned int flag, | |||
511 | __clear_bit(flag, &q->queue_flags); | 511 | __clear_bit(flag, &q->queue_flags); |
512 | } | 512 | } |
513 | 513 | ||
514 | static inline int queue_in_flight(struct request_queue *q) | ||
515 | { | ||
516 | return q->in_flight[0] + q->in_flight[1]; | ||
517 | } | ||
518 | |||
514 | static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) | 519 | static inline void queue_flag_clear(unsigned int flag, struct request_queue *q) |
515 | { | 520 | { |
516 | WARN_ON_ONCE(!queue_is_locked(q)); | 521 | WARN_ON_ONCE(!queue_is_locked(q)); |