]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/cache: Fix pwl_path read issue 37237/head
authorMahati Chamarthy <mahati.chamarthy@intel.com>
Fri, 18 Sep 2020 07:22:25 +0000 (12:52 +0530)
committerMahati Chamarthy <mahati.chamarthy@intel.com>
Fri, 18 Sep 2020 08:23:35 +0000 (13:53 +0530)
... in ImageCacheState

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@intel.com>
src/librbd/cache/pwl/ImageCacheState.cc
src/test/librbd/cache/test_mock_ReplicatedWriteLog.cc

index 1aa9c73a7ec6bdf8e33204cf794520f9ae1129b4..5f2ac52f0dd96fd88d4c1c337a9f6a98c0d16727 100644 (file)
@@ -53,10 +53,10 @@ ImageCacheState<I>::ImageCacheState(
   present = (bool)f["present"];
   empty = (bool)f["empty"];
   clean = (bool)f["clean"];
-  host = (string)f["rwl_host"];
-  path = (string)f["rwl_path"];
+  host = (string)f["pwl_host"];
+  path = (string)f["pwl_path"];
   uint64_t pwl_size;
-  std::istringstream iss(f["rwl_size"]);
+  std::istringstream iss(f["pwl_size"]);
   iss >> pwl_size;
   size = pwl_size;
 
index 4e9f8065ae4c45dccc56b2fb5b31506d14856244..6027b28a207496db8a8f06395292c996a07f6ca2 100644 (file)
@@ -156,9 +156,9 @@ TEST_F(TestMockCacheReplicatedWriteLog, init_state_json_write) {
 
   JSONFormattable f;
   string strf = "{ \"present\": \"1\", \"empty\": \"0\", \"clean\": \"0\", \
-                   \"rwl_host\": \"testhost\", \
-                   \"rwl_path\": \"/tmp\", \
-                   \"rwl_size\": \"1024\" }";
+                   \"pwl_host\": \"testhost\", \
+                   \"pwl_path\": \"/tmp\", \
+                   \"pwl_size\": \"1024\" }";
   get_jf(strf, &f);
   MockImageCacheStateRWL image_cache_state(&mock_image_ctx, f);