#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"
#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"
#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"
#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"
PoolWatcher.cc
ServiceDaemon.cc
Threads.cc
- types.cc
+ Types.cc
image_deleter/RemoveRequest.cc
image_deleter/SnapshotPurgeRequest.cc
image_deleter/TrashMoveRequest.cc
#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>
#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>
#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>
#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; }
#include "include/rados/librados.hpp"
#include "ClusterWatcher.h"
#include "PoolReplayer.h"
-#include "types.h"
+#include "tools/rbd_mirror/Types.h"
#include <set>
#include <map>
#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"
#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"
#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>
--- /dev/null
+// -*- 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
--- /dev/null
+// -*- 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
#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;
#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>
#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;
#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 {
+++ /dev/null
-// -*- 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
+++ /dev/null
-// -*- 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