From: Ilya Dryomov Date: Wed, 5 May 2021 10:29:44 +0000 (+0200) Subject: librbd/cache/pwl: log image_cache_state after it is fetched, not before X-Git-Tag: v17.1.0~2026^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2e412cfddfc43d50a1dbf293a8e3f6dd7bd88d9a;p=ceph.git librbd/cache/pwl: log image_cache_state after it is fetched, not before Signed-off-by: Ilya Dryomov --- diff --git a/src/librbd/cache/pwl/ImageCacheState.cc b/src/librbd/cache/pwl/ImageCacheState.cc index 2c6117d9e2ff..4fb6f529f257 100644 --- a/src/librbd/cache/pwl/ImageCacheState.cc +++ b/src/librbd/cache/pwl/ImageCacheState.cc @@ -105,7 +105,6 @@ ImageCacheState* ImageCacheState::create_image_cache_state( I* image_ctx, plugin::Api& plugin_api, int &r) { std::string cache_state_str; ImageCacheState* cache_state = nullptr; - ldout(image_ctx->cct, 20) << "image_cache_state:" << cache_state_str << dendl; r = 0; bool dirty_cache = plugin_api.test_image_features(image_ctx, RBD_FEATURE_DIRTY_CACHE); @@ -114,6 +113,8 @@ ImageCacheState* ImageCacheState::create_image_cache_state( IMAGE_CACHE_STATE, &cache_state_str); } + ldout(image_ctx->cct, 20) << "image_cache_state: " << cache_state_str << dendl; + bool pwl_enabled = cache::util::is_pwl_enabled(*image_ctx); bool cache_desired = pwl_enabled; cache_desired &= !image_ctx->read_only;