"0"));
CephContext *cct = reinterpret_cast<CephContext *>(m_local_io_ctx.cct());
- std::string policy_type = cct->_conf.get_val<string>("rbd_mirror_image_policy_type");
+ std::string policy_type = cct->_conf.get_val<std::string>("rbd_mirror_image_policy_type");
if (policy_type == "none" || policy_type == "simple") {
m_policy = image_map::SimplePolicy::create(m_local_io_ctx);
#include "test/rbd_mirror/mock/MockSafeTimer.h"
#include <boost/intrusive_ptr.hpp>
+using namespace std::chrono_literals;
+
namespace librbd {
namespace {
#include "test/rbd_mirror/mock/MockContextWQ.h"
#include "test/rbd_mirror/mock/MockSafeTimer.h"
+using namespace std::chrono_literals;
+
namespace librbd {
namespace {
//cout << "complete " << c << std::endl;
int ret = c->get_return_value();
if (ret != 0) {
- cout << "write error: " << cpp_strerror(ret) << std::endl;
+ std::cout << "write error: " << cpp_strerror(ret) << std::endl;
exit(ret < 0 ? -ret : ret);
}
b->lock.lock();
image.size(&size);
ceph_assert(size != 0);
- vector<uint64_t> thread_offset;
+ std::vector<uint64_t> thread_offset;
uint64_t i;
uint64_t start_pos;
std::vector<const char*> args;
argv_to_vec(argc, argv, args);
if (args.empty()) {
- cerr << argv[0] << ": -h or --help for usage" << std::endl;
+ std::cerr << argv[0] << ": -h or --help for usage" << std::endl;
exit(1);
}
if (ceph_argparse_need_usage(args)) {
RadosRef m_cluster;
ceph::mutex m_lock = ceph::make_mutex("TestClusterWatcherLock");
- unique_ptr<rbd::mirror::ServiceDaemon<>> m_service_daemon;
- unique_ptr<ClusterWatcher> m_cluster_watcher;
+ std::unique_ptr<rbd::mirror::ServiceDaemon<>> m_service_daemon;
+ std::unique_ptr<ClusterWatcher> m_cluster_watcher;
set<string> m_pools;
ClusterWatcher::PoolPeers m_pool_peers;
return "image" + stringify(++_image_number);
}
- std::string get_image_id(librados::IoCtx &ioctx, const string &image_name)
+ std::string get_image_id(librados::IoCtx &ioctx, const std::string &image_name)
{
std::string obj = librbd::util::id_obj_name(image_name);
std::string id;
#include <set>
#include <vector>
+using namespace std::chrono_literals;
+
using rbd::mirror::ImageId;
using rbd::mirror::ImageIds;
using rbd::mirror::PoolWatcher;
ceph::mutex m_lock = ceph::make_mutex("TestPoolWatcherLock");
RadosRef m_cluster;
PoolWatcherListener m_pool_watcher_listener;
- unique_ptr<PoolWatcher<> > m_pool_watcher;
+ std::unique_ptr<PoolWatcher<> > m_pool_watcher;
set<string> m_pools;
ImageIds m_mirrored_images;
if (!seeded) {
seeded = true;
int seed = getpid();
- cout << "seed " << seed << std::endl;
+ std::cout << "seed " << seed << std::endl;
srand(seed);
}
#include "tools/rbd_mirror/pool_watcher/RefreshImagesRequest.h"
#include "include/stringify.h"
+using namespace std::chrono_literals;
+
namespace librbd {
namespace {