summaryrefslogtreecommitdiffstats
path: root/src/test/rbd_mirror/test_ImageSync.cc
diff options
context:
space:
mode:
authorMykola Golub <mgolub@suse.com>2019-08-27 21:42:46 +0200
committerMykola Golub <mgolub@suse.com>2019-09-05 14:57:47 +0200
commit03dc984f07d87d9c50632fb9843411562dd0db72 (patch)
treef3372d201383afe7de4af6e40e12850bb5201028 /src/test/rbd_mirror/test_ImageSync.cc
parentlibrbd: disable mirroring when removing namespace (diff)
downloadceph-03dc984f07d87d9c50632fb9843411562dd0db72.tar.xz
ceph-03dc984f07d87d9c50632fb9843411562dd0db72.zip
rbd-mirror: generalize ImageSyncThrottler into Throttler
Signed-off-by: Mykola Golub <mgolub@suse.com>
Diffstat (limited to 'src/test/rbd_mirror/test_ImageSync.cc')
-rw-r--r--src/test/rbd_mirror/test_ImageSync.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/test/rbd_mirror/test_ImageSync.cc b/src/test/rbd_mirror/test_ImageSync.cc
index 39feffe89f5..b585ea571fb 100644
--- a/src/test/rbd_mirror/test_ImageSync.cc
+++ b/src/test/rbd_mirror/test_ImageSync.cc
@@ -18,9 +18,9 @@
#include "librbd/io/ReadResult.h"
#include "librbd/journal/Types.h"
#include "tools/rbd_mirror/ImageSync.h"
-#include "tools/rbd_mirror/ImageSyncThrottler.h"
#include "tools/rbd_mirror/InstanceWatcher.h"
#include "tools/rbd_mirror/Threads.h"
+#include "tools/rbd_mirror/Throttler.h"
void register_test_image_sync() {
}
@@ -74,7 +74,8 @@ public:
create_and_open(m_remote_io_ctx, &m_remote_image_ctx);
auto cct = reinterpret_cast<CephContext*>(m_local_io_ctx.cct());
- m_image_sync_throttler = rbd::mirror::ImageSyncThrottler<>::create(cct);
+ m_image_sync_throttler = rbd::mirror::Throttler<>::create(
+ cct, "rbd_mirror_concurrent_image_syncs");
m_instance_watcher = rbd::mirror::InstanceWatcher<>::create(
m_local_io_ctx, m_threads->work_queue, nullptr, m_image_sync_throttler);
@@ -126,7 +127,7 @@ public:
librbd::ImageCtx *m_remote_image_ctx;
librbd::ImageCtx *m_local_image_ctx;
- rbd::mirror::ImageSyncThrottler<> *m_image_sync_throttler;
+ rbd::mirror::Throttler<> *m_image_sync_throttler;
rbd::mirror::InstanceWatcher<> *m_instance_watcher;
::journal::Journaler *m_remote_journaler;
librbd::journal::MirrorPeerClientMeta m_client_meta;