Re: [PATCH V3] block: drain queue before waiting for q_usage_counter becoming zero
From: Ming Lei <hidden>
Date: 2017-12-20 23:12:32
On Thu, Nov 30, 2017 at 07:56:35AM +0800, Ming Lei wrote:
Now we track legacy requests with .q_usage_counter in commit 055f6e18e08f
("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: 055f6e18e08f("block: Make q_usage_counter also track legacy requests")
Cc: Wen Xiong <redacted>
Tested-by: "chenxiang (M)" <redacted>
Tested-by: Mauricio Faria de Oliveira <redacted>
Signed-off-by: Ming Lei <redacted>
---
V3:
- V2 can't cover chenxiang's issue, so we have to drain queue via
blk_drain_queue(), and fallback to original post(V1)Hi Jens, This patch fixes regression caused by 055f6e18e08f merged to v4.15-rc, could you consider it for v4.15? Thanks, Ming