Hi,

在 2025/04/29 14:31, Hannes Reinecke 写道:
On 4/27/25 10:29, Yu Kuai wrote:
From: Yu Kuai <yuku...@huawei.com>

Also add comment for part_inflight_show() for the difference between
bio-based and rq-based device.

Signed-off-by: Yu Kuai <yuku...@huawei.com>
---
  block/blk-mq.c | 12 ++++++------
  block/blk-mq.h |  3 +--
  block/genhd.c  | 43 +++++++++++++++++++++++++------------------
  3 files changed, 32 insertions(+), 26 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 301dbd3e1743..0067e8226e05 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -89,7 +89,7 @@ struct mq_inflight {
      unsigned int inflight[2];
  };
-static bool blk_mq_check_inflight(struct request *rq, void *priv)
+static bool blk_mq_check_in_driver(struct request *rq, void *priv)

Please don't rename these functions. 'in flight' always means 'in flight
in the driver', so renaming them just introduces churn with no real advantage.

Actually, the inflight value, from /proc/diskstats from diskstats_show,
actually means IO start accounting, which may not in the rq driver. For
example, IO scheduler. The same inflight value is used in
update_io_ticks as well.

This is the main reason about this rename. Related comments are added in
part_inflight_show() in this patch, and in part_in_flight() in next
patch.

Thanks,
Kuai


Cheers,

Hannes


Reply via email to