Skip to content

Commit

Permalink
Merge pull request #11744 from trociny/wip-16962
Browse files Browse the repository at this point in the history
rbd-mirror: snap protect of non-layered image results in split-brain

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Nov 4, 2016
2 parents ff00d41 + 8e1cc88 commit 740ac05
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/librbd/Operations.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 740ac05

Please sign in to comment.