percpu_ida: add an API to return free tags
authorShaohua Li <shli@kernel.org>
Tue, 15 Oct 2013 01:05:03 +0000 (09:05 +0800)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:38 +0000 (12:54 -0600)
commit9fc021225c0459ff64a9664a8c000aa3bcbbfbfb
tree3e8c38c02e2b019cdb08aa6b4c3a1959b7bf2610
parentf5d05a7aef18562331a3506360bc8e54466f0634
percpu_ida: add an API to return free tags

Add an API to return free tags, blk-mq-tag will use it.

Note, this just returns a snapshot of free tags number. blk-mq-tag has
two usages of it. One is for info output for diagnosis. The other is to
quickly check if there are free tags for request dispatch checking.
Neither requires very precise.

Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Shaohua Li <shli@fusionio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/percpu_ida.h
lib/percpu_ida.c