]> git.baikalelectronics.ru Git - kernel.git/commit
sbitmap: fix batched wait_cnt accounting
authorKeith Busch <kbusch@kernel.org>
Fri, 9 Sep 2022 18:40:22 +0000 (11:40 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Sep 2022 06:10:34 +0000 (00:10 -0600)
commit4acb83417cadfdcbe64215f9d0ddcf3132af808e
tree45bdd14acf29ddc9b49cbb26e30323446d4aaeb6
parentc35227d4e8cbc70a6622cc7cc5f8c3bff513f1fa
sbitmap: fix batched wait_cnt accounting

Batched completions can clear multiple bits, but we're only decrementing
the wait_cnt by one each time. This can cause waiters to never be woken,
stalling IO. Use the batched count instead.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215679
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20220909184022.1709476-1-kbusch@fb.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c
include/linux/sbitmap.h
lib/sbitmap.c