]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
objectstore: OP_COLL_MOVE
authorSage Weil <sage.weil@dreamhost.com>
Tue, 6 Mar 2012 05:41:49 +0000 (21:41 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Tue, 6 Mar 2012 05:41:49 +0000 (21:41 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/ObjectStore.h

index bab912108fa81484ba468c29133633d76bc4cb21..35f8a8323387abe05078e9e7ac3338211c3066bb 100644 (file)
@@ -124,6 +124,7 @@ public:
       OP_COLL_SETATTR = 24,  // cid, attrname, bl
       OP_COLL_RMATTR =  25,  // cid, attrname
       OP_COLL_SETATTRS = 26,  // cid, attrset
+      OP_COLL_MOVE =    8,   // newcid, oldcid, oid
 
       OP_STARTSYNC =    27,  // start a sync 
 
@@ -415,6 +416,14 @@ public:
       ::encode(oid, tbl);
       ops++;
     }
+    void collection_move(coll_t cid, coll_t oldcid, const hobject_t& oid) {
+      __u32 op = OP_COLL_MOVE;
+      ::encode(op, tbl);
+      ::encode(cid, tbl);
+      ::encode(oid, tbl);
+      ops++;
+    }
+
     void collection_setattr(coll_t cid, const char* name, bufferlist& val) {
       string n(name);
       collection_setattr(cid, n, val);