]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: fix rollback size
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 26 Feb 2013 21:20:08 +0000 (13:20 -0800)
committerSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 22:55:11 +0000 (14:55 -0800)
The duplicate calls to get_image_size() and get_snap_size() replaced
by 5806226cf0743bb44eaf7bc815897c6846d43233 uncovered this. The first
call was using the currently set snap_id instead of the snapshot being
rolled back to.

Fixes: #4272
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/librbd/internal.cc

index a4c25dfaa524a9c66e2b114090cf885ef3b0d95f..c5f2c137ee48e1cb8a2c6c693e3a07f2b8a4718d 100644 (file)
@@ -1765,7 +1765,7 @@ reprotect_and_return_err:
        lderr(cct) << "No such snapshot found." << dendl;
        return -ENOENT;
       }
-      new_size = ictx->get_image_size(ictx->snap_id);
+      new_size = ictx->get_image_size(snap_id);
     }
 
     // need to flush any pending writes before resizing and rolling back -