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 <zab@versity.com>
This commit is contained in:
Zach Brown
2021-05-25 12:55:19 -07:00
parent 1e460e5cb0
commit 1199bac91d

View File

@@ -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);
}
/*