Re: [PATCH v4 0/6] BTT error clearing rework

Kani, Toshimitsu
2017-08-01T20:06:44Z

On Tue, 2017-08-01 at 13:56 -0600, Vishal Verma wrote:
:
>
> Hey Toshi, that is a great catch (I'm going to look at enhancing the
> unit tests too to catch this).
>
> Your patch is correct. Normally whenever we calculate a 'nsoff', we
> use that to do arena_{read,write}_bytes, and that takes care of
> adding the initial_offset. This was the first instance where we
> calculated nsoff and did something other than rw_bytes with it (i.e.
> is_bad_pmem), and therefore this nsoff needs the initial_offset
> adjustment manually..
>
> However just adding that here is inviting future bugs like this, so
> I'm going to refactor the initial_offset adjustment into some helpers
> and use those across the board. That should prevent this sort of a
> bug again.

Sounds great. Thanks Vishal!
-Toshi