]> git.ipfire.org Git - thirdparty/linux.git/commit
blk-mq: add blk_mq_all_tag_iter
authorMing Lei <ming.lei@redhat.com>
Fri, 29 May 2020 13:53:14 +0000 (15:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 29 May 2020 16:23:25 +0000 (10:23 -0600)
commit602380d28e28b454683efac41dc4b2862d055d91
tree105845e989e30adfe630116e790f73ee68bf5641
parent600c3b0cea784aaba77df3ed4a6b4f2ebfa935ce
blk-mq: add blk_mq_all_tag_iter

Add a new blk_mq_all_tag_iter function to iterate over all allocated
scheduler tags and driver tags.  This is more flexible than the existing
blk_mq_all_tag_busy_iter function as it allows the callers to do whatever
they want on allocated request instead of being limited to started
requests.

It will be used to implement draining allocated requests on specified
hctx in this patchset.

[hch: switch from the two booleans to a more readable flags field and
 consolidate the tags iter functions]

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Bart van Assche <bvanassche@acm.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-tag.c
block/blk-mq-tag.h