diff options
author | Jason Dillaman <dillaman@redhat.com> | 2019-04-09 14:58:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-09 14:58:50 +0200 |
commit | 42ac6ac442bee75c47649bfeb0a4b4e5da47c804 (patch) | |
tree | 6c65eee9668efa0e0c15ba66ea458af9679a66c0 /src/librbd | |
parent | Merge pull request #27268 from trociny/wip-38364 (diff) | |
parent | librbd: do not allow to deep copy migrating image (diff) | |
download | ceph-42ac6ac442bee75c47649bfeb0a4b4e5da47c804.tar.xz ceph-42ac6ac442bee75c47649bfeb0a4b4e5da47c804.zip |
Merge pull request #27194 from trociny/wip-38661
librbd: do not allow to deep copy migrating image
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Diffstat (limited to 'src/librbd')
-rw-r--r-- | src/librbd/api/Image.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librbd/api/Image.cc b/src/librbd/api/Image.cc index 48bec35da0c..13c5a90d8c5 100644 --- a/src/librbd/api/Image.cc +++ b/src/librbd/api/Image.cc @@ -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); } |