From 4b15fb267075daa07fd6dbcd74b38d58ffef5510 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 e9799b442c8..064c4c9b916 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1616,6 +1616,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