On Mon, Apr 14, 2025 at 02:48:23PM +0800, Yu Kuai wrote: > > If we export this it needs a kerneldoc comment, and probably also > > a better name. > > Sure about comment. I think a name like bdev_count_inflight might also be helpful as there is nothing partition-specific in the helper. > There are two kinds of helpers: > > 1) part_in_flight and part_in_flight_rw > 2) blk_mq_in_flight and blk_mq_in_flight_rw > > 1) is accounted at blk_account_io_start(), while 2) is > blk_mq_start_request(), I think this is the essential difference. > > part_in_flight_rw() and blk_mq_in_flight_rw() is also used in sysfs API > inflight for bio/rq based device. And commit 7be835694dae ("block: fix > that util can be greater than 100%") convert blk_mq_in_flight() to > part_in_flight() from disk stats API. Now I just checked there is no use > for blk_mq_in_flight() anymore and maybe it can be removed. Yeah. I'm still confused about having the different methods to count the _rw vs non-_rw variants for blk-mq, but I guess that's not really in scope for your series.