diff options
author | Josh Durgin <josh.durgin@inktank.com> | 2013-02-26 13:20:08 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-26 14:55:11 -0800 |
commit | f58601d681d3aee6541119ab830ba5e2a9ec3a13 (patch) | |
tree | e5b416312842207959096c2735708d5a32733de7 | |
parent | c8dd2b67b39a8c70e48441ecd1a5cc3c6200ae97 (diff) | |
download | ceph-f58601d681d3aee6541119ab830ba5e2a9ec3a13.tar.gz |
librbd: fix rollback size
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>
-rw-r--r-- | src/librbd/internal.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index a4c25dfaa52..c5f2c137ee4 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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 - |