image_replayer/snapshot/StateBuilder.cc
image_sync/SyncPointCreateRequest.cc
image_sync/SyncPointPruneRequest.cc
+ image_sync/Utils.cc
pool_watcher/RefreshImagesRequest.cc
service_daemon/Types.cc)
#include "librbd/Operations.h"
#include "librbd/Utils.h"
#include "tools/rbd_mirror/image_sync/Types.h"
+#include "tools/rbd_mirror/image_sync/Utils.h"
#define dout_context g_ceph_context
#define dout_subsys ceph_subsys_rbd_mirror
namespace mirror {
namespace image_sync {
-namespace {
-
-static const std::string SNAP_NAME_PREFIX(".rbd-mirror");
-
-} // anonymous namespace
-
using librbd::util::create_context_callback;
template <typename I>
uuid_gen.generate_random();
auto& sync_point = m_sync_points_copy.back();
- sync_point.snap_name = SNAP_NAME_PREFIX + "." + m_local_mirror_uuid + "." +
+ sync_point.snap_name = util::get_snapshot_name_prefix(m_local_mirror_uuid) +
uuid_gen.to_string();
auto ctx = create_context_callback<
--- /dev/null
+// -*- mode:c++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// vim: ts=8 sw=2 smarttab
+
+#include "Utils.h"
+
+namespace rbd {
+namespace mirror {
+namespace image_sync {
+namespace util {
+
+namespace {
+
+static const std::string SNAP_NAME_PREFIX(".rbd-mirror");
+
+} // anonymous namespace
+
+std::string get_snapshot_name_prefix(const std::string& local_mirror_uuid) {
+ return SNAP_NAME_PREFIX + "." + local_mirror_uuid + ".";
+}
+
+} // namespace util
+} // namespace image_sync
+} // 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
+
+#include <string>
+
+namespace rbd {
+namespace mirror {
+namespace image_sync {
+namespace util {
+
+std::string get_snapshot_name_prefix(const std::string& local_mirror_uuid);
+
+} // namespace util
+} // namespace image_sync
+} // namespace mirror
+} // namespace rbd