[dm-devel] [PATCH 32/35] multipathd: uxlsnr: add timeout handling
Benjamin Marzinski
bmarzins at redhat.com
Thu Sep 16 15:08:37 UTC 2021
On Thu, Sep 16, 2021 at 10:58:36AM +0200, Martin Wilck wrote:
> On Wed, 2021-09-15 at 23:17 -0500, Benjamin Marzinski wrote:
> > On Fri, Sep 10, 2021 at 01:41:17PM +0200, mwilck at suse.com wrote:
> > > From: Martin Wilck <mwilck at suse.com>
> > >
> > > Our ppoll() call needs to wake up when a client request times out.
> > > This logic can be added by determining the first client that's
> > > about
> > > to time out. The logic in handle_client() will then cause a timeout
> > > reply to be sent to the client. This is more client-friendly
> > > as the client timing out without receiving a reply.
> > >
> > > Signed-off-by: Martin Wilck <mwilck at suse.com>
> > > ---
> > > multipathd/uxlsnr.c | 58
> > > +++++++++++++++++++++++++++++++++++++++++----
> > > 1 file changed, 53 insertions(+), 5 deletions(-)
> > >
> > >
> > > @@ -594,6 +643,7 @@ void *uxsock_listen(long ux_sock, void
> > > *trigger_data)
> > > while (1) {
> > > struct client *c, *tmp;
> > > int i, n_pfds, poll_count, num_clients;
> > > + struct timespec __timeout, *timeout;
> >
> > Maybe it's just too late to be looking at code, but I'm missing why
> > we
> > need a separate variable that it a pointer to __timeout.
>
> This way __get_soonest_timeout() can return either NULL or &__timeout,
> and we can simply pass the return value to ppoll().
Ah. Yep. Too late to be reviewing code.
-Ben
>
> Martin
>
More information about the dm-devel
mailing list