]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: open parent as read-only during clone
authorJosh Durgin <josh.durgin@inktank.com>
Sat, 29 Dec 2012 06:13:37 +0000 (22:13 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Sun, 30 Dec 2012 08:06:11 +0000 (00:06 -0800)
We never write to the parent, and don't need to watch it during this process.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/librbd/internal.cc

index 7d49e82d3292dfe79f39511486bb376052ec5226..53ce19c65fc6caff1a9cd84c3366208cbf70e099 100644 (file)
@@ -897,7 +897,7 @@ reprotect_and_return_err:
     librbd::NoOpProgressContext no_op;
     ImageCtx *c_imctx = NULL;
     // make sure parent snapshot exists
-    ImageCtx *p_imctx = new ImageCtx(p_name, "", p_snap_name, p_ioctx, false);
+    ImageCtx *p_imctx = new ImageCtx(p_name, "", p_snap_name, p_ioctx, true);
     r = open_image(p_imctx);
     if (r < 0) {
       lderr(cct) << "error opening parent image: "