Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d7c1f61 authored by Sage Weil's avatar Sage Weil Committed by Alex Elder
Browse files

crush: avoid recursion if we have already collided



This saves us some cycles, but does not affect the placement result at
all.

This corresponds to ceph.git commit 4abb53d4f.

Signed-off-by: default avatarSage Weil <sage@inktank.com>
parent 1604f488
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ static int crush_choose(const struct crush_map *map,
				}

				reject = 0;
				if (recurse_to_leaf) {
				if (!collide && recurse_to_leaf) {
					if (item < 0) {
						if (crush_choose(map,
							 map->buckets[-1-item],