]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: move rgw_meta_sync_status, rgw_meta_sync_marker and rgw_meta_sync_info into...
authorOrit Wasserman <owasserm@redhat.com>
Tue, 13 Oct 2015 10:40:40 +0000 (12:40 +0200)
committerYehuda Sadeh <yehuda@redhat.com>
Fri, 12 Feb 2016 00:13:08 +0000 (16:13 -0800)
Signed-off-by: Orit Wasserman <owasserm@redhat.com>
src/rgw/rgw_meta_sync_status.h [new file with mode: 0644]
src/rgw/rgw_sync.h

diff --git a/src/rgw/rgw_meta_sync_status.h b/src/rgw/rgw_meta_sync_status.h
new file mode 100644 (file)
index 0000000..0c24078
--- /dev/null
@@ -0,0 +1,89 @@
+#ifndef RGW_META_SYNC_STATUS_H
+#define RGW_META_SYNC_STATUS_H
+
+struct rgw_meta_sync_info {
+  enum SyncState {
+    StateInit = 0,
+    StateBuildingFullSyncMaps = 1,
+    StateSync = 2,
+  };
+
+  uint16_t state;
+  uint32_t num_shards;
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(state, bl);
+    ::encode(num_shards, bl);
+    ENCODE_FINISH(bl);
+  }
+
+  void decode(bufferlist::iterator& bl) {
+     DECODE_START(1, bl);
+     ::decode(state, bl);
+     ::decode(num_shards, bl);
+     DECODE_FINISH(bl);
+  }
+
+  void dump(Formatter *f) const;
+
+  rgw_meta_sync_info() : state((int)StateInit), num_shards(0) {}
+};
+WRITE_CLASS_ENCODER(rgw_meta_sync_info)
+
+struct rgw_meta_sync_marker {
+  enum SyncState {
+    FullSync = 0,
+    IncrementalSync = 1,
+  };
+  uint16_t state;
+  string marker;
+  string next_step_marker;
+
+  rgw_meta_sync_marker() : state(FullSync) {}
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(state, bl);
+    ::encode(marker, bl);
+    ::encode(next_step_marker, bl);
+    ENCODE_FINISH(bl);
+  }
+
+  void decode(bufferlist::iterator& bl) {
+     DECODE_START(1, bl);
+    ::decode(state, bl);
+    ::decode(marker, bl);
+    ::decode(next_step_marker, bl);
+     DECODE_FINISH(bl);
+  }
+
+  void dump(Formatter *f) const;
+};
+WRITE_CLASS_ENCODER(rgw_meta_sync_marker)
+
+struct rgw_meta_sync_status {
+  rgw_meta_sync_info sync_info;
+  map<uint32_t, rgw_meta_sync_marker> sync_markers;
+
+  rgw_meta_sync_status() {}
+
+  void encode(bufferlist& bl) const {
+    ENCODE_START(1, 1, bl);
+    ::encode(sync_info, bl);
+    ::encode(sync_markers, bl);
+    ENCODE_FINISH(bl);
+  }
+
+  void decode(bufferlist::iterator& bl) {
+     DECODE_START(1, bl);
+    ::decode(sync_info, bl);
+    ::decode(sync_markers, bl);
+     DECODE_FINISH(bl);
+  }
+
+  void dump(Formatter *f) const;
+};
+WRITE_CLASS_ENCODER(rgw_meta_sync_status)
+
+#endif
index f5f33da402fc66d7bec4649fb96099469caa30d4..af63cd12d25ac0e91404fd9bfb49cd59f95dc926 100644 (file)
@@ -3,6 +3,7 @@
 
 #include "rgw_coroutine.h"
 #include "rgw_http_client.h"
+#include "rgw_meta_sync_status.h"
 
 #include "common/RWLock.h"
 
@@ -15,94 +16,11 @@ struct rgw_mdlog_info {
   void decode_json(JSONObj *obj);
 };
 
-struct rgw_meta_sync_info {
-  enum SyncState {
-    StateInit = 0,
-    StateBuildingFullSyncMaps = 1,
-    StateSync = 2,
-  };
-
-  uint16_t state;
-  uint32_t num_shards;
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(state, bl);
-    ::encode(num_shards, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-     DECODE_START(1, bl);
-     ::decode(state, bl);
-     ::decode(num_shards, bl);
-     DECODE_FINISH(bl);
-  }
-
-  void dump(Formatter *f) const;
-
-  rgw_meta_sync_info() : state((int)StateInit), num_shards(0) {}
-};
-WRITE_CLASS_ENCODER(rgw_meta_sync_info)
-
-struct rgw_meta_sync_marker {
-  enum SyncState {
-    FullSync = 0,
-    IncrementalSync = 1,
-  };
-  uint16_t state;
-  string marker;
-  string next_step_marker;
-
-  rgw_meta_sync_marker() : state(FullSync) {}
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(state, bl);
-    ::encode(marker, bl);
-    ::encode(next_step_marker, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-     DECODE_START(1, bl);
-    ::decode(state, bl);
-    ::decode(marker, bl);
-    ::decode(next_step_marker, bl);
-     DECODE_FINISH(bl);
-  }
-
-  void dump(Formatter *f) const;
-};
-WRITE_CLASS_ENCODER(rgw_meta_sync_marker)
-
-struct rgw_meta_sync_status {
-  rgw_meta_sync_info sync_info;
-  map<uint32_t, rgw_meta_sync_marker> sync_markers;
-
-  rgw_meta_sync_status() {}
-
-  void encode(bufferlist& bl) const {
-    ENCODE_START(1, 1, bl);
-    ::encode(sync_info, bl);
-    ::encode(sync_markers, bl);
-    ENCODE_FINISH(bl);
-  }
-
-  void decode(bufferlist::iterator& bl) {
-     DECODE_START(1, bl);
-    ::decode(sync_info, bl);
-    ::decode(sync_markers, bl);
-     DECODE_FINISH(bl);
-  }
-
-  void dump(Formatter *f) const;
-};
-WRITE_CLASS_ENCODER(rgw_meta_sync_status)
 
 class RGWAsyncRadosProcessor;
 class RGWMetaSyncStatusManager;
 class RGWMetaSyncCR;
+class RGWRESTConn;
 
 class RGWRemoteMetaLog : public RGWCoroutinesManager {
   RGWRados *store;