]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: corrected usage of ImageState::open flag parameter
authorJason Dillaman <dillaman@redhat.com>
Tue, 17 Apr 2018 20:45:24 +0000 (16:45 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 14 Aug 2018 22:29:45 +0000 (18:29 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/api/Group.cc
src/librbd/api/Image.cc

index 1d9f6a3434d969ae53ae136ae136b74e1e0b4cb9..cfd9d86e37ee4802edb406c846908d7e16c5ef35 100644 (file)
@@ -235,7 +235,7 @@ int group_snap_remove_by_record(librados::IoCtx& group_ioctx,
 
     C_SaferCond* on_finish = new C_SaferCond;
 
-    image_ctx->state->open(false, on_finish);
+    image_ctx->state->open(0, on_finish);
 
     ictxs.push_back(image_ctx);
     on_finishes.push_back(on_finish);
@@ -787,7 +787,7 @@ int Group<I>::snap_create(librados::IoCtx& group_ioctx,
 
     C_SaferCond* on_finish = new C_SaferCond;
 
-    image_ctx->state->open(false, on_finish);
+    image_ctx->state->open(0, on_finish);
 
     ictxs.push_back(image_ctx);
     on_finishes.push_back(on_finish);
index 877027cdef03e40a4786a85c6cb9af2f23eda779..2759992113429283244a53ea94450b3d80d56fec 100644 (file)
@@ -264,7 +264,7 @@ int Image<I>::deep_copy(I *src, librados::IoCtx& dest_md_ctx,
 
   ImageCtx *dest = new librbd::ImageCtx(destname, "", NULL,
                                         dest_md_ctx, false);
-  r = dest->state->open(false);
+  r = dest->state->open(0);
   if (r < 0) {
     lderr(cct) << "failed to read newly created header" << dendl;
     return r;