blk-throttle: Rename tg_may_dispatch() to tg_dispatch_time()
authorZizhi Wo <wozizhi@huawei.com>
Tue, 6 May 2025 02:09:28 +0000 (10:09 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 13 May 2025 18:08:27 +0000 (12:08 -0600)
commitfd6c08b26460436ec0f53e125f8ded98738806f1
tree75c14cf0cc616d875397972a853d62af59ec18ca
parentcf724e5e4161f3b1de59163a4f39ba59379f52a4
blk-throttle: Rename tg_may_dispatch() to tg_dispatch_time()

tg_may_dispatch() can directly indicate whether bio can be dispatched by
returning the time to wait, without the need for the redundant "wait"
parameter. Remove it and modify the function's return type accordingly.

Since we have determined by the return time whether bio can be dispatched,
rename tg_may_dispatch() to tg_dispatch_time().

Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Zizhi Wo <wozizhi@huaweicloud.com>
Link: https://lore.kernel.org/r/20250506020935.655574-2-wozizhi@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c