Re: [PATCH 2/3] btrfs: rename struct btrfs_io_bio to struct btrfs_logical_bio
From: Nikolay Borisov <hidden>
Date: 2021-09-07 09:47:30
From: Nikolay Borisov <hidden>
Date: 2021-09-07 09:47:30
On 7.09.21 г. 10:42, Qu Wenruo wrote:
In btrfs there are at least 4 types of different bios currently: - btrfs_io_bio It's used to specify IO for logical bytenr
Perhaps this structure needs to be turned into a btrfs_bio.
- btrfs_bio It's real physical bio
It'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.
- compressed_bio Only used for compressed read write.
This should be compressed_io_ctx or some such.
- 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>