summaryrefslogtreecommitdiff
path: root/include/linux/part_stat.h
diff options
context:
space:
mode:
authorYu Kuai <yukuai3@huawei.com>2025-05-06 20:48:59 +0800
committerYu Kuai <yukuai3@huawei.com>2025-05-10 16:11:49 +0800
commitf2987c5816bda01a8ffdd4eb5dfaaa2b41b67039 (patch)
treee2888571239e81a2341b39a04179b892e9903f13 /include/linux/part_stat.h
parent6b6c3a97abdebfafa25ef0f4b6b0b8b412b57bbb (diff)
block: export API to get the number of bdev inflight IO
- rename part_in_{flight, flight_rw} to bdev_count_{inflight, inflight_rw} - export bdev_count_inflight, to fix a problem in mdraid that foreground IO can be starved by background sync IO in later patches Link: https://lore.kernel.org/linux-raid/20250506124903.2540268-6-yukuai1@huaweicloud.com Signed-off-by: Yu Kuai <yukuai3@huawei.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de>
Diffstat (limited to 'include/linux/part_stat.h')
-rw-r--r--include/linux/part_stat.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/part_stat.h b/include/linux/part_stat.h
index c5e9cac0575e..eeeff2a04529 100644
--- a/include/linux/part_stat.h
+++ b/include/linux/part_stat.h
@@ -79,4 +79,6 @@ static inline void part_stat_set_all(struct block_device *part, int value)
#define part_stat_local_read_cpu(part, field, cpu) \
local_read(&(part_stat_get_cpu(part, field, cpu)))
+unsigned int bdev_count_inflight(struct block_device *part);
+
#endif /* _LINUX_PART_STAT_H */