summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-12-10 15:45:53 -0700
committerJens Axboe <axboe@kernel.dk>2018-12-10 18:10:34 -0700
commitb7934ba4147a883f7a1b32c6408179274a4d6ed1 (patch)
tree54917292e4e39a04f4d2aba88f32bc92f4042e23 /drivers/nvme
parent4ba09f69e20d0a768d91277847ddbd31f476590e (diff)
downloadlinux-stable-b7934ba4147a883f7a1b32c6408179274a4d6ed1.tar.gz
linux-stable-b7934ba4147a883f7a1b32c6408179274a4d6ed1.tar.bz2
linux-stable-b7934ba4147a883f7a1b32c6408179274a4d6ed1.zip
dm: fix inflight IO check
After switching to percpu inflight counters, the inflight check is totally buggy. It's perfectly valid for some counters to be non-zero while having a total inflight IO count of 0, that's how these kinds of counters work (inc on one CPU, dec on another). Fix the md_in_flight() check to sum all counters before returning a false positive, potentially. While at it, remove the inflight read for IO completion. We don't need it, just wake anyone that's waiting for the IO count to drop to zero. The caller needs to re-check that value anyway when woken, which it does. Fixes: 6f75723190d8 ("dm: remove the pending IO accounting") Acked-by: Mike Snitzer <snitzer@redhat.com> Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions