]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/librbd/api/Image.cc
import ceph nautilus 14.2.2
[ceph.git] / ceph / src / librbd / api / Image.cc
index 48bec35da0c21558024ff567ead1f78722bc5b00..13c5a90d8c547421945af4d0a7bd0484e646abad 100644 (file)
@@ -520,6 +520,12 @@ int Image<I>::deep_copy(I *src, librados::IoCtx& dest_md_ctx,
   uint64_t src_size;
   {
     RWLock::RLocker snap_locker(src->snap_lock);
+
+    if (!src->migration_info.empty()) {
+      lderr(cct) << "cannot deep copy migrating image" << dendl;
+      return -EBUSY;
+    }
+
     features = (src->features & ~RBD_FEATURES_IMPLICIT_ENABLE);
     src_size = src->get_image_size(src->snap_id);
   }