]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: enable mirroring namespace support
authorMykola Golub <mgolub@suse.com>
Thu, 29 Aug 2019 14:50:49 +0000 (15:50 +0100)
committerMykola Golub <mgolub@suse.com>
Thu, 5 Sep 2019 12:57:47 +0000 (13:57 +0100)
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/librbd/api/Mirror.cc

index 200fac95a5dbfd6611101497c86e8afcc62b3538..2e91b584dc4305973a8b6afe13f529fe8e1ea9dd 100644 (file)
@@ -169,12 +169,6 @@ int Mirror<I>::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;
@@ -581,12 +575,6 @@ int Mirror<I>::mode_set(librados::IoCtx& io_ctx,
   CephContext *cct = reinterpret_cast<CephContext *>(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:
@@ -783,12 +771,6 @@ int Mirror<I>::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;