diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-11-19 11:25:07 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-11-19 11:25:07 -0500 |
commit | 94eddfbeaafa3e8040a2c47d370dea0e58e76941 (patch) | |
tree | 52cdf7a26b27d9cab3b1eba9b424a6d1432bdf8d /include/linux/blkdev.h | |
parent | 34f2fd8dfe6185b0eaaf7d661281713a6170b077 (diff) |
blk-mq: ensure that we set REQ_IO_STAT so diskstats work
If disk stats are enabled on the queue, a request needs to
be marked with REQ_IO_STAT for accounting to be active on
that request. This fixes an issue with virtio-blk not
showing up in /proc/diskstats after the conversion to
blk-mq.
Add QUEUE_FLAG_MQ_DEFAULT, setting stats and same cpu-group
completion on by default.
Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index f26ec20f6354..1b135d49b279 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -505,6 +505,9 @@ struct request_queue { | |||
505 | (1 << QUEUE_FLAG_SAME_COMP) | \ | 505 | (1 << QUEUE_FLAG_SAME_COMP) | \ |
506 | (1 << QUEUE_FLAG_ADD_RANDOM)) | 506 | (1 << QUEUE_FLAG_ADD_RANDOM)) |
507 | 507 | ||
508 | #define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | ||
509 | (1 << QUEUE_FLAG_SAME_COMP)) | ||
510 | |||
508 | static inline void queue_lockdep_assert_held(struct request_queue *q) | 511 | static inline void queue_lockdep_assert_held(struct request_queue *q) |
509 | { | 512 | { |
510 | if (q->queue_lock) | 513 | if (q->queue_lock) |