]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: snap protect of non-layered image results in split-brain 11744/head
authorMykola Golub <mgolub@mirantis.com>
Wed, 2 Nov 2016 10:43:45 +0000 (12:43 +0200)
committerMykola Golub <mgolub@mirantis.com>
Wed, 2 Nov 2016 10:43:45 +0000 (12:43 +0200)
Fixes: http://tracker.ceph.com/issues/16962
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/librbd/Operations.cc

index 63dacf9430d2dc578304ad597b7475cfdeed494c..feb99ed4a98ea1bc2fcec407f98fd104d932530f 100644 (file)
@@ -1020,6 +1020,11 @@ int Operations<I>::snap_protect(const char *snap_name) {
     return -EROFS;
   }
 
+  if (!m_image_ctx.test_features(RBD_FEATURE_LAYERING)) {
+    lderr(cct) << "image must support layering" << dendl;
+    return -ENOSYS;
+  }
+
   int r = m_image_ctx.state->refresh_if_required();
   if (r < 0) {
     return r;