Re: [PATCH 01/10] btrfs: Always initialize btrfs_bio::tgtdev_map/raid_map pointers

David Sterba
2020-07-03T15:58:17Z

On Fri, Jul 03, 2020 at 11:31:02AM +0300, Nikolay Borisov wrote:
>
>
> On 2.07.20 г. 17:04 ч., Johannes Thumshirn wrote:
> > On 02/07/2020 15:47, Nikolay Borisov wrote:
> > [...]
> >> - bbio->raid_map = (u64 *)((void *)bbio->stripes +
> >> - sizeof(struct btrfs_bio_stripe) *
> >> - num_alloc_stripes +
> >> - sizeof(int) * tgtdev_indexes);
> >
> > That one took me a while to be convinced it is correct.
>
> There are 2 aspects to this:
>
> 1. I think the original code is harder to grasp ...

Agreed, the rework is much better. Though understanding that's an
equivalent change is tough. I'll update the changelog with the
explanation.