]> 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)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 23 Apr 2013 18:33:17 +0000 (11:33 -0700)
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.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit d6c126e2131fefab6df676f2b9d0addf78f7a488)

src/librbd/internal.cc

index 7c90f02b09db91eea57da69b6bbb6da96b407034..6989a70c98ef2639c0f6ceb2ffe1c65562a3eb1c 100644 (file)
@@ -1752,7 +1752,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 -