From: Josh Durgin Date: Fri, 8 Jun 2012 14:56:59 +0000 (-0700) Subject: librbd: use ImageCtx members instead of the old header in resize() X-Git-Tag: v0.48argonaut~92^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfbed50886152bb700aa89594d83dcc064328bd3;p=ceph.git librbd: use ImageCtx members instead of the old header in resize() Signed-off-by: Josh Durgin --- diff --git a/src/librbd.cc b/src/librbd.cc index 0d357fa222cb..8a5bf855d235 100644 --- a/src/librbd.cc +++ b/src/librbd.cc @@ -1205,14 +1205,15 @@ int resize_helper(ImageCtx *ictx, uint64_t size, ProgressContext& prog_ctx) int resize(ImageCtx *ictx, uint64_t size, ProgressContext& prog_ctx) { CephContext *cct = ictx->cct; - ldout(cct, 20) << "resize " << ictx << " " << ictx->header.image_size << " -> " << size << dendl; + ldout(cct, 20) << "resize " << ictx << " " << ictx->size << " -> " + << size << dendl; int r = ictx_check(ictx); if (r < 0) return r; Mutex::Locker l(ictx->lock); - if (size < ictx->header.image_size && ictx->object_cacher) { + if (size < ictx->size && ictx->object_cacher) { // need to invalidate since we're deleting objects, and // ObjectCacher doesn't track non-existent objects ictx->invalidate_cache();