]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree' 39919/head
authorSage Weil <sage@newdream.net>
Tue, 23 Feb 2021 15:15:01 +0000 (09:15 -0600)
committerNathan Cutler <ncutler@suse.com>
Mon, 8 Mar 2021 17:05:59 +0000 (18:05 +0100)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9115c62ad2239d5122d8cd73cece54c1b122487a)

src/crush/CrushWrapper.cc

index 923d0df415abb382851b335a759af6f502107edd..4de0716433d879e80212736cf122ca475ea90857 100644 (file)
@@ -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;
 }