]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: rename MDSTableServer::_pending to mds_table_pending_t
authorGreg Farnum <greg@inktank.com>
Wed, 16 Jan 2013 23:56:05 +0000 (15:56 -0800)
committerGreg Farnum <greg@inktank.com>
Tue, 5 Feb 2013 21:29:06 +0000 (13:29 -0800)
And move it from MDSTableServer into mdstypes.cc, so we can use it
in ceph-dencoder more gracefully (coming up next!).

Signed-off-by: Greg Farnum <greg@inktank.com>
src/mds/MDSTableServer.cc
src/mds/MDSTableServer.h
src/mds/mdstypes.h

index 7175bbb3cfe73e141eb77b093e5a09cc20c32f60..6eadd82a5001f4f0106849d3158c9fd22e8d98f0 100644 (file)
@@ -156,7 +156,7 @@ void MDSTableServer::handle_mds_recovery(int who)
     dout(7) << "handle_mds_recovery mds." << who << dendl;
   
   // resend agrees for recovered mds
-  for (map<version_t,_pending>::iterator p = pending_for_mds.begin();
+  for (map<version_t,mds_table_pending_t>::iterator p = pending_for_mds.begin();
        p != pending_for_mds.end();
        p++) {
     if (who >= 0 && p->second.mds != who)
index 1467263d8b79a996887cd0538def164087ccdc80..26cd5944844b2e787ab693d684f6893f1d4d46ab 100644 (file)
@@ -22,31 +22,7 @@ class MMDSTableRequest;
 class MDSTableServer : public MDSTable {
 public:
   int table;
-
-  /* mds's requesting any pending ops.  child needs to encodig the corresponding
-   * pending mutation state in the table.
-   */
-  struct _pending {
-    uint64_t reqid;
-    __s32 mds;
-    version_t tid;
-    void encode(bufferlist& bl) const {
-      __u8 struct_v = 1;
-      ::encode(struct_v, bl);
-      ::encode(reqid, bl);
-      ::encode(mds, bl);
-      ::encode(tid, bl);
-    }
-    void decode(bufferlist::iterator& bl) {
-      __u8 struct_v;
-      ::decode(struct_v, bl);
-      ::decode(reqid, bl);
-      ::decode(mds, bl);
-      ::decode(tid, bl);
-    }
-  };
-  WRITE_CLASS_ENCODER(_pending)
-  map<version_t,_pending> pending_for_mds;  // ** child should encode this! **
+  map<version_t,mds_table_pending_t> pending_for_mds;  // ** child should encode this! **
 
 
 private:
@@ -117,6 +93,5 @@ private:
   void finish_recovery();
   void handle_mds_recovery(int who);
 };
-WRITE_CLASS_ENCODER(MDSTableServer::_pending)
 
 #endif
index c9c30e3488ed2e36790f5eb299fa99e3b6ce64a5..32439ffaffd111bd6c9abe6a381929dee361131e 100644 (file)
@@ -615,6 +615,32 @@ inline ostream& operator<<(ostream& out, const string_snap_t &k)
   return out << "(" << k.name << "," << k.snapid << ")";
 }
 
+/*
+ * mds_table_pending_t
+ *
+ * mds's requesting any pending ops.  child needs to encode the corresponding
+ * pending mutation state in the table.
+ */
+struct mds_table_pending_t {
+  uint64_t reqid;
+  __s32 mds;
+  version_t tid;
+  void encode(bufferlist& bl) const {
+    __u8 struct_v = 1;
+    ::encode(struct_v, bl);
+    ::encode(reqid, bl);
+    ::encode(mds, bl);
+    ::encode(tid, bl);
+  }
+  void decode(bufferlist::iterator& bl) {
+    __u8 struct_v;
+    ::decode(struct_v, bl);
+    ::decode(reqid, bl);
+    ::decode(mds, bl);
+    ::decode(tid, bl);
+  }
+};
+WRITE_CLASS_ENCODER(mds_table_pending_t)
 
 
 // =========