Re: [PATCH v2 15/17] md: Use enum for overloaded magic numbers used by mddev->curr_resync

Logan Gunthorpe
2022-05-30T15:57:18Z

On 2022-05-30 00:01, Christoph Hellwig wrote:
> On Thu, May 26, 2022 at 10:36:02AM -0600, Logan Gunthorpe wrote:
>> Comments in the code document special values used for
>> mddev->curr_resync. Make this clearer by using an enum to label these
>> values.
>>
>> The only functional change is a couple places use the wrong comparison
>> operator that implied 3 is another special value. They are all
>> fixed to imply that 3 or greater is an active resync.
>
> This already looks good, but shouldn't the curr_resync also be changed
> to the new enum type?

I thought not, seeing curr_resync actually represents a sector_t except
for these handful of special values.
Thanks,

Logan