From 5da7444145cc0688c9854a9c073fa45df7883d7f 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 1e87635c5cb0..69475c56f776 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1565,6 +1565,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.47.3