Skip to content

Commit

Permalink
librbd: open parent as read-only during clone
Browse files Browse the repository at this point in the history
We never write to the parent, and don't need to watch it during this process.

Signed-off-by: Josh Durgin <[email protected]>
  • Loading branch information
jdurgin committed Dec 30, 2012
1 parent c67c789 commit 47bf519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librbd/internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ namespace librbd {
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: "
Expand Down

0 comments on commit 47bf519

Please sign in to comment.