Lines Matching refs:ls
56 struct dlm_ls *ls = lkb->lkb_resource->res_ls; in dlm_add_lkb_callback() local
81 log_debug(ls, "skip %x add bast %llu mode %d " in dlm_add_lkb_callback()
103 log_error(ls, "no callbacks %x %llu flags %x mode %d sb %d %x", in dlm_add_lkb_callback()
114 int dlm_rem_lkb_callback(struct dlm_ls *ls, struct dlm_lkb *lkb, in dlm_rem_lkb_callback() argument
149 log_debug(ls, "skip %x bast %llu mode %d " in dlm_rem_lkb_callback()
178 struct dlm_ls *ls = lkb->lkb_resource->res_ls; in dlm_add_cb() local
203 if (test_bit(LSFL_CB_DELAY, &ls->ls_flags)) { in dlm_add_cb()
204 mutex_lock(&ls->ls_cb_mutex); in dlm_add_cb()
205 list_add(&lkb->lkb_cb_list, &ls->ls_cb_delay); in dlm_add_cb()
206 mutex_unlock(&ls->ls_cb_mutex); in dlm_add_cb()
208 queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work); in dlm_add_cb()
218 struct dlm_ls *ls = lkb->lkb_resource->res_ls; in dlm_callback_work() local
229 log_error(ls, "dlm_callback_work %x no work", lkb->lkb_id); in dlm_callback_work()
235 rv = dlm_rem_lkb_callback(ls, lkb, &callbacks[i], &resid); in dlm_callback_work()
242 log_error(ls, "dlm_callback_work %x resid %d", lkb->lkb_id, in dlm_callback_work()
259 trace_dlm_bast(ls, lkb, callbacks[i].mode); in dlm_callback_work()
264 trace_dlm_ast(ls, lkb, lkb->lkb_lksb); in dlm_callback_work()
272 int dlm_callback_start(struct dlm_ls *ls) in dlm_callback_start() argument
274 ls->ls_callback_wq = alloc_workqueue("dlm_callback", in dlm_callback_start()
276 if (!ls->ls_callback_wq) { in dlm_callback_start()
283 void dlm_callback_stop(struct dlm_ls *ls) in dlm_callback_stop() argument
285 if (ls->ls_callback_wq) in dlm_callback_stop()
286 destroy_workqueue(ls->ls_callback_wq); in dlm_callback_stop()
289 void dlm_callback_suspend(struct dlm_ls *ls) in dlm_callback_suspend() argument
291 set_bit(LSFL_CB_DELAY, &ls->ls_flags); in dlm_callback_suspend()
293 if (ls->ls_callback_wq) in dlm_callback_suspend()
294 flush_workqueue(ls->ls_callback_wq); in dlm_callback_suspend()
299 void dlm_callback_resume(struct dlm_ls *ls) in dlm_callback_resume() argument
305 clear_bit(LSFL_CB_DELAY, &ls->ls_flags); in dlm_callback_resume()
307 if (!ls->ls_callback_wq) in dlm_callback_resume()
311 mutex_lock(&ls->ls_cb_mutex); in dlm_callback_resume()
312 list_for_each_entry_safe(lkb, safe, &ls->ls_cb_delay, lkb_cb_list) { in dlm_callback_resume()
314 queue_work(ls->ls_callback_wq, &lkb->lkb_cb_work); in dlm_callback_resume()
319 empty = list_empty(&ls->ls_cb_delay); in dlm_callback_resume()
320 mutex_unlock(&ls->ls_cb_mutex); in dlm_callback_resume()
330 log_rinfo(ls, "%s %d", __func__, sum); in dlm_callback_resume()