mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-05 03:44:05 +00:00
The mounted_clients btree stores items to track mounted clients. It's modified by multiple greeting workers and the farewell work. The greeting work was serialized by the farewell_mutex, but the modifications in the farewell thread weren't protected. This could result in modifications between the threads being lost if the dirty block reference updates raced in just the right way. I saw this in testing with deletions in farewell being lost and then that lingering item preventing unmount because the server thought it had to wait for a remaining quorum member to unmount. We fix this by adding a mutex specifically to protect the mounted_clients btree in the server. Signed-off-by: Zach Brown <zab@versity.com>