block: export API to get the number of bdev inflight IO
authorYu Kuai <yukuai3@huawei.com>
Tue, 6 May 2025 12:48:59 +0000 (20:48 +0800)
committerYu Kuai <yukuai3@huawei.com>
Sat, 10 May 2025 08:11:49 +0000 (16:11 +0800)
commitf2987c5816bda01a8ffdd4eb5dfaaa2b41b67039
treee2888571239e81a2341b39a04179b892e9903f13
parent6b6c3a97abdebfafa25ef0f4b6b0b8b412b57bbb
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>
block/blk-core.c
block/blk.h
block/genhd.c
include/linux/part_stat.h