From bfbed50886152bb700aa89594d83dcc064328bd3 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 8 Jun 2012 07:56:59 -0700 Subject: [PATCH] librbd: use ImageCtx members instead of the old header in resize() Signed-off-by: Josh Durgin --- src/librbd.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librbd.cc b/src/librbd.cc index 0d357fa222cb5..8a5bf855d235a 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(); -- 2.39.5