]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd/tools: fix rwl related names
authorlixiaoy1 <xiaoyan.li@intel.com>
Thu, 1 Oct 2020 20:32:28 +0000 (16:32 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 5 Oct 2020 18:20:21 +0000 (14:20 -0400)
These attributes have been renamed.

Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
src/tools/rbd/action/Status.cc

index db9b69bf6df1c2d8ae967185ab19ee8469e89f1b..d9d938165794de662b6493c6dd6a6f7ee120fc3a 100644 (file)
@@ -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;