From ab3551e6892e36aab91f038a5fd69bfede721dab Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 21 Jun 2018 15:22:58 -0400 Subject: [PATCH] librbd: temporarily disable namespace support for mirroring Signed-off-by: Jason Dillaman --- src/librbd/api/Mirror.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/librbd/api/Mirror.cc b/src/librbd/api/Mirror.cc index adc688baa13..c1e545a39ea 100644 --- a/src/librbd/api/Mirror.cc +++ b/src/librbd/api/Mirror.cc @@ -140,6 +140,12 @@ int Mirror::image_enable(I *ictx, bool relax_same_pool_parent_check) { CephContext *cct = ictx->cct; ldout(cct, 20) << "ictx=" << ictx << dendl; + // TODO + if (!ictx->md_ctx.get_namespace().empty()) { + lderr(cct) << "namespaces are not supported" << dendl; + return -EINVAL; + } + int r = ictx->state->refresh_if_required(); if (r < 0) { return r; @@ -495,6 +501,12 @@ int Mirror::mode_set(librados::IoCtx& io_ctx, CephContext *cct = reinterpret_cast(io_ctx.cct()); ldout(cct, 20) << dendl; + // TODO + if (!io_ctx.get_namespace().empty()) { + lderr(cct) << "namespaces are not supported" << dendl; + return -EINVAL; + } + cls::rbd::MirrorMode next_mirror_mode; switch (mirror_mode) { case RBD_MIRROR_MODE_DISABLED: @@ -672,6 +684,12 @@ int Mirror::peer_add(librados::IoCtx& io_ctx, std::string *uuid, ldout(cct, 20) << "name=" << cluster_name << ", " << "client=" << client_name << dendl; + // TODO + if (!io_ctx.get_namespace().empty()) { + lderr(cct) << "namespaces are not supported" << dendl; + return -EINVAL; + } + if (cct->_conf->cluster == cluster_name) { lderr(cct) << "cannot add self as remote peer" << dendl; return -EINVAL; -- 2.39.5