Lines Matching refs:ls
18 struct gdlm_ls *ls; in init_gdlm() local
21 ls = kzalloc(sizeof(struct gdlm_ls), GFP_KERNEL); in init_gdlm()
22 if (!ls) in init_gdlm()
25 ls->fscb = cb; in init_gdlm()
26 ls->sdp = sdp; in init_gdlm()
27 ls->fsflags = flags; in init_gdlm()
28 spin_lock_init(&ls->async_lock); in init_gdlm()
29 INIT_LIST_HEAD(&ls->delayed); in init_gdlm()
30 INIT_LIST_HEAD(&ls->submit); in init_gdlm()
31 init_waitqueue_head(&ls->thread_wait); in init_gdlm()
32 init_waitqueue_head(&ls->wait_control); in init_gdlm()
33 ls->jid = -1; in init_gdlm()
41 kfree(ls); in init_gdlm()
47 strncpy(ls->clustername, buf, GDLM_NAME_LEN); in init_gdlm()
48 strncpy(ls->fsname, p, GDLM_NAME_LEN); in init_gdlm()
50 return ls; in init_gdlm()
53 static int make_args(struct gdlm_ls *ls, char *data_arg, int *nodir) in make_args() argument
81 sscanf(y, "%u", &ls->jid); in make_args()
89 sscanf(y, "%u", &ls->first); in make_args()
97 sscanf(y, "%u", &ls->id); in make_args()
123 struct gdlm_ls *ls; in gdlm_mount() local
129 ls = init_gdlm(cb, cb_data, flags, table_name); in gdlm_mount()
130 if (!ls) in gdlm_mount()
133 error = make_args(ls, host_data, &nodir); in gdlm_mount()
137 error = gdlm_init_threads(ls); in gdlm_mount()
141 error = gdlm_kobject_setup(ls, fskobj); in gdlm_mount()
145 error = dlm_new_lockspace(ls->fsname, strlen(ls->fsname), in gdlm_mount()
146 &ls->dlm_lockspace, in gdlm_mount()
155 lockstruct->ls_jid = ls->jid; in gdlm_mount()
156 lockstruct->ls_first = ls->first; in gdlm_mount()
157 lockstruct->ls_lockspace = ls; in gdlm_mount()
164 gdlm_kobject_release(ls); in gdlm_mount()
166 gdlm_release_threads(ls); in gdlm_mount()
168 kfree(ls); in gdlm_mount()
175 struct gdlm_ls *ls = lockspace; in gdlm_unmount() local
177 log_debug("unmount flags %lx", ls->flags); in gdlm_unmount()
183 if (test_bit(DFL_WITHDRAW, &ls->flags)) in gdlm_unmount()
186 gdlm_kobject_release(ls); in gdlm_unmount()
187 dlm_release_lockspace(ls->dlm_lockspace, 2); in gdlm_unmount()
188 gdlm_release_threads(ls); in gdlm_unmount()
189 BUG_ON(ls->all_locks_count); in gdlm_unmount()
191 kfree(ls); in gdlm_unmount()
200 struct gdlm_ls *ls = lockspace; in gdlm_recovery_done() local
201 ls->recover_jid_done = jid; in gdlm_recovery_done()
202 ls->recover_jid_status = message; in gdlm_recovery_done()
206 kobject_uevent_env(&ls->kobj, KOBJ_CHANGE, envp); in gdlm_recovery_done()
213 struct gdlm_ls *ls = lockspace; in gdlm_others_may_mount() local
214 ls->first_done = 1; in gdlm_others_may_mount()
215 kobject_uevent_env(&ls->kobj, KOBJ_CHANGE, envp); in gdlm_others_may_mount()
224 struct gdlm_ls *ls = lockspace; in gdlm_withdraw() local
226 kobject_uevent(&ls->kobj, KOBJ_OFFLINE); in gdlm_withdraw()
228 wait_event_interruptible(ls->wait_control, in gdlm_withdraw()
229 test_bit(DFL_WITHDRAW, &ls->flags)); in gdlm_withdraw()
231 dlm_release_lockspace(ls->dlm_lockspace, 2); in gdlm_withdraw()
232 gdlm_release_threads(ls); in gdlm_withdraw()
233 gdlm_kobject_release(ls); in gdlm_withdraw()
239 struct gdlm_ls *ls = lockspace; in gdlm_plock() local
240 return dlm_posix_lock(ls->dlm_lockspace, name->ln_number, file, cmd, fl); in gdlm_plock()
246 struct gdlm_ls *ls = lockspace; in gdlm_punlock() local
247 return dlm_posix_unlock(ls->dlm_lockspace, name->ln_number, file, fl); in gdlm_punlock()
253 struct gdlm_ls *ls = lockspace; in gdlm_plock_get() local
254 return dlm_posix_get(ls->dlm_lockspace, name->ln_number, file, fl); in gdlm_plock_get()