]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: invalidate rmap on create (and thus decode)
authorSage Weil <sage@inktank.com>
Tue, 1 Oct 2013 22:53:42 +0000 (15:53 -0700)
committerSage Weil <sage@inktank.com>
Tue, 1 Oct 2013 22:55:43 +0000 (15:55 -0700)
If we have an existing CrushWrapper object and decode from a bufferlist,
reset build_rmaps so that they get rebuilt.

Remove the build_rmaps() all in decode that was useless on a redecode
(because have_rmaps == true in that case and it did nothing).

Fixes: #6442
Backport: dumpling, maybe cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 9b7a2ae329b6a511064dd3d6e549ba61f52cfd21)

src/crush/CrushWrapper.cc
src/crush/CrushWrapper.h

index bab9f9a817e38a655cf7f7c5078327871f570885..d17166bc4a9fe7905e167b22e47dde8d504bc5d9 100644 (file)
@@ -861,7 +861,6 @@ void CrushWrapper::decode(bufferlist::iterator& blp)
     decode_32_or_64_string_map(type_map, blp);
     decode_32_or_64_string_map(name_map, blp);
     decode_32_or_64_string_map(rule_name_map, blp);
-    build_rmaps();
 
     // tunables
     if (!blp.end()) {
index 80906e4fe180345856661c1238cc8154ab822505..b4bb67bb7429b16b2125e153391a53e291a1ca3e 100644 (file)
@@ -94,6 +94,7 @@ public:
       crush_destroy(crush);
     crush = crush_create();
     assert(crush);
+    have_rmaps = false;
   }
 
   // tunables