blk-mq: allow the callback to blk_mq_tag_busy_iter() to stop looping
authorJens Axboe <axboe@fb.com>
Fri, 3 Apr 2015 16:29:14 +0000 (10:29 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 3 Apr 2015 16:29:14 +0000 (10:29 -0600)
commitae59040c5caf922452b5ffa92b897f5a9fd1f7b0
treee7b360c57f380f625e9694ed73d437866410f21c
parente42391cd048809d903291d07f86ed3934ce138e9
blk-mq: allow the callback to blk_mq_tag_busy_iter() to stop looping

Currently blk_mq_tag_busy_iter() loops all busy tags for a given
hardware queue. But sometimes we are looking for a specific request,
and when we find it, we don't have to keep looking over the rest of
them. Change the busy_iter_fn callback to return a bool, where a
true return will break out of the search.

Update current callers (blk-mq timeout and NVMe IO cancel).

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-tag.c
block/blk-mq.c
drivers/block/nvme-core.c
include/linux/blk-mq.h