Hi all, this series started out as an attempt to move btrfs to use the new as of 5.18 bio interface, which then turned into cleaning up a lot of the surrounding areas. It can be roughly divided into 4 sub-series: - patches 1 to 4 are bug fixes for bugs found during code inspection. It might be a good idea if experienced btrfs developers could help review them or correct me if I misunderstood something - patches 5 to 22 are general cleanups on how bios are used and surrounding code - patches 23 to 29 clean up various extra memory allocations in the bio I/O path. With I/Os that go to a single device (like all reads) only need the btrfs_bio memory allocation and not additional object. - patches 30 to 40 integrate the btrfs dio code more tightly with iomap and avoid the extra dio_private allocation and bio clone All this is pretty rough. It survices a xfstests auto group run on a default file system config, though. The tree is based on Jens' for-next tree as it started with the bio cleanups, and will need a rebase once 5.18-rc1 is out. A git tree is available here: git://git.infradead.org/users/hch/misc.git btrfs-bio-cleanup Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/btrfs-bio-cleanup Diffstat: fs/btrfs/btrfs_inode.h | 25 - fs/btrfs/check-integrity.c | 165 +++++------ fs/btrfs/check-integrity.h | 8 fs/btrfs/compression.c | 54 +-- fs/btrfs/ctree.h | 6 fs/btrfs/disk-io.c | 272 +++--------------- fs/btrfs/disk-io.h | 21 - fs/btrfs/extent_io.c | 210 ++++++-------- fs/btrfs/extent_io.h | 17 - fs/btrfs/file.c | 6 fs/btrfs/inode.c | 661 ++++++++++++++++++--------------------------- fs/btrfs/raid56.c | 156 ++++------ fs/btrfs/scrub.c | 92 ++---- fs/btrfs/super.c | 11 fs/btrfs/volumes.c | 392 +++++++++++++++----------- fs/btrfs/volumes.h | 60 ++-- fs/iomap/direct-io.c | 29 + fs/iomap/iter.c | 13 include/linux/iomap.h | 23 + 19 files changed, 963 insertions(+), 1258 deletions(-)