summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-debugfs.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-11-08 10:24:07 -0700
committerJens Axboe <axboe@kernel.dk>2018-11-08 10:24:07 -0700
commit7baa85727d0406ffd2b2303cd803a145aa35c505 (patch)
tree580e8cf709bda194b7271ca9310f11ea0d8b14e3 /block/blk-mq-debugfs.c
parentc28445fa06a3a54e06938559b9514c5a7f01c90f (diff)
downloadlinux-7baa85727d0406ffd2b2303cd803a145aa35c505.tar.gz
linux-7baa85727d0406ffd2b2303cd803a145aa35c505.tar.bz2
linux-7baa85727d0406ffd2b2303cd803a145aa35c505.zip
blk-mq-tag: change busy_iter_fn to return whether to continue or not
We have this functionality in sbitmap, but we don't export it in blk-mq for users of the tags busy iteration. This can be useful for stopping the iteration, if the caller doesn't need to find more requests. Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-debugfs.c')
-rw-r--r--block/blk-mq-debugfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index cde19be36135..f021f4817b80 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -422,15 +422,18 @@ struct show_busy_params {
/*
* Note: the state of a request may change while this function is in progress,
- * e.g. due to a concurrent blk_mq_finish_request() call.
+ * e.g. due to a concurrent blk_mq_finish_request() call. Returns true to
+ * keep iterating requests.
*/
-static void hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
+static bool hctx_show_busy_rq(struct request *rq, void *data, bool reserved)
{
const struct show_busy_params *params = data;
if (rq->mq_hctx == params->hctx)
__blk_mq_debugfs_rq_show(params->m,
list_entry_rq(&rq->queuelist));
+
+ return true;
}
static int hctx_busy_show(void *data, struct seq_file *m)