mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-08 21:03:12 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user