diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-02 17:46:28 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-04 11:38:19 -0700 |
commit | 6544d229bf433b755e77800002e078e54cd9b42b (patch) | |
tree | d4c1008a4d1b50e9d085f65af4e17fcee4677491 /block/blk-mq.c | |
parent | 376f7ef8bfeaee3993c2e85df1bbaa06725b9342 (diff) | |
download | linux-6544d229bf433b755e77800002e078e54cd9b42b.tar.bz2 |
block: enable polling by default if a poll map is initalized
If the user did setup polling in the driver we should not require
another know in the block layer to enable it.
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 50d529602e05..eabc7fcd96db 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2826,6 +2826,8 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, q->tag_set = set; q->queue_flags |= QUEUE_FLAG_MQ_DEFAULT; + if (set->nr_maps > HCTX_TYPE_POLL) + blk_queue_flag_set(QUEUE_FLAG_POLL, q); if (!(set->flags & BLK_MQ_F_SG_MERGE)) blk_queue_flag_set(QUEUE_FLAG_NO_SG_MERGE, q); |