]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: rebuild reverse maps after rebuilding crush map 39197/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 14 Jul 2020 22:49:30 +0000 (18:49 -0400)
committerwangyingbin <ybwang0211@163.com>
Mon, 1 Feb 2021 03:51:03 +0000 (11:51 +0800)
The Objecter will crash when localized reads are enabled and two threads
attempt to rebuild the (invalidated) reverse maps concurrently. This
should address the issue for the Objecter use-case without the need to
add additional locking.

Fixes: https://tracker.ceph.com/issues/44311
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 8b866794f5b3674c5e3ad9adceb5e3230d55a0e0)

src/crush/CrushWrapper.h

index 9dffe69c8a228a1fc0e0cd9381a12487fafd1c28..136ad53864995730fd746fed5cdc9a1abfa91a38 100644 (file)
@@ -1321,6 +1321,7 @@ public:
       crush->max_devices = name_map.rbegin()->first + 1;
     }
     have_uniform_rules = !has_legacy_rule_ids();
+    build_rmaps();
   }
   int bucket_set_alg(int id, int alg);