Re: [PATCH 12/35] multipathd: add and set cli_handlers in a single step

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

 



On Wed, 2021-09-15 at 19:01 -0500, Benjamin Marzinski wrote:
> On Fri, Sep 10, 2021 at 01:40:57PM +0200, mwilck@xxxxxxxx wrote:
> > From: Martin Wilck <mwilck@xxxxxxxx>
> > 
> > Modify set_handler_callback() such that a missing slot is created
> > if no matching slot is found. This way, we can skip the
> > initialization
> > with NULL handlers on startup.
> > 
> > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx>
> > ---
> >  multipathd/cli.c | 85 +++++++-------------------------------------
> > ----
> >  multipathd/cli.h |  6 ++--
> >  2 files changed, 15 insertions(+), 76 deletions(-)
> > 
> > diff --git a/multipathd/cli.c b/multipathd/cli.c
> > index 5213813..7020d2b 100644
> > --- a/multipathd/cli.c
> > +++ b/multipathd/cli.c
> > @@ -100,26 +100,20 @@ find_handler (uint64_t fp)
> >  }
> >  
> >  int
> > -set_handler_callback (uint64_t fp, cli_handler *fn)
> > +__set_handler_callback (uint64_t fp, cli_handler *fn, bool locked)
> >  {
> > -       struct handler * h = find_handler(fp);
> > +       struct handler *h = find_handler(fp);
> >  
> 
> Wouldn't it be a bug if we reset the handler? Is this really
> something
> we need to check for? Also, if add_handler() just returned a pointer
> to
> the handler, we wouldn't need to call fail_handler() immediately
> after
> creating it.

I'll fix this in an add-on patch in v2.

Regards
Martin


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux