Re: [PATCH] Fix wrong max check in bch2_opt_validate

From: Kent Overstreet
Date: Wed Nov 06 2024 - 14:34:52 EST


On Wed, Nov 06, 2024 at 06:58:04PM +0000, Piotr Zalewski wrote:
>
>
>
>
>
> Sent with Proton Mail secure email.
>
> On Wednesday, November 6th, 2024 at 6:52 PM, Kent Overstreet <kent.overstreet@xxxxxxxxx> wrote:
>
> > On Wed, Nov 06, 2024 at 08:11:13AM +0000, Piotr Zalewski wrote:
> >
> > > Hi Kent,
> > >
> > > Did you see this?
> >
> >
> > Whoops, I did miss it the first time.
>
> np
>
> > I think it'd be better to fix it in the OPT_STR() macro though.
>
> If changed in OPT_STR() macro it would also require a change in
> bch2_opt_to_text:434 (it also does -1 there).

*nod*

I think we should do it that way then, we don't want opt->max meaning
different things in different contexts if we can avoid it