Go to the documentation of this file.
14 #ifndef __DLM_INTERNAL_DOT_H__
15 #define __DLM_INTERNAL_DOT_H__
21 #include <linux/module.h>
22 #include <linux/slab.h>
23 #include <linux/sched.h>
24 #include <linux/types.h>
25 #include <linux/ctype.h>
28 #include <linux/list.h>
29 #include <linux/errno.h>
30 #include <linux/random.h>
32 #include <linux/socket.h>
36 #include <linux/kernel.h>
42 #include <asm/uaccess.h>
44 #include <linux/dlm.h>
51 #define DLM_INBUF_LEN 148
64 #define log_print(fmt, args...) \
65 printk(KERN_ERR "dlm: "fmt"\n" , ##args)
66 #define log_error(ls, fmt, args...) \
67 printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args)
69 #define log_debug(ls, fmt, args...) \
71 if (dlm_config.ci_log_debug) \
72 printk(KERN_DEBUG "dlm: %s: " fmt "\n", \
73 (ls)->ls_name , ##args); \
76 #define log_limit(ls, fmt, args...) \
78 if (dlm_config.ci_log_debug) \
79 printk_ratelimited(KERN_DEBUG "dlm: %s: " fmt "\n", \
80 (ls)->ls_name , ##args); \
83 #define DLM_ASSERT(x, do) \
87 printk(KERN_ERR "\nDLM: Assertion failed on line %d of file %s\n" \
88 "DLM: assertion: \"%s\"\n" \
89 "DLM: time = %lu\n", \
90 __LINE__, __FILE__, #x, jiffies); \
94 panic("DLM: Record message above and reboot.\n"); \
188 #define DLM_LKSTS_WAITING 1
189 #define DLM_LKSTS_GRANTED 2
190 #define DLM_LKSTS_CONVERT 3
194 #define DLM_IFL_MSTCPY 0x00010000
195 #define DLM_IFL_RESEND 0x00020000
196 #define DLM_IFL_DEAD 0x00040000
197 #define DLM_IFL_OVERLAP_UNLOCK 0x00080000
198 #define DLM_IFL_OVERLAP_CANCEL 0x00100000
199 #define DLM_IFL_ENDOFLIFE 0x00200000
200 #define DLM_IFL_WATCH_TIMEWARN 0x00400000
201 #define DLM_IFL_TIMEOUT_CANCEL 0x00800000
202 #define DLM_IFL_DEADLOCK_CANCEL 0x01000000
203 #define DLM_IFL_STUB_MS 0x02000000
204 #define DLM_IFL_USER 0x00000001
205 #define DLM_IFL_ORPHAN 0x00000002
207 #define DLM_CALLBACKS_SIZE 6
209 #define DLM_CB_CAST 0x00000001
210 #define DLM_CB_BAST 0x00000002
211 #define DLM_CB_SKIP 0x00000004
316 #define DLM_LU_RECOVER_DIR 1
317 #define DLM_LU_RECOVER_MASTER 2
321 #define DLM_LU_MATCH 1
326 #define R_REQUEST 0x00000001
327 #define R_RECEIVE_REQUEST 0x00000002
328 #define R_RECEIVE_RECOVER 0x00000004
360 #define DLM_HEADER_MAJOR 0x00030000
361 #define DLM_HEADER_MINOR 0x00000001
363 #define DLM_HEADER_SLOTS 0x00000001
378 #define DLM_MSG_REQUEST 1
379 #define DLM_MSG_CONVERT 2
380 #define DLM_MSG_UNLOCK 3
381 #define DLM_MSG_CANCEL 4
382 #define DLM_MSG_REQUEST_REPLY 5
383 #define DLM_MSG_CONVERT_REPLY 6
384 #define DLM_MSG_UNLOCK_REPLY 7
385 #define DLM_MSG_CANCEL_REPLY 8
386 #define DLM_MSG_GRANT 9
387 #define DLM_MSG_BAST 10
388 #define DLM_MSG_LOOKUP 11
389 #define DLM_MSG_REMOVE 12
390 #define DLM_MSG_LOOKUP_REPLY 13
391 #define DLM_MSG_PURGE 14
417 #define DLM_RS_NODES 0x00000001
418 #define DLM_RS_NODES_ALL 0x00000002
419 #define DLM_RS_DIR 0x00000004
420 #define DLM_RS_DIR_ALL 0x00000008
421 #define DLM_RS_LOCKS 0x00000010
422 #define DLM_RS_LOCKS_ALL 0x00000020
423 #define DLM_RS_DONE 0x00000040
424 #define DLM_RS_DONE_ALL 0x00000080
426 #define DLM_RCOM_STATUS 1
427 #define DLM_RCOM_NAMES 2
428 #define DLM_RCOM_LOOKUP 3
429 #define DLM_RCOM_LOCK 4
430 #define DLM_RCOM_STATUS_REPLY 5
431 #define DLM_RCOM_NAMES_REPLY 6
432 #define DLM_RCOM_LOOKUP_REPLY 7
433 #define DLM_RCOM_LOCK_REPLY 8
451 #define DLM_RSF_NEED_SLOTS 0x00000001
506 #define DLM_REMOVE_NAMES_MAX 8
642 #define LSFL_RECOVER_STOP 0
643 #define LSFL_RECOVER_DOWN 1
644 #define LSFL_RECOVER_LOCK 2
645 #define LSFL_RECOVER_WORK 3
646 #define LSFL_RUNNING 4
648 #define LSFL_RCOM_READY 5
649 #define LSFL_RCOM_WAIT 6
650 #define LSFL_UEVENT_WAIT 7
651 #define LSFL_TIMEWARN 8
652 #define LSFL_CB_DELAY 9
653 #define LSFL_NODIR 10
672 #define DLM_PROC_FLAGS_CLOSING 1
673 #define DLM_PROC_FLAGS_COMPAT 2
689 static inline int dlm_locking_stopped(
struct dlm_ls *ls)
694 static inline int dlm_recovery_stopped(
struct dlm_ls *ls)
699 static inline int dlm_no_directory(
struct dlm_ls *ls)
710 #ifdef CONFIG_DLM_DEBUG