]> git.baikalelectronics.ru Git - kernel.git/commit
block: drain queue before waiting for q_usage_counter becoming zero
authorMing Lei <ming.lei@redhat.com>
Wed, 29 Nov 2017 23:56:35 +0000 (07:56 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Jan 2018 16:09:48 +0000 (09:09 -0700)
commit59ae0683c49ad4219938c0007de48c4b595a5851
tree6471f6c7b9d06b8172eb05edf07ec45680637aef
parente86c4cdf0ad825dbf9931124319d1fb3437323ca
block: drain queue before waiting for q_usage_counter becoming zero

Now we track legacy requests with .q_usage_counter in commit 45e4f6350c62
("block: Make q_usage_counter also track legacy requests"), but that
commit never runs and drains legacy queue before waiting for this counter
becoming zero, then IO hang is caused in the test of pulling disk during IO.

This patch fixes the issue by draining requests before waiting for
q_usage_counter becoming zero, both Mauricio and chenxiang reported this
issue, and observed that it can be fixed by this patch.

Link: https://marc.info/?l=linux-block&m=151192424731797&w=2
Fixes: 45e4f6350c62("block: Make q_usage_counter also track legacy requests")
Cc: Wen Xiong <wenxiong@us.ibm.com>
Tested-by: "chenxiang (M)" <chenxiang66@hisilicon.com>
Tested-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-mq.c
block/blk.h