]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: clean up MDSTableServer interface a bit
authorSage Weil <sage@newdream.net>
Thu, 7 Aug 2008 21:40:27 +0000 (14:40 -0700)
committerSage Weil <sage@newdream.net>
Thu, 7 Aug 2008 21:40:27 +0000 (14:40 -0700)
src/mds/AnchorServer.h
src/mds/MDSTableServer.h
src/mds/SnapServer.h

index 4c0cd9548cee991be620dddf35573583a212b1e5..3a4d16bdb7d77455f1999e37bc35b60d8e19c178 100644 (file)
@@ -33,19 +33,17 @@ class AnchorServer : public MDSTableServer {
 
   void init_inode();
   void reset_state();
-  void encode_state(bufferlist& bl) {
+  void encode_server_state(bufferlist& bl) {
     ::encode(anchor_map, bl);
     ::encode(pending_create, bl);
     ::encode(pending_destroy, bl);
     ::encode(pending_update, bl);
-    ::encode(pending_for_mds, bl);
   }
-  void decode_state(bufferlist::iterator& p) {
+  void decode_server_state(bufferlist::iterator& p) {
     ::decode(anchor_map, p);
     ::decode(pending_create, p);
     ::decode(pending_destroy, p);
     ::decode(pending_update, p);
-    ::decode(pending_for_mds, p);
   }
 
   bool add(inodeno_t ino, inodeno_t dirino, __u32 dn_hash);
index b1a491349732e6d8ef96e4ca4bd98f7ddd11fbf6..180c2f363f02aa438b2b11e0135d77cbed012da3 100644 (file)
@@ -82,6 +82,18 @@ private:
 
   void handle_request(MMDSTableRequest *m);
 
+  virtual void encode_server_state(bufferlist& bl) = 0;
+  virtual void decode_server_state(bufferlist::iterator& bl) = 0;
+
+  void encode_state(bufferlist& bl) {
+    encode_server_state(bl);
+    ::encode(pending_for_mds, bl);
+  }
+  void decode_state(bufferlist::iterator& bl) {
+    decode_server_state(bl);
+    ::decode(pending_for_mds, bl);
+  }
+
   // recovery
   void finish_recovery();
   void handle_mds_recovery(int who);
index a0371f6363254b02784b5399ed76377b0f1caf89..29b89151a770f4397b4334c13e46c474d8e2808d 100644 (file)
@@ -39,23 +39,21 @@ public:
     
   void init_inode();
   void reset_state();
-  void encode_state(bufferlist& bl) {
+  void encode_server_state(bufferlist& bl) {
     ::encode(last_snap, bl);
     ::encode(snaps, bl);
     ::encode(pending_purge, bl);
     ::encode(pending_create, bl);
     ::encode(pending_destroy, bl);
     ::encode(pending_noop, bl);
-    ::encode(pending_for_mds, bl);
   }
-  void decode_state(bufferlist::iterator& bl) {
+  void decode_server_state(bufferlist::iterator& bl) {
     ::decode(last_snap, bl);
     ::decode(snaps, bl);
     ::decode(pending_purge, bl);
     ::decode(pending_create, bl);
     ::decode(pending_destroy, bl);
     ::decode(pending_noop, bl);
-    ::decode(pending_for_mds, bl);
   }
 
   // server bits