/Linux-v4.19/fs/dlm/ |
D | recoverd.c | 33 static int enable_locking(struct dlm_ls *ls, uint64_t seq) in enable_locking() argument 37 down_write(&ls->ls_recv_active); in enable_locking() 39 spin_lock(&ls->ls_recover_lock); in enable_locking() 40 if (ls->ls_recover_seq == seq) { in enable_locking() 41 set_bit(LSFL_RUNNING, &ls->ls_flags); in enable_locking() 43 up_write(&ls->ls_in_recovery); in enable_locking() 44 clear_bit(LSFL_RECOVER_LOCK, &ls->ls_flags); in enable_locking() 47 spin_unlock(&ls->ls_recover_lock); in enable_locking() 49 up_write(&ls->ls_recv_active); in enable_locking() 53 static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv) in ls_recover() argument [all …]
|
D | lockspace.c | 37 static ssize_t dlm_control_store(struct dlm_ls *ls, const char *buf, size_t len) in dlm_control_store() argument 45 ls = dlm_find_lockspace_local(ls->ls_local_handle); in dlm_control_store() 46 if (!ls) in dlm_control_store() 51 dlm_ls_stop(ls); in dlm_control_store() 54 dlm_ls_start(ls); in dlm_control_store() 59 dlm_put_lockspace(ls); in dlm_control_store() 63 static ssize_t dlm_event_store(struct dlm_ls *ls, const char *buf, size_t len) in dlm_event_store() argument 65 int rc = kstrtoint(buf, 0, &ls->ls_uevent_result); in dlm_event_store() 69 set_bit(LSFL_UEVENT_WAIT, &ls->ls_flags); in dlm_event_store() 70 wake_up(&ls->ls_uevent_wait); in dlm_event_store() [all …]
|
D | recover.c | 44 int dlm_wait_function(struct dlm_ls *ls, int (*testfn) (struct dlm_ls *ls)) in dlm_wait_function() argument 50 rv = wait_event_timeout(ls->ls_wait_general, in dlm_wait_function() 51 testfn(ls) || dlm_recovery_stopped(ls), in dlm_wait_function() 55 if (test_bit(LSFL_RCOM_WAIT, &ls->ls_flags)) { in dlm_wait_function() 56 log_debug(ls, "dlm_wait_function timed out"); in dlm_wait_function() 61 if (dlm_recovery_stopped(ls)) { in dlm_wait_function() 62 log_debug(ls, "dlm_wait_function aborted"); in dlm_wait_function() 76 uint32_t dlm_recover_status(struct dlm_ls *ls) in dlm_recover_status() argument 79 spin_lock(&ls->ls_recover_lock); in dlm_recover_status() 80 status = ls->ls_recover_status; in dlm_recover_status() [all …]
|
D | member.c | 29 void dlm_slot_save(struct dlm_ls *ls, struct dlm_rcom *rc, in dlm_slot_save() argument 41 void dlm_slots_copy_out(struct dlm_ls *ls, struct dlm_rcom *rc) in dlm_slots_copy_out() argument 51 for (i = 0; i < ls->ls_slots_size; i++) { in dlm_slots_copy_out() 52 slot = &ls->ls_slots[i]; in dlm_slots_copy_out() 63 static void log_slots(struct dlm_ls *ls, uint32_t gen, int num_slots, in log_slots() argument 95 log_rinfo(ls, "generation %u slots %d%s", gen, num_slots, line); in log_slots() 98 int dlm_slots_copy_in(struct dlm_ls *ls) in dlm_slots_copy_in() argument 101 struct dlm_rcom *rc = ls->ls_recover_buf; in dlm_slots_copy_in() 112 if (gen <= ls->ls_generation) { in dlm_slots_copy_in() 113 log_error(ls, "dlm_slots_copy_in gen %u old %u", in dlm_slots_copy_in() [all …]
|
D | rcom.c | 27 static int rcom_response(struct dlm_ls *ls) in rcom_response() argument 29 return test_bit(LSFL_RCOM_READY, &ls->ls_flags); in rcom_response() 32 static int create_rcom(struct dlm_ls *ls, int to_nodeid, int type, int len, in create_rcom() argument 51 rc->rc_header.h_lockspace = ls->ls_global_id; in create_rcom() 58 spin_lock(&ls->ls_recover_lock); in create_rcom() 59 rc->rc_seq = ls->ls_recover_seq; in create_rcom() 60 spin_unlock(&ls->ls_recover_lock); in create_rcom() 67 static void send_rcom(struct dlm_ls *ls, struct dlm_mhandle *mh, in send_rcom() argument 74 static void set_rcom_status(struct dlm_ls *ls, struct rcom_status *rs, in set_rcom_status() argument 84 static void set_rcom_config(struct dlm_ls *ls, struct rcom_config *rf, in set_rcom_config() argument [all …]
|
D | requestqueue.c | 34 void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_message *ms) in dlm_add_requestqueue() argument 45 e->recover_seq = ls->ls_recover_seq & 0xFFFFFFFF; in dlm_add_requestqueue() 49 mutex_lock(&ls->ls_requestqueue_mutex); in dlm_add_requestqueue() 50 list_add_tail(&e->list, &ls->ls_requestqueue); in dlm_add_requestqueue() 51 mutex_unlock(&ls->ls_requestqueue_mutex); in dlm_add_requestqueue() 65 int dlm_process_requestqueue(struct dlm_ls *ls) in dlm_process_requestqueue() argument 71 mutex_lock(&ls->ls_requestqueue_mutex); in dlm_process_requestqueue() 74 if (list_empty(&ls->ls_requestqueue)) { in dlm_process_requestqueue() 75 mutex_unlock(&ls->ls_requestqueue_mutex); in dlm_process_requestqueue() 79 e = list_entry(ls->ls_requestqueue.next, struct rq_entry, list); in dlm_process_requestqueue() [all …]
|
D | dir.c | 35 int dlm_hash2nodeid(struct dlm_ls *ls, uint32_t hash) in dlm_hash2nodeid() argument 39 if (ls->ls_num_nodes == 1) in dlm_hash2nodeid() 42 node = (hash >> 16) % ls->ls_total_weight; in dlm_hash2nodeid() 43 return ls->ls_node_array[node]; in dlm_hash2nodeid() 52 void dlm_recover_dir_nodeid(struct dlm_ls *ls) in dlm_recover_dir_nodeid() argument 56 down_read(&ls->ls_root_sem); in dlm_recover_dir_nodeid() 57 list_for_each_entry(r, &ls->ls_root_list, res_root_list) { in dlm_recover_dir_nodeid() 58 r->res_dir_nodeid = dlm_hash2nodeid(ls, r->res_hash); in dlm_recover_dir_nodeid() 60 up_read(&ls->ls_root_sem); in dlm_recover_dir_nodeid() 63 int dlm_recover_directory(struct dlm_ls *ls) in dlm_recover_directory() argument [all …]
|
D | lock.c | 91 static void do_purge(struct dlm_ls *ls, int nodeid, int pid); 205 static inline void dlm_lock_recovery(struct dlm_ls *ls) in dlm_lock_recovery() argument 207 down_read(&ls->ls_in_recovery); in dlm_lock_recovery() 210 void dlm_unlock_recovery(struct dlm_ls *ls) in dlm_unlock_recovery() argument 212 up_read(&ls->ls_in_recovery); in dlm_unlock_recovery() 215 int dlm_lock_recovery_try(struct dlm_ls *ls) in dlm_lock_recovery_try() argument 217 return down_read_trylock(&ls->ls_in_recovery); in dlm_lock_recovery_try() 351 struct dlm_ls *ls = r->res_ls; in put_rsb() local 354 spin_lock(&ls->ls_rsbtbl[bucket].lock); in put_rsb() 356 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in put_rsb() [all …]
|
D | lock.h | 17 void dlm_dump_rsb_name(struct dlm_ls *ls, char *name, int len); 19 void dlm_receive_message_saved(struct dlm_ls *ls, struct dlm_message *ms, 26 void dlm_scan_rsbs(struct dlm_ls *ls); 27 int dlm_lock_recovery_try(struct dlm_ls *ls); 28 void dlm_unlock_recovery(struct dlm_ls *ls); 29 void dlm_scan_waiters(struct dlm_ls *ls); 30 void dlm_scan_timeout(struct dlm_ls *ls); 31 void dlm_adjust_timeouts(struct dlm_ls *ls); 32 int dlm_master_lookup(struct dlm_ls *ls, int nodeid, char *name, int len, 38 void dlm_recover_purge(struct dlm_ls *ls); [all …]
|
D | recover.h | 17 int dlm_wait_function(struct dlm_ls *ls, int (*testfn) (struct dlm_ls *ls)); 18 uint32_t dlm_recover_status(struct dlm_ls *ls); 19 void dlm_set_recover_status(struct dlm_ls *ls, uint32_t status); 20 int dlm_recover_members_wait(struct dlm_ls *ls); 21 int dlm_recover_directory_wait(struct dlm_ls *ls); 22 int dlm_recover_locks_wait(struct dlm_ls *ls); 23 int dlm_recover_done_wait(struct dlm_ls *ls); 24 int dlm_recover_masters(struct dlm_ls *ls); 25 int dlm_recover_master_reply(struct dlm_ls *ls, struct dlm_rcom *rc); 26 int dlm_recover_locks(struct dlm_ls *ls); [all …]
|
D | member.h | 16 int dlm_ls_stop(struct dlm_ls *ls); 17 int dlm_ls_start(struct dlm_ls *ls); 18 void dlm_clear_members(struct dlm_ls *ls); 19 void dlm_clear_members_gone(struct dlm_ls *ls); 20 int dlm_recover_members(struct dlm_ls *ls, struct dlm_recover *rv,int *neg_out); 21 int dlm_is_removed(struct dlm_ls *ls, int nodeid); 22 int dlm_is_member(struct dlm_ls *ls, int nodeid); 24 void dlm_slot_save(struct dlm_ls *ls, struct dlm_rcom *rc, 26 void dlm_slots_copy_out(struct dlm_ls *ls, struct dlm_rcom *rc); 27 int dlm_slots_copy_in(struct dlm_ls *ls); [all …]
|
D | ast.c | 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() [all …]
|
D | debug_fs.c | 425 struct dlm_ls *ls = seq->private; in table_seq_start() local 435 if (bucket >= ls->ls_rsbtbl_size) in table_seq_start() 452 tree = toss ? &ls->ls_rsbtbl[bucket].toss : &ls->ls_rsbtbl[bucket].keep; in table_seq_start() 454 spin_lock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start() 462 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start() 467 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start() 480 if (bucket >= ls->ls_rsbtbl_size) { in table_seq_start() 484 tree = toss ? &ls->ls_rsbtbl[bucket].toss : &ls->ls_rsbtbl[bucket].keep; in table_seq_start() 486 spin_lock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start() 493 spin_unlock(&ls->ls_rsbtbl[bucket].lock); in table_seq_start() [all …]
|
D | user.c | 180 struct dlm_ls *ls; in dlm_user_add_ast() local 188 ls = lkb->lkb_resource->res_ls; in dlm_user_add_ast() 189 mutex_lock(&ls->ls_clear_proc_locks); in dlm_user_add_ast() 235 mutex_unlock(&ls->ls_clear_proc_locks); in dlm_user_add_ast() 241 struct dlm_ls *ls; in device_user_lock() local 246 ls = dlm_find_lockspace_local(proc->lockspace); in device_user_lock() 247 if (!ls) in device_user_lock() 267 error = dlm_user_convert(ls, ua, in device_user_lock() 272 error = dlm_user_adopt_orphan(ls, ua, in device_user_lock() 280 error = dlm_user_request(ls, ua, in device_user_lock() [all …]
|
D | plock.c | 80 static void do_unlock_close(struct dlm_ls *ls, u64 number, in do_unlock_close() argument 91 op->info.fsid = ls->ls_global_id; in do_unlock_close() 107 struct dlm_ls *ls; in dlm_posix_lock() local 112 ls = dlm_find_lockspace_local(lockspace); in dlm_posix_lock() 113 if (!ls) in dlm_posix_lock() 127 op->info.fsid = ls->ls_global_id; in dlm_posix_lock() 150 log_debug(ls, "dlm_posix_lock: wait killed %llx", in dlm_posix_lock() 156 do_unlock_close(ls, number, file, fl); in dlm_posix_lock() 166 log_error(ls, "dlm_posix_lock: op on list %llx", in dlm_posix_lock() 176 log_error(ls, "dlm_posix_lock: vfs lock error %llx", in dlm_posix_lock() [all …]
|
D | dlm_internal.h | 65 #define log_error(ls, fmt, args...) \ argument 66 printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args) 68 #define log_rinfo(ls, fmt, args...) \ argument 72 (ls)->ls_name, ##args); \ 75 (ls)->ls_name , ##args); \ 78 #define log_debug(ls, fmt, args...) \ argument 82 (ls)->ls_name , ##args); \ 85 #define log_limit(ls, fmt, args...) \ argument 89 (ls)->ls_name , ##args); \ 702 static inline int dlm_locking_stopped(struct dlm_ls *ls) in dlm_locking_stopped() argument [all …]
|
D | ast.h | 19 int dlm_rem_lkb_callback(struct dlm_ls *ls, struct dlm_lkb *lkb, 25 int dlm_callback_start(struct dlm_ls *ls); 26 void dlm_callback_stop(struct dlm_ls *ls); 27 void dlm_callback_suspend(struct dlm_ls *ls); 28 void dlm_callback_resume(struct dlm_ls *ls);
|
D | recoverd.h | 17 void dlm_recoverd_stop(struct dlm_ls *ls); 18 int dlm_recoverd_start(struct dlm_ls *ls); 19 void dlm_recoverd_suspend(struct dlm_ls *ls); 20 void dlm_recoverd_resume(struct dlm_ls *ls);
|
D | requestqueue.h | 16 void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_message *ms); 17 int dlm_process_requestqueue(struct dlm_ls *ls); 18 void dlm_wait_requestqueue(struct dlm_ls *ls); 19 void dlm_purge_requestqueue(struct dlm_ls *ls);
|
/Linux-v4.19/fs/gfs2/ |
D | lock_dlm.c | 255 struct lm_lockstruct *ls = &gl->gl_name.ln_sbd->sd_lockstruct; in gdlm_lock() local 277 return dlm_lock(ls->ls_dlm, req, &gl->gl_lksb, lkf, strname, in gdlm_lock() 284 struct lm_lockstruct *ls = &sdp->sd_lockstruct; in gdlm_put_lock() local 309 error = dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_VALBLK, in gdlm_put_lock() 321 struct lm_lockstruct *ls = &gl->gl_name.ln_sbd->sd_lockstruct; in gdlm_cancel() local 322 dlm_unlock(ls->ls_dlm, gl->gl_lksb.sb_lkid, DLM_LKF_CANCEL, NULL, gl); in gdlm_cancel() 467 static void control_lvb_read(struct lm_lockstruct *ls, uint32_t *lvb_gen, in control_lvb_read() argument 471 memcpy(lvb_bits, ls->ls_control_lvb, GDLM_LVB_SIZE); in control_lvb_read() 476 static void control_lvb_write(struct lm_lockstruct *ls, uint32_t lvb_gen, in control_lvb_write() argument 480 memcpy(ls->ls_control_lvb, lvb_bits, GDLM_LVB_SIZE); in control_lvb_write() [all …]
|
/Linux-v4.19/fs/nfsd/ |
D | nfs4layouts.c | 157 struct nfs4_layout_stateid *ls = layoutstateid(stid); in nfsd4_free_layout_stateid() local 158 struct nfs4_client *clp = ls->ls_stid.sc_client; in nfsd4_free_layout_stateid() 159 struct nfs4_file *fp = ls->ls_stid.sc_file; in nfsd4_free_layout_stateid() 161 trace_nfsd_layoutstate_free(&ls->ls_stid.sc_stateid); in nfsd4_free_layout_stateid() 164 list_del_init(&ls->ls_perclnt); in nfsd4_free_layout_stateid() 168 list_del_init(&ls->ls_perfile); in nfsd4_free_layout_stateid() 171 if (!nfsd4_layout_ops[ls->ls_layout_type]->disable_recalls) in nfsd4_free_layout_stateid() 172 vfs_setlease(ls->ls_file, F_UNLCK, NULL, (void **)&ls); in nfsd4_free_layout_stateid() 173 fput(ls->ls_file); in nfsd4_free_layout_stateid() 175 if (ls->ls_recalled) in nfsd4_free_layout_stateid() [all …]
|
/Linux-v4.19/tools/perf/ |
D | builtin-lock.c | 403 struct lock_stat *ls; in report_lock_acquire_event() local 412 ls = lock_stat_findnew(addr, name); in report_lock_acquire_event() 413 if (!ls) in report_lock_acquire_event() 415 if (ls->discard) in report_lock_acquire_event() 433 ls->nr_trylock++; in report_lock_acquire_event() 435 ls->nr_readlock++; in report_lock_acquire_event() 438 ls->nr_acquired++; in report_lock_acquire_event() 444 ls->nr_acquired++; in report_lock_acquire_event() 455 ls->discard = 1; in report_lock_acquire_event() 465 ls->nr_acquire++; in report_lock_acquire_event() [all …]
|
/Linux-v4.19/security/apparmor/ |
D | label.c | 569 struct aa_labelset *ls = labels_set(label); in __label_remove() local 571 AA_BUG(!ls); in __label_remove() 573 lockdep_assert_held_exclusive(&ls->lock); in __label_remove() 582 rb_erase(&label->node, &ls->root); in __label_remove() 605 struct aa_labelset *ls = labels_set(old); in __label_replace() local 607 AA_BUG(!ls); in __label_replace() 610 lockdep_assert_held_exclusive(&ls->lock); in __label_replace() 617 rb_replace_node(&old->node, &new->node, &ls->root); in __label_replace() 639 static struct aa_label *__label_insert(struct aa_labelset *ls, in __label_insert() argument 644 AA_BUG(!ls); in __label_insert() [all …]
|
/Linux-v4.19/arch/mips/lasat/ |
D | lasat_board.c | 61 unsigned long *ls = lasat_board_info.li_flashpart_size; in init_flash_sizes() local 64 ls[LASAT_MTD_BOOTLOADER] = 0x40000; in init_flash_sizes() 65 ls[LASAT_MTD_SERVICE] = 0xC0000; in init_flash_sizes() 66 ls[LASAT_MTD_NORMAL] = 0x100000; in init_flash_sizes() 74 ls[LASAT_MTD_CONFIG] = 0x100000; in init_flash_sizes() 75 ls[LASAT_MTD_FS] = 0x500000; in init_flash_sizes() 82 ls[LASAT_MTD_CONFIG] = 0x100000; in init_flash_sizes() 84 ls[LASAT_MTD_FS] = in init_flash_sizes() 90 lb[i] = lb[i-1] + ls[i-1]; in init_flash_sizes()
|
/Linux-v4.19/arch/m68k/lib/ |
D | memset.c | 34 long *ls = s; in memset() local 37 *ls++ = c; in memset() 58 : "=a" (ls), "=d" (temp), "=&d" (temp1) in memset() 59 : "d" (c), "0" (ls), "1" (temp)); in memset() 61 s = ls; in memset()
|