Blame view
include/linux/dlm_device.h
2.48 KB
e7fd41792 [DLM] The core of... |
1 2 3 4 |
/****************************************************************************** ******************************************************************************* ** ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. |
d7db923ea [DLM] dlm_device ... |
5 |
** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. |
e7fd41792 [DLM] The core of... |
6 7 8 9 10 11 12 |
** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions ** of the GNU General Public License v.2. ** ******************************************************************************* ******************************************************************************/ |
c1c76743e dlm: linux/{dlm,d... |
13 14 |
#ifndef _LINUX_DLM_DEVICE_H #define _LINUX_DLM_DEVICE_H |
e7fd41792 [DLM] The core of... |
15 16 17 |
/* This is the device interface for dlm, most users will use a library * interface. */ |
c1c76743e dlm: linux/{dlm,d... |
18 19 |
#include <linux/dlm.h> #include <linux/types.h> |
e7fd41792 [DLM] The core of... |
20 21 22 |
#define DLM_USER_LVB_LEN 32 /* Version of the device interface */ |
d7db923ea [DLM] dlm_device ... |
23 24 |
#define DLM_DEVICE_VERSION_MAJOR 6 #define DLM_DEVICE_VERSION_MINOR 0 |
0f8e0d9a3 dlm: allow multip... |
25 |
#define DLM_DEVICE_VERSION_PATCH 1 |
e7fd41792 [DLM] The core of... |
26 27 28 29 |
/* struct passed to the lock write */ struct dlm_lock_params { __u8 mode; |
22da645fd [DLM] compat patch |
30 |
__u8 namelen; |
d7db923ea [DLM] dlm_device ... |
31 32 |
__u16 unused; __u32 flags; |
e7fd41792 [DLM] The core of... |
33 34 |
__u32 lkid; __u32 parent; |
d7db923ea [DLM] dlm_device ... |
35 36 37 |
__u64 xid; __u64 timeout; void __user *castparam; |
e7fd41792 [DLM] The core of... |
38 39 |
void __user *castaddr; void __user *bastparam; |
d7db923ea [DLM] dlm_device ... |
40 |
void __user *bastaddr; |
e7fd41792 [DLM] The core of... |
41 42 |
struct dlm_lksb __user *lksb; char lvb[DLM_USER_LVB_LEN]; |
22da645fd [DLM] compat patch |
43 |
char name[0]; |
e7fd41792 [DLM] The core of... |
44 45 46 47 48 |
}; struct dlm_lspace_params { __u32 flags; __u32 minor; |
22da645fd [DLM] compat patch |
49 |
char name[0]; |
e7fd41792 [DLM] The core of... |
50 |
}; |
72c2be776 [DLM] interface f... |
51 52 53 54 |
struct dlm_purge_params { __u32 nodeid; __u32 pid; }; |
e7fd41792 [DLM] The core of... |
55 56 57 |
struct dlm_write_request { __u32 version[3]; __u8 cmd; |
22da645fd [DLM] compat patch |
58 59 |
__u8 is64bit; __u8 unused[2]; |
e7fd41792 [DLM] The core of... |
60 61 62 63 |
union { struct dlm_lock_params lock; struct dlm_lspace_params lspace; |
72c2be776 [DLM] interface f... |
64 |
struct dlm_purge_params purge; |
e7fd41792 [DLM] The core of... |
65 66 |
} i; }; |
d7db923ea [DLM] dlm_device ... |
67 68 69 |
struct dlm_device_version { __u32 version[3]; }; |
e7fd41792 [DLM] The core of... |
70 71 |
/* struct read from the "device" fd, consists mainly of userspace pointers for the library to use */ |
d7db923ea [DLM] dlm_device ... |
72 |
|
e7fd41792 [DLM] The core of... |
73 |
struct dlm_lock_result { |
d7db923ea [DLM] dlm_device ... |
74 |
__u32 version[3]; |
e7fd41792 [DLM] The core of... |
75 76 77 78 79 80 |
__u32 length; void __user * user_astaddr; void __user * user_astparam; struct dlm_lksb __user * user_lksb; struct dlm_lksb lksb; __u8 bast_mode; |
22da645fd [DLM] compat patch |
81 |
__u8 unused[3]; |
e7fd41792 [DLM] The core of... |
82 83 84 85 86 87 88 89 90 91 |
/* Offsets may be zero if no data is present */ __u32 lvb_offset; }; /* Commands passed to the device */ #define DLM_USER_LOCK 1 #define DLM_USER_UNLOCK 2 #define DLM_USER_QUERY 3 #define DLM_USER_CREATE_LOCKSPACE 4 #define DLM_USER_REMOVE_LOCKSPACE 5 |
72c2be776 [DLM] interface f... |
92 |
#define DLM_USER_PURGE 6 |
8b4021fa4 [DLM] canceling d... |
93 |
#define DLM_USER_DEADLOCK 7 |
e7fd41792 [DLM] The core of... |
94 |
|
e7fd41792 [DLM] The core of... |
95 96 97 |
/* Lockspace flags */ #define DLM_USER_LSFLG_AUTOFREE 1 #define DLM_USER_LSFLG_FORCEFREE 2 |
c1c76743e dlm: linux/{dlm,d... |
98 |
#endif |