/fs/ocfs2/ |
D | stackglue.h | 59 struct dlm_lksb lksb; member 83 void (*lp_lock_ast)(struct ocfs2_dlm_lksb *lksb); 84 void (*lp_blocking_ast)(struct ocfs2_dlm_lksb *lksb, int level); 85 void (*lp_unlock_ast)(struct ocfs2_dlm_lksb *lksb, int error); 167 struct ocfs2_dlm_lksb *lksb, 182 struct ocfs2_dlm_lksb *lksb, 191 int (*lock_status)(struct ocfs2_dlm_lksb *lksb); 196 int (*lvb_valid)(struct ocfs2_dlm_lksb *lksb); 201 void *(*lock_lvb)(struct ocfs2_dlm_lksb *lksb); 218 void (*dump_lksb)(struct ocfs2_dlm_lksb *lksb); [all …]
|
D | stack_o2cb.c | 158 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_lock_ast_wrapper() local 160 lksb->lksb_conn->cc_proto->lp_lock_ast(lksb); in o2dlm_lock_ast_wrapper() 165 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_blocking_ast_wrapper() local 167 lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level); in o2dlm_blocking_ast_wrapper() 172 struct ocfs2_dlm_lksb *lksb = astarg; in o2dlm_unlock_ast_wrapper() local 189 lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, error); in o2dlm_unlock_ast_wrapper() 194 struct ocfs2_dlm_lksb *lksb, in o2cb_dlm_lock() argument 204 status = dlmlock(conn->cc_lockspace, o2dlm_mode, &lksb->lksb_o2dlm, in o2cb_dlm_lock() 206 o2dlm_lock_ast_wrapper, lksb, in o2cb_dlm_lock() 213 struct ocfs2_dlm_lksb *lksb, in o2cb_dlm_unlock() argument [all …]
|
D | stack_user.c | 655 struct ocfs2_dlm_lksb *lksb = astarg; in fsdlm_lock_ast_wrapper() local 656 int status = lksb->lksb_fsdlm.sb_status; in fsdlm_lock_ast_wrapper() 669 lksb->lksb_conn->cc_proto->lp_unlock_ast(lksb, 0); in fsdlm_lock_ast_wrapper() 671 lksb->lksb_conn->cc_proto->lp_lock_ast(lksb); in fsdlm_lock_ast_wrapper() 676 struct ocfs2_dlm_lksb *lksb = astarg; in fsdlm_blocking_ast_wrapper() local 678 lksb->lksb_conn->cc_proto->lp_blocking_ast(lksb, level); in fsdlm_blocking_ast_wrapper() 683 struct ocfs2_dlm_lksb *lksb, in user_dlm_lock() argument 690 if (!lksb->lksb_fsdlm.sb_lvbptr) in user_dlm_lock() 691 lksb->lksb_fsdlm.sb_lvbptr = (char *)lksb + in user_dlm_lock() 694 ret = dlm_lock(conn->cc_lockspace, mode, &lksb->lksb_fsdlm, in user_dlm_lock() [all …]
|
D | stackglue.c | 235 struct ocfs2_dlm_lksb *lksb, in ocfs2_dlm_lock() argument 240 if (!lksb->lksb_conn) in ocfs2_dlm_lock() 241 lksb->lksb_conn = conn; in ocfs2_dlm_lock() 243 BUG_ON(lksb->lksb_conn != conn); in ocfs2_dlm_lock() 244 return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags, in ocfs2_dlm_lock() 250 struct ocfs2_dlm_lksb *lksb, in ocfs2_dlm_unlock() argument 253 BUG_ON(lksb->lksb_conn == NULL); in ocfs2_dlm_unlock() 255 return active_stack->sp_ops->dlm_unlock(conn, lksb, flags); in ocfs2_dlm_unlock() 259 int ocfs2_dlm_lock_status(struct ocfs2_dlm_lksb *lksb) in ocfs2_dlm_lock_status() argument 261 return active_stack->sp_ops->lock_status(lksb); in ocfs2_dlm_lock_status() [all …]
|
D | dlmglue.c | 294 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()
|
/fs/ocfs2/dlm/ |
D | dlmunlock.c | 46 struct dlm_lockstatus *lksb, 51 struct dlm_lockstatus *lksb, 57 struct dlm_lockstatus *lksb, 86 struct dlm_lockstatus *lksb, in dlmunlock_common() argument 142 status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 144 status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions); in dlmunlock_common() 153 memcpy(res->lvb, lksb->lvb, DLM_LVB_LEN); in dlmunlock_common() 168 status = dlm_send_remote_unlock_request(dlm, res, lock, lksb, in dlmunlock_common() 262 lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); in dlmunlock_common() 286 struct dlm_lockstatus *lksb, in dlmunlock_master() argument [all …]
|
D | dlmlock.c | 129 lock->lksb->status = DLM_NORMAL; in dlmlock_master() 188 lock->lksb->flags &= ~DLM_LKSB_GET_LVB; in dlm_revert_pending_lock() 352 kfree(lock->lksb); in dlm_lock_release() 408 struct dlm_lockstatus *lksb) in dlm_new_lock() argument 417 if (!lksb) { in dlm_new_lock() 419 lksb = kzalloc(sizeof(*lksb), GFP_NOFS); in dlm_new_lock() 420 if (!lksb) { in dlm_new_lock() 430 lock->lksb = lksb; in dlm_new_lock() 431 lksb->lockid = lock; in dlm_new_lock() 449 struct dlm_lockstatus *lksb = NULL; in dlm_create_lock_handler() local [all …]
|
D | dlmconvert.c | 143 lock->lksb->flags |= DLM_LKSB_PUT_LVB; in __dlmconvert_master() 153 lock->lksb->flags |= DLM_LKSB_GET_LVB; in __dlmconvert_master() 193 lock->lksb->status = DLM_NORMAL; in __dlmconvert_master() 197 if (lock->lksb->flags & DLM_LKSB_PUT_LVB) in __dlmconvert_master() 198 memcpy(res->lvb, lock->lksb->lvb, DLM_LVB_LEN); in __dlmconvert_master() 241 lock->lksb->flags &= ~(DLM_LKSB_GET_LVB|DLM_LKSB_PUT_LVB); in dlm_revert_pending_convert() 304 lock->lksb->flags |= DLM_LKSB_PUT_LVB; in dlmconvert_remote() 310 lock->lksb->flags |= DLM_LKSB_GET_LVB; in dlmconvert_remote() 382 vec[1].iov_base = lock->lksb->lvb; in dlm_send_remote_convert_request() 439 struct dlm_lockstatus *lksb; in dlm_convert_lock_handler() local [all …]
|
D | dlmast.c | 181 struct dlm_lockstatus *lksb = lock->lksb; in dlm_update_lvb() local 182 BUG_ON(!lksb); in dlm_update_lvb() 188 if (lksb->flags & DLM_LKSB_GET_LVB) { in dlm_update_lvb() 192 memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN); in dlm_update_lvb() 205 lksb->flags &= ~(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB); in dlm_update_lvb() 230 struct dlm_lockstatus *lksb; in dlm_do_remote_ast() local 238 lksb = lock->lksb; in dlm_do_remote_ast() 241 lksbflags = lksb->flags; in dlm_do_remote_ast() 408 lock->lksb->status = DLM_NORMAL; in dlm_proxy_ast_handler() 412 BUG_ON(!(lock->lksb->flags & DLM_LKSB_GET_LVB)); in dlm_proxy_ast_handler() [all …]
|
D | dlmrecovery.c | 1184 if (!lock->lksb) in dlm_prepare_lvb_for_migration() 1196 memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN); in dlm_prepare_lvb_for_migration() 1201 if (!memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN)) in dlm_prepare_lvb_for_migration() 1228 if (lock->lksb) { in dlm_add_lock_to_array() 1229 ml->flags = lock->lksb->flags; in dlm_add_lock_to_array() 1249 dummy.lksb = NULL; in dlm_add_dummy_lock() 1804 struct dlm_lockstatus *lksb = NULL; in dlm_process_recovery_data() local 1828 lksb = NULL; in dlm_process_recovery_data() 1923 lksb = newlock->lksb; in dlm_process_recovery_data() 1930 lksb->flags |= (ml->flags & in dlm_process_recovery_data() [all …]
|
D | dlmapi.h | 167 struct dlm_lockstatus *lksb, 176 struct dlm_lockstatus *lksb,
|
D | dlmthread.c | 423 BUG_ON(!target->lksb); in dlm_shuffle_lists() 424 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists() 483 BUG_ON(!target->lksb); in dlm_shuffle_lists() 484 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists()
|
D | dlmcommon.h | 355 struct dlm_lockstatus *lksb; member 816 struct dlm_lockstatus *lksb);
|
/fs/dlm/ |
D | user.c | 47 __u32 lksb; member 78 struct dlm_lksb32 lksb; member 115 kb->i.lock.lksb = (void *)(long)kb32->i.lock.lksb; in compat_input() 138 res32->lksb.sb_status = res->lksb.sb_status; in compat_output() 139 res32->lksb.sb_flags = res->lksb.sb_flags; in compat_output() 140 res32->lksb.sb_lkid = res->lksb.sb_lkid; in compat_output() 141 res32->lksb.sb_lvbptr = (__u32)(long)res->lksb.sb_lvbptr; in compat_output() 248 if (!params->castaddr || !params->lksb) { in device_user_lock() 257 ua->user_lksb = params->lksb; in device_user_lock() 283 error = ua->lksb.sb_lkid; in device_user_lock() [all …]
|
D | lock.c | 2809 static int set_lock_args(int mode, struct dlm_lksb *lksb, uint32_t flags, in set_lock_args() argument 2850 if (!ast || !lksb) in set_lock_args() 2853 if (flags & DLM_LKF_VALBLK && !lksb->sb_lvbptr) in set_lock_args() 2856 if (flags & DLM_LKF_CONVERT && !lksb->sb_lkid) in set_lock_args() 2869 args->lksb = lksb; in set_lock_args() 2919 lkb->lkb_lksb = args->lksb; in validate_lock_args() 2920 lkb->lkb_lvbptr = args->lksb->sb_lvbptr; in validate_lock_args() 3415 struct dlm_lksb *lksb, in dlm_lock() argument 3436 error = find_lkb(ls, lksb->sb_lkid, &lkb); in dlm_lock() 3443 error = set_lock_args(mode, lksb, flags, namelen, 0, ast, in dlm_lock() [all …]
|
D | memory.c | 85 kfree(ua->lksb.sb_lvbptr); in dlm_free_lkb()
|
D | dlm_internal.h | 150 struct dlm_lksb *lksb; member 673 struct dlm_lksb lksb; member
|
/fs/ocfs2/dlmfs/ |
D | userdlm.c | 32 static inline struct user_lock_res *user_lksb_to_lock_res(struct ocfs2_dlm_lksb *lksb) in user_lksb_to_lock_res() argument 34 return container_of(lksb, struct user_lock_res, l_lksb); in user_lksb_to_lock_res() 113 static void user_ast(struct ocfs2_dlm_lksb *lksb) in user_ast() argument 115 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_ast() 201 static void user_bast(struct ocfs2_dlm_lksb *lksb, int level) in user_bast() argument 203 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_bast() 219 static void user_unlock_ast(struct ocfs2_dlm_lksb *lksb, int status) in user_unlock_ast() argument 221 struct user_lock_res *lockres = user_lksb_to_lock_res(lksb); in user_unlock_ast()
|
/fs/gfs2/ |
D | lock_dlm.c | 501 static int sync_unlock(struct gfs2_sbd *sdp, struct dlm_lksb *lksb, char *name) in sync_unlock() argument 506 error = dlm_unlock(ls->ls_dlm, lksb->sb_lkid, 0, lksb, ls); in sync_unlock() 509 name, lksb->sb_lkid, error); in sync_unlock() 515 if (lksb->sb_status != -DLM_EUNLOCK) { in sync_unlock() 517 name, lksb->sb_lkid, lksb->sb_status); in sync_unlock() 524 unsigned int num, struct dlm_lksb *lksb, char *name) in sync_lock() argument 533 error = dlm_lock(ls->ls_dlm, mode, lksb, flags, in sync_lock() 538 name, lksb->sb_lkid, flags, mode, error); in sync_lock() 544 status = lksb->sb_status; in sync_lock() 548 name, lksb->sb_lkid, flags, mode, status); in sync_lock()
|