blk-mq: fix hang in bt_get()
authorBart Van Assche <bvanassche@acm.org>
Mon, 8 Dec 2014 15:46:34 +0000 (08:46 -0700)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:56 +0000 (12:54 -0600)
commit3cb2b0e7721d36b8f2f71e75a0366195102b6517
treefe4c67396501ea01708c5a7fac98ab1866cc7c89
parent59cb045181bab313e6e082eceff4ff6e2d4134c9
blk-mq: fix hang in bt_get()

Avoid that if there are fewer hardware queues than CPU threads that
bt_get() can hang. The symptoms of the hang were as follows:

* All tags allocated for a particular hardware queue.
* (nr_tags) pending commands for that hardware queue.
* No pending commands for the software queues associated with that
  hardware queue.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-tag.c