]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/cache/pwl: log image_cache_state after it is fetched, not before
authorIlya Dryomov <idryomov@gmail.com>
Wed, 5 May 2021 10:29:44 +0000 (12:29 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 5 May 2021 22:17:25 +0000 (00:17 +0200)
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/cache/pwl/ImageCacheState.cc

index 2c6117d9e2ff3bd8ec73725e866555b09b264458..4fb6f529f2577715b34bb1ecf1d9cc7f80ddba80 100644 (file)
@@ -105,7 +105,6 @@ ImageCacheState<I>* ImageCacheState<I>::create_image_cache_state(
     I* image_ctx, plugin::Api<I>& plugin_api, int &r) {
   std::string cache_state_str;
   ImageCacheState<I>* 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<I>* ImageCacheState<I>::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;