Thread (7 messages) 7 messages, 3 authors, 2021-09-07

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 bytenr
Perhaps 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 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.
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>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help