From 4abb53d4f313f49af41d2d77af0cc18c932ef317 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 7 Jun 2012 16:52:57 -0700 Subject: [PATCH] crush: fix leaf recursion if we already collided This just saves us some cycles, but does not effect placement results at all. Signed-off-by: Sage Weil --- src/crush/mapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crush/mapper.c b/src/crush/mapper.c index f691535af6e62..8ca87d794d080 100644 --- a/src/crush/mapper.c +++ b/src/crush/mapper.c @@ -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], -- 2.39.5