From 1199bac91d8e44d24fa32aeb870e378bbdb841db Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 25 May 2021 12:55:19 -0700 Subject: [PATCH] Fix quorum server shutdown If the server shuts down it calls into quorum to tell it that the server has exited. This stops quorum from sending heartbeats that suppress other leader elections. The function that did this got the logic wrong. It was setting the bit instead of clearing it, having been initially written to set a bit when the server exited. Signed-off-by: Zach Brown --- kmod/src/quorum.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kmod/src/quorum.c b/kmod/src/quorum.c index fcba1b28..a69e5270 100644 --- a/kmod/src/quorum.c +++ b/kmod/src/quorum.c @@ -813,15 +813,15 @@ out: } /* - * Set a flag for the quorum work's next iteration to indicate that the - * server has shutdown and that it should step down as leader, update - * quorum blocks, and stop sending heartbeats. + * Clear the server flag for the quorum work's next iteration to + * indicate that the server has shutdown and that it should step down as + * leader, update quorum blocks, and stop sending heartbeats. */ void scoutfs_quorum_server_shutdown(struct super_block *sb) { DECLARE_QUORUM_INFO(sb, qinf); - set_bit(QINF_FLAG_SERVER, &qinf->flags); + clear_bit(QINF_FLAG_SERVER, &qinf->flags); } /*