diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 52559715cb90..93051d151635 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1146,7 +1146,7 @@ void init_request_from_bio(struct request *req, struct bio *bio) | |||
1146 | */ | 1146 | */ |
1147 | static inline bool queue_should_plug(struct request_queue *q) | 1147 | static inline bool queue_should_plug(struct request_queue *q) |
1148 | { | 1148 | { |
1149 | return !(blk_queue_nonrot(q) && blk_queue_tagged(q)); | 1149 | return !(blk_queue_nonrot(q) && blk_queue_queuing(q)); |
1150 | } | 1150 | } |
1151 | 1151 | ||
1152 | static int __make_request(struct request_queue *q, struct bio *bio) | 1152 | static int __make_request(struct request_queue *q, struct bio *bio) |
@@ -1857,8 +1857,15 @@ void blk_dequeue_request(struct request *rq) | |||
1857 | * and to it is freed is accounted as io that is in progress at | 1857 | * and to it is freed is accounted as io that is in progress at |
1858 | * the driver side. | 1858 | * the driver side. |
1859 | */ | 1859 | */ |
1860 | if (blk_account_rq(rq)) | 1860 | if (blk_account_rq(rq)) { |
1861 | q->in_flight[rq_is_sync(rq)]++; | 1861 | q->in_flight[rq_is_sync(rq)]++; |
1862 | /* | ||
1863 | * Mark this device as supporting hardware queuing, if | ||
1864 | * we have more IOs in flight than 4. | ||
1865 | */ | ||
1866 | if (!blk_queue_queuing(q) && queue_in_flight(q) > 4) | ||
1867 | set_bit(QUEUE_FLAG_CQ, &q->queue_flags); | ||
1868 | } | ||
1862 | } | 1869 | } |
1863 | 1870 | ||
1864 | /** | 1871 | /** |