diff options
author | Jens Axboe <axboe@fb.com> | 2015-01-14 08:49:55 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-01-14 08:49:55 -0700 |
commit | 0bf364984c4a799f75414de009ecd579d6d35a21 (patch) | |
tree | 639f8d48aa1425843523ac6ace08cfd821eb9446 /include/linux/blkdev.h | |
parent | dd22f551ac0ad366f92f601835f6623b83adc331 (diff) |
blk-mq: fix false negative out-of-tags condition
The blk-mq tagging tries to maintain some locality between CPUs and
the tags issued. The tags are split into groups of words, and the
words may not be fully populated. When searching for a new free tag,
blk-mq may look at partial words, hence it passes in an offset/size
to find_next_zero_bit(). However, it does that wrong, the size must
always be the full length of the number of tags in that word,
otherwise we'll potentially miss some near the end.
Another issue is when __bt_get() goes from one word set to the next.
It bumps the index, but not the last_tag associated with the
previous index. Bump that to be in the range of the new word.
Finally, clean up __bt_get() and __bt_get_word() a bit and get
rid of the goto in there, and the unnecessary 'wrap' variable.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions