From: Sage Weil Date: Tue, 23 Feb 2021 15:15:01 +0000 (-0600) Subject: crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree' X-Git-Tag: v14.2.22~22^2~5^2~7^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F39920%2Fhead;p=ceph.git crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree' Signed-off-by: Sage Weil (cherry picked from commit 9115c62ad2239d5122d8cd73cece54c1b122487a) --- 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; }