Re: [PATCH v3 3/3] btrfs: rename struct btrfs_io_bio to btrfs_logical_bio

David Sterba
2021-09-17T11:39:24Z

On Wed, Sep 15, 2021 at 03:17:18PM +0800, Qu Wenruo wrote:
> Previously we have "struct btrfs_bio", which records IO context for
> mirrored IO and RAID56, and "strcut btrfs_io_bio", which records extra
> btrfs specific info for logical bytenr bio.
>
> With "strcut btrfs_bio" renamed to "struct btrfs_io_context", we are
> safe to rename "strcut btrfs_io_bio" to "strcut btrfs_logical_bio" which
> is a more suitable name now.
>
> Although the name, "btrfs_logical_bio", is a little long and name
> "btrfs_bio" can be much shorter, "btrfs_bio" conflicts with previous
> "btrfs_bio" structure and can cause a lot of problems for backports.
>
> Thus here we choose the name "btrfs_logical_bio", which also emphasis
> those bios all work at logical bytenr.

After reading through the whole patch I agree with the naming, though
yeah it's a bit long, but we've been using this wordy naming. For
identifiers it's fine to use lbio and it's now clear from the context
that it's about the btrfs-specific features.