]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix error message and unnamed constant
authorJosh Durgin <josh.durgin@dreamhost.com>
Thu, 3 Mar 2011 16:42:34 +0000 (08:42 -0800)
committerJosh Durgin <josh.durgin@dreamhost.com>
Fri, 4 Mar 2011 00:10:26 +0000 (16:10 -0800)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/librbd.cc

index 74f551284df97ef37e686725c686e3fcd86c8d89..e1265580b2f8a016665fc7022b4b8955ae564521 100644 (file)
@@ -543,8 +543,7 @@ int snap_create(ImageCtx *ictx, const char *snap_name)
   if (r < 0)
     return r;
 
-  // probably a bug: what's so special about snap 0? (as opposed to CEPH_NOSNAP, etc?)
-  ictx->io_ctx.snap_set_read(0);
+  ictx->io_ctx.snap_set_read(CEPH_NOSNAP);
   r = add_snap(ictx, snap_name);
   notify_change(ictx->io_ctx, md_oid, NULL, ictx);
   return r;
@@ -799,7 +798,7 @@ int rm_snap(IoCtx& io_ctx, string& md_oid, const char *snap_name)
 
   int r = io_ctx.exec(md_oid, "rbd", "snap_remove", bl, bl2);
   if (r < 0) {
-    derr << "rbd.snap_remove execution failed failed: " << strerror(-r) << dendl;
+    derr << "rbd.snap_remove execution failed: " << strerror(-r) << dendl;
     return r;
   }