]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: renamed 'types' files to 'Types'
authorJason Dillaman <dillaman@redhat.com>
Mon, 10 Sep 2018 16:09:16 +0000 (12:09 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 12 Sep 2018 01:07:24 +0000 (21:07 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
21 files changed:
src/test/rbd_mirror/test_ClusterWatcher.cc
src/test/rbd_mirror/test_ImageDeleter.cc
src/test/rbd_mirror/test_ImageReplayer.cc
src/test/rbd_mirror/test_PoolWatcher.cc
src/tools/rbd_mirror/CMakeLists.txt
src/tools/rbd_mirror/ClusterWatcher.h
src/tools/rbd_mirror/ImageDeleter.h
src/tools/rbd_mirror/ImageReplayer.h
src/tools/rbd_mirror/InstanceReplayer.h
src/tools/rbd_mirror/Mirror.h
src/tools/rbd_mirror/PoolReplayer.h
src/tools/rbd_mirror/PoolWatcher.h
src/tools/rbd_mirror/ServiceDaemon.h
src/tools/rbd_mirror/Types.cc [new file with mode: 0644]
src/tools/rbd_mirror/Types.h [new file with mode: 0644]
src/tools/rbd_mirror/image_map/Types.h
src/tools/rbd_mirror/image_replayer/BootstrapRequest.h
src/tools/rbd_mirror/pool_watcher/RefreshImagesRequest.h
src/tools/rbd_mirror/pool_watcher/Types.h
src/tools/rbd_mirror/types.cc [deleted file]
src/tools/rbd_mirror/types.h [deleted file]

index dd7117cd94cf47c5fa4ec35b5383e9bb5ce1475f..02e4baa35757631bf4cb8356925a542ad8ab6bd4 100644 (file)
@@ -8,7 +8,7 @@
 #include "librbd/api/Mirror.h"
 #include "tools/rbd_mirror/ClusterWatcher.h"
 #include "tools/rbd_mirror/ServiceDaemon.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "test/rbd_mirror/test_fixture.h"
 #include "test/librados/test.h"
 #include "gtest/gtest.h"
index ee62ced0f57d2ecfe723ca2cca8b5099b2868bd8..2b3fd44cd9993299797771e908fedbc442c83ced 100644 (file)
@@ -19,7 +19,7 @@
 #include "tools/rbd_mirror/ImageDeleter.h"
 #include "tools/rbd_mirror/ServiceDaemon.h"
 #include "tools/rbd_mirror/Threads.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "librbd/ImageCtx.h"
 #include "librbd/ImageState.h"
 #include "librbd/Operations.h"
index 8a95a65d2370ef73f0b43691ee6184e6aa9a5799..e3aa540b5fcff180d7c53d3a6188162ffab3a536 100644 (file)
 #include "librbd/io/AioCompletion.h"
 #include "librbd/io/ImageRequestWQ.h"
 #include "librbd/io/ReadResult.h"
-#include "tools/rbd_mirror/types.h"
 #include "tools/rbd_mirror/ImageReplayer.h"
 #include "tools/rbd_mirror/InstanceWatcher.h"
 #include "tools/rbd_mirror/ServiceDaemon.h"
 #include "tools/rbd_mirror/Threads.h"
+#include "tools/rbd_mirror/Types.h"
 
 #include "test/librados/test.h"
 #include "gtest/gtest.h"
index 02e96422d8c4d5e58c3d28d29eb2bc874fdd675b..f43d0ed0a00735fda3e7927457980b8e422b86a2 100644 (file)
@@ -19,7 +19,7 @@
 #include "common/Mutex.h"
 #include "tools/rbd_mirror/PoolWatcher.h"
 #include "tools/rbd_mirror/Threads.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/pool_watcher/Types.h"
 #include "test/librados/test.h"
 #include "gtest/gtest.h"
index b9ecdcfbbb0c6a76d4572cac30c3b7b3d4f12f2a..a28ad0dc1b1770c05a898f08cf533561587c3d46 100644 (file)
@@ -20,7 +20,7 @@ set(rbd_mirror_internal
   PoolWatcher.cc
   ServiceDaemon.cc
   Threads.cc
-  types.cc
+  Types.cc
   image_deleter/RemoveRequest.cc
   image_deleter/SnapshotPurgeRequest.cc
   image_deleter/TrashMoveRequest.cc
index 1099db4e0bcc1eacb6f4f09a2b87810ac100e5a4..e0de653dd75c12bc3e2f0de2b03abb9ccd8741fc 100644 (file)
@@ -12,7 +12,7 @@
 #include "common/Mutex.h"
 #include "common/Timer.h"
 #include "include/rados/librados.hpp"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/service_daemon/Types.h"
 #include <unordered_map>
 
index 5c7285b3796fd16e31f6602efb5792764be3c540..8a17eb38c2b0cc2f7c366de27f015a21823317e7 100644 (file)
@@ -18,7 +18,7 @@
 #include "include/utime.h"
 #include "common/AsyncOpTracker.h"
 #include "common/Mutex.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/image_deleter/Types.h"
 #include <atomic>
 #include <deque>
index b769d32b0c4ea1711debe5e26f0533f189bf4d65..8847b8e8522f8816f9d2f41367fece84c8721d8e 100644 (file)
@@ -16,7 +16,7 @@
 #include "librbd/journal/Types.h"
 #include "librbd/journal/TypeTraits.h"
 #include "ProgressContext.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/image_replayer/Types.h"
 
 #include <boost/noncopyable.hpp>
index 96969cb62c9beb55103e3ce7dc0840d051c099d7..0321d78c5afb34faa872a8487569835446ddeee7 100644 (file)
@@ -10,7 +10,7 @@
 #include "common/AsyncOpTracker.h"
 #include "common/Formatter.h"
 #include "common/Mutex.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 
 namespace librbd { class ImageCtx; }
 
index 98089678118ac2fb362b82a9d6e9af48559cc25a..fd04cddaa512e8062cf07777fd853cc0a75575fe 100644 (file)
@@ -9,7 +9,7 @@
 #include "include/rados/librados.hpp"
 #include "ClusterWatcher.h"
 #include "PoolReplayer.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 
 #include <set>
 #include <map>
index e15d183725f11fa2c7038888e1f68fc7c4a3b542..9ecb16bc30c73055c66c2a7009b89e90f97cdc23 100644 (file)
@@ -14,7 +14,7 @@
 #include "LeaderWatcher.h"
 #include "PoolWatcher.h"
 #include "ImageDeleter.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/image_map/Types.h"
 #include "tools/rbd_mirror/leader_watcher/Types.h"
 #include "tools/rbd_mirror/pool_watcher/Types.h"
index d51b001700fc94e8f8940cf021b1f49e6a84b24d..c45e1bcf03f402434e00d5a40f0068109226df8c 100644 (file)
@@ -13,7 +13,7 @@
 #include "common/ceph_context.h"
 #include "common/Mutex.h"
 #include "include/rados/librados.hpp"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
 #include <boost/functional/hash.hpp>
 #include <boost/optional.hpp>
 #include "include/assert.h"
index 1f84269dc220fa3ae95f14eb7c99c4377b75e618..1de7e20bf5e44ae8725bfb86f92c6c2b677789da 100644 (file)
@@ -5,7 +5,7 @@
 #define CEPH_RBD_MIRROR_SERVICE_DAEMON_H
 
 #include "common/Mutex.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include "tools/rbd_mirror/service_daemon/Types.h"
 #include <map>
 #include <string>
diff --git a/src/tools/rbd_mirror/Types.cc b/src/tools/rbd_mirror/Types.cc
new file mode 100644 (file)
index 0000000..f4abb1f
--- /dev/null
@@ -0,0 +1,21 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "tools/rbd_mirror/Types.h"
+
+namespace rbd {
+namespace mirror {
+
+std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
+  return os << "global id=" << image_id.global_id << ", "
+            << "id=" << image_id.id;
+}
+
+std::ostream& operator<<(std::ostream& lhs, const peer_t &peer) {
+  return lhs << "uuid: " << peer.uuid
+            << " cluster: " << peer.cluster_name
+            << " client: " << peer.client_name;
+}
+
+} // namespace mirror
+} // namespace rbd
diff --git a/src/tools/rbd_mirror/Types.h b/src/tools/rbd_mirror/Types.h
new file mode 100644 (file)
index 0000000..41920b7
--- /dev/null
@@ -0,0 +1,97 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#ifndef CEPH_RBD_MIRROR_TYPES_H
+#define CEPH_RBD_MIRROR_TYPES_H
+
+#include <iostream>
+#include <memory>
+#include <set>
+#include <string>
+#include <vector>
+
+#include "include/rados/librados.hpp"
+#include "include/rbd/librbd.hpp"
+
+namespace rbd {
+namespace mirror {
+
+typedef std::shared_ptr<librados::Rados> RadosRef;
+typedef std::shared_ptr<librados::IoCtx> IoCtxRef;
+typedef std::shared_ptr<librbd::Image> ImageRef;
+
+struct ImageId {
+  std::string global_id;
+  std::string id;
+
+  explicit ImageId(const std::string &global_id) : global_id(global_id) {
+  }
+  ImageId(const std::string &global_id, const std::string &id)
+    : global_id(global_id), id(id) {
+  }
+
+  inline bool operator==(const ImageId &rhs) const {
+    return (global_id == rhs.global_id && id == rhs.id);
+  }
+  inline bool operator<(const ImageId &rhs) const {
+    return global_id < rhs.global_id;
+  }
+};
+
+std::ostream &operator<<(std::ostream &, const ImageId &image_id);
+
+typedef std::set<ImageId> ImageIds;
+
+struct Peer {
+  std::string peer_uuid;
+  librados::IoCtx io_ctx;
+
+  Peer() {
+  }
+  Peer(const std::string &peer_uuid) : peer_uuid(peer_uuid) {
+  }
+  Peer(const std::string &peer_uuid, librados::IoCtx& io_ctx)
+    : peer_uuid(peer_uuid), io_ctx(io_ctx) {
+  }
+
+  inline bool operator<(const Peer &rhs) const {
+    return peer_uuid < rhs.peer_uuid;
+  }
+};
+
+typedef std::set<Peer> Peers;
+
+struct peer_t {
+  peer_t() = default;
+  peer_t(const std::string &uuid, const std::string &cluster_name,
+        const std::string &client_name)
+    : uuid(uuid), cluster_name(cluster_name), client_name(client_name)
+  {
+  }
+  peer_t(const librbd::mirror_peer_t &peer) :
+    uuid(peer.uuid),
+    cluster_name(peer.cluster_name),
+    client_name(peer.client_name)
+  {
+  }
+  std::string uuid;
+  std::string cluster_name;
+  std::string client_name;
+  bool operator<(const peer_t &rhs) const {
+    return this->uuid < rhs.uuid;
+  }
+  bool operator()(const peer_t &lhs, const peer_t &rhs) const {
+    return lhs.uuid < rhs.uuid;
+  }
+  bool operator==(const peer_t &rhs) const {
+    return uuid == rhs.uuid;
+  }
+};
+
+std::ostream& operator<<(std::ostream& lhs, const peer_t &peer);
+
+} // namespace mirror
+} // namespace rbd
+
+
+#endif // CEPH_RBD_MIRROR_TYPES_H
index 3b6b9b4530e05854aa1eadb4caaf2e3c9c3fcc15..5a97430f3b630d738bfa696344e797c8defde0be 100644 (file)
@@ -13,7 +13,7 @@
 #include "include/buffer.h"
 #include "include/encoding.h"
 #include "include/utime.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 
 struct Context;
 
index a28789b9f8fb8c5a6b2e0837747f78ff32c39cf7..9c91a7ffc0e21e82b9dc093a0fd7f46dbd5e8fb2 100644 (file)
@@ -11,7 +11,7 @@
 #include "librbd/journal/Types.h"
 #include "librbd/journal/TypeTraits.h"
 #include "tools/rbd_mirror/BaseRequest.h"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include <list>
 #include <string>
 
index 35ed6b3301480bd227ed335812ed3e09bd4463f5..8bfeabe29b8667c203cd3ce74dad3054d4f7dc0e 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "include/buffer.h"
 #include "include/rados/librados.hpp"
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include <string>
 
 struct Context;
index 45fdd51b4d2aa642d84501f64bfaedf86e56c06f..52dfc342dd4d8b0815a3047a785145977d4dfe6d 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef CEPH_RBD_MIRROR_POOL_WATCHER_TYPES_H
 #define CEPH_RBD_MIRROR_POOL_WATCHER_TYPES_H
 
-#include "tools/rbd_mirror/types.h"
+#include "tools/rbd_mirror/Types.h"
 #include <string>
 
 namespace rbd {
diff --git a/src/tools/rbd_mirror/types.cc b/src/tools/rbd_mirror/types.cc
deleted file mode 100644 (file)
index 4cd1e49..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#include "types.h"
-
-namespace rbd {
-namespace mirror {
-
-std::ostream &operator<<(std::ostream &os, const ImageId &image_id) {
-  return os << "global id=" << image_id.global_id << ", "
-            << "id=" << image_id.id;
-}
-
-std::ostream& operator<<(std::ostream& lhs, const peer_t &peer) {
-  return lhs << "uuid: " << peer.uuid
-            << " cluster: " << peer.cluster_name
-            << " client: " << peer.client_name;
-}
-
-} // namespace mirror
-} // namespace rbd
diff --git a/src/tools/rbd_mirror/types.h b/src/tools/rbd_mirror/types.h
deleted file mode 100644 (file)
index 41920b7..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
-
-#ifndef CEPH_RBD_MIRROR_TYPES_H
-#define CEPH_RBD_MIRROR_TYPES_H
-
-#include <iostream>
-#include <memory>
-#include <set>
-#include <string>
-#include <vector>
-
-#include "include/rados/librados.hpp"
-#include "include/rbd/librbd.hpp"
-
-namespace rbd {
-namespace mirror {
-
-typedef std::shared_ptr<librados::Rados> RadosRef;
-typedef std::shared_ptr<librados::IoCtx> IoCtxRef;
-typedef std::shared_ptr<librbd::Image> ImageRef;
-
-struct ImageId {
-  std::string global_id;
-  std::string id;
-
-  explicit ImageId(const std::string &global_id) : global_id(global_id) {
-  }
-  ImageId(const std::string &global_id, const std::string &id)
-    : global_id(global_id), id(id) {
-  }
-
-  inline bool operator==(const ImageId &rhs) const {
-    return (global_id == rhs.global_id && id == rhs.id);
-  }
-  inline bool operator<(const ImageId &rhs) const {
-    return global_id < rhs.global_id;
-  }
-};
-
-std::ostream &operator<<(std::ostream &, const ImageId &image_id);
-
-typedef std::set<ImageId> ImageIds;
-
-struct Peer {
-  std::string peer_uuid;
-  librados::IoCtx io_ctx;
-
-  Peer() {
-  }
-  Peer(const std::string &peer_uuid) : peer_uuid(peer_uuid) {
-  }
-  Peer(const std::string &peer_uuid, librados::IoCtx& io_ctx)
-    : peer_uuid(peer_uuid), io_ctx(io_ctx) {
-  }
-
-  inline bool operator<(const Peer &rhs) const {
-    return peer_uuid < rhs.peer_uuid;
-  }
-};
-
-typedef std::set<Peer> Peers;
-
-struct peer_t {
-  peer_t() = default;
-  peer_t(const std::string &uuid, const std::string &cluster_name,
-        const std::string &client_name)
-    : uuid(uuid), cluster_name(cluster_name), client_name(client_name)
-  {
-  }
-  peer_t(const librbd::mirror_peer_t &peer) :
-    uuid(peer.uuid),
-    cluster_name(peer.cluster_name),
-    client_name(peer.client_name)
-  {
-  }
-  std::string uuid;
-  std::string cluster_name;
-  std::string client_name;
-  bool operator<(const peer_t &rhs) const {
-    return this->uuid < rhs.uuid;
-  }
-  bool operator()(const peer_t &lhs, const peer_t &rhs) const {
-    return lhs.uuid < rhs.uuid;
-  }
-  bool operator==(const peer_t &rhs) const {
-    return uuid == rhs.uuid;
-  }
-};
-
-std::ostream& operator<<(std::ostream& lhs, const peer_t &peer);
-
-} // namespace mirror
-} // namespace rbd
-
-
-#endif // CEPH_RBD_MIRROR_TYPES_H