From 38712af0a263b1c3a905fe242d7139fd2706878f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 24 Feb 2010 07:43:02 -0800 Subject: [PATCH] --- yaml --- r: 180767 b: refs/heads/master c: 7b1f94b8a600a3e8b1f8015c5045f1cc8d100a54 h: refs/heads/master i: 180765: c3f4ce9ad21d9897e5b0166b6b43dacfc2bfa71a 180763: ca7b8bd507ddea6162ec6dfe94adf1c30140d9e3 180759: c147cde5cae59c61c7f8fdebaf21aaf541bca3a9 180751: 52a9db88733ee098852395be9bc50855c39d8f3d 180735: fe63ced329027591722de69ca5861df56b6dca55 v: v3 --- [refs] | 2 +- trunk/block/blk-core.c | 11 ++--------- trunk/include/linux/blkdev.h | 4 +--- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index b0cd89a3e191..10a4e3b0ac48 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 83b4d17d8841a9a7b8ed02ac99ca92afada154e1 +refs/heads/master: 7b1f94b8a600a3e8b1f8015c5045f1cc8d100a54 diff --git a/trunk/block/blk-core.c b/trunk/block/blk-core.c index 718897e6d37f..d1a9a0a64f95 100644 --- a/trunk/block/blk-core.c +++ b/trunk/block/blk-core.c @@ -1147,7 +1147,7 @@ void init_request_from_bio(struct request *req, struct bio *bio) */ static inline bool queue_should_plug(struct request_queue *q) { - return !(blk_queue_nonrot(q) && blk_queue_queuing(q)); + return !(blk_queue_nonrot(q) && blk_queue_tagged(q)); } static int __make_request(struct request_queue *q, struct bio *bio) @@ -1859,15 +1859,8 @@ void blk_dequeue_request(struct request *rq) * and to it is freed is accounted as io that is in progress at * the driver side. */ - if (blk_account_rq(rq)) { + if (blk_account_rq(rq)) q->in_flight[rq_is_sync(rq)]++; - /* - * Mark this device as supporting hardware queuing, if - * we have more IOs in flight than 4. - */ - if (!blk_queue_queuing(q) && queue_in_flight(q) > 4) - set_bit(QUEUE_FLAG_CQ, &q->queue_flags); - } } /** diff --git a/trunk/include/linux/blkdev.h b/trunk/include/linux/blkdev.h index 5c8018977efa..1896e868854f 100644 --- a/trunk/include/linux/blkdev.h +++ b/trunk/include/linux/blkdev.h @@ -461,8 +461,7 @@ struct request_queue #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ -#define QUEUE_FLAG_CQ 16 /* hardware does queuing */ -#define QUEUE_FLAG_DISCARD 17 /* supports DISCARD */ +#define QUEUE_FLAG_DISCARD 16 /* supports DISCARD */ #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ (1 << QUEUE_FLAG_CLUSTER) | \ @@ -586,7 +585,6 @@ enum { #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags) #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) -#define blk_queue_queuing(q) test_bit(QUEUE_FLAG_CQ, &(q)->queue_flags) #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags)