summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target/fcloop.c
diff options
context:
space:
mode:
authorDennis Zhou <dennis@kernel.org>2019-07-05 23:09:09 +0200
committerJens Axboe <axboe@kernel.dk>2019-07-05 23:14:00 +0200
commitc9b3007feca018d3f7061f5d5a14cb00766ffe9b (patch)
tree842d551e188fd8996b328291c3d044a9bff995db /drivers/nvme/target/fcloop.c
parentblock: nr_phys_segments needs to be zero for REQ_OP_WRITE_ZEROES (diff)
downloadlinux-c9b3007feca018d3f7061f5d5a14cb00766ffe9b.tar.xz
linux-c9b3007feca018d3f7061f5d5a14cb00766ffe9b.zip
blk-iolatency: fix STS_AGAIN handling
The iolatency controller is based on rq_qos. It increments on rq_qos_throttle() and decrements on either rq_qos_cleanup() or rq_qos_done_bio(). a3fb01ba5af0 fixes the double accounting issue where blk_mq_make_request() may call both rq_qos_cleanup() and rq_qos_done_bio() on REQ_NO_WAIT. So checking STS_AGAIN prevents the double decrement. The above works upstream as the only way we can get STS_AGAIN is from blk_mq_get_request() failing. The STS_AGAIN handling isn't a real problem as bio_endio() skipping only happens on reserved tag allocation failures which can only be caused by driver bugs and already triggers WARN. However, the fix creates a not so great dependency on how STS_AGAIN can be propagated. Internally, we (Facebook) carry a patch that kills read ahead if a cgroup is io congested or a fatal signal is pending. This combined with chained bios progagate their bi_status to the parent is not already set can can cause the parent bio to not clean up properly even though it was successful. This consequently leaks the inflight counter and can hang all IOs under that blkg. To nip the adverse interaction early, this removes the rq_qos_cleanup() callback in iolatency in favor of cleaning up always on the rq_qos_done_bio() path. Fixes: a3fb01ba5af0 ("blk-iolatency: only account submitted bios") Debugged-by: Tejun Heo <tj@kernel.org> Debugged-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Dennis Zhou <dennis@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/fcloop.c')
0 files changed, 0 insertions, 0 deletions