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>
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 -