Symbol: dlm
arch/powerpc/kernel/udbg_16550.c
126
unsigned int dll, dlm, divisor, prescaler, speed;
arch/powerpc/kernel/udbg_16550.c
136
dlm = udbg_uart_in(UART_DLM);
arch/powerpc/kernel/udbg_16550.c
137
divisor = dlm << 8 | dll;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1003
if (status & VI6_STATUS_FLD_STD(dlm->index))
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1012
if (dlm->active && (dlm->active->flags & VSP1_DL_FRAME_END_WRITEBACK)) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1014
dlm->active->flags &= ~VSP1_DL_FRAME_END_WRITEBACK;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1021
if (dlm->queued) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1022
if (dlm->queued->flags & VSP1_DL_FRAME_END_INTERNAL)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1024
dlm->queued->flags &= ~VSP1_DL_FRAME_END_INTERNAL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1026
__vsp1_dl_list_put(dlm->active);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1027
dlm->active = dlm->queued;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1028
dlm->queued = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1037
if (dlm->pending) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1038
vsp1_dl_list_hw_enqueue(dlm->pending);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1039
dlm->queued = dlm->pending;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1040
dlm->pending = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1065
void vsp1_dlm_reset(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1069
scoped_guard(spinlock_irqsave, &dlm->lock) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1070
__vsp1_dl_list_put(dlm->active);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1071
__vsp1_dl_list_put(dlm->queued);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1072
__vsp1_dl_list_put(dlm->pending);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1074
list_count = list_count_nodes(&dlm->free);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1077
WARN_ON_ONCE(list_count != dlm->list_count);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1079
dlm->active = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1080
dlm->queued = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1081
dlm->pending = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1084
struct vsp1_dl_body *vsp1_dlm_dl_body_get(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1086
return vsp1_dl_body_get(dlm->pool);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1093
struct vsp1_dl_manager *dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1097
dlm = devm_kzalloc(vsp1->dev, sizeof(*dlm), GFP_KERNEL);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1098
if (!dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1101
dlm->index = index;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1107
dlm->singleshot = vsp1->info->uapi || vsp1->iif;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1108
dlm->vsp1 = vsp1;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1110
spin_lock_init(&dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1111
INIT_LIST_HEAD(&dlm->free);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1126
dlm->pool = vsp1_dl_body_pool_create(vsp1, prealloc + 1,
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1128
if (!dlm->pool)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1134
dl = vsp1_dl_list_alloc(dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1136
vsp1_dlm_destroy(dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1145
list_add_tail(&dl->list, &dlm->free);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1148
dlm->list_count = prealloc;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1151
dlm->cmdpool = vsp1_dl_cmd_pool_create(vsp1,
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1153
if (!dlm->cmdpool) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1154
vsp1_dlm_destroy(dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1159
return dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1162
void vsp1_dlm_destroy(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1166
if (!dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1169
list_for_each_entry_safe(dl, next, &dlm->free, list) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1174
vsp1_dl_body_pool_destroy(dlm->pool);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
1175
vsp1_dl_ext_cmd_pool_destroy(dlm->cmdpool);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
187
struct vsp1_dl_manager *dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
531
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
536
dl->pre_cmd = vsp1_dl_ext_cmd_get(dlm->cmdpool);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
545
static struct vsp1_dl_list *vsp1_dl_list_alloc(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
555
dl->dlm = dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
558
dl->body0 = vsp1_dl_body_get(dlm->pool);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
601
struct vsp1_dl_list *vsp1_dl_list_get(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
605
lockdep_assert_not_held(&dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
607
guard(spinlock_irqsave)(&dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
609
if (!list_empty(&dlm->free)) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
610
dl = list_first_entry(&dlm->free, struct vsp1_dl_list, list);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
632
lockdep_assert_held(&dl->dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
666
list_add_tail(&dl->list, &dl->dlm->free);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
683
guard(spinlock_irqsave)(&dl->dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
757
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
790
if (!dlm->singleshot || is_last)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
799
if (!dlm->singleshot || !is_last)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
810
} else if (!dlm->singleshot) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
841
static bool vsp1_dl_list_hw_update_pending(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
843
struct vsp1_device *vsp1 = dlm->vsp1;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
845
if (!dlm->queued)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
852
return !!(vsp1_read(vsp1, VI6_CMD(dlm->index)) & VI6_CMD_UPDHDR);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
857
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
858
struct vsp1_device *vsp1 = dlm->vsp1;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
867
vsp1_write(vsp1, VI6_DL_HDR_ADDR(dlm->index), dl->dma);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
872
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
889
if (vsp1_dl_list_hw_update_pending(dlm)) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
890
WARN_ON(dlm->pending &&
drivers/media/platform/renesas/vsp1/vsp1_dl.c
891
(dlm->pending->flags & VSP1_DL_FRAME_END_INTERNAL));
drivers/media/platform/renesas/vsp1/vsp1_dl.c
892
__vsp1_dl_list_put(dlm->pending);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
893
dlm->pending = dl;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
903
__vsp1_dl_list_put(dlm->queued);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
904
dlm->queued = dl;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
909
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
918
dlm->active = dl;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
923
struct vsp1_dl_manager *dlm = dl->dlm;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
937
guard(spinlock_irqsave)(&dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
939
if (dlm->singleshot)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
970
unsigned int vsp1_dlm_irq_frame_end(struct vsp1_dl_manager *dlm)
drivers/media/platform/renesas/vsp1/vsp1_dl.c
972
struct vsp1_device *vsp1 = dlm->vsp1;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
976
guard(spinlock)(&dlm->lock);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
982
if (dlm->singleshot) {
drivers/media/platform/renesas/vsp1/vsp1_dl.c
983
__vsp1_dl_list_put(dlm->active);
drivers/media/platform/renesas/vsp1/vsp1_dl.c
984
dlm->active = NULL;
drivers/media/platform/renesas/vsp1/vsp1_dl.c
995
if (vsp1_dl_list_hw_update_pending(dlm))
drivers/media/platform/renesas/vsp1/vsp1_dl.h
57
void vsp1_dlm_destroy(struct vsp1_dl_manager *dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.h
58
void vsp1_dlm_reset(struct vsp1_dl_manager *dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.h
59
unsigned int vsp1_dlm_irq_frame_end(struct vsp1_dl_manager *dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.h
60
struct vsp1_dl_body *vsp1_dlm_dl_body_get(struct vsp1_dl_manager *dlm);
drivers/media/platform/renesas/vsp1/vsp1_dl.h
62
struct vsp1_dl_list *vsp1_dl_list_get(struct vsp1_dl_manager *dlm);
drivers/media/platform/renesas/vsp1/vsp1_drm.c
78
dl = vsp1_dl_list_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_drm.c
781
vsp1_dlm_reset(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_pipe.c
552
flags = vsp1_dlm_irq_frame_end(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_rwpf.h
66
struct vsp1_dl_manager *dlm;
drivers/media/platform/renesas/vsp1/vsp1_video.c
272
dl = vsp1_dl_list_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_video.c
295
dl_next = vsp1_dl_list_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_video.c
762
pipe->stream_config = vsp1_dlm_dl_body_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_vspx.c
391
vsp1_dlm_reset(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_vspx.c
427
job->dl = vsp1_dl_list_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_vspx.c
469
second_dl = vsp1_dl_list_get(pipe->output->dlm);
drivers/media/platform/renesas/vsp1/vsp1_wpf.c
200
vsp1_dlm_destroy(wpf->dlm);
drivers/media/platform/renesas/vsp1/vsp1_wpf.c
210
dl_next = vsp1_dl_list_get(wpf->dlm);
drivers/media/platform/renesas/vsp1/vsp1_wpf.c
584
wpf->dlm = vsp1_dlm_create(vsp1, index, 64);
drivers/media/platform/renesas/vsp1/vsp1_wpf.c
585
if (!wpf->dlm) {
drivers/tty/serial/8250/8250_port.c
321
unsigned char dlm = serial_in(up, UART_DLM);
drivers/tty/serial/8250/8250_port.c
323
return dll | dlm << 8;
drivers/tty/serial/8250/8250_port.c
3419
unsigned char lcr, dll, dlm;
drivers/tty/serial/8250/8250_port.c
3425
dlm = serial_port_in(port, UART_DLM);
drivers/tty/serial/8250/8250_port.c
3428
quot = (dlm << 8) | dll;
drivers/tty/serial/pch_uart.c
431
unsigned int dll, dlm, lcr;
drivers/tty/serial/pch_uart.c
441
dlm = ((unsigned int)div >> 8) & 0x00FFU;
drivers/tty/serial/pch_uart.c
466
iowrite8(dlm, priv->membase + PCH_UART_DLM);
fs/dlm/lockspace.c
159
ATTRIBUTE_GROUPS(dlm);
fs/ocfs2/dlm/dlmapi.h
161
enum dlm_status dlmlock(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmapi.h
171
enum dlm_status dlmunlock(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmapi.h
184
void dlm_unregister_domain(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmapi.h
197
void dlm_register_eviction_cb(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmast.c
105
if (dlm_should_cancel_bast(dlm, lock)) {
fs/ocfs2/dlm/dlmast.c
107
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmast.c
122
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmast.c
124
list_add_tail(&lock->ast_list, &dlm->pending_asts);
fs/ocfs2/dlm/dlmast.c
129
void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)
fs/ocfs2/dlm/dlmast.c
131
BUG_ON(!dlm);
fs/ocfs2/dlm/dlmast.c
134
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmast.c
135
__dlm_queue_ast(dlm, lock);
fs/ocfs2/dlm/dlmast.c
136
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmast.c
140
void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)
fs/ocfs2/dlm/dlmast.c
144
BUG_ON(!dlm);
fs/ocfs2/dlm/dlmast.c
147
assert_spin_locked(&dlm->ast_lock);
fs/ocfs2/dlm/dlmast.c
154
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmast.c
161
list_add_tail(&lock->bast_list, &dlm->pending_basts);
fs/ocfs2/dlm/dlmast.c
166
static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
174
if (res->owner == dlm->node_num) {
fs/ocfs2/dlm/dlmast.c
178
lock->ml.node == dlm->node_num ? "master" :
fs/ocfs2/dlm/dlmast.c
196
void dlm_do_local_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
201
mlog(0, "%s: res %.*s, lock %u:%llu, Local AST\n", dlm->name,
fs/ocfs2/dlm/dlmast.c
207
BUG_ON(lock->ml.node != dlm->node_num);
fs/ocfs2/dlm/dlmast.c
209
dlm_update_lvb(dlm, res, lock);
fs/ocfs2/dlm/dlmast.c
214
int dlm_do_remote_ast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
221
mlog(0, "%s: res %.*s, lock %u:%llu, Remote AST\n", dlm->name,
fs/ocfs2/dlm/dlmast.c
227
BUG_ON(lock->ml.node == dlm->node_num);
fs/ocfs2/dlm/dlmast.c
230
dlm_update_lvb(dlm, res, lock);
fs/ocfs2/dlm/dlmast.c
234
ret = dlm_send_proxy_ast(dlm, res, lock, lksbflags);
fs/ocfs2/dlm/dlmast.c
238
void dlm_do_local_bast(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
243
BUG_ON(lock->ml.node != dlm->node_num);
fs/ocfs2/dlm/dlmast.c
246
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmast.c
261
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmast.c
271
if (!dlm_grab(dlm)) {
fs/ocfs2/dlm/dlmast.c
276
mlog_bug_on_msg(!dlm_domain_fully_joined(dlm),
fs/ocfs2/dlm/dlmast.c
277
"Domain %s not fully joined!\n", dlm->name);
fs/ocfs2/dlm/dlmast.c
316
res = dlm_lookup_lockres(dlm, name, locklen);
fs/ocfs2/dlm/dlmast.c
328
BUG_ON(res->owner == dlm->node_num);
fs/ocfs2/dlm/dlmast.c
330
mlog(0, "%s: res %.*s\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmast.c
34
static void dlm_update_lvb(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
36
static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock);
fs/ocfs2/dlm/dlmast.c
384
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmast.c
407
dlm_do_local_ast(dlm, res, lock);
fs/ocfs2/dlm/dlmast.c
409
dlm_do_local_bast(dlm, res, lock, past->blocked_type);
fs/ocfs2/dlm/dlmast.c
415
dlm_put(dlm);
fs/ocfs2/dlm/dlmast.c
421
int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmast.c
431
mlog(0, "%s: res %.*s, to %u, type %d, blocked_type %d\n", dlm->name,
fs/ocfs2/dlm/dlmast.c
436
past.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmast.c
452
ret = o2net_send_message_vec(DLM_PROXY_AST_MSG, dlm->key, vec, veclen,
fs/ocfs2/dlm/dlmast.c
456
dlm->name, res->lockname.len, res->lockname.name, ret,
fs/ocfs2/dlm/dlmast.c
47
static int dlm_should_cancel_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock)
fs/ocfs2/dlm/dlmast.c
49
assert_spin_locked(&dlm->ast_lock);
fs/ocfs2/dlm/dlmast.c
74
void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock)
fs/ocfs2/dlm/dlmast.c
78
BUG_ON(!dlm);
fs/ocfs2/dlm/dlmast.c
83
assert_spin_locked(&dlm->ast_lock);
fs/ocfs2/dlm/dlmast.c
88
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmast.c
96
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmcommon.h
1009
void __dlm_unlink_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle);
fs/ocfs2/dlm/dlmcommon.h
1010
void __dlm_insert_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle);
fs/ocfs2/dlm/dlmcommon.h
1022
void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up);
fs/ocfs2/dlm/dlmcommon.h
1023
int dlm_drop_lockres_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
1025
void dlm_clean_master_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
1027
void dlm_force_free_mles(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
1028
int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock);
fs/ocfs2/dlm/dlmcommon.h
1113
static inline void dlm_set_lockres_owner(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
1122
static inline void dlm_change_lockres_owner(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
1129
dlm_set_lockres_owner(dlm, res, owner);
fs/ocfs2/dlm/dlmcommon.h
170
static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned i)
fs/ocfs2/dlm/dlmcommon.h
172
return dlm->lockres_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] + (i % DLM_BUCKETS_PER_PAGE);
fs/ocfs2/dlm/dlmcommon.h
175
static inline struct hlist_head *dlm_master_hash(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
178
return dlm->master_hash[(i / DLM_BUCKETS_PER_PAGE) % DLM_HASH_PAGES] +
fs/ocfs2/dlm/dlmcommon.h
224
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmcommon.h
234
static inline void dlm_init_work_item(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
242
i->dlm = dlm; /* must have already done a dlm_grab on this! */
fs/ocfs2/dlm/dlmcommon.h
247
static inline void __dlm_set_joining_node(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
250
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmcommon.h
252
dlm->joining_node = node;
fs/ocfs2/dlm/dlmcommon.h
253
wake_up(&dlm->dlm_join_events);
fs/ocfs2/dlm/dlmcommon.h
305
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmcommon.h
42
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmcommon.h
837
int dlm_launch_thread(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
838
void dlm_complete_thread(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
839
int dlm_launch_recovery_thread(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
840
void dlm_complete_recovery_thread(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
841
void dlm_wait_for_recovery(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
842
void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
843
int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
fs/ocfs2/dlm/dlmcommon.h
844
void dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout);
fs/ocfs2/dlm/dlmcommon.h
845
void dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout);
fs/ocfs2/dlm/dlmcommon.h
847
void dlm_put(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
848
struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
849
int dlm_domain_fully_joined(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmcommon.h
851
void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
853
void dlm_lockres_calc_usage(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
862
void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
fs/ocfs2/dlm/dlmcommon.h
863
void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
fs/ocfs2/dlm/dlmcommon.h
864
struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
868
struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
872
struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
878
struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
882
struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
886
void dlm_lockres_set_refmap_bit(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
888
void dlm_lockres_clear_refmap_bit(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
891
void dlm_lockres_drop_inflight_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
893
void dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
896
void __dlm_lockres_grab_inflight_worker(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
899
void dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock);
fs/ocfs2/dlm/dlmcommon.h
900
void __dlm_queue_ast(struct dlm_ctxt *dlm, struct dlm_lock *lock);
fs/ocfs2/dlm/dlmcommon.h
901
void __dlm_queue_bast(struct dlm_ctxt *dlm, struct dlm_lock *lock);
fs/ocfs2/dlm/dlmcommon.h
902
void dlm_do_local_ast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
905
int dlm_do_remote_ast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
908
void dlm_do_local_bast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
912
int dlm_send_proxy_ast_msg(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
917
static inline int dlm_send_proxy_bast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
922
return dlm_send_proxy_ast_msg(dlm, res, lock, DLM_BAST,
fs/ocfs2/dlm/dlmcommon.h
926
static inline int dlm_send_proxy_ast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
931
return dlm_send_proxy_ast_msg(dlm, res, lock, DLM_AST,
fs/ocfs2/dlm/dlmcommon.h
938
void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
fs/ocfs2/dlm/dlmcommon.h
939
void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
fs/ocfs2/dlm/dlmcommon.h
945
int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res);
fs/ocfs2/dlm/dlmcommon.h
946
int dlm_finish_migration(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
949
void dlm_lockres_release_ast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
976
int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmcommon.h
979
void __dlm_do_purge_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
982
int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
989
int dlm_send_one_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmcommon.h
994
void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
102
static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
192
if (lock->ml.node == dlm->node_num)
fs/ocfs2/dlm/dlmconvert.c
249
enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
316
status = dlm_send_remote_convert_request(dlm, res, lock, flags, type);
fs/ocfs2/dlm/dlmconvert.c
331
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmconvert.c
353
static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
367
convert.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmconvert.c
384
tmpret = o2net_send_message_vec(DLM_CONVERT_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmconvert.c
402
"node %u\n", tmpret, DLM_CONVERT_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmconvert.c
408
dlm_wait_for_node_death(dlm, res->owner,
fs/ocfs2/dlm/dlmconvert.c
41
static enum dlm_status __dlmconvert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
432
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmconvert.c
442
if (!dlm_grab(dlm)) {
fs/ocfs2/dlm/dlmconvert.c
447
mlog_bug_on_msg(!dlm_domain_fully_joined(dlm),
fs/ocfs2/dlm/dlmconvert.c
448
"Domain %s not fully joined!\n", dlm->name);
fs/ocfs2/dlm/dlmconvert.c
46
static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
469
res = dlm_lookup_lockres(dlm, cnv->name, cnv->namelen);
fs/ocfs2/dlm/dlmconvert.c
520
status = __dlmconvert_master(dlm, res, lock, flags,
fs/ocfs2/dlm/dlmconvert.c
542
dlm_queue_ast(dlm, lock);
fs/ocfs2/dlm/dlmconvert.c
544
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmconvert.c
547
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmconvert.c
552
dlm_put(dlm);
fs/ocfs2/dlm/dlmconvert.c
59
enum dlm_status dlmconvert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.c
72
status = __dlmconvert_master(dlm, res, lock, flags, type,
fs/ocfs2/dlm/dlmconvert.c
83
dlm_queue_ast(dlm, lock);
fs/ocfs2/dlm/dlmconvert.c
85
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmconvert.c
88
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmconvert.h
11
enum dlm_status dlmconvert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmconvert.h
14
enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdebug.c
296
static int debug_purgelist_print(struct dlm_ctxt *dlm, char *buf, int len)
fs/ocfs2/dlm/dlmdebug.c
303
"Dumping Purgelist for Domain: %s\n", dlm->name);
fs/ocfs2/dlm/dlmdebug.c
305
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdebug.c
306
list_for_each_entry(res, &dlm->purge_list, purge) {
fs/ocfs2/dlm/dlmdebug.c
318
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdebug.c
327
struct dlm_ctxt *dlm = inode->i_private;
fs/ocfs2/dlm/dlmdebug.c
334
i_size_write(inode, debug_purgelist_print(dlm, buf, PAGE_SIZE - 1));
fs/ocfs2/dlm/dlmdebug.c
350
static int debug_mle_print(struct dlm_ctxt *dlm, char *buf, int len)
fs/ocfs2/dlm/dlmdebug.c
358
"Dumping MLEs for Domain: %s\n", dlm->name);
fs/ocfs2/dlm/dlmdebug.c
360
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmdebug.c
362
bucket = dlm_master_hash(dlm, i);
fs/ocfs2/dlm/dlmdebug.c
373
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmdebug.c
382
struct dlm_ctxt *dlm = inode->i_private;
fs/ocfs2/dlm/dlmdebug.c
389
i_size_write(inode, debug_mle_print(dlm, buf, PAGE_SIZE - 1));
fs/ocfs2/dlm/dlmdebug.c
486
struct dlm_ctxt *dlm = dl->dl_ctxt;
fs/ocfs2/dlm/dlmdebug.c
491
spin_lock(&dlm->track_lock);
fs/ocfs2/dlm/dlmdebug.c
495
track_list = &dlm->tracking_list;
fs/ocfs2/dlm/dlmdebug.c
498
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmdebug.c
504
if (&iter->tracking != &dlm->tracking_list) {
fs/ocfs2/dlm/dlmdebug.c
510
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmdebug.c
556
struct dlm_ctxt *dlm = inode->i_private;
fs/ocfs2/dlm/dlmdebug.c
573
dl->dl_ctxt = dlm_grab(dlm);
fs/ocfs2/dlm/dlmdebug.c
612
static int debug_state_print(struct dlm_ctxt *dlm, char *buf, int len)
fs/ocfs2/dlm/dlmdebug.c
620
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdebug.c
622
switch (dlm->dlm_state) {
fs/ocfs2/dlm/dlmdebug.c
638
dlm->name, dlm->key, dlm->dlm_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdebug.c
639
dlm->dlm_locking_proto.pv_minor);
fs/ocfs2/dlm/dlmdebug.c
644
task_pid_nr(dlm->dlm_thread_task), dlm->node_num, state);
fs/ocfs2/dlm/dlmdebug.c
649
dlm->num_joins, dlm->joining_node);
fs/ocfs2/dlm/dlmdebug.c
653
out += stringify_nodemap(dlm->domain_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdebug.c
659
out += stringify_nodemap(dlm->exit_domain_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdebug.c
665
out += stringify_nodemap(dlm->live_nodes_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdebug.c
672
atomic_read(&dlm->res_cur_count),
fs/ocfs2/dlm/dlmdebug.c
673
atomic_read(&dlm->res_tot_count));
fs/ocfs2/dlm/dlmdebug.c
676
tot_mles += atomic_read(&dlm->mle_tot_count[i]);
fs/ocfs2/dlm/dlmdebug.c
679
cur_mles += atomic_read(&dlm->mle_cur_count[i]);
fs/ocfs2/dlm/dlmdebug.c
688
atomic_read(&dlm->mle_cur_count[DLM_MLE_BLOCK]),
fs/ocfs2/dlm/dlmdebug.c
689
atomic_read(&dlm->mle_tot_count[DLM_MLE_BLOCK]));
fs/ocfs2/dlm/dlmdebug.c
694
atomic_read(&dlm->mle_cur_count[DLM_MLE_MASTER]),
fs/ocfs2/dlm/dlmdebug.c
695
atomic_read(&dlm->mle_tot_count[DLM_MLE_MASTER]));
fs/ocfs2/dlm/dlmdebug.c
700
atomic_read(&dlm->mle_cur_count[DLM_MLE_MIGRATION]),
fs/ocfs2/dlm/dlmdebug.c
701
atomic_read(&dlm->mle_tot_count[DLM_MLE_MIGRATION]));
fs/ocfs2/dlm/dlmdebug.c
707
(list_empty(&dlm->dirty_list) ? "Empty" : "InUse"),
fs/ocfs2/dlm/dlmdebug.c
708
(list_empty(&dlm->purge_list) ? "Empty" : "InUse"),
fs/ocfs2/dlm/dlmdebug.c
709
(list_empty(&dlm->pending_asts) ? "Empty" : "InUse"),
fs/ocfs2/dlm/dlmdebug.c
710
(list_empty(&dlm->pending_basts) ? "Empty" : "InUse"));
fs/ocfs2/dlm/dlmdebug.c
714
"Purge Count: %d Refs: %d\n", dlm->purge_count,
fs/ocfs2/dlm/dlmdebug.c
715
kref_read(&dlm->dlm_refs));
fs/ocfs2/dlm/dlmdebug.c
719
"Dead Node: %d\n", dlm->reco.dead_node);
fs/ocfs2/dlm/dlmdebug.c
722
if (dlm->reco.state == DLM_RECO_STATE_ACTIVE)
fs/ocfs2/dlm/dlmdebug.c
730
task_pid_nr(dlm->dlm_reco_thread_task),
fs/ocfs2/dlm/dlmdebug.c
731
dlm->reco.new_master, state);
fs/ocfs2/dlm/dlmdebug.c
735
out += stringify_nodemap(dlm->recovery_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdebug.c
741
list_for_each_entry(node, &dlm->reco.node_data, list) {
fs/ocfs2/dlm/dlmdebug.c
772
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdebug.c
779
struct dlm_ctxt *dlm = inode->i_private;
fs/ocfs2/dlm/dlmdebug.c
786
i_size_write(inode, debug_state_print(dlm, buf, PAGE_SIZE - 1));
fs/ocfs2/dlm/dlmdebug.c
802
void dlm_debug_init(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdebug.c
806
dlm->dlm_debugfs_subroot, dlm, &debug_state_fops);
fs/ocfs2/dlm/dlmdebug.c
810
dlm->dlm_debugfs_subroot, dlm, &debug_lockres_fops);
fs/ocfs2/dlm/dlmdebug.c
814
dlm->dlm_debugfs_subroot, dlm, &debug_mle_fops);
fs/ocfs2/dlm/dlmdebug.c
818
dlm->dlm_debugfs_subroot, dlm,
fs/ocfs2/dlm/dlmdebug.c
823
void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdebug.c
825
dlm->dlm_debugfs_subroot = debugfs_create_dir(dlm->name,
fs/ocfs2/dlm/dlmdebug.c
829
void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdebug.c
831
debugfs_remove_recursive(dlm->dlm_debugfs_subroot);
fs/ocfs2/dlm/dlmdebug.h
22
void dlm_debug_init(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmdebug.h
24
void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmdebug.h
25
void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmdebug.h
32
static inline void dlm_debug_init(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdebug.h
35
static inline void dlm_create_debugfs_subroot(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdebug.h
38
static inline void dlm_destroy_debugfs_subroot(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
1019
dlm->node_num, qr->qr_node);
fs/ocfs2/dlm/dlmdomain.c
1042
qr->qr_node, dlm->node_num);
fs/ocfs2/dlm/dlmdomain.c
1052
static int dlm_send_regions(struct dlm_ctxt *dlm, unsigned long *node_map)
fs/ocfs2/dlm/dlmdomain.c
1068
qr->qr_node = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
1069
qr->qr_namelen = strlen(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1070
memcpy(qr->qr_domain, dlm->name, qr->qr_namelen);
fs/ocfs2/dlm/dlmdomain.c
1083
if (i == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
1109
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
1126
dlm = __dlm_lookup_domain_full(qr->qr_domain, qr->qr_namelen);
fs/ocfs2/dlm/dlmdomain.c
1127
if (!dlm) {
fs/ocfs2/dlm/dlmdomain.c
1133
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1134
if (dlm->joining_node != qr->qr_node) {
fs/ocfs2/dlm/dlmdomain.c
1137
dlm->joining_node);
fs/ocfs2/dlm/dlmdomain.c
1142
if (dlm->dlm_locking_proto.pv_major == 1 &&
fs/ocfs2/dlm/dlmdomain.c
1143
dlm->dlm_locking_proto.pv_minor == 0) {
fs/ocfs2/dlm/dlmdomain.c
1146
qr->qr_domain, dlm->dlm_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1147
dlm->dlm_locking_proto.pv_minor);
fs/ocfs2/dlm/dlmdomain.c
1151
status = dlm_match_regions(dlm, qr, local, sizeof(qr->qr_regions));
fs/ocfs2/dlm/dlmdomain.c
1154
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1164
static int dlm_match_nodes(struct dlm_ctxt *dlm, struct dlm_query_nodeinfo *qn)
fs/ocfs2/dlm/dlmdomain.c
1206
qn->qn_nodenum, dlm->node_num);
fs/ocfs2/dlm/dlmdomain.c
1213
dlm->node_num, qn->qn_nodenum);
fs/ocfs2/dlm/dlmdomain.c
1224
static int dlm_send_nodeinfo(struct dlm_ctxt *dlm, unsigned long *node_map)
fs/ocfs2/dlm/dlmdomain.c
1253
qn->qn_nodenum = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
1255
qn->qn_namelen = strlen(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1256
memcpy(qn->qn_domain, dlm->name, qn->qn_namelen);
fs/ocfs2/dlm/dlmdomain.c
1261
if (i == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
1286
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
1295
dlm = __dlm_lookup_domain_full(qn->qn_domain, qn->qn_namelen);
fs/ocfs2/dlm/dlmdomain.c
1296
if (!dlm) {
fs/ocfs2/dlm/dlmdomain.c
1302
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1303
if (dlm->joining_node != qn->qn_nodenum) {
fs/ocfs2/dlm/dlmdomain.c
1306
dlm->joining_node);
fs/ocfs2/dlm/dlmdomain.c
1311
if (dlm->dlm_locking_proto.pv_major == 1 &&
fs/ocfs2/dlm/dlmdomain.c
1312
dlm->dlm_locking_proto.pv_minor == 0) {
fs/ocfs2/dlm/dlmdomain.c
1315
qn->qn_domain, dlm->dlm_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1316
dlm->dlm_locking_proto.pv_minor);
fs/ocfs2/dlm/dlmdomain.c
1320
status = dlm_match_nodes(dlm, qn);
fs/ocfs2/dlm/dlmdomain.c
1323
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1334
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
1342
dlm = __dlm_lookup_domain_full(cancel->domain, cancel->name_len);
fs/ocfs2/dlm/dlmdomain.c
1344
if (dlm) {
fs/ocfs2/dlm/dlmdomain.c
1345
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1349
BUG_ON(dlm->joining_node != cancel->node_idx);
fs/ocfs2/dlm/dlmdomain.c
1350
__dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmdomain.c
1352
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1359
static int dlm_send_one_join_cancel(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1366
cancel_msg.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
1367
cancel_msg.name_len = strlen(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1368
memcpy(cancel_msg.domain, dlm->name, cancel_msg.name_len);
fs/ocfs2/dlm/dlmdomain.c
1385
static int dlm_send_join_cancels(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1404
if (node == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
1407
tmpstat = dlm_send_one_join_cancel(dlm, node);
fs/ocfs2/dlm/dlmdomain.c
1421
static int dlm_request_join(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1433
join_msg.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
1434
join_msg.name_len = strlen(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1435
memcpy(join_msg.domain, dlm->name, join_msg.name_len);
fs/ocfs2/dlm/dlmdomain.c
1436
join_msg.dlm_proto = dlm->dlm_locking_proto;
fs/ocfs2/dlm/dlmdomain.c
1437
join_msg.fs_proto = dlm->fs_locking_proto;
fs/ocfs2/dlm/dlmdomain.c
1440
byte_copymap(join_msg.node_map, dlm->live_nodes_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
145
static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmdomain.c
147
void __dlm_unhash_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmdomain.c
1471
dlm->dlm_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1472
dlm->dlm_locking_proto.pv_minor,
fs/ocfs2/dlm/dlmdomain.c
1473
dlm->fs_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1474
dlm->fs_locking_proto.pv_minor,
fs/ocfs2/dlm/dlmdomain.c
1480
dlm->dlm_locking_proto.pv_minor = packet.dlm_minor;
fs/ocfs2/dlm/dlmdomain.c
1481
dlm->fs_locking_proto.pv_minor = packet.fs_minor;
fs/ocfs2/dlm/dlmdomain.c
1486
dlm->dlm_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1487
dlm->dlm_locking_proto.pv_minor,
fs/ocfs2/dlm/dlmdomain.c
1488
dlm->fs_locking_proto.pv_major,
fs/ocfs2/dlm/dlmdomain.c
1489
dlm->fs_locking_proto.pv_minor);
fs/ocfs2/dlm/dlmdomain.c
1508
static int dlm_send_one_join_assert(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1518
assert_msg.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
1519
assert_msg.name_len = strlen(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
152
mlog(0, "%s: Unhash res %.*s\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmdomain.c
1520
memcpy(assert_msg.domain, dlm->name, assert_msg.name_len);
fs/ocfs2/dlm/dlmdomain.c
1535
static void dlm_send_join_asserts(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1543
if (node == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
1550
status = dlm_send_one_join_assert(dlm, node);
fs/ocfs2/dlm/dlmdomain.c
1552
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1553
live = test_bit(node, dlm->live_nodes_map);
fs/ocfs2/dlm/dlmdomain.c
1554
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1573
static int dlm_should_restart_join(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
158
void __dlm_insert_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmdomain.c
1584
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1587
ret = !bitmap_equal(ctxt->live_map, dlm->live_nodes_map,
fs/ocfs2/dlm/dlmdomain.c
1589
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1597
static int dlm_try_to_join_domain(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
1603
mlog(0, "%p", dlm);
fs/ocfs2/dlm/dlmdomain.c
1615
o2hb_fill_node_map(dlm->live_nodes_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
1617
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1618
bitmap_copy(ctxt->live_map, dlm->live_nodes_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
1619
__dlm_set_joining_node(dlm, dlm->node_num);
fs/ocfs2/dlm/dlmdomain.c
162
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1620
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1625
if (node == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
1628
status = dlm_request_join(dlm, node, &response);
fs/ocfs2/dlm/dlmdomain.c
1639
if (dlm_should_restart_join(dlm, ctxt, response)) {
fs/ocfs2/dlm/dlmdomain.c
164
bucket = dlm_lockres_hash(dlm, res->lockname.hash);
fs/ocfs2/dlm/dlmdomain.c
1651
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1652
bitmap_copy(dlm->domain_map, ctxt->yes_resp_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
1653
set_bit(dlm->node_num, dlm->domain_map);
fs/ocfs2/dlm/dlmdomain.c
1654
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1657
if (dlm->dlm_locking_proto.pv_major > 1 ||
fs/ocfs2/dlm/dlmdomain.c
1658
dlm->dlm_locking_proto.pv_minor > 0) {
fs/ocfs2/dlm/dlmdomain.c
1659
status = dlm_send_nodeinfo(dlm, ctxt->yes_resp_map);
fs/ocfs2/dlm/dlmdomain.c
1664
status = dlm_send_regions(dlm, ctxt->yes_resp_map);
fs/ocfs2/dlm/dlmdomain.c
1671
dlm_send_join_asserts(dlm, ctxt->yes_resp_map);
fs/ocfs2/dlm/dlmdomain.c
1678
dlm->dlm_state = DLM_CTXT_JOINED;
fs/ocfs2/dlm/dlmdomain.c
1679
dlm->num_joins++;
fs/ocfs2/dlm/dlmdomain.c
1683
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1684
__dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmdomain.c
1686
printk(KERN_NOTICE "o2dlm: Joining domain %s ", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1687
__dlm_print_nodes(dlm);
fs/ocfs2/dlm/dlmdomain.c
1689
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1694
tmpstat = dlm_send_join_cancels(dlm,
fs/ocfs2/dlm/dlmdomain.c
1707
static void dlm_unregister_domain_handlers(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
1709
o2hb_unregister_callback(dlm->name, &dlm->dlm_hb_up);
fs/ocfs2/dlm/dlmdomain.c
171
mlog(0, "%s: Hash res %.*s\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmdomain.c
1710
o2hb_unregister_callback(dlm->name, &dlm->dlm_hb_down);
fs/ocfs2/dlm/dlmdomain.c
1711
o2net_unregister_handler_list(&dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1714
static int dlm_register_domain_handlers(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
1720
o2hb_setup_callback(&dlm->dlm_hb_down, O2HB_NODE_DOWN_CB,
fs/ocfs2/dlm/dlmdomain.c
1721
dlm_hb_node_down_cb, dlm, DLM_HB_NODE_DOWN_PRI);
fs/ocfs2/dlm/dlmdomain.c
1722
o2hb_setup_callback(&dlm->dlm_hb_up, O2HB_NODE_UP_CB,
fs/ocfs2/dlm/dlmdomain.c
1723
dlm_hb_node_up_cb, dlm, DLM_HB_NODE_UP_PRI);
fs/ocfs2/dlm/dlmdomain.c
1725
status = o2hb_register_callback(dlm->name, &dlm->dlm_hb_down);
fs/ocfs2/dlm/dlmdomain.c
1729
status = o2hb_register_callback(dlm->name, &dlm->dlm_hb_up);
fs/ocfs2/dlm/dlmdomain.c
1733
status = o2net_register_handler(DLM_MASTER_REQUEST_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1736
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1740
status = o2net_register_handler(DLM_ASSERT_MASTER_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1743
dlm, dlm_assert_master_post_handler,
fs/ocfs2/dlm/dlmdomain.c
1744
&dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1748
status = o2net_register_handler(DLM_CREATE_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
175
struct dlm_lock_resource * __dlm_lookup_lockres_full(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
1751
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1755
status = o2net_register_handler(DLM_CONVERT_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1758
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1762
status = o2net_register_handler(DLM_UNLOCK_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1765
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1769
status = o2net_register_handler(DLM_PROXY_AST_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1772
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1776
status = o2net_register_handler(DLM_EXIT_DOMAIN_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1779
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1783
status = o2net_register_handler(DLM_DEREF_LOCKRES_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1786
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1790
status = o2net_register_handler(DLM_MIGRATE_REQUEST_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1793
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1797
status = o2net_register_handler(DLM_MIG_LOCKRES_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1800
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1804
status = o2net_register_handler(DLM_MASTER_REQUERY_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1807
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1811
status = o2net_register_handler(DLM_LOCK_REQUEST_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1814
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1818
status = o2net_register_handler(DLM_RECO_DATA_DONE_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1821
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1825
status = o2net_register_handler(DLM_BEGIN_RECO_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1828
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1832
status = o2net_register_handler(DLM_FINALIZE_RECO_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1835
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1839
status = o2net_register_handler(DLM_BEGIN_EXIT_DOMAIN_MSG, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1842
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
1846
status = o2net_register_handler(DLM_DEREF_LOCKRES_DONE, dlm->key,
fs/ocfs2/dlm/dlmdomain.c
1849
dlm, NULL, &dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
185
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
1852
dlm_unregister_domain_handlers(dlm);
fs/ocfs2/dlm/dlmdomain.c
1857
static int dlm_join_domain(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
1864
BUG_ON(!dlm);
fs/ocfs2/dlm/dlmdomain.c
1866
mlog(0, "Join domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1868
status = dlm_register_domain_handlers(dlm);
fs/ocfs2/dlm/dlmdomain.c
187
bucket = dlm_lockres_hash(dlm, hash);
fs/ocfs2/dlm/dlmdomain.c
1874
status = dlm_launch_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
1880
status = dlm_launch_recovery_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
1886
dlm_debug_init(dlm);
fs/ocfs2/dlm/dlmdomain.c
1888
snprintf(wq_name, O2NM_MAX_NAME_LEN, "dlm_wq-%s", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
1889
dlm->dlm_worker = alloc_workqueue(wq_name, WQ_MEM_RECLAIM | WQ_PERCPU,
fs/ocfs2/dlm/dlmdomain.c
1891
if (!dlm->dlm_worker) {
fs/ocfs2/dlm/dlmdomain.c
1898
status = dlm_try_to_join_domain(dlm);
fs/ocfs2/dlm/dlmdomain.c
1913
"%s after %u msecs\n", dlm->name,
fs/ocfs2/dlm/dlmdomain.c
1943
dlm_unregister_domain_handlers(dlm);
fs/ocfs2/dlm/dlmdomain.c
1944
dlm_complete_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
1945
dlm_complete_recovery_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
1946
dlm_destroy_dlm_worker(dlm);
fs/ocfs2/dlm/dlmdomain.c
1957
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
1959
dlm = kzalloc_obj(*dlm);
fs/ocfs2/dlm/dlmdomain.c
1960
if (!dlm) {
fs/ocfs2/dlm/dlmdomain.c
1966
dlm->name = kstrdup(domain, GFP_KERNEL);
fs/ocfs2/dlm/dlmdomain.c
1967
if (dlm->name == NULL) {
fs/ocfs2/dlm/dlmdomain.c
1973
dlm->lockres_hash = (struct hlist_head **)dlm_alloc_pagevec(DLM_HASH_PAGES);
fs/ocfs2/dlm/dlmdomain.c
1974
if (!dlm->lockres_hash) {
fs/ocfs2/dlm/dlmdomain.c
1981
INIT_HLIST_HEAD(dlm_lockres_hash(dlm, i));
fs/ocfs2/dlm/dlmdomain.c
1983
dlm->master_hash = (struct hlist_head **)
fs/ocfs2/dlm/dlmdomain.c
1985
if (!dlm->master_hash) {
fs/ocfs2/dlm/dlmdomain.c
1992
INIT_HLIST_HEAD(dlm_master_hash(dlm, i));
fs/ocfs2/dlm/dlmdomain.c
1994
dlm->key = key;
fs/ocfs2/dlm/dlmdomain.c
1995
dlm->node_num = o2nm_this_node();
fs/ocfs2/dlm/dlmdomain.c
1997
dlm_create_debugfs_subroot(dlm);
fs/ocfs2/dlm/dlmdomain.c
1999
spin_lock_init(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
2000
spin_lock_init(&dlm->master_lock);
fs/ocfs2/dlm/dlmdomain.c
2001
spin_lock_init(&dlm->ast_lock);
fs/ocfs2/dlm/dlmdomain.c
2002
spin_lock_init(&dlm->track_lock);
fs/ocfs2/dlm/dlmdomain.c
2003
INIT_LIST_HEAD(&dlm->list);
fs/ocfs2/dlm/dlmdomain.c
2004
INIT_LIST_HEAD(&dlm->dirty_list);
fs/ocfs2/dlm/dlmdomain.c
2005
INIT_LIST_HEAD(&dlm->reco.resources);
fs/ocfs2/dlm/dlmdomain.c
2006
INIT_LIST_HEAD(&dlm->reco.node_data);
fs/ocfs2/dlm/dlmdomain.c
2007
INIT_LIST_HEAD(&dlm->purge_list);
fs/ocfs2/dlm/dlmdomain.c
2008
INIT_LIST_HEAD(&dlm->dlm_domain_handlers);
fs/ocfs2/dlm/dlmdomain.c
2009
INIT_LIST_HEAD(&dlm->tracking_list);
fs/ocfs2/dlm/dlmdomain.c
2010
dlm->reco.state = 0;
fs/ocfs2/dlm/dlmdomain.c
2012
INIT_LIST_HEAD(&dlm->pending_asts);
fs/ocfs2/dlm/dlmdomain.c
2013
INIT_LIST_HEAD(&dlm->pending_basts);
fs/ocfs2/dlm/dlmdomain.c
2016
dlm->recovery_map, &(dlm->recovery_map[0]));
fs/ocfs2/dlm/dlmdomain.c
2018
bitmap_zero(dlm->recovery_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
2019
bitmap_zero(dlm->live_nodes_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
2020
bitmap_zero(dlm->domain_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmdomain.c
2022
dlm->dlm_thread_task = NULL;
fs/ocfs2/dlm/dlmdomain.c
2023
dlm->dlm_reco_thread_task = NULL;
fs/ocfs2/dlm/dlmdomain.c
2024
dlm->dlm_worker = NULL;
fs/ocfs2/dlm/dlmdomain.c
2025
init_waitqueue_head(&dlm->dlm_thread_wq);
fs/ocfs2/dlm/dlmdomain.c
2026
init_waitqueue_head(&dlm->dlm_reco_thread_wq);
fs/ocfs2/dlm/dlmdomain.c
2027
init_waitqueue_head(&dlm->reco.event);
fs/ocfs2/dlm/dlmdomain.c
2028
init_waitqueue_head(&dlm->ast_wq);
fs/ocfs2/dlm/dlmdomain.c
2029
init_waitqueue_head(&dlm->migration_wq);
fs/ocfs2/dlm/dlmdomain.c
2030
INIT_LIST_HEAD(&dlm->mle_hb_events);
fs/ocfs2/dlm/dlmdomain.c
2032
dlm->joining_node = DLM_LOCK_RES_OWNER_UNKNOWN;
fs/ocfs2/dlm/dlmdomain.c
2033
init_waitqueue_head(&dlm->dlm_join_events);
fs/ocfs2/dlm/dlmdomain.c
2035
dlm->migrate_done = 0;
fs/ocfs2/dlm/dlmdomain.c
2037
dlm->reco.new_master = O2NM_INVALID_NODE_NUM;
fs/ocfs2/dlm/dlmdomain.c
2038
dlm->reco.dead_node = O2NM_INVALID_NODE_NUM;
fs/ocfs2/dlm/dlmdomain.c
2040
atomic_set(&dlm->res_tot_count, 0);
fs/ocfs2/dlm/dlmdomain.c
2041
atomic_set(&dlm->res_cur_count, 0);
fs/ocfs2/dlm/dlmdomain.c
2043
atomic_set(&dlm->mle_tot_count[i], 0);
fs/ocfs2/dlm/dlmdomain.c
2044
atomic_set(&dlm->mle_cur_count[i], 0);
fs/ocfs2/dlm/dlmdomain.c
2047
spin_lock_init(&dlm->work_lock);
fs/ocfs2/dlm/dlmdomain.c
2048
INIT_LIST_HEAD(&dlm->work_list);
fs/ocfs2/dlm/dlmdomain.c
2049
INIT_WORK(&dlm->dispatched_work, dlm_dispatch_work);
fs/ocfs2/dlm/dlmdomain.c
2051
kref_init(&dlm->dlm_refs);
fs/ocfs2/dlm/dlmdomain.c
2052
dlm->dlm_state = DLM_CTXT_NEW;
fs/ocfs2/dlm/dlmdomain.c
2054
INIT_LIST_HEAD(&dlm->dlm_eviction_callbacks);
fs/ocfs2/dlm/dlmdomain.c
2057
kref_read(&dlm->dlm_refs));
fs/ocfs2/dlm/dlmdomain.c
2061
if (ret < 0 && dlm) {
fs/ocfs2/dlm/dlmdomain.c
2062
if (dlm->master_hash)
fs/ocfs2/dlm/dlmdomain.c
2063
dlm_free_pagevec((void **)dlm->master_hash,
fs/ocfs2/dlm/dlmdomain.c
2066
if (dlm->lockres_hash)
fs/ocfs2/dlm/dlmdomain.c
2067
dlm_free_pagevec((void **)dlm->lockres_hash,
fs/ocfs2/dlm/dlmdomain.c
2070
kfree(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
2071
kfree(dlm);
fs/ocfs2/dlm/dlmdomain.c
2072
dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
2074
return dlm;
fs/ocfs2/dlm/dlmdomain.c
208
struct dlm_lock_resource * __dlm_lookup_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
2112
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
2124
dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
2133
dlm = __dlm_lookup_domain(domain);
fs/ocfs2/dlm/dlmdomain.c
2134
if (dlm) {
fs/ocfs2/dlm/dlmdomain.c
2135
if (dlm->dlm_state != DLM_CTXT_JOINED) {
fs/ocfs2/dlm/dlmdomain.c
2145
if (dlm_protocol_compare(&dlm->fs_locking_proto, fs_proto)) {
fs/ocfs2/dlm/dlmdomain.c
2155
__dlm_get(dlm);
fs/ocfs2/dlm/dlmdomain.c
2156
dlm->num_joins++;
fs/ocfs2/dlm/dlmdomain.c
217
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
2178
dlm = new_ctxt;
fs/ocfs2/dlm/dlmdomain.c
2182
list_add_tail(&dlm->list, &dlm_domains);
fs/ocfs2/dlm/dlmdomain.c
2189
dlm->dlm_locking_proto = dlm_protocol;
fs/ocfs2/dlm/dlmdomain.c
219
res = __dlm_lookup_lockres_full(dlm, name, len, hash);
fs/ocfs2/dlm/dlmdomain.c
2190
dlm->fs_locking_proto = *fs_proto;
fs/ocfs2/dlm/dlmdomain.c
2192
ret = dlm_join_domain(dlm);
fs/ocfs2/dlm/dlmdomain.c
2195
dlm_put(dlm);
fs/ocfs2/dlm/dlmdomain.c
2200
*fs_proto = dlm->fs_locking_proto;
fs/ocfs2/dlm/dlmdomain.c
2208
dlm = ERR_PTR(ret);
fs/ocfs2/dlm/dlmdomain.c
2210
return dlm;
fs/ocfs2/dlm/dlmdomain.c
2278
void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
2284
list_for_each_entry(cb, &dlm->dlm_eviction_callbacks, ec_item) {
fs/ocfs2/dlm/dlmdomain.c
2300
void dlm_register_eviction_cb(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
2304
list_add_tail(&cb->ec_item, &dlm->dlm_eviction_callbacks);
fs/ocfs2/dlm/dlmdomain.c
233
struct dlm_lock_resource * dlm_lookup_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
240
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
241
res = __dlm_lookup_lockres(dlm, name, len, hash);
fs/ocfs2/dlm/dlmdomain.c
242
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
292
static void dlm_free_ctxt_mem(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
294
dlm_destroy_debugfs_subroot(dlm);
fs/ocfs2/dlm/dlmdomain.c
296
if (dlm->lockres_hash)
fs/ocfs2/dlm/dlmdomain.c
297
dlm_free_pagevec((void **)dlm->lockres_hash, DLM_HASH_PAGES);
fs/ocfs2/dlm/dlmdomain.c
299
if (dlm->master_hash)
fs/ocfs2/dlm/dlmdomain.c
300
dlm_free_pagevec((void **)dlm->master_hash, DLM_HASH_PAGES);
fs/ocfs2/dlm/dlmdomain.c
302
kfree(dlm->name);
fs/ocfs2/dlm/dlmdomain.c
303
kfree(dlm);
fs/ocfs2/dlm/dlmdomain.c
311
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmdomain.c
313
dlm = container_of(kref, struct dlm_ctxt, dlm_refs);
fs/ocfs2/dlm/dlmdomain.c
315
BUG_ON(dlm->num_joins);
fs/ocfs2/dlm/dlmdomain.c
316
BUG_ON(dlm->dlm_state == DLM_CTXT_JOINED);
fs/ocfs2/dlm/dlmdomain.c
319
list_del_init(&dlm->list);
fs/ocfs2/dlm/dlmdomain.c
323
mlog(0, "freeing memory from domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
327
dlm_free_ctxt_mem(dlm);
fs/ocfs2/dlm/dlmdomain.c
332
void dlm_put(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
335
kref_put(&dlm->dlm_refs, dlm_ctxt_release);
fs/ocfs2/dlm/dlmdomain.c
339
static void __dlm_get(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
341
kref_get(&dlm->dlm_refs);
fs/ocfs2/dlm/dlmdomain.c
347
struct dlm_ctxt *dlm_grab(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
355
if (target == dlm) {
fs/ocfs2/dlm/dlmdomain.c
367
int dlm_domain_fully_joined(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
372
ret = (dlm->dlm_state == DLM_CTXT_JOINED) ||
fs/ocfs2/dlm/dlmdomain.c
373
(dlm->dlm_state == DLM_CTXT_IN_SHUTDOWN);
fs/ocfs2/dlm/dlmdomain.c
379
static void dlm_destroy_dlm_worker(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
381
if (dlm->dlm_worker) {
fs/ocfs2/dlm/dlmdomain.c
382
destroy_workqueue(dlm->dlm_worker);
fs/ocfs2/dlm/dlmdomain.c
383
dlm->dlm_worker = NULL;
fs/ocfs2/dlm/dlmdomain.c
387
static void dlm_complete_dlm_shutdown(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
389
dlm_unregister_domain_handlers(dlm);
fs/ocfs2/dlm/dlmdomain.c
390
dlm_complete_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
391
dlm_complete_recovery_thread(dlm);
fs/ocfs2/dlm/dlmdomain.c
392
dlm_destroy_dlm_worker(dlm);
fs/ocfs2/dlm/dlmdomain.c
398
list_del_init(&dlm->list);
fs/ocfs2/dlm/dlmdomain.c
405
static int dlm_migrate_all_locks(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
413
mlog(0, "Migrating locks from domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
416
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
420
bucket = dlm_lockres_hash(dlm, i);
fs/ocfs2/dlm/dlmdomain.c
429
dropped = dlm_empty_lockres(dlm, res);
fs/ocfs2/dlm/dlmdomain.c
433
__dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmdomain.c
441
cond_resched_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
445
cond_resched_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
450
if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) {
fs/ocfs2/dlm/dlmdomain.c
452
"need to be migrated after dlm recovery\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
456
"all lock resources\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
457
dlm->migrate_done = 1;
fs/ocfs2/dlm/dlmdomain.c
461
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
462
wake_up(&dlm->dlm_thread_wq);
fs/ocfs2/dlm/dlmdomain.c
468
dlm->name, num);
fs/ocfs2/dlm/dlmdomain.c
471
mlog(0, "DONE Migrating locks from domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
475
static int dlm_no_joining_node(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
479
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
480
ret = dlm->joining_node == DLM_LOCK_RES_OWNER_UNKNOWN;
fs/ocfs2/dlm/dlmdomain.c
481
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
489
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmdomain.c
493
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmdomain.c
497
mlog(0, "%s: Node %u sent a begin exit domain message\n", dlm->name, node);
fs/ocfs2/dlm/dlmdomain.c
499
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
500
set_bit(node, dlm->exit_domain_map);
fs/ocfs2/dlm/dlmdomain.c
501
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
503
dlm_put(dlm);
fs/ocfs2/dlm/dlmdomain.c
508
static void dlm_mark_domain_leaving(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
514
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
516
if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) {
fs/ocfs2/dlm/dlmdomain.c
518
dlm->joining_node);
fs/ocfs2/dlm/dlmdomain.c
519
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
522
wait_event(dlm->dlm_join_events, dlm_no_joining_node(dlm));
fs/ocfs2/dlm/dlmdomain.c
526
dlm->dlm_state = DLM_CTXT_LEAVING;
fs/ocfs2/dlm/dlmdomain.c
527
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
531
static void __dlm_print_nodes(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
535
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
538
while ((node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdomain.c
549
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmdomain.c
555
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmdomain.c
560
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
561
clear_bit(node, dlm->domain_map);
fs/ocfs2/dlm/dlmdomain.c
562
clear_bit(node, dlm->exit_domain_map);
fs/ocfs2/dlm/dlmdomain.c
563
printk(KERN_NOTICE "o2dlm: Node %u leaves domain %s ", node, dlm->name);
fs/ocfs2/dlm/dlmdomain.c
564
__dlm_print_nodes(dlm);
fs/ocfs2/dlm/dlmdomain.c
567
dlm_hb_event_notify_attached(dlm, node, 0);
fs/ocfs2/dlm/dlmdomain.c
569
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
571
dlm_put(dlm);
fs/ocfs2/dlm/dlmdomain.c
576
static int dlm_send_one_domain_exit(struct dlm_ctxt *dlm, u32 msg_type,
fs/ocfs2/dlm/dlmdomain.c
582
mlog(0, "%s: Sending domain exit message %u to node %u\n", dlm->name,
fs/ocfs2/dlm/dlmdomain.c
586
leave_msg.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmdomain.c
588
status = o2net_send_message(msg_type, dlm->key, &leave_msg,
fs/ocfs2/dlm/dlmdomain.c
593
dlm->name);
fs/ocfs2/dlm/dlmdomain.c
598
static void dlm_begin_exit_domain(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
603
if (dlm->dlm_locking_proto.pv_major == 1 &&
fs/ocfs2/dlm/dlmdomain.c
604
dlm->dlm_locking_proto.pv_minor < 2)
fs/ocfs2/dlm/dlmdomain.c
612
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
614
node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES, node + 1);
fs/ocfs2/dlm/dlmdomain.c
617
if (node == dlm->node_num)
fs/ocfs2/dlm/dlmdomain.c
620
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
621
dlm_send_one_domain_exit(dlm, DLM_BEGIN_EXIT_DOMAIN_MSG, node);
fs/ocfs2/dlm/dlmdomain.c
622
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
624
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
627
static void dlm_leave_domain(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
636
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
638
clear_bit(dlm->node_num, dlm->domain_map);
fs/ocfs2/dlm/dlmdomain.c
639
while ((node = find_next_bit(dlm->domain_map, O2NM_MAX_NODES,
fs/ocfs2/dlm/dlmdomain.c
647
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
651
status = dlm_send_one_domain_exit(dlm, DLM_EXIT_DOMAIN_MSG,
fs/ocfs2/dlm/dlmdomain.c
666
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
670
clear_bit(node, dlm->domain_map);
fs/ocfs2/dlm/dlmdomain.c
672
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
675
void dlm_unregister_domain(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.c
681
BUG_ON(dlm->dlm_state != DLM_CTXT_JOINED);
fs/ocfs2/dlm/dlmdomain.c
682
BUG_ON(!dlm->num_joins);
fs/ocfs2/dlm/dlmdomain.c
684
dlm->num_joins--;
fs/ocfs2/dlm/dlmdomain.c
685
if (!dlm->num_joins) {
fs/ocfs2/dlm/dlmdomain.c
692
dlm->dlm_state = DLM_CTXT_IN_SHUTDOWN;
fs/ocfs2/dlm/dlmdomain.c
698
mlog(0, "shutting down domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
699
dlm_begin_exit_domain(dlm);
fs/ocfs2/dlm/dlmdomain.c
702
dlm_kick_thread(dlm, NULL);
fs/ocfs2/dlm/dlmdomain.c
704
while (dlm_migrate_all_locks(dlm)) {
fs/ocfs2/dlm/dlmdomain.c
707
mlog(0, "%s: more migration to do\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
711
if (!list_empty(&dlm->tracking_list)) {
fs/ocfs2/dlm/dlmdomain.c
714
list_for_each_entry(res, &dlm->tracking_list, tracking)
fs/ocfs2/dlm/dlmdomain.c
718
dlm_mark_domain_leaving(dlm);
fs/ocfs2/dlm/dlmdomain.c
719
dlm_leave_domain(dlm);
fs/ocfs2/dlm/dlmdomain.c
720
printk(KERN_NOTICE "o2dlm: Leaving domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmdomain.c
721
dlm_force_free_mles(dlm);
fs/ocfs2/dlm/dlmdomain.c
722
dlm_complete_dlm_shutdown(dlm);
fs/ocfs2/dlm/dlmdomain.c
724
dlm_put(dlm);
fs/ocfs2/dlm/dlmdomain.c
798
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
823
dlm = __dlm_lookup_domain_full(query->domain, query->name_len);
fs/ocfs2/dlm/dlmdomain.c
824
if (!dlm)
fs/ocfs2/dlm/dlmdomain.c
834
if (test_bit(nodenum, dlm->domain_map)) {
fs/ocfs2/dlm/dlmdomain.c
850
if (dlm->dlm_state != DLM_CTXT_LEAVING) {
fs/ocfs2/dlm/dlmdomain.c
852
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
854
if (dlm->dlm_state == DLM_CTXT_NEW &&
fs/ocfs2/dlm/dlmdomain.c
855
dlm->joining_node == DLM_LOCK_RES_OWNER_UNKNOWN) {
fs/ocfs2/dlm/dlmdomain.c
860
} else if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) {
fs/ocfs2/dlm/dlmdomain.c
863
} else if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) {
fs/ocfs2/dlm/dlmdomain.c
867
} else if (test_bit(bit, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmdomain.c
871
} else if (test_bit(bit, dlm->domain_map)) {
fs/ocfs2/dlm/dlmdomain.c
884
&dlm->dlm_locking_proto,
fs/ocfs2/dlm/dlmdomain.c
888
&dlm->fs_locking_proto,
fs/ocfs2/dlm/dlmdomain.c
895
__dlm_set_joining_node(dlm, query->node_idx);
fs/ocfs2/dlm/dlmdomain.c
899
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
915
struct dlm_ctxt *dlm = NULL;
fs/ocfs2/dlm/dlmdomain.c
923
dlm = __dlm_lookup_domain_full(assert->domain, assert->name_len);
fs/ocfs2/dlm/dlmdomain.c
925
if (dlm) {
fs/ocfs2/dlm/dlmdomain.c
926
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
931
BUG_ON(dlm->joining_node != assert->node_idx);
fs/ocfs2/dlm/dlmdomain.c
933
if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) {
fs/ocfs2/dlm/dlmdomain.c
935
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
940
set_bit(assert->node_idx, dlm->domain_map);
fs/ocfs2/dlm/dlmdomain.c
941
clear_bit(assert->node_idx, dlm->exit_domain_map);
fs/ocfs2/dlm/dlmdomain.c
942
__dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmdomain.c
945
assert->node_idx, dlm->name);
fs/ocfs2/dlm/dlmdomain.c
946
__dlm_print_nodes(dlm);
fs/ocfs2/dlm/dlmdomain.c
949
dlm_hb_event_notify_attached(dlm, assert->node_idx, 1);
fs/ocfs2/dlm/dlmdomain.c
951
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmdomain.c
958
static int dlm_match_regions(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmdomain.c
971
qr->qr_domain, qr->qr_node, dlm->node_num);
fs/ocfs2/dlm/dlmdomain.c
980
qr->qr_domain, dlm->node_num, qr->qr_node);
fs/ocfs2/dlm/dlmdomain.h
14
static inline int dlm_joined(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.h
19
if (dlm->dlm_state == DLM_CTXT_JOINED)
fs/ocfs2/dlm/dlmdomain.h
26
static inline int dlm_shutting_down(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmdomain.h
31
if (dlm->dlm_state == DLM_CTXT_IN_SHUTDOWN)
fs/ocfs2/dlm/dlmdomain.h
38
void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmlock.c
101
static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmlock.c
115
lock->ml.node != dlm->node_num) {
fs/ocfs2/dlm/dlmlock.c
143
"node %u for reco lock\n", dlm->name,
fs/ocfs2/dlm/dlmlock.c
154
"node %u for reco lock\n", dlm->name,
fs/ocfs2/dlm/dlmlock.c
170
dlm_queue_ast(dlm, lock);
fs/ocfs2/dlm/dlmlock.c
172
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmlock.c
174
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmlock.c
176
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmlock.c
197
static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmlock.c
214
if (res->owner == dlm->node_num) {
fs/ocfs2/dlm/dlmlock.c
228
status = dlm_send_remote_lock_request(dlm, res, lock, flags);
fs/ocfs2/dlm/dlmlock.c
242
dlm->name, res->owner);
fs/ocfs2/dlm/dlmlock.c
263
dlm->name, dlm->node_num, res->owner);
fs/ocfs2/dlm/dlmlock.c
269
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmlock.c
283
static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmlock.c
292
create.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmlock.c
299
tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create,
fs/ocfs2/dlm/dlmlock.c
306
"currently.\n", dlm->name, create.namelen,
fs/ocfs2/dlm/dlmlock.c
313
"node %u\n", dlm->name, create.namelen, create.name,
fs/ocfs2/dlm/dlmlock.c
43
static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmlock.c
443
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmlock.c
452
BUG_ON(!dlm);
fs/ocfs2/dlm/dlmlock.c
454
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmlock.c
460
if (!dlm_domain_fully_joined(dlm)) {
fs/ocfs2/dlm/dlmlock.c
463
dlm->name, create->node_idx, namelen, name);
fs/ocfs2/dlm/dlmlock.c
491
res = dlm_lookup_lockres(dlm, name, namelen);
fs/ocfs2/dlm/dlmlock.c
508
status = dlmlock_master(dlm, res, newlock, be32_to_cpu(create->flags));
fs/ocfs2/dlm/dlmlock.c
517
dlm_put(dlm);
fs/ocfs2/dlm/dlmlock.c
540
enum dlm_status dlmlock(struct dlm_ctxt *dlm, int mode,
fs/ocfs2/dlm/dlmlock.c
617
dlm_wait_for_recovery(dlm);
fs/ocfs2/dlm/dlmlock.c
619
if (res->owner == dlm->node_num)
fs/ocfs2/dlm/dlmlock.c
620
status = dlmconvert_master(dlm, res, lock, flags, mode);
fs/ocfs2/dlm/dlmlock.c
622
status = dlmconvert_remote(dlm, res, lock, flags, mode);
fs/ocfs2/dlm/dlmlock.c
650
dlm_get_next_cookie(dlm->node_num, &tmpcookie);
fs/ocfs2/dlm/dlmlock.c
651
lock = dlm_new_lock(mode, dlm->node_num, tmpcookie, lksb);
fs/ocfs2/dlm/dlmlock.c
658
dlm_wait_for_recovery(dlm);
fs/ocfs2/dlm/dlmlock.c
661
res = dlm_get_lock_resource(dlm, name, namelen, flags);
fs/ocfs2/dlm/dlmlock.c
690
if (res->owner == dlm->node_num)
fs/ocfs2/dlm/dlmlock.c
691
status = dlmlock_master(dlm, res, lock, flags);
fs/ocfs2/dlm/dlmlock.c
693
status = dlmlock_remote(dlm, res, lock, flags);
fs/ocfs2/dlm/dlmlock.c
704
dlm_wait_for_node_death(dlm, res->owner,
fs/ocfs2/dlm/dlmlock.c
707
dlm_wait_for_recovery(dlm);
fs/ocfs2/dlm/dlmlock.c
714
dlm_lockres_drop_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmlock.c
717
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmlock.c
718
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
1000
static int dlm_wait_for_lock_mastery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1017
mlog(0, "%s:%.*s: owner is suddenly %u\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
1022
if (res->owner != dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
104
static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1047
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmmaster.c
1048
ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked);
fs/ocfs2/dlm/dlmmaster.c
1052
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmmaster.c
106
static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1062
"rechecking now\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
1068
"for %s:%.*s\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
108
static int dlm_mark_lockres_migrating(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1082
if (dlm->node_num <= bit) {
fs/ocfs2/dlm/dlmmaster.c
1086
mle->master = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
1107
mlog(0, "%s:%.*s: waiting again\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
111
static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1118
m = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
1121
ret = dlm_do_assert_master(dlm, res, mle->vote_map, 0);
fs/ocfs2/dlm/dlmmaster.c
1139
dlm_change_lockres_owner(dlm, res, m);
fs/ocfs2/dlm/dlmmaster.c
1205
static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1252
"now\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
1268
dlm->name,
fs/ocfs2/dlm/dlmmaster.c
1286
set_bit(dlm->node_num, mle->maybe_map);
fs/ocfs2/dlm/dlmmaster.c
1308
struct dlm_ctxt *dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
1313
request.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
1321
ret = o2net_send_message(DLM_MASTER_REQUEST_MSG, dlm->key, &request,
fs/ocfs2/dlm/dlmmaster.c
1357
"reference\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
1403
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
1414
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
1417
if (!dlm_domain_fully_joined(dlm)) {
fs/ocfs2/dlm/dlmmaster.c
1432
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1433
res = __dlm_lookup_lockres(dlm, name, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
1435
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1462
if (res->owner == dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
1463
dlm_lockres_set_refmap_bit(dlm, res, request->node_idx);
fs/ocfs2/dlm/dlmmaster.c
1494
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1495
found = dlm_find_mle(dlm, &tmpmle, name, namelen);
fs/ocfs2/dlm/dlmmaster.c
1507
if (tmpmle->master == dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
1518
if (tmpmle->master == dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
1524
dlm_lockres_set_refmap_bit(dlm, res,
fs/ocfs2/dlm/dlmmaster.c
1535
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1551
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1552
found = dlm_find_mle(dlm, &tmpmle, name, namelen);
fs/ocfs2/dlm/dlmmaster.c
1556
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1557
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1568
dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL, name, namelen);
fs/ocfs2/dlm/dlmmaster.c
1570
__dlm_insert_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
1574
if (tmpmle->master == dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
1590
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1591
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1606
dlm->node_num, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmmaster.c
1608
ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx,
fs/ocfs2/dlm/dlmmaster.c
161
static inline void __dlm_mle_attach_hb_events(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1617
__dlm_lockres_grab_inflight_worker(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
1626
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
164
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1640
static int dlm_do_assert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
166
list_add_tail(&mle->hb_events, &dlm->mle_hb_events);
fs/ocfs2/dlm/dlmmaster.c
1670
assert.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
1675
tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key,
fs/ocfs2/dlm/dlmmaster.c
1680
DLM_ASSERT_MASTER_MSG, dlm->key, to);
fs/ocfs2/dlm/dlmmaster.c
1694
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1695
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1696
if (dlm_find_mle(dlm, &mle, (char *)lockname,
fs/ocfs2/dlm/dlmmaster.c
170
static inline void __dlm_mle_detach_hb_events(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1701
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1702
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1724
dlm_lockres_set_refmap_bit(dlm, res, to);
fs/ocfs2/dlm/dlmmaster.c
1752
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
1762
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
1775
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
178
static inline void dlm_mle_detach_hb_events(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
1781
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1782
if (!dlm_find_mle(dlm, &mle, name, namelen)) {
fs/ocfs2/dlm/dlmmaster.c
181
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1815
dlm->name, namelen, name,
fs/ocfs2/dlm/dlmmaster.c
182
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
1820
dlm->name, namelen, name,
fs/ocfs2/dlm/dlmmaster.c
1823
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1824
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1829
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
183
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1833
res = __dlm_lookup_lockres(dlm, name, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
188
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
189
dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
1904
if (nn != dlm->node_num && nn != assert->node_idx) {
fs/ocfs2/dlm/dlmmaster.c
191
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
192
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1922
dlm->node_num, mle->new_master);
fs/ocfs2/dlm/dlmmaster.c
1925
dlm_change_lockres_owner(dlm, res, mle->new_master);
fs/ocfs2/dlm/dlmmaster.c
1928
dlm_change_lockres_owner(dlm, res, mle->master);
fs/ocfs2/dlm/dlmmaster.c
1939
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1956
"inuse=%d\n", dlm->name, namelen, name,
fs/ocfs2/dlm/dlmmaster.c
1960
__dlm_unlink_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
1961
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
1970
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
1978
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
1988
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
199
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
1996
assert->node_idx, dlm->name, namelen, name);
fs/ocfs2/dlm/dlmmaster.c
200
dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
2003
dlm->name, namelen, name, assert->node_idx);
fs/ocfs2/dlm/dlmmaster.c
2013
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2016
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2017
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2019
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
202
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
203
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2037
int dlm_dispatch_assert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2048
dlm_init_work_item(dlm, item, dlm_assert_master_worker, NULL);
fs/ocfs2/dlm/dlmmaster.c
2059
spin_lock(&dlm->work_lock);
fs/ocfs2/dlm/dlmmaster.c
206
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2060
list_add_tail(&item->list, &dlm->work_list);
fs/ocfs2/dlm/dlmmaster.c
2061
spin_unlock(&dlm->work_lock);
fs/ocfs2/dlm/dlmmaster.c
2063
queue_work(dlm->dlm_worker, &dlm->dispatched_work);
fs/ocfs2/dlm/dlmmaster.c
2069
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
207
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2078
dlm = item->dlm;
fs/ocfs2/dlm/dlmmaster.c
2084
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2085
bitmap_copy(nodemap, dlm->domain_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmmaster.c
2086
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2088
clear_bit(dlm->node_num, nodemap);
fs/ocfs2/dlm/dlmmaster.c
2094
bit = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
2124
res->lockname.len, res->lockname.name, dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
2125
ret = dlm_do_assert_master(dlm, res, nodemap, flags);
fs/ocfs2/dlm/dlmmaster.c
2133
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2136
dlm_lockres_drop_inflight_worker(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
214
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
215
dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
2153
static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2161
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2162
dlm_node_iter_init(dlm->domain_map, &iter);
fs/ocfs2/dlm/dlmmaster.c
2163
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2167
if (nodenum == dlm->node_num)
fs/ocfs2/dlm/dlmmaster.c
2169
ret = dlm_do_master_requery(dlm, res, nodenum, &master);
fs/ocfs2/dlm/dlmmaster.c
217
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
218
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2181
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2182
if (test_bit(master, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmmaster.c
2186
"lock. must wait.\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2190
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2191
mlog(0, "%s: reco lock master is %u\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2203
int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmmaster.c
2215
deref.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
2219
ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key,
fs/ocfs2/dlm/dlmmaster.c
2223
dlm->name, namelen, lockname, ret, res->owner);
fs/ocfs2/dlm/dlmmaster.c
2227
dlm->name, namelen, lockname, res->owner, r);
fs/ocfs2/dlm/dlmmaster.c
2240
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
2252
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
2270
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2271
res = __dlm_lookup_lockres_full(dlm, name, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
2273
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2275
dlm->name, namelen, name);
fs/ocfs2/dlm/dlmmaster.c
2278
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2286
dlm_lockres_clear_refmap_bit(dlm, res, node);
fs/ocfs2/dlm/dlmmaster.c
2294
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2297
"but it is already dropped!\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2312
dlm_init_work_item(dlm, item, dlm_deref_lockres_worker, NULL);
fs/ocfs2/dlm/dlmmaster.c
2316
spin_lock(&dlm->work_lock);
fs/ocfs2/dlm/dlmmaster.c
2317
list_add_tail(&item->list, &dlm->work_list);
fs/ocfs2/dlm/dlmmaster.c
2318
spin_unlock(&dlm->work_lock);
fs/ocfs2/dlm/dlmmaster.c
2320
queue_work(dlm->dlm_worker, &dlm->dispatched_work);
fs/ocfs2/dlm/dlmmaster.c
2326
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
233
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
2334
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
234
dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
2344
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
236
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2362
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2363
res = __dlm_lookup_lockres_full(dlm, name, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
2365
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2367
dlm->name, namelen, name);
fs/ocfs2/dlm/dlmmaster.c
237
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2374
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2376
"but it is already derefed!\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2382
__dlm_do_purge_lockres(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2386
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
239
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2392
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
2396
static void dlm_drop_lockres_ref_done(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
240
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2409
deref.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmmaster.c
2413
ret = o2net_send_message(DLM_DEREF_LOCKRES_DONE, dlm->key,
fs/ocfs2/dlm/dlmmaster.c
2417
" to node %u\n", dlm->name, namelen,
fs/ocfs2/dlm/dlmmaster.c
2422
dlm->name, namelen, lockname, node, r);
fs/ocfs2/dlm/dlmmaster.c
2429
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
2434
dlm = item->dlm;
fs/ocfs2/dlm/dlmmaster.c
2442
dlm_lockres_clear_refmap_bit(dlm, res, node);
fs/ocfs2/dlm/dlmmaster.c
2447
dlm_drop_lockres_ref_done(dlm, res, node);
fs/ocfs2/dlm/dlmmaster.c
2451
dlm->name, res->lockname.len, res->lockname.name, node);
fs/ocfs2/dlm/dlmmaster.c
2452
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2455
"but it is already dropped!\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2470
static int dlm_is_lockres_migratable(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2490
if (res->owner != dlm->node_num)
fs/ocfs2/dlm/dlmmaster.c
2496
if (lock->ml.node != dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
250
struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2502
"%s list\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
2517
mlog(0, "%s: res %.*s, Migratable\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
2528
static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2540
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
2546
mlog(0, "%s: Migrating %.*s to node %u\n", dlm->name, namelen, name,
fs/ocfs2/dlm/dlmmaster.c
255
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2568
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2569
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
257
mle->dlm = dlm;
fs/ocfs2/dlm/dlmmaster.c
2570
ret = dlm_add_migration_mle(dlm, res, mle, &oldmle, name,
fs/ocfs2/dlm/dlmmaster.c
2571
namelen, target, dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
2579
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
2580
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2592
if (dlm_mark_lockres_migrating(dlm, res, target) < 0) {
fs/ocfs2/dlm/dlmmaster.c
2606
dlm_mle_detach_hb_events(dlm, oldmle);
fs/ocfs2/dlm/dlmmaster.c
2612
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
2630
flush_workqueue(dlm->dlm_worker);
fs/ocfs2/dlm/dlmmaster.c
2636
ret = dlm_send_one_lockres(dlm, res, mres, target,
fs/ocfs2/dlm/dlmmaster.c
2643
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
2651
dlm_wait_for_node_death(dlm, target,
fs/ocfs2/dlm/dlmmaster.c
2679
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmmaster.c
2682
if (dlm_is_node_dead(dlm, target)) {
fs/ocfs2/dlm/dlmmaster.c
2685
dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
2689
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
2700
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmmaster.c
2705
dlm_set_lockres_owner(dlm, res, target);
fs/ocfs2/dlm/dlmmaster.c
2707
dlm_remove_nonlocal_locks(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2712
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
2716
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2721
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2730
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
2732
mlog(0, "%s: Migrating %.*s to %u, returns %d\n", dlm->name, namelen,
fs/ocfs2/dlm/dlmmaster.c
2747
int dlm_empty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmmaster.c
2748
__must_hold(&dlm->spinlock)
fs/ocfs2/dlm/dlmmaster.c
2754
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2757
if (dlm_is_lockres_migratable(dlm, res))
fs/ocfs2/dlm/dlmmaster.c
2758
target = dlm_pick_migration_target(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2765
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2767
ret = dlm_migrate_lockres(dlm, res, target);
fs/ocfs2/dlm/dlmmaster.c
2770
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmmaster.c
2772
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2777
int dlm_lock_basts_flushed(struct dlm_ctxt *dlm, struct dlm_lock *lock)
fs/ocfs2/dlm/dlmmaster.c
2780
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmmaster.c
2784
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmmaster.c
2788
static int dlm_migration_can_proceed(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2799
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2800
if (!test_bit(mig_target, dlm->domain_map))
fs/ocfs2/dlm/dlmmaster.c
2802
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2806
static int dlm_lockres_is_dirty(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2817
static int dlm_mark_lockres_migrating(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2824
res->lockname.len, res->lockname.name, dlm->node_num,
fs/ocfs2/dlm/dlmmaster.c
2837
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2845
wait_event(dlm->ast_wq, !dlm_lockres_is_dirty(dlm, res));
fs/ocfs2/dlm/dlmmaster.c
2846
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
2854
ret = wait_event_interruptible_timeout(dlm->migration_wq,
fs/ocfs2/dlm/dlmmaster.c
2855
dlm_migration_can_proceed(dlm, res, target),
fs/ocfs2/dlm/dlmmaster.c
2860
str_no_yes(test_bit(target, dlm->domain_map)));
fs/ocfs2/dlm/dlmmaster.c
2864
str_no_yes(test_bit(target, dlm->domain_map)));
fs/ocfs2/dlm/dlmmaster.c
2866
if (!dlm_migration_can_proceed(dlm, res, target)) {
fs/ocfs2/dlm/dlmmaster.c
2873
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2874
if (!test_bit(target, dlm->domain_map)) {
fs/ocfs2/dlm/dlmmaster.c
2879
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
289
atomic_inc(&dlm->mle_tot_count[mle->type]);
fs/ocfs2/dlm/dlmmaster.c
290
atomic_inc(&dlm->mle_cur_count[mle->type]);
fs/ocfs2/dlm/dlmmaster.c
2909
static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2918
BUG_ON(res->owner == dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
2922
if (lock->ml.node != dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
293
bitmap_copy(mle->node_map, dlm->domain_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmmaster.c
2930
dlm_lockres_clear_refmap_bit(dlm, res,
fs/ocfs2/dlm/dlmmaster.c
294
bitmap_copy(mle->vote_map, dlm->domain_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmmaster.c
2948
if (bit != dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
295
clear_bit(dlm->node_num, mle->vote_map);
fs/ocfs2/dlm/dlmmaster.c
2950
"migrating lockres, clearing\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
2952
dlm_lockres_clear_refmap_bit(dlm, res, bit);
fs/ocfs2/dlm/dlmmaster.c
296
clear_bit(dlm->node_num, mle->node_map);
fs/ocfs2/dlm/dlmmaster.c
2963
static u8 dlm_pick_migration_target(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
2972
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
2979
if (lock->ml.node == dlm->node_num)
fs/ocfs2/dlm/dlmmaster.c
2981
if (test_bit(lock->ml.node, dlm->exit_domain_map))
fs/ocfs2/dlm/dlmmaster.c
299
__dlm_mle_attach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
2995
if (noderef == dlm->node_num)
fs/ocfs2/dlm/dlmmaster.c
2997
if (test_bit(noderef, dlm->exit_domain_map))
fs/ocfs2/dlm/dlmmaster.c
3009
static int dlm_do_migrate_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
302
void __dlm_unlink_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle)
fs/ocfs2/dlm/dlmmaster.c
3033
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3034
skip = (!test_bit(nodenum, dlm->domain_map));
fs/ocfs2/dlm/dlmmaster.c
3035
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
304
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3041
ret = o2net_send_message(DLM_MIGRATE_REQUEST_MSG, dlm->key,
fs/ocfs2/dlm/dlmmaster.c
3046
"MIGRATE_REQUEST to node %u\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
305
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3063
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmmaster.c
3066
dlm_lockres_set_refmap_bit(dlm, res, nodenum);
fs/ocfs2/dlm/dlmmaster.c
3089
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmmaster.c
3097
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmmaster.c
311
void __dlm_insert_mle(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle)
fs/ocfs2/dlm/dlmmaster.c
3113
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3114
res = __dlm_lookup_lockres(dlm, name, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
3132
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3134
ret = dlm_add_migration_mle(dlm, res, mle, &oldmle,
fs/ocfs2/dlm/dlmmaster.c
3142
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3144
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3148
dlm_mle_detach_hb_events(dlm, oldmle);
fs/ocfs2/dlm/dlmmaster.c
315
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3155
dlm_put(dlm);
fs/ocfs2/dlm/dlmmaster.c
3166
static int dlm_add_migration_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
317
bucket = dlm_master_hash(dlm, mle->mnamehash);
fs/ocfs2/dlm/dlmmaster.c
3178
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3179
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3182
found = dlm_find_mle(dlm, oldmle, (char *)name, namelen);
fs/ocfs2/dlm/dlmmaster.c
3187
if (master == dlm->node_num) {
fs/ocfs2/dlm/dlmmaster.c
3211
__dlm_unlink_mle(dlm, tmp);
fs/ocfs2/dlm/dlmmaster.c
3212
__dlm_mle_detach_hb_events(dlm, tmp);
fs/ocfs2/dlm/dlmmaster.c
3218
"migration\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
322
static int dlm_find_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
3227
dlm_init_mle(mle, DLM_MLE_MIGRATION, dlm, res, name, namelen);
fs/ocfs2/dlm/dlmmaster.c
3234
__dlm_insert_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3242
static struct dlm_lock_resource *dlm_reset_mleres_owner(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
3248
res = __dlm_lookup_lockres(dlm, mle->mname, mle->mnamelen,
fs/ocfs2/dlm/dlmmaster.c
3251
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3255
dlm_set_lockres_owner(dlm, res, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmmaster.c
3256
dlm_move_lockres_to_recovery_list(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
3261
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3264
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3266
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3272
static void dlm_clean_migration_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
3275
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3278
__dlm_unlink_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3285
static void dlm_clean_block_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
330
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3309
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3314
void dlm_clean_master_list(struct dlm_ctxt *dlm, u8 dead_node)
fs/ocfs2/dlm/dlmmaster.c
3322
mlog(0, "dlm=%s, dead node=%u\n", dlm->name, dead_node);
fs/ocfs2/dlm/dlmmaster.c
3324
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3327
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3329
bucket = dlm_master_hash(dlm, i);
fs/ocfs2/dlm/dlmmaster.c
333
bucket = dlm_master_hash(dlm, hash);
fs/ocfs2/dlm/dlmmaster.c
3345
dlm_clean_block_mle(dlm, mle, dead_node);
fs/ocfs2/dlm/dlmmaster.c
335
if (!dlm_mle_equal(dlm, tmpmle, name, namelen))
fs/ocfs2/dlm/dlmmaster.c
3368
dlm->name, dead_node,
fs/ocfs2/dlm/dlmmaster.c
3375
dlm_clean_migration_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3378
"%u to %u!\n", dlm->name, dead_node, mle->master,
fs/ocfs2/dlm/dlmmaster.c
3386
res = dlm_reset_mleres_owner(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3395
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3398
int dlm_finish_migration(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmmaster.c
3404
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3405
dlm_node_iter_init(dlm->domain_map, &iter);
fs/ocfs2/dlm/dlmmaster.c
3407
clear_bit(dlm->node_num, iter.node_map);
fs/ocfs2/dlm/dlmmaster.c
3408
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3414
dlm_lockres_set_refmap_bit(dlm, res, old_master);
fs/ocfs2/dlm/dlmmaster.c
3418
ret = dlm_do_migrate_request(dlm, res, old_master,
fs/ocfs2/dlm/dlmmaster.c
3419
dlm->node_num, &iter);
fs/ocfs2/dlm/dlmmaster.c
3429
ret = dlm_do_assert_master(dlm, res, iter.node_map,
fs/ocfs2/dlm/dlmmaster.c
344
void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up)
fs/ocfs2/dlm/dlmmaster.c
3441
ret = dlm_do_assert_master(dlm, res, iter.node_map,
fs/ocfs2/dlm/dlmmaster.c
3453
dlm_set_lockres_owner(dlm, res, dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
3457
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
348
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3496
void dlm_lockres_release_ast(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
350
list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) {
fs/ocfs2/dlm/dlmmaster.c
3512
wake_up(&dlm->migration_wq);
fs/ocfs2/dlm/dlmmaster.c
3515
void dlm_force_free_mles(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmmaster.c
352
dlm_mle_node_up(dlm, mle, NULL, idx);
fs/ocfs2/dlm/dlmmaster.c
3528
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
3529
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3531
BUG_ON(dlm->dlm_state != DLM_CTXT_LEAVING);
fs/ocfs2/dlm/dlmmaster.c
3532
BUG_ON((find_first_bit(dlm->domain_map, O2NM_MAX_NODES) < O2NM_MAX_NODES));
fs/ocfs2/dlm/dlmmaster.c
3535
bucket = dlm_master_hash(dlm, i);
fs/ocfs2/dlm/dlmmaster.c
354
dlm_mle_node_down(dlm, mle, NULL, idx);
fs/ocfs2/dlm/dlmmaster.c
3544
__dlm_unlink_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3545
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
3549
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
3550
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
358
static void dlm_mle_node_down(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
372
static void dlm_mle_node_up(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
38
static void dlm_mle_node_down(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
406
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
409
dlm = mle->dlm;
fs/ocfs2/dlm/dlmmaster.c
411
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
412
assert_spin_locked(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
418
__dlm_unlink_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
42
static void dlm_mle_node_up(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
421
__dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
423
atomic_dec(&dlm->mle_cur_count[mle->type]);
fs/ocfs2/dlm/dlmmaster.c
467
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmmaster.c
470
dlm = res->dlm;
fs/ocfs2/dlm/dlmmaster.c
479
atomic_dec(&dlm->res_cur_count);
fs/ocfs2/dlm/dlmmaster.c
48
static int dlm_do_assert_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
523
static void dlm_init_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
53
static inline int dlm_mle_equal(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
554
res->dlm = dlm;
fs/ocfs2/dlm/dlmmaster.c
558
atomic_inc(&dlm->res_tot_count);
fs/ocfs2/dlm/dlmmaster.c
559
atomic_inc(&dlm->res_cur_count);
fs/ocfs2/dlm/dlmmaster.c
563
dlm_set_lockres_owner(dlm, res, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmmaster.c
570
spin_lock(&dlm->track_lock);
fs/ocfs2/dlm/dlmmaster.c
571
list_add_tail(&res->tracking, &dlm->tracking_list);
fs/ocfs2/dlm/dlmmaster.c
572
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmmaster.c
578
struct dlm_lock_resource *dlm_new_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
58
if (dlm != mle->dlm)
fs/ocfs2/dlm/dlmmaster.c
592
dlm_init_lockres(dlm, res, name, namelen);
fs/ocfs2/dlm/dlmmaster.c
601
void dlm_lockres_set_refmap_bit(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
612
void dlm_lockres_clear_refmap_bit(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
623
static void __dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
628
mlog(0, "%s: res %.*s, inflight++: now %u, %ps()\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
633
void dlm_lockres_grab_inflight_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
637
__dlm_lockres_grab_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
640
void dlm_lockres_drop_inflight_ref(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
649
mlog(0, "%s: res %.*s, inflight--: now %u, %ps()\n", dlm->name,
fs/ocfs2/dlm/dlmmaster.c
656
void __dlm_lockres_grab_inflight_worker(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
662
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmmaster.c
666
static void __dlm_lockres_drop_inflight_worker(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
673
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmmaster.c
677
static void dlm_lockres_drop_inflight_worker(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
681
__dlm_lockres_drop_inflight_worker(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
701
struct dlm_lock_resource * dlm_get_lock_resource(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
723
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
724
tmpres = __dlm_lookup_lockres_full(dlm, lockid, namelen, hash);
fs/ocfs2/dlm/dlmmaster.c
726
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
75
struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
753
BUG_ON(tmpres->owner == dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
763
dlm_lockres_grab_inflight_ref(dlm, tmpres);
fs/ocfs2/dlm/dlmmaster.c
767
spin_lock(&dlm->track_lock);
fs/ocfs2/dlm/dlmmaster.c
775
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmmaster.c
783
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
789
res = dlm_new_lockres(dlm, lockid, namelen);
fs/ocfs2/dlm/dlmmaster.c
801
dlm_change_lockres_owner(dlm, res, dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
802
__dlm_insert_lockres(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
803
dlm_lockres_grab_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
805
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
81
static int dlm_find_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
811
spin_lock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
814
blocked = dlm_find_mle(dlm, &mle, (char *)lockid, namelen);
fs/ocfs2/dlm/dlmmaster.c
831
BUG_ON(mig && mle->master == dlm->node_num);
fs/ocfs2/dlm/dlmmaster.c
835
dlm->name, namelen, lockid,
fs/ocfs2/dlm/dlmmaster.c
837
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
838
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
842
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
856
dlm_init_mle(mle, DLM_MLE_MASTER, dlm, res, NULL, 0);
fs/ocfs2/dlm/dlmmaster.c
857
set_bit(dlm->node_num, mle->maybe_map);
fs/ocfs2/dlm/dlmmaster.c
858
__dlm_insert_mle(dlm, mle);
fs/ocfs2/dlm/dlmmaster.c
864
bit = find_first_bit(dlm->recovery_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmmaster.c
868
dlm->name, namelen, (char *)lockid, bit);
fs/ocfs2/dlm/dlmmaster.c
879
__dlm_insert_lockres(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
882
__dlm_lockres_grab_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmmaster.c
889
spin_unlock(&dlm->master_lock);
fs/ocfs2/dlm/dlmmaster.c
89
static int dlm_wait_for_lock_mastery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
890
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
899
"master $RECOVERY lock now\n", dlm->name);
fs/ocfs2/dlm/dlmmaster.c
900
if (!dlm_pre_master_reco_lockres(dlm, res))
fs/ocfs2/dlm/dlmmaster.c
904
"change\n", dlm->name);
fs/ocfs2/dlm/dlmmaster.c
910
dlm_kick_recovery_thread(dlm);
fs/ocfs2/dlm/dlmmaster.c
912
dlm_wait_for_recovery(dlm);
fs/ocfs2/dlm/dlmmaster.c
914
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
915
bit = find_first_bit(dlm->recovery_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmmaster.c
919
dlm->name, namelen, (char *)lockid, bit);
fs/ocfs2/dlm/dlmmaster.c
923
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmmaster.c
926
dlm_wait_for_node_recovery(dlm, bit, 10000);
fs/ocfs2/dlm/dlmmaster.c
93
static int dlm_restart_lock_mastery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
947
"master is %u, keep going\n", dlm->name, namelen,
fs/ocfs2/dlm/dlmmaster.c
954
ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked);
fs/ocfs2/dlm/dlmmaster.c
958
"request now, blocked=%d\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
963
dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
97
static int dlm_add_migration_mle(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmmaster.c
972
mlog(0, "%s: res %.*s, Mastered by %u\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmmaster.c
978
dlm_mle_detach_hb_events(dlm, mle);
fs/ocfs2/dlm/dlmrecovery.c
100
static inline void dlm_set_reco_dead_node(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
1021
dlm_kick_recovery_thread(dlm);
fs/ocfs2/dlm/dlmrecovery.c
1026
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
103
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1032
static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
1039
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
104
if (dlm->reco.dead_node != dead_node)
fs/ocfs2/dlm/dlmrecovery.c
1040
list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) {
fs/ocfs2/dlm/dlmrecovery.c
1051
dead_node, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
106
dlm->name, dlm->reco.dead_node, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
107
dlm->reco.dead_node = dead_node;
fs/ocfs2/dlm/dlmrecovery.c
1075
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1093
static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
110
static inline void dlm_set_reco_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
1116
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmrecovery.c
1121
ret = o2net_send_message(DLM_MIG_LOCKRES_MSG, dlm->key, mres,
fs/ocfs2/dlm/dlmrecovery.c
1128
"node %u (%s)\n", dlm->name, mres->lockname_len,
fs/ocfs2/dlm/dlmrecovery.c
113
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
115
dlm->name, dlm->reco.new_master, master);
fs/ocfs2/dlm/dlmrecovery.c
116
dlm->reco.new_master = master;
fs/ocfs2/dlm/dlmrecovery.c
119
static inline void __dlm_reset_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
121
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
122
clear_bit(dlm->reco.dead_node, dlm->recovery_map);
fs/ocfs2/dlm/dlmrecovery.c
1229
static void dlm_add_dummy_lock(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
123
dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
1239
dummy.ml.node = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
124
dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
1243
static inline int dlm_is_dummy_lock(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
1258
int dlm_send_one_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmrecovery.c
1296
ret = dlm_send_mig_lockres_msg(dlm, mres, send_to,
fs/ocfs2/dlm/dlmrecovery.c
130
struct dlm_ctxt *dlm =
fs/ocfs2/dlm/dlmrecovery.c
1305
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmrecovery.c
1308
dlm_add_dummy_lock(dlm, mres);
fs/ocfs2/dlm/dlmrecovery.c
1311
ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, res, total_locks);
fs/ocfs2/dlm/dlmrecovery.c
1318
dlm->name, ret);
fs/ocfs2/dlm/dlmrecovery.c
1322
"lockres %.*s\n", dlm->name, send_to,
fs/ocfs2/dlm/dlmrecovery.c
1346
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
1357
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
1360
if (!dlm_joined(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
1363
dlm->name, mres->lockname_len,
fs/ocfs2/dlm/dlmrecovery.c
1365
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
137
spin_lock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
138
list_splice_init(&dlm->work_list, &tmp_list);
fs/ocfs2/dlm/dlmrecovery.c
139
spin_unlock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
1393
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1394
res = __dlm_lookup_lockres_full(dlm, mres->lockname, mres->lockname_len,
fs/ocfs2/dlm/dlmrecovery.c
1403
" ref!\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
1407
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1428
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1435
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1437
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
144
mlog(0, "%s: work thread has %d work items\n", dlm->name, tot);
fs/ocfs2/dlm/dlmrecovery.c
1440
res = dlm_new_lockres(dlm, mres->lockname, mres->lockname_len);
fs/ocfs2/dlm/dlmrecovery.c
1454
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1455
__dlm_insert_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
1456
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1489
dlm_lockres_grab_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
1499
dlm_change_lockres_owner(dlm, res, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
1504
dlm_grab(dlm); /* get an extra ref for the work item */
fs/ocfs2/dlm/dlmrecovery.c
1506
dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf);
fs/ocfs2/dlm/dlmrecovery.c
1510
spin_lock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
1511
list_add_tail(&item->list, &dlm->work_list);
fs/ocfs2/dlm/dlmrecovery.c
1512
spin_unlock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
1513
queue_work(dlm->dlm_worker, &dlm->dispatched_work);
fs/ocfs2/dlm/dlmrecovery.c
152
BUG_ON(item->dlm != dlm);
fs/ocfs2/dlm/dlmrecovery.c
1520
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
1533
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmrecovery.c
1540
dlm = item->dlm;
fs/ocfs2/dlm/dlmrecovery.c
1551
ret = dlm_lockres_master_requery(dlm, res, &real_master);
fs/ocfs2/dlm/dlmrecovery.c
1563
dlm_lockres_drop_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
1574
ret = dlm_process_recovery_data(dlm, res, mres);
fs/ocfs2/dlm/dlmrecovery.c
158
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
1582
ret = dlm_finish_migration(dlm, res, mres->master);
fs/ocfs2/dlm/dlmrecovery.c
1599
static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
1632
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1633
dlm_node_iter_init(dlm->domain_map, &iter);
fs/ocfs2/dlm/dlmrecovery.c
1634
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1638
if (nodenum == dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
1640
ret = dlm_do_master_requery(dlm, res, nodenum, real_master);
fs/ocfs2/dlm/dlmrecovery.c
1657
int dlm_do_master_requery(struct dlm_ctxt *dlm, struct dlm_lock_resource *res,
fs/ocfs2/dlm/dlmrecovery.c
1665
req.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
167
void dlm_kick_recovery_thread(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
1670
ret = o2net_send_message(DLM_MASTER_REQUERY_MSG, dlm->key,
fs/ocfs2/dlm/dlmrecovery.c
1675
dlm->key, nodenum);
fs/ocfs2/dlm/dlmrecovery.c
1698
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
1706
if (!dlm_grab(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
1714
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1715
res = __dlm_lookup_lockres(dlm, req->name, req->namelen, hash);
fs/ocfs2/dlm/dlmrecovery.c
1719
if (master == dlm->node_num) {
fs/ocfs2/dlm/dlmrecovery.c
1720
int ret = dlm_dispatch_assert_master(dlm, res,
fs/ocfs2/dlm/dlmrecovery.c
1726
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1727
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
1732
__dlm_lockres_grab_inflight_worker(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
1741
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
1744
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
175
wake_up(&dlm->dlm_reco_thread_wq);
fs/ocfs2/dlm/dlmrecovery.c
1785
static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
179
int dlm_launch_recovery_thread(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
1804
if (dlm_is_dummy_lock(dlm, ml, &from)) {
fs/ocfs2/dlm/dlmrecovery.c
1808
dlm->name, mres->lockname_len, mres->lockname,
fs/ocfs2/dlm/dlmrecovery.c
1811
dlm_lockres_set_refmap_bit(dlm, res, from);
fs/ocfs2/dlm/dlmrecovery.c
1825
if (ml->node == dlm->node_num) {
fs/ocfs2/dlm/dlmrecovery.c
183
dlm->dlm_reco_thread_task = kthread_run(dlm_recovery_thread, dlm,
fs/ocfs2/dlm/dlmrecovery.c
184
"dlm_reco-%s", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
185
if (IS_ERR(dlm->dlm_reco_thread_task)) {
fs/ocfs2/dlm/dlmrecovery.c
186
mlog_errno(PTR_ERR(dlm->dlm_reco_thread_task));
fs/ocfs2/dlm/dlmrecovery.c
187
dlm->dlm_reco_thread_task = NULL;
fs/ocfs2/dlm/dlmrecovery.c
194
void dlm_complete_recovery_thread(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
1953
"lvb! type=%d\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
196
if (dlm->dlm_reco_thread_task) {
fs/ocfs2/dlm/dlmrecovery.c
198
kthread_stop(dlm->dlm_reco_thread_task);
fs/ocfs2/dlm/dlmrecovery.c
199
dlm->dlm_reco_thread_task = NULL;
fs/ocfs2/dlm/dlmrecovery.c
1993
"exists on this lockres!\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2022
"setting refmap bit\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2024
dlm_lockres_set_refmap_bit(dlm, res, ml->node);
fs/ocfs2/dlm/dlmrecovery.c
2033
dlm_lockres_drop_inflight_ref(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2042
void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
2049
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2055
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmrecovery.c
2061
list_add_tail(&res->recovering, &dlm->reco.resources);
fs/ocfs2/dlm/dlmrecovery.c
2126
static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
2133
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2135
list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) {
fs/ocfs2/dlm/dlmrecovery.c
2138
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmrecovery.c
2144
dlm_change_lockres_owner(dlm, res, new_master);
fs/ocfs2/dlm/dlmrecovery.c
2147
__dlm_dirty_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2159
bucket = dlm_lockres_hash(dlm, i);
fs/ocfs2/dlm/dlmrecovery.c
2172
res->owner != dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
2183
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmrecovery.c
2186
dlm_change_lockres_owner(dlm, res, new_master);
fs/ocfs2/dlm/dlmrecovery.c
2189
__dlm_dirty_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2207
static void dlm_revalidate_lvb(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
2216
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2219
if (res->owner == dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
2226
search_node = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
2250
static void dlm_free_dead_locks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
2260
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
228
static void dlm_print_reco_node_status(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
2297
"dropping ref from lockres\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2301
"but ref was not set\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2306
dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2309
"no locks and had not purged before dying\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2311
dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2315
__dlm_dirty_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2318
static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
fs/ocfs2/dlm/dlmrecovery.c
2328
dlm_clean_master_list(dlm, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
234
dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
fs/ocfs2/dlm/dlmrecovery.c
2345
bucket = dlm_lockres_hash(dlm, i);
fs/ocfs2/dlm/dlmrecovery.c
235
dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive",
fs/ocfs2/dlm/dlmrecovery.c
2357
dead_node, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
236
dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2371
__dlm_do_purge_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2376
} else if (res->owner == dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
2377
dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
238
list_for_each_entry(ndata, &dlm->reco.node_data, list) {
fs/ocfs2/dlm/dlmrecovery.c
2383
dlm_revalidate_lvb(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2390
dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmrecovery.c
2393
__dlm_do_purge_lockres(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2399
dlm_move_lockres_to_recovery_list(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2400
} else if (res->owner == dlm->node_num) {
fs/ocfs2/dlm/dlmrecovery.c
2401
dlm_free_dead_locks(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2402
__dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmrecovery.c
2407
dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmrecovery.c
2409
dlm_lockres_clear_refmap_bit(dlm, res, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2418
static void __dlm_hb_node_down(struct dlm_ctxt *dlm, int idx)
fs/ocfs2/dlm/dlmrecovery.c
2420
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2422
if (dlm->reco.new_master == idx) {
fs/ocfs2/dlm/dlmrecovery.c
2424
dlm->name, idx);
fs/ocfs2/dlm/dlmrecovery.c
2425
if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) {
fs/ocfs2/dlm/dlmrecovery.c
2430
"finalize1 state, clearing\n", dlm->name, idx);
fs/ocfs2/dlm/dlmrecovery.c
2431
dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE;
fs/ocfs2/dlm/dlmrecovery.c
2432
__dlm_reset_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2437
if (dlm->joining_node == idx) {
fs/ocfs2/dlm/dlmrecovery.c
2439
__dlm_set_joining_node(dlm, DLM_LOCK_RES_OWNER_UNKNOWN);
fs/ocfs2/dlm/dlmrecovery.c
2443
if (!test_bit(idx, dlm->live_nodes_map)) {
fs/ocfs2/dlm/dlmrecovery.c
2446
dlm->name, idx);
fs/ocfs2/dlm/dlmrecovery.c
2451
if (!test_bit(idx, dlm->domain_map)) {
fs/ocfs2/dlm/dlmrecovery.c
2458
clear_bit(idx, dlm->live_nodes_map);
fs/ocfs2/dlm/dlmrecovery.c
2461
if (!test_bit(idx, dlm->recovery_map))
fs/ocfs2/dlm/dlmrecovery.c
2462
dlm_do_local_recovery_cleanup(dlm, idx);
fs/ocfs2/dlm/dlmrecovery.c
2465
dlm_hb_event_notify_attached(dlm, idx, 0);
fs/ocfs2/dlm/dlmrecovery.c
2468
clear_bit(idx, dlm->domain_map);
fs/ocfs2/dlm/dlmrecovery.c
2469
clear_bit(idx, dlm->exit_domain_map);
fs/ocfs2/dlm/dlmrecovery.c
2472
wake_up(&dlm->migration_wq);
fs/ocfs2/dlm/dlmrecovery.c
2474
set_bit(idx, dlm->recovery_map);
fs/ocfs2/dlm/dlmrecovery.c
2479
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
2481
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
2488
if (test_bit(idx, dlm->domain_map))
fs/ocfs2/dlm/dlmrecovery.c
2489
dlm_fire_domain_eviction_callbacks(dlm, idx);
fs/ocfs2/dlm/dlmrecovery.c
2491
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2492
__dlm_hb_node_down(dlm, idx);
fs/ocfs2/dlm/dlmrecovery.c
2493
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2495
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2500
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
2502
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
2505
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2506
set_bit(idx, dlm->live_nodes_map);
fs/ocfs2/dlm/dlmrecovery.c
2509
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2511
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2516
struct dlm_ctxt *dlm = astdata;
fs/ocfs2/dlm/dlmrecovery.c
2518
dlm->node_num, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
2522
struct dlm_ctxt *dlm = astdata;
fs/ocfs2/dlm/dlmrecovery.c
2524
dlm->node_num, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
2543
static int dlm_pick_recovery_master(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
2550
dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2554
ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY,
fs/ocfs2/dlm/dlmrecovery.c
2556
dlm_reco_ast, dlm, dlm_reco_bast);
fs/ocfs2/dlm/dlmrecovery.c
2559
dlm->name, ret, lksb.status);
fs/ocfs2/dlm/dlmrecovery.c
2563
dlm->name, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2567
if (dlm_reco_master_ready(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
2569
"do the recovery\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2570
dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2576
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2577
if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
2580
"node got recovered already\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
2581
if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
2584
dlm->name, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2588
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2595
"begin_reco now\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2596
dlm->reco.dead_node, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2597
status = dlm_send_begin_reco_message(dlm,
fs/ocfs2/dlm/dlmrecovery.c
2598
dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2603
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2604
dlm_set_reco_master(dlm, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2605
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2610
ret = dlmunlock(dlm, &lksb, 0, dlm_reco_unlock_ast, dlm);
fs/ocfs2/dlm/dlmrecovery.c
2613
ret = dlmunlock(dlm, &lksb, LKM_CANCEL, dlm_reco_unlock_ast, dlm);
fs/ocfs2/dlm/dlmrecovery.c
2626
dlm->name, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2630
wait_event_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
2631
dlm_reco_master_ready(dlm),
fs/ocfs2/dlm/dlmrecovery.c
2633
if (!dlm_reco_master_ready(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
2635
dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
2640
dlm->name, dlm->reco.new_master, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2644
dlm->name, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
2651
"lksb.status=%s\n", dlm->name, dlm_errname(ret),
fs/ocfs2/dlm/dlmrecovery.c
2653
res = dlm_lookup_lockres(dlm, DLM_RECOVERY_LOCK_NAME,
fs/ocfs2/dlm/dlmrecovery.c
2667
static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node)
fs/ocfs2/dlm/dlmrecovery.c
267
dlm->name, ndata->node_num, st);
fs/ocfs2/dlm/dlmrecovery.c
2675
mlog(0, "%s: dead node is %u\n", dlm->name, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2677
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2678
dlm_node_iter_init(dlm->domain_map, &iter);
fs/ocfs2/dlm/dlmrecovery.c
2679
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2684
br.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
269
list_for_each_entry(res, &dlm->reco.resources, recovering) {
fs/ocfs2/dlm/dlmrecovery.c
2694
if (nodenum == dlm->node_num) {
fs/ocfs2/dlm/dlmrecovery.c
2701
ret = o2net_send_message(DLM_BEGIN_RECO_MSG, dlm->key,
fs/ocfs2/dlm/dlmrecovery.c
271
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmrecovery.c
2710
"begin reco msg (%d)\n", dlm->name, nodenum, ret);
fs/ocfs2/dlm/dlmrecovery.c
2722
"to complete, backoff for a bit\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2734
"returned %d\n", dlm->name, nodenum, ret);
fs/ocfs2/dlm/dlmrecovery.c
2735
res = dlm_lookup_lockres(dlm, DLM_RECOVERY_LOCK_NAME,
fs/ocfs2/dlm/dlmrecovery.c
2756
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
2760
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
2763
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2764
if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) {
fs/ocfs2/dlm/dlmrecovery.c
2767
dlm->name, br->node_idx, br->dead_node,
fs/ocfs2/dlm/dlmrecovery.c
2768
dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2769
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2770
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2773
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2776
dlm->name, br->node_idx, br->dead_node,
fs/ocfs2/dlm/dlmrecovery.c
2777
dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2779
dlm_fire_domain_eviction_callbacks(dlm, br->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2781
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2782
if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
2783
if (test_bit(dlm->reco.new_master, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmrecovery.c
2785
"to %u\n", dlm->name, dlm->reco.new_master,
fs/ocfs2/dlm/dlmrecovery.c
2789
"to %u\n", dlm->name, dlm->reco.new_master,
fs/ocfs2/dlm/dlmrecovery.c
2794
if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
2796
"node %u changing it to %u\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
2797
dlm->reco.dead_node, br->node_idx, br->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2799
dlm_set_reco_master(dlm, br->node_idx);
fs/ocfs2/dlm/dlmrecovery.c
280
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
2800
dlm_set_reco_dead_node(dlm, br->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2801
if (!test_bit(br->dead_node, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmrecovery.c
2805
if (!test_bit(br->dead_node, dlm->domain_map) ||
fs/ocfs2/dlm/dlmrecovery.c
2806
!test_bit(br->dead_node, dlm->live_nodes_map))
fs/ocfs2/dlm/dlmrecovery.c
2812
set_bit(br->dead_node, dlm->domain_map);
fs/ocfs2/dlm/dlmrecovery.c
2813
set_bit(br->dead_node, dlm->live_nodes_map);
fs/ocfs2/dlm/dlmrecovery.c
2814
__dlm_hb_node_down(dlm, br->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2816
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2818
dlm_kick_recovery_thread(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2821
dlm->name, br->node_idx, br->dead_node,
fs/ocfs2/dlm/dlmrecovery.c
2822
dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2824
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2829
static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
283
mlog(0, "dlm thread running for %s...\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
2839
"stage %d\n", dlm->name, dlm->reco.dead_node, stage);
fs/ocfs2/dlm/dlmrecovery.c
2841
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2842
dlm_node_iter_init(dlm->domain_map, &iter);
fs/ocfs2/dlm/dlmrecovery.c
2843
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2847
fr.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
2848
fr.dead_node = dlm->reco.dead_node;
fs/ocfs2/dlm/dlmrecovery.c
2853
if (nodenum == dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
2855
ret = o2net_send_message(DLM_FINALIZE_RECO_MSG, dlm->key,
fs/ocfs2/dlm/dlmrecovery.c
286
if (dlm_domain_fully_joined(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
2862
dlm->key, nodenum);
fs/ocfs2/dlm/dlmrecovery.c
287
status = dlm_do_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2888
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
2893
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
2900
"node %u (%u:%u)\n", dlm->name, fr->node_idx, stage,
fs/ocfs2/dlm/dlmrecovery.c
2901
fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2903
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2905
if (dlm->reco.new_master != fr->node_idx) {
fs/ocfs2/dlm/dlmrecovery.c
2908
fr->node_idx, dlm->reco.new_master, fr->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2911
if (dlm->reco.dead_node != fr->dead_node) {
fs/ocfs2/dlm/dlmrecovery.c
2914
fr->node_idx, fr->dead_node, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2920
dlm_finish_local_lockres_recovery(dlm, fr->dead_node, fr->node_idx);
fs/ocfs2/dlm/dlmrecovery.c
2921
if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) {
fs/ocfs2/dlm/dlmrecovery.c
2925
dlm->name, fr->node_idx, fr->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2926
dlm_print_reco_node_status(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2929
dlm->reco.state |= DLM_RECO_STATE_FINALIZE;
fs/ocfs2/dlm/dlmrecovery.c
2930
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2933
if (!(dlm->reco.state & DLM_RECO_STATE_FINALIZE)) {
fs/ocfs2/dlm/dlmrecovery.c
2937
dlm->name, fr->node_idx, fr->dead_node);
fs/ocfs2/dlm/dlmrecovery.c
2938
dlm_print_reco_node_status(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2941
dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE;
fs/ocfs2/dlm/dlmrecovery.c
2942
__dlm_reset_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2943
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
2944
dlm_kick_recovery_thread(dlm);
fs/ocfs2/dlm/dlmrecovery.c
2949
dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
2951
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
296
wait_event_interruptible_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
306
static int dlm_reco_master_ready(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
309
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
310
ready = (dlm->reco.new_master != O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
311
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
317
int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node)
fs/ocfs2/dlm/dlmrecovery.c
320
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
321
dead = !test_bit(node, dlm->domain_map);
fs/ocfs2/dlm/dlmrecovery.c
322
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
328
static int dlm_is_node_recovered(struct dlm_ctxt *dlm, u8 node)
fs/ocfs2/dlm/dlmrecovery.c
331
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
332
recovered = !test_bit(node, dlm->recovery_map);
fs/ocfs2/dlm/dlmrecovery.c
333
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
338
void dlm_wait_for_node_death(struct dlm_ctxt *dlm, u8 node, int timeout)
fs/ocfs2/dlm/dlmrecovery.c
340
if (dlm_is_node_dead(dlm, node))
fs/ocfs2/dlm/dlmrecovery.c
344
"domain %s\n", node, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
347
wait_event_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
348
dlm_is_node_dead(dlm, node),
fs/ocfs2/dlm/dlmrecovery.c
351
wait_event(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
352
dlm_is_node_dead(dlm, node));
fs/ocfs2/dlm/dlmrecovery.c
355
void dlm_wait_for_node_recovery(struct dlm_ctxt *dlm, u8 node, int timeout)
fs/ocfs2/dlm/dlmrecovery.c
357
if (dlm_is_node_recovered(dlm, node))
fs/ocfs2/dlm/dlmrecovery.c
361
"domain %s\n", node, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
364
wait_event_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
365
dlm_is_node_recovered(dlm, node),
fs/ocfs2/dlm/dlmrecovery.c
368
wait_event(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
369
dlm_is_node_recovered(dlm, node));
fs/ocfs2/dlm/dlmrecovery.c
378
static int dlm_in_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
38
static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node);
fs/ocfs2/dlm/dlmrecovery.c
381
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
382
in_recovery = !!(dlm->reco.state & DLM_RECO_STATE_ACTIVE);
fs/ocfs2/dlm/dlmrecovery.c
383
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
388
void dlm_wait_for_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
390
if (dlm_in_recovery(dlm)) {
fs/ocfs2/dlm/dlmrecovery.c
393
dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
fs/ocfs2/dlm/dlmrecovery.c
394
dlm->reco.state, dlm->reco.new_master,
fs/ocfs2/dlm/dlmrecovery.c
395
dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
397
wait_event(dlm->reco.event, !dlm_in_recovery(dlm));
fs/ocfs2/dlm/dlmrecovery.c
400
static void dlm_begin_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
402
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
403
BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE);
fs/ocfs2/dlm/dlmrecovery.c
405
dlm->name, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
406
dlm->reco.state |= DLM_RECO_STATE_ACTIVE;
fs/ocfs2/dlm/dlmrecovery.c
409
static void dlm_end_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
41
static int dlm_do_recovery(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmrecovery.c
411
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
412
BUG_ON(!(dlm->reco.state & DLM_RECO_STATE_ACTIVE));
fs/ocfs2/dlm/dlmrecovery.c
413
dlm->reco.state &= ~DLM_RECO_STATE_ACTIVE;
fs/ocfs2/dlm/dlmrecovery.c
414
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
415
printk(KERN_NOTICE "o2dlm: End recovery on domain %s\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
416
wake_up(&dlm->reco.event);
fs/ocfs2/dlm/dlmrecovery.c
419
static void dlm_print_recovery_master(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
422
"dead node %u in domain %s\n", dlm->reco.new_master,
fs/ocfs2/dlm/dlmrecovery.c
423
(dlm->node_num == dlm->reco.new_master ? "me" : "he"),
fs/ocfs2/dlm/dlmrecovery.c
424
dlm->reco.dead_node, dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
427
static int dlm_do_recovery(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
43
static int dlm_pick_recovery_master(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmrecovery.c
432
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
434
if (dlm->migrate_done) {
fs/ocfs2/dlm/dlmrecovery.c
436
"lock resources\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
437
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
44
static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node);
fs/ocfs2/dlm/dlmrecovery.c
442
if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM &&
fs/ocfs2/dlm/dlmrecovery.c
443
test_bit(dlm->reco.new_master, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmrecovery.c
445
dlm->reco.new_master, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
447
dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
45
static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node);
fs/ocfs2/dlm/dlmrecovery.c
451
if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
454
bit = find_first_bit(dlm->recovery_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmrecovery.c
456
dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
458
dlm_set_reco_dead_node(dlm, bit);
fs/ocfs2/dlm/dlmrecovery.c
459
} else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) {
fs/ocfs2/dlm/dlmrecovery.c
46
static int dlm_request_all_locks(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
462
dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
463
dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
fs/ocfs2/dlm/dlmrecovery.c
466
if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
467
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
472
dlm->name, task_pid_nr(dlm->dlm_reco_thread_task),
fs/ocfs2/dlm/dlmrecovery.c
473
dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
477
dlm_begin_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
479
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
48
static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmrecovery.c
481
if (dlm->reco.new_master == dlm->node_num)
fs/ocfs2/dlm/dlmrecovery.c
484
if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
489
ret = dlm_pick_recovery_master(dlm);
fs/ocfs2/dlm/dlmrecovery.c
497
dlm_print_recovery_master(dlm);
fs/ocfs2/dlm/dlmrecovery.c
502
dlm_end_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
508
dlm_print_recovery_master(dlm);
fs/ocfs2/dlm/dlmrecovery.c
510
status = dlm_remaster_locks(dlm, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
514
"retrying.\n", dlm->name, status, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
521
dlm->name, dlm->reco.dead_node, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
522
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
523
__dlm_reset_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
524
dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE;
fs/ocfs2/dlm/dlmrecovery.c
525
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
527
dlm_end_recovery(dlm);
fs/ocfs2/dlm/dlmrecovery.c
533
static int dlm_remaster_locks(struct dlm_ctxt *dlm, u8 dead_node)
fs/ocfs2/dlm/dlmrecovery.c
544
status = dlm_init_recovery_area(dlm, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
547
"retrying\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
55
static int dlm_send_mig_lockres_msg(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
554
list_for_each_entry(ndata, &dlm->reco.node_data, list) {
fs/ocfs2/dlm/dlmrecovery.c
558
mlog(0, "%s: Requesting lock info from node %u\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
561
if (ndata->node_num == dlm->node_num) {
fs/ocfs2/dlm/dlmrecovery.c
567
status = dlm_request_all_locks(dlm, ndata->node_num,
fs/ocfs2/dlm/dlmrecovery.c
577
wait_event_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
578
dlm_is_node_dead(dlm,
fs/ocfs2/dlm/dlmrecovery.c
583
str_yes_no(dlm_is_node_dead(dlm, ndata->node_num)));
fs/ocfs2/dlm/dlmrecovery.c
589
dlm->name, ndata->node_num,
fs/ocfs2/dlm/dlmrecovery.c
60
static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
63
static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmrecovery.c
630
mlog(0, "%s: Done requesting all lock info\n", dlm->name);
fs/ocfs2/dlm/dlmrecovery.c
64
static int dlm_send_all_done_msg(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
640
list_for_each_entry(ndata, &dlm->reco.node_data, list) {
fs/ocfs2/dlm/dlmrecovery.c
66
static int dlm_send_begin_reco_message(struct dlm_ctxt *dlm, u8 dead_node);
fs/ocfs2/dlm/dlmrecovery.c
660
dlm->name, ndata->node_num,
fs/ocfs2/dlm/dlmrecovery.c
667
dlm->name, ndata->node_num);
fs/ocfs2/dlm/dlmrecovery.c
67
static void dlm_move_reco_locks_to_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
671
dlm->name, ndata->node_num);
fs/ocfs2/dlm/dlmrecovery.c
686
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
687
dlm->reco.state |= DLM_RECO_STATE_FINALIZE;
fs/ocfs2/dlm/dlmrecovery.c
688
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
69
static void dlm_finish_local_lockres_recovery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
694
ret = dlm_send_finalize_reco_message(dlm);
fs/ocfs2/dlm/dlmrecovery.c
698
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
699
dlm_finish_local_lockres_recovery(dlm, dead_node,
fs/ocfs2/dlm/dlmrecovery.c
700
dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
701
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
705
"dead=%u, this=%u, new=%u\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
706
jiffies, dlm->reco.dead_node,
fs/ocfs2/dlm/dlmrecovery.c
707
dlm->node_num, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
711
dlm_kick_thread(dlm, NULL);
fs/ocfs2/dlm/dlmrecovery.c
716
wait_event_interruptible_timeout(dlm->dlm_reco_thread_wq,
fs/ocfs2/dlm/dlmrecovery.c
723
dlm_destroy_recovery_area(dlm);
fs/ocfs2/dlm/dlmrecovery.c
728
static int dlm_init_recovery_area(struct dlm_ctxt *dlm, u8 dead_node)
fs/ocfs2/dlm/dlmrecovery.c
733
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
734
bitmap_copy(dlm->reco.node_map, dlm->domain_map, O2NM_MAX_NODES);
fs/ocfs2/dlm/dlmrecovery.c
737
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
740
num = find_next_bit (dlm->reco.node_map, O2NM_MAX_NODES, num);
fs/ocfs2/dlm/dlmrecovery.c
748
dlm_destroy_recovery_area(dlm);
fs/ocfs2/dlm/dlmrecovery.c
754
list_add_tail(&ndata->list, &dlm->reco.node_data);
fs/ocfs2/dlm/dlmrecovery.c
762
static void dlm_destroy_recovery_area(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmrecovery.c
768
list_splice_init(&dlm->reco.node_data, &tmplist);
fs/ocfs2/dlm/dlmrecovery.c
77
static int dlm_lockres_master_requery(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmrecovery.c
777
static int dlm_request_all_locks(struct dlm_ctxt *dlm, u8 request_from,
fs/ocfs2/dlm/dlmrecovery.c
791
lr.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
795
ret = o2net_send_message(DLM_LOCK_REQUEST_MSG, dlm->key,
fs/ocfs2/dlm/dlmrecovery.c
801
"to recover dead node %u\n", dlm->name, ret,
fs/ocfs2/dlm/dlmrecovery.c
814
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
819
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
822
if (lr->dead_node != dlm->reco.dead_node) {
fs/ocfs2/dlm/dlmrecovery.c
824
"dead_node is %u\n", dlm->name, lr->node_idx,
fs/ocfs2/dlm/dlmrecovery.c
825
lr->dead_node, dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
826
dlm_print_reco_node_status(dlm);
fs/ocfs2/dlm/dlmrecovery.c
828
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
831
BUG_ON(lr->dead_node != dlm->reco.dead_node);
fs/ocfs2/dlm/dlmrecovery.c
835
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
843
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
848
dlm_grab(dlm); /* get an extra ref for the work item */
fs/ocfs2/dlm/dlmrecovery.c
849
dlm_init_work_item(dlm, item, dlm_request_all_locks_worker, buf);
fs/ocfs2/dlm/dlmrecovery.c
852
spin_lock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
853
list_add_tail(&item->list, &dlm->work_list);
fs/ocfs2/dlm/dlmrecovery.c
854
spin_unlock(&dlm->work_lock);
fs/ocfs2/dlm/dlmrecovery.c
855
queue_work(dlm->dlm_worker, &dlm->dispatched_work);
fs/ocfs2/dlm/dlmrecovery.c
857
dlm_put(dlm);
fs/ocfs2/dlm/dlmrecovery.c
865
struct dlm_ctxt *dlm;
fs/ocfs2/dlm/dlmrecovery.c
871
dlm = item->dlm;
fs/ocfs2/dlm/dlmrecovery.c
877
dlm->name, dead_node, reco_master);
fs/ocfs2/dlm/dlmrecovery.c
879
if (dead_node != dlm->reco.dead_node ||
fs/ocfs2/dlm/dlmrecovery.c
880
reco_master != dlm->reco.new_master) {
fs/ocfs2/dlm/dlmrecovery.c
883
if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) {
fs/ocfs2/dlm/dlmrecovery.c
886
" current=(dead=%u,mas=%u)\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
888
dlm->reco.dead_node, dlm->reco.new_master);
fs/ocfs2/dlm/dlmrecovery.c
892
dlm->name, dlm->reco.dead_node,
fs/ocfs2/dlm/dlmrecovery.c
893
dlm->reco.new_master, dead_node, reco_master);
fs/ocfs2/dlm/dlmrecovery.c
904
dlm_move_reco_locks_to_list(dlm, &resources, dead_node);
fs/ocfs2/dlm/dlmrecovery.c
911
ret = dlm_send_one_lockres(dlm, res, mres, reco_master,
fs/ocfs2/dlm/dlmrecovery.c
915
"recovery state for dead node %u, ret=%d\n", dlm->name,
fs/ocfs2/dlm/dlmrecovery.c
923
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
924
list_splice_init(&resources, &dlm->reco.resources);
fs/ocfs2/dlm/dlmrecovery.c
925
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmrecovery.c
928
ret = dlm_send_all_done_msg(dlm, dead_node, reco_master);
fs/ocfs2/dlm/dlmrecovery.c
932
dlm->name, reco_master, dead_node, ret);
fs/ocfs2/dlm/dlmrecovery.c
940
static int dlm_send_all_done_msg(struct dlm_ctxt *dlm, u8 dead_node, u8 send_to)
fs/ocfs2/dlm/dlmrecovery.c
946
done_msg.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmrecovery.c
952
ret = o2net_send_message(DLM_RECO_DATA_DONE_MSG, dlm->key, &done_msg,
fs/ocfs2/dlm/dlmrecovery.c
956
"to recover dead node %u\n", dlm->name, ret, send_to,
fs/ocfs2/dlm/dlmrecovery.c
970
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmrecovery.c
975
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmrecovery.c
980
dlm->reco.dead_node, done->node_idx, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
982
mlog_bug_on_msg((done->dead_node != dlm->reco.dead_node),
fs/ocfs2/dlm/dlmrecovery.c
985
dlm->reco.dead_node, done->node_idx, dlm->node_num);
fs/ocfs2/dlm/dlmrecovery.c
988
list_for_each_entry(ndata, &dlm->reco.node_data, list) {
fs/ocfs2/dlm/dlmthread.c
106
void __dlm_lockres_calc_usage(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
109
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
115
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
119
list_add_tail(&res->purge, &dlm->purge_list);
fs/ocfs2/dlm/dlmthread.c
120
dlm->purge_count++;
fs/ocfs2/dlm/dlmthread.c
124
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
128
dlm->purge_count--;
fs/ocfs2/dlm/dlmthread.c
132
void dlm_lockres_calc_usage(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
135
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
138
__dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmthread.c
141
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
150
void __dlm_do_purge_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
153
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
158
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
161
dlm->purge_count--;
fs/ocfs2/dlm/dlmthread.c
166
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
171
__dlm_unhash_lockres(dlm, res);
fs/ocfs2/dlm/dlmthread.c
173
spin_lock(&dlm->track_lock);
fs/ocfs2/dlm/dlmthread.c
178
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
181
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmthread.c
190
static void dlm_purge_lockres(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
196
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
199
master = (res->owner == dlm->node_num);
fs/ocfs2/dlm/dlmthread.c
201
mlog(0, "%s: Purging res %.*s, master %d\n", dlm->name,
fs/ocfs2/dlm/dlmthread.c
207
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
215
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
223
ret = dlm_drop_lockres_ref(dlm, res);
fs/ocfs2/dlm/dlmthread.c
228
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
234
dlm->name, res->lockname.len, res->lockname.name, master);
fs/ocfs2/dlm/dlmthread.c
237
dlm->purge_count--;
fs/ocfs2/dlm/dlmthread.c
242
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
249
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
254
__dlm_unhash_lockres(dlm, res);
fs/ocfs2/dlm/dlmthread.c
256
spin_lock(&dlm->track_lock);
fs/ocfs2/dlm/dlmthread.c
264
spin_unlock(&dlm->track_lock);
fs/ocfs2/dlm/dlmthread.c
276
static void dlm_run_purge_list(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
283
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
284
run_max = dlm->purge_count;
fs/ocfs2/dlm/dlmthread.c
286
while(run_max && !list_empty(&dlm->purge_list)) {
fs/ocfs2/dlm/dlmthread.c
289
lockres = list_entry(dlm->purge_list.next,
fs/ocfs2/dlm/dlmthread.c
318
dlm->name, lockres->lockname.len,
fs/ocfs2/dlm/dlmthread.c
322
list_move_tail(&lockres->purge, &dlm->purge_list);
fs/ocfs2/dlm/dlmthread.c
329
dlm_purge_lockres(dlm, lockres);
fs/ocfs2/dlm/dlmthread.c
334
cond_resched_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
337
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
340
static void dlm_shuffle_lists(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmthread.c
352
assert_spin_locked(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
361
mlog(0, "%s: res %.*s has locks on the convert queue\n", dlm->name,
fs/ocfs2/dlm/dlmthread.c
367
dlm->name, res->lockname.len, res->lockname.name);
fs/ocfs2/dlm/dlmthread.c
379
__dlm_queue_bast(dlm, lock);
fs/ocfs2/dlm/dlmthread.c
38
static void dlm_flush_asts(struct dlm_ctxt *dlm);
fs/ocfs2/dlm/dlmthread.c
396
__dlm_queue_bast(dlm, lock);
fs/ocfs2/dlm/dlmthread.c
410
"%d => %d, node %u\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
427
__dlm_queue_ast(dlm, target);
fs/ocfs2/dlm/dlmthread.c
444
__dlm_queue_bast(dlm, lock);
fs/ocfs2/dlm/dlmthread.c
458
__dlm_queue_bast(dlm, lock);
fs/ocfs2/dlm/dlmthread.c
472
"node %u\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
487
__dlm_queue_ast(dlm, target);
fs/ocfs2/dlm/dlmthread.c
497
void dlm_kick_thread(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmthread.c
500
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
502
__dlm_dirty_lockres(dlm, res);
fs/ocfs2/dlm/dlmthread.c
504
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
506
wake_up(&dlm->dlm_thread_wq);
fs/ocfs2/dlm/dlmthread.c
509
void __dlm_dirty_lockres(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
fs/ocfs2/dlm/dlmthread.c
511
assert_spin_locked(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
515
if (res->owner == dlm->node_num) {
fs/ocfs2/dlm/dlmthread.c
523
list_add_tail(&res->dirty, &dlm->dirty_list);
fs/ocfs2/dlm/dlmthread.c
528
mlog(0, "%s: res %.*s\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
534
int dlm_launch_thread(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmthread.c
538
dlm->dlm_thread_task = kthread_run(dlm_thread, dlm, "dlm-%s",
fs/ocfs2/dlm/dlmthread.c
539
dlm->name);
fs/ocfs2/dlm/dlmthread.c
540
if (IS_ERR(dlm->dlm_thread_task)) {
fs/ocfs2/dlm/dlmthread.c
541
mlog_errno(PTR_ERR(dlm->dlm_thread_task));
fs/ocfs2/dlm/dlmthread.c
542
dlm->dlm_thread_task = NULL;
fs/ocfs2/dlm/dlmthread.c
549
void dlm_complete_thread(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmthread.c
551
if (dlm->dlm_thread_task) {
fs/ocfs2/dlm/dlmthread.c
553
kthread_stop(dlm->dlm_thread_task);
fs/ocfs2/dlm/dlmthread.c
554
dlm->dlm_thread_task = NULL;
fs/ocfs2/dlm/dlmthread.c
558
static int dlm_dirty_list_empty(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmthread.c
562
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
563
empty = list_empty(&dlm->dirty_list);
fs/ocfs2/dlm/dlmthread.c
564
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
569
static void dlm_flush_asts(struct dlm_ctxt *dlm)
fs/ocfs2/dlm/dlmthread.c
576
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
577
while (!list_empty(&dlm->pending_asts)) {
fs/ocfs2/dlm/dlmthread.c
578
lock = list_entry(dlm->pending_asts.next,
fs/ocfs2/dlm/dlmthread.c
584
"node %u\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
595
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
597
if (lock->ml.node != dlm->node_num) {
fs/ocfs2/dlm/dlmthread.c
598
ret = dlm_do_remote_ast(dlm, res, lock);
fs/ocfs2/dlm/dlmthread.c
602
dlm_do_local_ast(dlm, res, lock);
fs/ocfs2/dlm/dlmthread.c
604
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
610
"one\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
618
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmthread.c
621
while (!list_empty(&dlm->pending_basts)) {
fs/ocfs2/dlm/dlmthread.c
622
lock = list_entry(dlm->pending_basts.next,
fs/ocfs2/dlm/dlmthread.c
640
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
644
dlm->name, res->lockname.len, res->lockname.name,
fs/ocfs2/dlm/dlmthread.c
649
if (lock->ml.node != dlm->node_num) {
fs/ocfs2/dlm/dlmthread.c
650
ret = dlm_send_proxy_bast(dlm, res, lock, hi);
fs/ocfs2/dlm/dlmthread.c
654
dlm_do_local_bast(dlm, res, lock, hi);
fs/ocfs2/dlm/dlmthread.c
656
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
662
"one\n", dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmthread.c
670
dlm_lockres_release_ast(dlm, res);
fs/ocfs2/dlm/dlmthread.c
672
wake_up(&dlm->ast_wq);
fs/ocfs2/dlm/dlmthread.c
673
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
683
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmthread.c
686
mlog(0, "dlm thread running for %s...\n", dlm->name);
fs/ocfs2/dlm/dlmthread.c
695
dlm_run_purge_list(dlm, dlm_shutting_down(dlm));
fs/ocfs2/dlm/dlmthread.c
704
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
705
while (!list_empty(&dlm->dirty_list)) {
fs/ocfs2/dlm/dlmthread.c
707
res = list_entry(dlm->dirty_list.next,
fs/ocfs2/dlm/dlmthread.c
719
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
726
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
728
if (res->owner != dlm->node_num) {
fs/ocfs2/dlm/dlmthread.c
731
" dirty %d\n", dlm->name,
fs/ocfs2/dlm/dlmthread.c
737
BUG_ON(res->owner != dlm->node_num);
fs/ocfs2/dlm/dlmthread.c
749
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
751
"shuffle, state %d\n", dlm->name,
fs/ocfs2/dlm/dlmthread.c
764
dlm_shuffle_lists(dlm, res);
fs/ocfs2/dlm/dlmthread.c
767
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmthread.c
769
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmthread.c
773
spin_lock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
778
__dlm_dirty_lockres(dlm, res);
fs/ocfs2/dlm/dlmthread.c
787
dlm->name);
fs/ocfs2/dlm/dlmthread.c
792
spin_unlock(&dlm->spinlock);
fs/ocfs2/dlm/dlmthread.c
793
dlm_flush_asts(dlm);
fs/ocfs2/dlm/dlmthread.c
801
wait_event_interruptible_timeout(dlm->dlm_thread_wq,
fs/ocfs2/dlm/dlmthread.c
802
!dlm_dirty_list_empty(dlm) ||
fs/ocfs2/dlm/dlmunlock.c
100
BUG_ON(res->owner == dlm->node_num);
fs/ocfs2/dlm/dlmunlock.c
102
spin_lock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmunlock.c
106
spin_unlock(&dlm->ast_lock);
fs/ocfs2/dlm/dlmunlock.c
140
status = dlm_get_cancel_actions(dlm, res, lock, lksb, &actions);
fs/ocfs2/dlm/dlmunlock.c
142
status = dlm_get_unlock_actions(dlm, res, lock, lksb, &actions);
fs/ocfs2/dlm/dlmunlock.c
166
status = dlm_send_remote_unlock_request(dlm, res, lock, lksb,
fs/ocfs2/dlm/dlmunlock.c
185
dlm->name, res->lockname.len,
fs/ocfs2/dlm/dlmunlock.c
281
static inline enum dlm_status dlmunlock_master(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
288
return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 1);
fs/ocfs2/dlm/dlmunlock.c
291
static inline enum dlm_status dlmunlock_remote(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
297
return dlmunlock_common(dlm, res, lock, lksb, flags, call_ast, 0);
fs/ocfs2/dlm/dlmunlock.c
307
static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
323
if (owner == dlm->node_num) {
fs/ocfs2/dlm/dlmunlock.c
328
"migration, re-evaluate now\n", dlm->name,
fs/ocfs2/dlm/dlmunlock.c
334
unlock.node_idx = dlm->node_num;
fs/ocfs2/dlm/dlmunlock.c
350
tmpret = o2net_send_message_vec(DLM_UNLOCK_LOCK_MSG, dlm->key,
fs/ocfs2/dlm/dlmunlock.c
359
"node %u\n", tmpret, DLM_UNLOCK_LOCK_MSG, dlm->key, owner);
fs/ocfs2/dlm/dlmunlock.c
368
if (dlm_is_node_dead(dlm, owner))
fs/ocfs2/dlm/dlmunlock.c
392
struct dlm_ctxt *dlm = data;
fs/ocfs2/dlm/dlmunlock.c
41
static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
421
if (!dlm_grab(dlm))
fs/ocfs2/dlm/dlmunlock.c
424
mlog_bug_on_msg(!dlm_domain_fully_joined(dlm),
fs/ocfs2/dlm/dlmunlock.c
425
"Domain %s not fully joined!\n", dlm->name);
fs/ocfs2/dlm/dlmunlock.c
429
res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen);
fs/ocfs2/dlm/dlmunlock.c
455
if (res->owner != dlm->node_num) {
fs/ocfs2/dlm/dlmunlock.c
46
static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
496
status = dlmunlock_master(dlm, res, lock, lksb, flags, &ignore);
fs/ocfs2/dlm/dlmunlock.c
503
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmunlock.c
504
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmunlock.c
519
dlm_put(dlm);
fs/ocfs2/dlm/dlmunlock.c
52
static enum dlm_status dlm_send_remote_unlock_request(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
525
static enum dlm_status dlm_get_cancel_actions(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
557
static enum dlm_status dlm_get_unlock_actions(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
584
enum dlm_status dlmunlock(struct dlm_ctxt *dlm, struct dlm_lockstatus *lksb,
fs/ocfs2/dlm/dlmunlock.c
625
is_master = (res->owner == dlm->node_num);
fs/ocfs2/dlm/dlmunlock.c
631
status = dlmunlock_master(dlm, res, lock, lksb, flags,
fs/ocfs2/dlm/dlmunlock.c
636
status = dlmunlock_remote(dlm, res, lock, lksb, flags,
fs/ocfs2/dlm/dlmunlock.c
671
dlm_kick_thread(dlm, NULL);
fs/ocfs2/dlm/dlmunlock.c
672
wait_event(dlm->ast_wq,
fs/ocfs2/dlm/dlmunlock.c
673
dlm_lock_basts_flushed(dlm, lock));
fs/ocfs2/dlm/dlmunlock.c
683
dlm_kick_thread(dlm, res);
fs/ocfs2/dlm/dlmunlock.c
687
dlm_lockres_calc_usage(dlm, res);
fs/ocfs2/dlm/dlmunlock.c
81
static enum dlm_status dlmunlock_common(struct dlm_ctxt *dlm,
fs/ocfs2/dlm/dlmunlock.c
98
BUG_ON(res->owner != dlm->node_num);
fs/ocfs2/stack_o2cb.c
322
struct dlm_ctxt *dlm;
fs/ocfs2/stack_o2cb.c
355
dlm = dlm_register_domain(conn->cc_name, dlm_key, &fs_version);
fs/ocfs2/stack_o2cb.c
356
if (IS_ERR(dlm)) {
fs/ocfs2/stack_o2cb.c
357
rc = PTR_ERR(dlm);
fs/ocfs2/stack_o2cb.c
364
conn->cc_lockspace = dlm;
fs/ocfs2/stack_o2cb.c
366
dlm_register_eviction_cb(dlm, &priv->op_eviction_cb);
fs/ocfs2/stack_o2cb.c
378
struct dlm_ctxt *dlm = conn->cc_lockspace;
fs/ocfs2/stack_o2cb.c
385
dlm_unregister_domain(dlm);
include/trace/events/dlm.h
3
#define TRACE_SYSTEM dlm