From 01e2084d3f1c5d560afddce6f22a263946d3e621 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 23 Feb 2021 09:15:01 -0600 Subject: [PATCH] crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree' Signed-off-by: Sage Weil (cherry picked from commit 9115c62ad2239d5122d8cd73cece54c1b122487a) --- src/crush/CrushWrapper.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 923d0df415abb..4de0716433d87 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1615,6 +1615,12 @@ int CrushWrapper::adjust_subtree_weight(CephContext *cct, int id, int weight, } } } + int ret = rebuild_roots_with_classes(cct); + if (ret < 0) { + ldout(cct, 0) << __func__ << " unable to rebuild roots with classes: " + << cpp_strerror(ret) << dendl; + return ret; + } return changed; } -- 2.39.5