Re: [PATCH 2/3] btrfs: rename struct btrfs_io_bio to struct btrfs_logical_bio
From: Qu Wenruo <hidden>
Date: 2021-09-07 09:56:50
On 2021/9/7 下午5:47, Nikolay Borisov wrote:
On 7.09.21 г. 10:42, Qu Wenruo wrote:quoted
In btrfs there are at least 4 types of different bios currently: - btrfs_io_bio It's used to specify IO for logical bytenrPerhaps this structure needs to be turned into a btrfs_bio.
That makes sense, although I still want to keep the logical part to indicate what the bytenr is for.
quoted
- btrfs_bio It's real physical bioIt's not even that, because btrfs_bio itself is not submitted at all, it's really some sort of a semaphore, which is used to signal all stripe bios i.e those bios which are submitted to the actual devices have completed. In that regard it's not even a bio per-se, more like an io_context.
Yep, although there is still some use-case where it integrate the logical bio into it, thus it still has bio in it. Or maybe we should separate the mapping part completely from the bio? Thanks, Qu
quoted
- compressed_bio Only used for compressed read write.This should be compressed_io_ctx or some such.quoted
- btrfs_raid_bio Only used by RAID56 The naming of btrfs_bio and btrfs_io_bio is just anti-human. Rename btrfs_io_bio to btrfs_logical_bio, and all involved helpers to make clear at which layer the bio works. Since we're here, also add extra comments on critical members like @mirror_num. Signed-off-by: Qu Wenruo <redacted><snip>