From: songweibin Date: Fri, 2 Mar 2018 07:46:11 +0000 (+0800) Subject: crush: should break the loop if leaves overfull X-Git-Tag: v13.0.2~102^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ad60da940d8f1e78716dfa15423113016ecdfc52;p=ceph.git crush: should break the loop if leaves overfull Signed-off-by: songweibin --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index b4643158d35a..837f8062c48f 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -3076,7 +3076,7 @@ int CrushWrapper::_choose_type_stack( ldout(cct, 10) << __func__ << " cumulative_fanout " << cumulative_fanout << dendl; - // identify underful targets for each intermediate level. + // identify underfull targets for each intermediate level. // this serves two purposes: // 1. we can tell when we are selecting a bucket that does not have any underfull // devices beneath it. that means that if the current input includes an overfull @@ -3176,6 +3176,7 @@ int CrushWrapper::_choose_type_stack( for (auto osd : leaves[pos]) { if (overfull.count(osd)) { any_overfull = true; + break; } } if (any_overfull) {