]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
block: fix deadline elevator drain for zoned block devices
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 27 Sep 2018 01:55:13 +0000 (10:55 +0900)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:45 +0000 (19:51 -0600)
commit63e90e95753a39c1dc7caba4f2fd88af3481a831
treedab8241172952261c23cb0e32a3585e3020ec5d3
parent2889b0900451fe9e69de318a5f353b10e898fcc1
block: fix deadline elevator drain for zoned block devices

BugLink: https://bugs.launchpad.net/bugs/1836287
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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
block/elevator.c