In the meantime, since I have sent the base patch as below [1], the block layer commit 0d02129e76ed (block: merge struct block_device and struct hd_struct) has changed the first argument in the function part_stat_read_all() to struct block_device in 5.11-rc1. So the compilation will fail. This patch fixes it.
This fixup patch must be rolled into its base patch [1]. [1] [PATCH v2 1/4] btrfs: add read_policy latency I will include these changes in the base patch after the review comments. Signed-off-by: Anand Jain <[email protected]> --- fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 381eed52708e..7fc56274f3c1 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -5550,8 +5550,8 @@ static int btrfs_find_best_stripe(struct btrfs_fs_info *fs_info, unsigned long read_ios; struct btrfs_device *device = map->stripes[index].dev; - read_wait = part_stat_read(device->bdev->bd_part, nsecs[READ]); - read_ios = part_stat_read(device->bdev->bd_part, ios[READ]); + read_wait = part_stat_read(device->bdev, nsecs[READ]); + read_ios = part_stat_read(device->bdev, ios[READ]); if (read_wait && read_ios && read_wait >= read_ios) avg_wait = div_u64(read_wait, read_ios); -- 2.25.1
