]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: rebuild shadow tree on 'osd crush reweight-subtree' 39736/head
authorSage Weil <sage@newdream.net>
Tue, 23 Feb 2021 15:15:01 +0000 (09:15 -0600)
committerSage Weil <sage@newdream.net>
Sat, 27 Feb 2021 15:13:46 +0000 (09:13 -0600)
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 9115c62ad2239d5122d8cd73cece54c1b122487a)

src/crush/CrushWrapper.cc

index e9799b442c8a89020b04aacc139c5ce2c86b9300..064c4c9b916655c911f6f6eb9a17cfaddc674ccc 100644 (file)
@@ -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;
 }