]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: should break the loop if leaves overfull 20687/head
authorsongweibin <song.weibin@zte.com.cn>
Fri, 2 Mar 2018 07:46:11 +0000 (15:46 +0800)
committersongweibin <song.weibin@zte.com.cn>
Fri, 2 Mar 2018 07:54:06 +0000 (15:54 +0800)
Signed-off-by: songweibin <song.weibin@zte.com.cn>
src/crush/CrushWrapper.cc

index b4643158d35af771b69f1464a9893620243748a5..837f8062c48f95ac60f729811c37c0630066d155 100644 (file)
@@ -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) {