Re: [PATCH v3 1/3] btrfs: rename btrfs_bio to btrfs_io_context

David Sterba
2021-09-17T11:33:49Z

On Fri, Sep 17, 2021 at 07:27:30PM +0800, Qu Wenruo wrote:
>
>
> On 2021/9/17 19:24, Qu Wenruo wrote:
> >
> >
> > On 2021/9/17 19:19, David Sterba wrote:
> >> On Wed, Sep 15, 2021 at 03:17:16PM +0800, Qu Wenruo wrote:
> >>> The structure btrfs_bio is used by two different sites:
> >>>
> >>> - bio->bi_private for mirror based profiles
> >>>    For those profiles (SINGLE/DUP/RAID1*/RAID10), this structures
> >>> records
> >>
> >> Why is SINGLE here?
> >>
> > For single we use the same routine as RAID1/DUP/etc, it's
> > submit_stripe_bio() doing the remapping.
> >
> > Thus there is really only two types, non-RAID56 and RAID56.
>
> And there is no really "SINGLE" profile in btrfs.
>
> As even for SINGLE profile, we may need to submit two bios to two
> different devices (one is the current device, the other is the
> dev-replace target).

Ok, thanks. It's a bit confusing to mention 'single' with mirrored
profiles but here it's on the implementation level where it could be
written on more than one device. We don't have a terminology for that so
be it.