aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dlm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/dlm.h')
-rw-r--r--include/linux/dlm.h62
1 files changed, 1 insertions, 61 deletions
diff --git a/include/linux/dlm.h b/include/linux/dlm.h
index 520152411cd1..1d47dcce11e1 100644
--- a/include/linux/dlm.h
+++ b/include/linux/dlm.h
@@ -10,68 +10,11 @@
10** 10**
11******************************************************************************* 11*******************************************************************************
12******************************************************************************/ 12******************************************************************************/
13
14#ifndef __DLM_DOT_H__ 13#ifndef __DLM_DOT_H__
15#define __DLM_DOT_H__ 14#define __DLM_DOT_H__
16 15
17/* 16#include <uapi/linux/dlm.h>
18 * Interface to Distributed Lock Manager (DLM)
19 * routines and structures to use DLM lockspaces
20 */
21
22/* Lock levels and flags are here */
23#include <linux/dlmconstants.h>
24#include <linux/types.h>
25
26typedef void dlm_lockspace_t;
27
28/*
29 * Lock status block
30 *
31 * Use this structure to specify the contents of the lock value block. For a
32 * conversion request, this structure is used to specify the lock ID of the
33 * lock. DLM writes the status of the lock request and the lock ID assigned
34 * to the request in the lock status block.
35 *
36 * sb_lkid: the returned lock ID. It is set on new (non-conversion) requests.
37 * It is available when dlm_lock returns.
38 *
39 * sb_lvbptr: saves or returns the contents of the lock's LVB according to rules
40 * shown for the DLM_LKF_VALBLK flag.
41 *
42 * sb_flags: DLM_SBF_DEMOTED is returned if in the process of promoting a lock,
43 * it was first demoted to NL to avoid conversion deadlock.
44 * DLM_SBF_VALNOTVALID is returned if the resource's LVB is marked invalid.
45 *
46 * sb_status: the returned status of the lock request set prior to AST
47 * execution. Possible return values:
48 *
49 * 0 if lock request was successful
50 * -EAGAIN if request would block and is flagged DLM_LKF_NOQUEUE
51 * -DLM_EUNLOCK if unlock request was successful
52 * -DLM_ECANCEL if a cancel completed successfully
53 * -EDEADLK if a deadlock was detected
54 * -ETIMEDOUT if the lock request was canceled due to a timeout
55 */
56
57#define DLM_SBF_DEMOTED 0x01
58#define DLM_SBF_VALNOTVALID 0x02
59#define DLM_SBF_ALTMODE 0x04
60 17
61struct dlm_lksb {
62 int sb_status;
63 __u32 sb_lkid;
64 char sb_flags;
65 char * sb_lvbptr;
66};
67
68/* dlm_new_lockspace() flags */
69
70#define DLM_LSFL_TIMEWARN 0x00000002
71#define DLM_LSFL_FS 0x00000004
72#define DLM_LSFL_NEWEXCL 0x00000008
73
74#ifdef __KERNEL__
75 18
76struct dlm_slot { 19struct dlm_slot {
77 int nodeid; /* 1 to MAX_INT */ 20 int nodeid; /* 1 to MAX_INT */
@@ -226,7 +169,4 @@ int dlm_unlock(dlm_lockspace_t *lockspace,
226 struct dlm_lksb *lksb, 169 struct dlm_lksb *lksb,
227 void *astarg); 170 void *astarg);
228 171
229#endif /* __KERNEL__ */
230
231#endif /* __DLM_DOT_H__ */ 172#endif /* __DLM_DOT_H__ */
232