aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/ceph_fs.h
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-05-12 17:48:20 -0400
committerSage Weil <sage@newdream.net>2010-05-17 18:25:38 -0400
commitca9d93a292e327bbcddd8f8ea4197397e35097d4 (patch)
tree30e81e64079228bca30b4b32b5ad4df68eca6dc2 /fs/ceph/ceph_fs.h
parent1a75627896fe67d0124eab6fe2f83dd40188c40c (diff)
ceph: resync headers with userland
Notable changes include pool op defines and types, FLOCK feature bit, and new CMPXATTR osd ops. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/ceph_fs.h')
-rw-r--r--fs/ceph/ceph_fs.h50
1 files changed, 47 insertions, 3 deletions
diff --git a/fs/ceph/ceph_fs.h b/fs/ceph/ceph_fs.h
index 8b194c6ef7d3..715e39ce517a 100644
--- a/fs/ceph/ceph_fs.h
+++ b/fs/ceph/ceph_fs.h
@@ -19,7 +19,7 @@
19 * Ceph release version 19 * Ceph release version
20 */ 20 */
21#define CEPH_VERSION_MAJOR 0 21#define CEPH_VERSION_MAJOR 0
22#define CEPH_VERSION_MINOR 19 22#define CEPH_VERSION_MINOR 20
23#define CEPH_VERSION_PATCH 0 23#define CEPH_VERSION_PATCH 0
24 24
25#define _CEPH_STRINGIFY(x) #x 25#define _CEPH_STRINGIFY(x) #x
@@ -36,7 +36,7 @@
36 * client-facing protocol. 36 * client-facing protocol.
37 */ 37 */
38#define CEPH_OSD_PROTOCOL 8 /* cluster internal */ 38#define CEPH_OSD_PROTOCOL 8 /* cluster internal */
39#define CEPH_MDS_PROTOCOL 9 /* cluster internal */ 39#define CEPH_MDS_PROTOCOL 12 /* cluster internal */
40#define CEPH_MON_PROTOCOL 5 /* cluster internal */ 40#define CEPH_MON_PROTOCOL 5 /* cluster internal */
41#define CEPH_OSDC_PROTOCOL 24 /* server/client */ 41#define CEPH_OSDC_PROTOCOL 24 /* server/client */
42#define CEPH_MDSC_PROTOCOL 32 /* server/client */ 42#define CEPH_MDSC_PROTOCOL 32 /* server/client */
@@ -55,10 +55,11 @@
55 */ 55 */
56#define CEPH_FEATURE_UID 1 56#define CEPH_FEATURE_UID 1
57#define CEPH_FEATURE_NOSRCADDR 2 57#define CEPH_FEATURE_NOSRCADDR 2
58#define CEPH_FEATURE_FLOCK 4
58 59
59#define CEPH_FEATURE_SUPPORTED_MON CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR 60#define CEPH_FEATURE_SUPPORTED_MON CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR
60#define CEPH_FEATURE_REQUIRED_MON CEPH_FEATURE_UID 61#define CEPH_FEATURE_REQUIRED_MON CEPH_FEATURE_UID
61#define CEPH_FEATURE_SUPPORTED_MDS CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR 62#define CEPH_FEATURE_SUPPORTED_MDS CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR|CEPH_FEATURE_FLOCK
62#define CEPH_FEATURE_REQUIRED_MDS CEPH_FEATURE_UID 63#define CEPH_FEATURE_REQUIRED_MDS CEPH_FEATURE_UID
63#define CEPH_FEATURE_SUPPORTED_OSD CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR 64#define CEPH_FEATURE_SUPPORTED_OSD CEPH_FEATURE_UID|CEPH_FEATURE_NOSRCADDR
64#define CEPH_FEATURE_REQUIRED_OSD CEPH_FEATURE_UID 65#define CEPH_FEATURE_REQUIRED_OSD CEPH_FEATURE_UID
@@ -100,6 +101,8 @@ int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
100#define CEPH_AUTH_NONE 0x1 101#define CEPH_AUTH_NONE 0x1
101#define CEPH_AUTH_CEPHX 0x2 102#define CEPH_AUTH_CEPHX 0x2
102 103
104#define CEPH_AUTH_UID_DEFAULT ((__u64) -1)
105
103 106
104/********************************************* 107/*********************************************
105 * message layer 108 * message layer
@@ -137,11 +140,27 @@ int ceph_file_layout_is_valid(const struct ceph_file_layout *layout);
137#define CEPH_MSG_CLIENT_SNAP 0x312 140#define CEPH_MSG_CLIENT_SNAP 0x312
138#define CEPH_MSG_CLIENT_CAPRELEASE 0x313 141#define CEPH_MSG_CLIENT_CAPRELEASE 0x313
139 142
143/* pool ops */
144#define CEPH_MSG_POOLOP_REPLY 48
145#define CEPH_MSG_POOLOP 49
146
147
140/* osd */ 148/* osd */
141#define CEPH_MSG_OSD_MAP 41 149#define CEPH_MSG_OSD_MAP 41
142#define CEPH_MSG_OSD_OP 42 150#define CEPH_MSG_OSD_OP 42
143#define CEPH_MSG_OSD_OPREPLY 43 151#define CEPH_MSG_OSD_OPREPLY 43
144 152
153/* pool operations */
154enum {
155 POOL_OP_CREATE = 0x01,
156 POOL_OP_DELETE = 0x02,
157 POOL_OP_AUID_CHANGE = 0x03,
158 POOL_OP_CREATE_SNAP = 0x11,
159 POOL_OP_DELETE_SNAP = 0x12,
160 POOL_OP_CREATE_UNMANAGED_SNAP = 0x21,
161 POOL_OP_DELETE_UNMANAGED_SNAP = 0x22,
162};
163
145struct ceph_mon_request_header { 164struct ceph_mon_request_header {
146 __le64 have_version; 165 __le64 have_version;
147 __le16 session_mon; 166 __le16 session_mon;
@@ -164,6 +183,31 @@ struct ceph_mon_statfs_reply {
164 struct ceph_statfs st; 183 struct ceph_statfs st;
165} __attribute__ ((packed)); 184} __attribute__ ((packed));
166 185
186const char *ceph_pool_op_name(int op);
187
188struct ceph_mon_poolop {
189 struct ceph_mon_request_header monhdr;
190 struct ceph_fsid fsid;
191 __le32 pool;
192 __le32 op;
193 __le64 auid;
194 __le64 snapid;
195 __le32 name_len;
196} __attribute__ ((packed));
197
198struct ceph_mon_poolop_reply {
199 struct ceph_mon_request_header monhdr;
200 struct ceph_fsid fsid;
201 __le32 reply_code;
202 __le32 epoch;
203 char has_data;
204 char data[0];
205} __attribute__ ((packed));
206
207struct ceph_mon_unmanaged_snap {
208 __le64 snapid;
209} __attribute__ ((packed));
210
167struct ceph_osd_getmap { 211struct ceph_osd_getmap {
168 struct ceph_mon_request_header monhdr; 212 struct ceph_mon_request_header monhdr;
169 struct ceph_fsid fsid; 213 struct ceph_fsid fsid;