summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-06-07 16:52:57 -0700
committerSage Weil <sage@inktank.com>2012-06-08 10:58:11 -0700
commit4abb53d4f313f49af41d2d77af0cc18c932ef317 (patch)
tree404ce6425a6e18c6063194a5b47640c07af9d6be /src
parent487371149b1c094ad26abcb42fc56bbba8aa86b1 (diff)
downloadceph-4abb53d4f313f49af41d2d77af0cc18c932ef317.tar.gz
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 <sage@inktank.com>
Diffstat (limited to 'src')
-rw-r--r--src/crush/mapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crush/mapper.c b/src/crush/mapper.c
index f691535af6e..8ca87d794d0 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],