Re: [PATCH] raid5: refactor raid5 personality definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 28, 2020 at 6:03 PM Jason Yan <yanaijie@xxxxxxxxxx> wrote:
>
> Hi all, any comments?

Sorry for the late reply. I somehow missed the first email.

>
> 在 2020/9/21 14:38, Jason Yan 写道:
> > The definition of md personality for raid4/raid5/raid6 is almost the same.
> > So introduce a macro 'RAID5_PERSONALITY_ATTR' to help define the
> > personality. This can help us reduce some duplicated code.
> >
> > Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
[...]
> > +}
> > +
> > +#define raid4_check_reshape raid5_check_reshape
> > +
> > +RAID5_PERSONALITY_ATTR(raid4, 4);
> > +RAID5_PERSONALITY_ATTR(raid5, 5);
> > +RAID5_PERSONALITY_ATTR(raid6, 6);

I don't think we benefit much from this change. It doesn't make the code
easier to read. Instead, this change adds another level of marco to the code.
I would rather keep this code as-is.

Thanks,
Song




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux