From: Jason Dillaman Date: Tue, 14 Jul 2020 22:49:30 +0000 (-0400) Subject: crush/CrushWrapper: rebuild reverse maps after rebuilding crush map X-Git-Tag: v15.2.5~67^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=12878431ad1e1980ecc99581aa11b9371fb264ec;p=ceph.git crush/CrushWrapper: rebuild reverse maps after rebuilding crush map 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 (cherry picked from commit 8b866794f5b3674c5e3ad9adceb5e3230d55a0e0) --- diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index 8e3ceee48f66..ed4a90addc42 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -1331,6 +1331,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);