0001
0002
0003
0004
0005
0006
0007
0008 #ifndef DLMDOMAIN_H
0009 #define DLMDOMAIN_H
0010
0011 extern spinlock_t dlm_domain_lock;
0012 extern struct list_head dlm_domains;
0013
0014 static inline int dlm_joined(struct dlm_ctxt *dlm)
0015 {
0016 int ret = 0;
0017
0018 spin_lock(&dlm_domain_lock);
0019 if (dlm->dlm_state == DLM_CTXT_JOINED)
0020 ret = 1;
0021 spin_unlock(&dlm_domain_lock);
0022
0023 return ret;
0024 }
0025
0026 static inline int dlm_shutting_down(struct dlm_ctxt *dlm)
0027 {
0028 int ret = 0;
0029
0030 spin_lock(&dlm_domain_lock);
0031 if (dlm->dlm_state == DLM_CTXT_IN_SHUTDOWN)
0032 ret = 1;
0033 spin_unlock(&dlm_domain_lock);
0034
0035 return ret;
0036 }
0037
0038 void dlm_fire_domain_eviction_callbacks(struct dlm_ctxt *dlm,
0039 int node_num);
0040
0041 #endif