mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
scoutfs: provide a function to init and uninit our dlmglue context
Signed-off-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
@@ -4279,3 +4279,24 @@ void ocfs2_wake_downconvert_thread(struct ocfs2_super *osb)
|
||||
spin_unlock_irqrestore(&osb->dc_task_lock, flags);
|
||||
wake_up(&osb->dc_event);
|
||||
}
|
||||
|
||||
int ocfs2_init_super(struct ocfs2_super *osb, int flags)
|
||||
{
|
||||
memset(osb, 0, sizeof(*osb));
|
||||
|
||||
osb->osb_dlm_debug = ocfs2_new_dlm_debug();
|
||||
if (!osb->osb_dlm_debug)
|
||||
return -ENOMEM;
|
||||
|
||||
spin_lock_init(&osb->dc_task_lock);
|
||||
init_waitqueue_head(&osb->dc_event);
|
||||
INIT_LIST_HEAD(&osb->blocked_lock_list);
|
||||
osb->s_mount_opt = flags;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ocfs2_uninit_super(struct ocfs2_super *osb)
|
||||
{
|
||||
ocfs2_dlm_shutdown_debug(osb);
|
||||
}
|
||||
|
||||
@@ -246,6 +246,9 @@ int ocfs2_cluster_lock(struct ocfs2_super *osb, struct ocfs2_lock_res *lockres,
|
||||
void ocfs2_cluster_unlock(struct ocfs2_super *osb,
|
||||
struct ocfs2_lock_res *lockres, int level);
|
||||
|
||||
int ocfs2_init_super(struct ocfs2_super *osb, int flags);
|
||||
void ocfs2_uninit_super(struct ocfs2_super *osb);
|
||||
|
||||
int ocfs2_dlm_init(struct ocfs2_super *osb, char *cluster_stack,
|
||||
char *cluster_name, char *ls_name, struct dentry *debug_root);
|
||||
void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending);
|
||||
|
||||
Reference in New Issue
Block a user