mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-09 13:23:14 +00:00
Shutdown locking before transactions
Shutting down the lock client waits for invalidation work and prevents future work from being queued. We're currently shutting down the subsystems that lock calls before lock itself, leading to crashes if we happen to have invalidations executing as we unmount. Shutting down locking before its dependencies fixes this. This was hit in testing during the inode deletion fixes because it created the perfect race by acquiring locks during unmount so that the server was very unlikely to send invalidations on behalf to one mount on behalf of another as they both unmounted. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -251,6 +251,8 @@ static void scoutfs_put_super(struct super_block *sb)
|
||||
scoutfs_unlock(sb, sbi->rid_lock, SCOUTFS_LOCK_WRITE);
|
||||
sbi->rid_lock = NULL;
|
||||
|
||||
scoutfs_lock_shutdown(sb);
|
||||
|
||||
scoutfs_shutdown_trans(sb);
|
||||
scoutfs_client_destroy(sb);
|
||||
scoutfs_inode_destroy(sb);
|
||||
@@ -258,7 +260,6 @@ static void scoutfs_put_super(struct super_block *sb)
|
||||
scoutfs_forest_destroy(sb);
|
||||
|
||||
scoutfs_quorum_destroy(sb);
|
||||
scoutfs_lock_shutdown(sb);
|
||||
scoutfs_server_destroy(sb);
|
||||
scoutfs_recov_destroy(sb);
|
||||
scoutfs_net_destroy(sb);
|
||||
|
||||
Reference in New Issue
Block a user