diff options
author | Sage Weil <sage@newdream.net> | 2010-07-07 11:39:03 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-08-01 23:11:42 -0400 |
commit | f0b18d9f22ea4e50955945661b7e165a47705249 (patch) | |
tree | 736393b3c0ba0d7e983f06882e31acd61cb75c44 | |
parent | 5cd068c200795537fd78c423254389c8a07e2d20 (diff) |
ceph: sync header defs with server code
Define ROLLBACK op, IFLOCK inode lock (for advisory file locking).
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | fs/ceph/ceph_fs.h | 1 | ||||
-rw-r--r-- | fs/ceph/ceph_strings.c | 1 | ||||
-rw-r--r-- | fs/ceph/rados.h | 9 |
3 files changed, 11 insertions, 0 deletions
diff --git a/fs/ceph/ceph_fs.h b/fs/ceph/ceph_fs.h index 663ff9021111..bf7dea673237 100644 --- a/fs/ceph/ceph_fs.h +++ b/fs/ceph/ceph_fs.h | |||
@@ -253,6 +253,7 @@ extern const char *ceph_mds_state_name(int s); | |||
253 | #define CEPH_LOCK_IDFT 512 /* dir frag tree */ | 253 | #define CEPH_LOCK_IDFT 512 /* dir frag tree */ |
254 | #define CEPH_LOCK_INEST 1024 /* mds internal */ | 254 | #define CEPH_LOCK_INEST 1024 /* mds internal */ |
255 | #define CEPH_LOCK_IXATTR 2048 | 255 | #define CEPH_LOCK_IXATTR 2048 |
256 | #define CEPH_LOCK_IFLOCK 4096 /* advisory file locks */ | ||
256 | #define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */ | 257 | #define CEPH_LOCK_INO 8192 /* immutable inode bits; not a lock */ |
257 | 258 | ||
258 | /* client_session ops */ | 259 | /* client_session ops */ |
diff --git a/fs/ceph/ceph_strings.c b/fs/ceph/ceph_strings.c index 7503aee828ce..0f943a0a3b5e 100644 --- a/fs/ceph/ceph_strings.c +++ b/fs/ceph/ceph_strings.c | |||
@@ -28,6 +28,7 @@ const char *ceph_osd_op_name(int op) | |||
28 | case CEPH_OSD_OP_TRUNCATE: return "truncate"; | 28 | case CEPH_OSD_OP_TRUNCATE: return "truncate"; |
29 | case CEPH_OSD_OP_ZERO: return "zero"; | 29 | case CEPH_OSD_OP_ZERO: return "zero"; |
30 | case CEPH_OSD_OP_WRITEFULL: return "writefull"; | 30 | case CEPH_OSD_OP_WRITEFULL: return "writefull"; |
31 | case CEPH_OSD_OP_ROLLBACK: return "rollback"; | ||
31 | 32 | ||
32 | case CEPH_OSD_OP_APPEND: return "append"; | 33 | case CEPH_OSD_OP_APPEND: return "append"; |
33 | case CEPH_OSD_OP_STARTSYNC: return "startsync"; | 34 | case CEPH_OSD_OP_STARTSYNC: return "startsync"; |
diff --git a/fs/ceph/rados.h b/fs/ceph/rados.h index 20b5b45fa575..6d5247f2e81b 100644 --- a/fs/ceph/rados.h +++ b/fs/ceph/rados.h | |||
@@ -203,6 +203,7 @@ enum { | |||
203 | CEPH_OSD_OP_TMAPGET = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 12, | 203 | CEPH_OSD_OP_TMAPGET = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 12, |
204 | 204 | ||
205 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, | 205 | CEPH_OSD_OP_CREATE = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13, |
206 | CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14, | ||
206 | 207 | ||
207 | /** attrs **/ | 208 | /** attrs **/ |
208 | /* read */ | 209 | /* read */ |
@@ -272,6 +273,10 @@ static inline int ceph_osd_op_mode_modify(int op) | |||
272 | return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_WR; | 273 | return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_WR; |
273 | } | 274 | } |
274 | 275 | ||
276 | /* | ||
277 | * note that the following tmap stuff is also defined in the ceph librados.h | ||
278 | * any modification here needs to be updated there | ||
279 | */ | ||
275 | #define CEPH_OSD_TMAP_HDR 'h' | 280 | #define CEPH_OSD_TMAP_HDR 'h' |
276 | #define CEPH_OSD_TMAP_SET 's' | 281 | #define CEPH_OSD_TMAP_SET 's' |
277 | #define CEPH_OSD_TMAP_RM 'r' | 282 | #define CEPH_OSD_TMAP_RM 'r' |
@@ -297,6 +302,7 @@ enum { | |||
297 | CEPH_OSD_FLAG_PARALLELEXEC = 512, /* execute op in parallel */ | 302 | CEPH_OSD_FLAG_PARALLELEXEC = 512, /* execute op in parallel */ |
298 | CEPH_OSD_FLAG_PGOP = 1024, /* pg op, no object */ | 303 | CEPH_OSD_FLAG_PGOP = 1024, /* pg op, no object */ |
299 | CEPH_OSD_FLAG_EXEC = 2048, /* op may exec */ | 304 | CEPH_OSD_FLAG_EXEC = 2048, /* op may exec */ |
305 | CEPH_OSD_FLAG_EXEC_PUBLIC = 4096, /* op may exec (public) */ | ||
300 | }; | 306 | }; |
301 | 307 | ||
302 | enum { | 308 | enum { |
@@ -350,6 +356,9 @@ struct ceph_osd_op { | |||
350 | struct { | 356 | struct { |
351 | __le64 cookie, count; | 357 | __le64 cookie, count; |
352 | } __attribute__ ((packed)) pgls; | 358 | } __attribute__ ((packed)) pgls; |
359 | struct { | ||
360 | __le64 snapid; | ||
361 | } __attribute__ ((packed)) snap; | ||
353 | }; | 362 | }; |
354 | __le32 payload_len; | 363 | __le32 payload_len; |
355 | } __attribute__ ((packed)); | 364 | } __attribute__ ((packed)); |