]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ceph: sync header defs with server code
authorSage Weil <sage@newdream.net>
Wed, 7 Jul 2010 15:39:03 +0000 (08:39 -0700)
committerSage Weil <sage@newdream.net>
Mon, 2 Aug 2010 03:11:42 +0000 (20:11 -0700)
Define ROLLBACK op, IFLOCK inode lock (for advisory file locking).

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/ceph_fs.h
fs/ceph/ceph_strings.c
fs/ceph/rados.h

index 663ff9021111b30bde427d226e5d833c95e6f0b2..bf7dea673237c1c02168b833004678aaa45d663f 100644 (file)
@@ -253,6 +253,7 @@ extern const char *ceph_mds_state_name(int s);
 #define CEPH_LOCK_IDFT        512   /* dir frag tree */
 #define CEPH_LOCK_INEST       1024  /* mds internal */
 #define CEPH_LOCK_IXATTR      2048
+#define CEPH_LOCK_IFLOCK      4096  /* advisory file locks */
 #define CEPH_LOCK_INO         8192  /* immutable inode bits; not a lock */
 
 /* client_session ops */
index 7503aee828cef9156e3a875f91e9b87e132911b9..0f943a0a3b5e40cc7d078ab1c0b98deb1b1a2f2b 100644 (file)
@@ -28,6 +28,7 @@ const char *ceph_osd_op_name(int op)
        case CEPH_OSD_OP_TRUNCATE: return "truncate";
        case CEPH_OSD_OP_ZERO: return "zero";
        case CEPH_OSD_OP_WRITEFULL: return "writefull";
+       case CEPH_OSD_OP_ROLLBACK: return "rollback";
 
        case CEPH_OSD_OP_APPEND: return "append";
        case CEPH_OSD_OP_STARTSYNC: return "startsync";
index 20b5b45fa5753a5a21db33703bd6feeea56c85cb..6d5247f2e81b273538e78df5db1dc9204674a2d3 100644 (file)
@@ -203,6 +203,7 @@ enum {
        CEPH_OSD_OP_TMAPGET = CEPH_OSD_OP_MODE_RD | CEPH_OSD_OP_TYPE_DATA | 12,
 
        CEPH_OSD_OP_CREATE  = CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 13,
+       CEPH_OSD_OP_ROLLBACK= CEPH_OSD_OP_MODE_WR | CEPH_OSD_OP_TYPE_DATA | 14,
 
        /** attrs **/
        /* read */
@@ -272,6 +273,10 @@ static inline int ceph_osd_op_mode_modify(int op)
        return (op & CEPH_OSD_OP_MODE) == CEPH_OSD_OP_MODE_WR;
 }
 
+/*
+ * note that the following tmap stuff is also defined in the ceph librados.h
+ * any modification here needs to be updated there
+ */
 #define CEPH_OSD_TMAP_HDR 'h'
 #define CEPH_OSD_TMAP_SET 's'
 #define CEPH_OSD_TMAP_RM  'r'
@@ -297,6 +302,7 @@ enum {
        CEPH_OSD_FLAG_PARALLELEXEC = 512, /* execute op in parallel */
        CEPH_OSD_FLAG_PGOP = 1024,      /* pg op, no object */
        CEPH_OSD_FLAG_EXEC = 2048,      /* op may exec */
+       CEPH_OSD_FLAG_EXEC_PUBLIC = 4096, /* op may exec (public) */
 };
 
 enum {
@@ -350,6 +356,9 @@ struct ceph_osd_op {
                struct {
                        __le64 cookie, count;
                } __attribute__ ((packed)) pgls;
+               struct {
+                       __le64 snapid;
+               } __attribute__ ((packed)) snap;
        };
        __le32 payload_len;
 } __attribute__ ((packed));