From: lixiaoy1 Date: Thu, 1 Oct 2020 20:32:28 +0000 (-0400) Subject: rbd/tools: fix rwl related names X-Git-Tag: v16.1.0~913^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be08a85dde328e765ca2fbe5e90b332e9d6687d6;p=ceph.git rbd/tools: fix rwl related names These attributes have been renamed. Signed-off-by: Li, Xiaoyan --- diff --git a/src/tools/rbd/action/Status.cc b/src/tools/rbd/action/Status.cc index db9b69bf6df1..d9d938165794 100644 --- a/src/tools/rbd/action/Status.cc +++ b/src/tools/rbd/action/Status.cc @@ -24,9 +24,9 @@ namespace { const std::string IMAGE_CACHE_STATE = ".librbd/image_cache_state"; struct ImageCacheState { - bool present; - bool clean; - int size; + bool present = false; + bool clean = false; + int size = 0; std::string host; std::string path; }; @@ -43,14 +43,14 @@ bool image_cache_parse(const std::string& s, ImageCacheState &cache_state) { if (success && (success = f.exists("clean"))) { cache_state.present = (bool)f["clean"]; } - if (success && (success = f.exists("rwl_size"))) { - cache_state.size = (int)f["rwl_size"]; + if (success && (success = f.exists("pwl_size"))) { + cache_state.size = (int)f["pwl_size"]; } - if (success && (success = f.exists("rwl_host"))) { - cache_state.host = (std::string)f["rwl_host"]; + if (success && (success = f.exists("pwl_host"))) { + cache_state.host = (std::string)f["pwl_host"]; } - if (success && (success = f.exists("rwl_path"))) { - cache_state.path = (std::string)f["rwl_path"]; + if (success && (success = f.exists("pwl_path"))) { + cache_state.path = (std::string)f["pwl_path"]; } } return success;