[dm-devel] [PATCH v2 29/48] multipathd: uxlsnr: merge uxsock_trigger() into state machine

Martin Wilck mwilck at suse.com
Fri Nov 26 14:34:59 UTC 2021


On Wed, 2021-11-24 at 18:38 -0600, Benjamin Marzinski wrote:
> On Thu, Nov 18, 2021 at 11:58:21PM +0100, mwilck at suse.com wrote:
> > From: Martin Wilck <mwilck at suse.com>
> > 
> > This patch sets up the bulk of the state machine.
> > client_state_machine()
> > is called in a loop, proceeding from state to state until it needs
> > to poll for input or wait for a lock, in which case it returns
> > STM_BREAK.
> > 
> > While doing this, switch to negative error codes for the functions
> > in uxlsnr.c (e.g. parse_cmd()). Positive return codes are reserved
> > for the cli_handler functions themselves. This way we can clearly
> > distinguish the error source, and avoid confusion and misleading
> > error messages. No cli_handler returns negative values.
> > 
> > Note: with this patch applied, clients may hang and time out if
> > the handler fails to acquire the vecs lock. This will be fixed in
> > the
> > follow-up patch "multipathd: uxlsnr: add idle notification".
> > 
> 
> Actually, one nitpick. See below
> 
> > +
> 
> This switch statement is indented with 8 spaces, instead of a tab

I'm going to fix that, but I assume you're aware that our code is far
from being consistent in this respect. This holds also for other
patches in this series. Do you want me to re-format all of them?

Martin





More information about the dm-devel mailing list