[dm-devel] [PATCH v2] simplify multipath signal handlers

Bart Van Assche bvanassche at acm.org
Fri May 10 18:23:38 UTC 2013


On 05/08/13 20:36, Benjamin Marzinski wrote:
> This patch changes how multipath's signal handlers work.  Instead of
> having sighup and sigusr1 acquire locks and call functions directly,
> they now both simply set atomic variables.  These two signals are
> blocked in child(), and all other threads inherit this sigmask. The
> only place in all the multipath code that doesn't block these signals
> is now the ppoll() call by the uxlsnr thread.  When it is interrupted
> by a signal, the uxlsnr thread does the actual processing work.
>
> Instead of sigend using mutex locks and condition variables to tell
> the child() function to exit, it now uses a signal_handler safe
> semaphore that child() waits on and exit_daemon() increments.
>
> This patch also switches all the sigprocmask() calls to
> pthread_sigmask()
>
> Signed-off-by: Benjamin Marzinski <bmarzins at redhat.com>

Thanks for addressing my comments.

Reviewed-by: Bart Van Assche <bvanassche at acm.org>




More information about the dm-devel mailing list