Home
last modified time | relevance | path

Searched refs:lksb (Results 1 – 20 of 20) sorted by relevance

/linux/fs/ocfs2/
H A Dstackglue.h54 * include in the lksb union to make space for a combined dlm_lksb and lvb.
57 struct dlm_lksb lksb; member
81 void (*lp_lock_ast)(struct ocfs2_dlm_lksb *lksb);
82 void (*lp_blocking_ast)(struct ocfs2_dlm_lksb *lksb, int level);
83 void (*lp_unlock_ast)(struct ocfs2_dlm_lksb *lksb, int error);
159 * them to stack->sp_proto. There is no astarg. The lksb will
165 struct ocfs2_dlm_lksb *lksb,
176 * no astarg. The lksb will be passed back to the unlock ast
180 struct ocfs2_dlm_lksb *lksb,
186 * callback pulls out the stack-specific lksb, convert
[all...]
H A Dstack_o2cb.c156 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_lock_ast_wrapper() local
158 lksb->lksb_conn->cc_proto->lp_lock_ast(lksb); in o2dlm_lock_ast_wrapper()
163 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_blocking_ast_wrapper() local
165 lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level); in o2dlm_blocking_ast_wrapper()
170 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_unlock_ast_wrapper() local
187 lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, error); in o2dlm_unlock_ast_wrapper()
192 struct ocfs2_dlm_lksb *lksb, in o2cb_dlm_lock() argument
211 o2cb_dlm_unlock(struct ocfs2_cluster_connection * conn,struct ocfs2_dlm_lksb * lksb,u32 flags) o2cb_dlm_unlock() argument
224 o2cb_dlm_lock_status(struct ocfs2_dlm_lksb * lksb) o2cb_dlm_lock_status() argument
234 o2cb_dlm_lvb_valid(struct ocfs2_dlm_lksb * lksb) o2cb_dlm_lvb_valid() argument
239 o2cb_dlm_lvb(struct ocfs2_dlm_lksb * lksb) o2cb_dlm_lvb() argument
244 o2cb_dump_lksb(struct ocfs2_dlm_lksb * lksb) o2cb_dump_lksb() argument
[all...]
H A Dstack_user.c654 struct ocfs2_dlm_lksb *lksb = astarg; in fsdlm_lock_ast_wrapper() local
655 int status = lksb->lksb_fsdlm.sb_status; in fsdlm_lock_ast_wrapper()
668 lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, 0); in fsdlm_lock_ast_wrapper()
670 lksb->lksb_conn->cc_proto->lp_lock_ast(lksb); in fsdlm_lock_ast_wrapper()
675 struct ocfs2_dlm_lksb *lksb = astarg; in fsdlm_blocking_ast_wrapper() local
677 lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level); in fsdlm_blocking_ast_wrapper()
682 struct ocfs2_dlm_lksb *lksb, in user_dlm_lock() argument
687 if (!lksb->lksb_fsdlm.sb_lvbptr) in user_dlm_lock()
688 lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb + in user_dlm_lock()
691 return dlm_lock(conn->cc_lockspace, mode, &lksb->lksb_fsdlm, in user_dlm_lock()
[all …]
H A Dstackglue.c227 * for the ast and bast functions. They will pass the lksb to the ast
228 * and bast. The caller can wrap the lksb with their own structure to
233 struct ocfs2_dlm_lksb *lksb, in ocfs2_dlm_lock() argument
238 if (!lksb->lksb_conn) in ocfs2_dlm_lock()
239 lksb->lksb_conn = conn; in ocfs2_dlm_lock()
241 BUG_ON(lksb->lksb_conn != conn); in ocfs2_dlm_lock()
242 return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags, in ocfs2_dlm_lock()
248 struct ocfs2_dlm_lksb *lksb, in ocfs2_dlm_unlock() argument
251 BUG_ON(lksb->lksb_conn == NULL); in ocfs2_dlm_unlock()
253 return active_stack->sp_ops->dlm_unlock(conn, lksb, flag in ocfs2_dlm_unlock()
257 ocfs2_dlm_lock_status(struct ocfs2_dlm_lksb * lksb) ocfs2_dlm_lock_status() argument
263 ocfs2_dlm_lvb_valid(struct ocfs2_dlm_lksb * lksb) ocfs2_dlm_lvb_valid() argument
269 ocfs2_dlm_lvb(struct ocfs2_dlm_lksb * lksb) ocfs2_dlm_lvb() argument
275 ocfs2_dlm_dump_lksb(struct ocfs2_dlm_lksb * lksb) ocfs2_dlm_dump_lksb() argument
[all...]
H A Ddlmglue.c294 static inline struct ocfs2_lock_res *ocfs2_lksb_to_lock_res(struct ocfs2_dlm_lksb *lksb) in ocfs2_lksb_to_lock_res() argument
296 return container_of(lksb, struct ocfs2_lock_res, l_lksb); in ocfs2_lksb_to_lock_res()
1114 static void ocfs2_blocking_ast(struct ocfs2_dlm_lksb *lksb, int level) in ocfs2_blocking_ast() argument
1116 struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); in ocfs2_blocking_ast()
1145 static void ocfs2_locking_ast(struct ocfs2_dlm_lksb *lksb) in ocfs2_locking_ast() argument
1147 struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); in ocfs2_locking_ast()
1211 static void ocfs2_unlock_ast(struct ocfs2_dlm_lksb *lksb, int error) in ocfs2_unlock_ast() argument
1213 struct ocfs2_lock_res *lockres = ocfs2_lksb_to_lock_res(lksb); in ocfs2_unlock_ast()
/linux/fs/ocfs2/dlm/
H A Ddlmunlock.c44 struct dlm_lockstatus *lksb,
49 struct dlm_lockstatus *lksb,
55 struct dlm_lockstatus *lksb,
84 struct dlm_lockstatus *lksb, in dlmunlock_common() argument
140 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
142 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common()
151 memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN); in dlmunlock_common()
166 status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, in dlmunlock_common()
260 lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); in dlmunlock_common()
284 struct dlm_lockstatus *lksb, in dlmunlock_master() argument
[all …]
H A Ddlmlock.c127 lock->lksb->status = DLM_NORMAL; in dlmlock_master()
186 lock->lksb->flags &= ~DLM_LKSB_GET_LVB; in dlm_revert_pending_lock()
350 kfree(lock->lksb); in dlm_lock_release()
406 struct dlm_lockstatus *lksb) in dlm_new_lock() argument
415 if (!lksb) { in dlm_new_lock()
417 lksb = kzalloc(sizeof(*lksb), GFP_NOFS); in dlm_new_lock()
418 if (!lksb) { in dlm_new_lock()
428 lock->lksb = lksb; in dlm_new_lock()
429 lksb->lockid = lock; in dlm_new_lock()
447 struct dlm_lockstatus *lksb = NULL; in dlm_create_lock_handler() local
[all …]
H A Ddlmconvert.c141 lock->lksb->flags |= DLM_LKSB_PUT_LVB; in __dlmconvert_master()
151 lock->lksb->flags |= DLM_LKSB_GET_LVB; in __dlmconvert_master()
191 lock->lksb->status = DLM_NORMAL; in __dlmconvert_master()
195 if (lock->lksb->flags & DLM_LKSB_PUT_LVB) in __dlmconvert_master()
196 memcpy(res->lvb, lock->lksb->lvb, DLM_LVB_LEN); in __dlmconvert_master()
239 lock->lksb->flags &= ~(DLM_LKSB_GET_LVB|DLM_LKSB_PUT_LVB); in dlm_revert_pending_convert()
302 lock->lksb->flags |= DLM_LKSB_PUT_LVB; in dlmconvert_remote()
308 lock->lksb->flags |= DLM_LKSB_GET_LVB; in dlmconvert_remote()
380 vec[1].iov_base = lock->lksb->lvb; in dlm_send_remote_convert_request()
437 struct dlm_lockstatus *lksb; in dlm_convert_lock_handler() local
[all …]
H A Ddlmast.c169 struct dlm_lockstatus *lksb = lock->lksb; in dlm_update_lvb() local
170 BUG_ON(!lksb); in dlm_update_lvb()
176 if (lksb->flags & DLM_LKSB_GET_LVB) { in dlm_update_lvb()
180 memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); in dlm_update_lvb()
193 lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); in dlm_update_lvb()
218 struct dlm_lockstatus *lksb; in dlm_do_remote_ast() local
226 lksb = lock->lksb; in dlm_do_remote_ast()
229 lksbflags = lksb->flags; in dlm_do_remote_ast()
396 lock->lksb->status = DLM_NORMAL; in dlm_proxy_ast_handler()
400 BUG_ON(!(lock->lksb->flags & DLM_LKSB_GET_LVB)); in dlm_proxy_ast_handler()
[all …]
H A Ddlmrecovery.c1174 if (!lock->lksb) in dlm_prepare_lvb_for_migration()
1186 memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN); in dlm_prepare_lvb_for_migration()
1191 if (!memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN)) in dlm_prepare_lvb_for_migration()
1218 if (lock->lksb) { in dlm_add_lock_to_array()
1219 ml->flags = lock->lksb->flags; in dlm_add_lock_to_array()
1239 dummy.lksb = NULL; in dlm_add_dummy_lock()
1794 struct dlm_lockstatus *lksb = NULL; in dlm_process_recovery_data()
1818 lksb = NULL; in dlm_process_recovery_data()
1913 lksb = newlock->lksb; in dlm_process_recovery_data()
1795 struct dlm_lockstatus *lksb = NULL; dlm_process_recovery_data() local
2548 struct dlm_lockstatus lksb; dlm_pick_recovery_master() local
[all...]
H A Ddlmthread.c421 BUG_ON(!target->lksb); in dlm_shuffle_lists()
422 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists()
481 BUG_ON(!target->lksb); in dlm_shuffle_lists()
482 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists()
H A Ddlmcommon.h350 struct dlm_lockstatus *lksb; member
811 struct dlm_lockstatus *lksb);
/linux/fs/dlm/
H A Duser.c50 __u32 lksb; member
81 struct dlm_lksb32 lksb; member
118 kb->i.lock.lksb = (__user void *)(long)kb32->i.lock.lksb; in compat_input()
141 res32->lksb.sb_status = res->lksb.sb_status; in compat_output()
142 res32->lksb.sb_flags = res->lksb.sb_flags; in compat_output()
143 res32->lksb.sb_lkid = res->lksb.sb_lkid; in compat_output()
144 res32->lksb.sb_lvbptr = (__u32)(long)res->lksb.sb_lvbptr; in compat_output()
222 cb->lkb_lksb = &cb->ua.lksb; in dlm_user_add_ast()
224 memcpy(cb->lvbptr, ua->lksb.sb_lvbptr, in dlm_user_add_ast()
260 if (!params->castaddr || !params->lksb) { in device_user_lock()
[all …]
H A Dlock.c2749 static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags, in set_lock_args() argument
2789 if (!ast || !lksb) in set_lock_args()
2792 if (flags & DLM_LKF_VALBLK && !lksb->sb_lvbptr) in set_lock_args()
2795 if (flags & DLM_LKF_CONVERT && !lksb->sb_lkid) in set_lock_args()
2807 args->lksb = lksb; in set_lock_args()
2858 lkb->lkb_lksb = args->lksb; in validate_lock_args()
2859 lkb->lkb_lvbptr = args->lksb->sb_lvbptr; in validate_lock_args()
3372 struct dlm_lksb *lksb, in dlm_lock() argument
3393 error = find_lkb(ls, lksb->sb_lkid, &lkb); in dlm_lock()
3402 error = set_lock_args(mode, lksb, flags, namelen, ast, astarg, bast, in dlm_lock()
[all …]
H A Dmemory.c126 kfree(ua->lksb.sb_lvbptr); in __free_lkb_rcu()
H A Ddlm_internal.h138 struct dlm_lksb *lksb; member
220 struct dlm_lksb lksb; member
/linux/drivers/md/
H A Dmd-cluster.c22 struct dlm_lksb lksb; member
132 ret = dlm_lock(res->ls, mode, &res->lksb, in dlm_lock_sync()
144 if (res->lksb.sb_status == 0) in dlm_lock_sync()
146 return res->lksb.sb_status; in dlm_lock_sync()
163 ret = dlm_lock(res->ls, mode, &res->lksb, in dlm_lock_sync_interruptible()
178 ret = dlm_unlock(res->ls, res->lksb.sb_lkid, DLM_LKF_CANCEL, in dlm_lock_sync_interruptible()
179 &res->lksb, res); in dlm_lock_sync_interruptible()
187 if (res->lksb.sb_status == 0) in dlm_lock_sync_interruptible()
189 return res->lksb.sb_status; in dlm_lock_sync_interruptible()
215 res->lksb.sb_lvbptr = kzalloc(LVB_SIZE, GFP_KERNEL); in lockres_init()
[all …]
/linux/fs/ocfs2/dlmfs/
H A Duserdlm.c30 static inline struct user_lock_res *user_lksb_to_lock_res(struct ocfs2_dlm_lksb *lksb) in user_lksb_to_lock_res() argument
32 return container_of(lksb, struct user_lock_res, l_lksb); in user_lksb_to_lock_res()
111 static void user_ast(struct ocfs2_dlm_lksb *lksb) in user_ast() argument
113 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_ast()
199 static void user_bast(struct ocfs2_dlm_lksb *lksb, int level) in user_bast() argument
201 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_bast()
217 static void user_unlock_ast(struct ocfs2_dlm_lksb *lksb, int status) in user_unlock_ast() argument
219 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_unlock_ast()
/linux/include/linux/
H A Ddlm.h144 struct dlm_lksb *lksb,
176 struct dlm_lksb *lksb,
/linux/include/uapi/linux/
H A Ddlm_device.h46 struct dlm_lksb __user *lksb; member
88 struct dlm_lksb lksb; member