Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blk-mq: fix sbitmap ws_active for shared tags
We now wrap sbitmap waitqueues in an active counter, so we can avoid iterating wakeups unless we have waiters there. This works as long as everyone that's manipulating the waitqueues use the proper helpers. For the tag wait case for shared tags, however, we add ourselves to the waitqueue without incrementing/decrementing the ->ws_active count. This means that wakeups can take a long time to happen. Fix this by manually doing the inc/dec as needed for the wait queue handling. Reported-by: Michael Leun <[email protected]> Tested-by: Michael Leun <[email protected]> Cc: [email protected] Reviewed-by: Omar Sandoval <[email protected]> Fixes: 5d2ee71 ("sbitmap: optimize wakeup check") Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information