diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2018-09-27 10:55:13 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-10-03 16:59:17 -0700 |
commit | 41a770d90b88f1aec1796f931973a6a3ba368234 (patch) | |
tree | aeba115caadf16e4ce523fb7224929a9c91ebf3b /block | |
parent | 0051646c2cc2fbb9ff134a80775c0dc23baa7d35 (diff) | |
download | linux-stable-41a770d90b88f1aec1796f931973a6a3ba368234.tar.gz linux-stable-41a770d90b88f1aec1796f931973a6a3ba368234.tar.bz2 linux-stable-41a770d90b88f1aec1796f931973a6a3ba368234.zip |
block: fix deadline elevator drain for zoned block devices
commit 854f31ccdd7964c9c2e68da234a3a8aedb51cf6b upstream.
When the deadline scheduler is used with a zoned block device, writes
to a zone will be dispatched one at a time. This causes the warning
message:
deadline: forced dispatching is broken (nr_sorted=X), please report this
to be displayed when switching to another elevator with the legacy I/O
path while write requests to a zone are being retained in the scheduler
queue.
Prevent this message from being displayed when executing
elv_drain_elevator() for a zoned block device. __blk_drain_queue() will
loop until all writes are dispatched and completed, resulting in the
desired elevator queue drain without extensive modifications to the
deadline code itself to handle forced-dispatch calls.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Fixes: 8dc8146f9c92 ("deadline-iosched: Introduce zone locking support")
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/elevator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c index fa828b5bfd4b..89a48a3a8c12 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -609,7 +609,7 @@ void elv_drain_elevator(struct request_queue *q) while (e->type->ops.sq.elevator_dispatch_fn(q, 1)) ; - if (q->nr_sorted && printed++ < 10) { + if (q->nr_sorted && !blk_queue_is_zoned(q) && printed++ < 10 ) { printk(KERN_ERR "%s: forced dispatching is broken " "(nr_sorted=%u), please report this\n", q->elevator->type->elevator_name, q->nr_sorted); |