From: Ilya Dryomov Date: Mon, 23 Dec 2013 16:12:56 +0000 (+0200) Subject: crush: misc formatting and whitespace fixes X-Git-Tag: v0.75~46^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=537a7c3f97b4207051e35624e85277bc18f607f6;p=ceph.git crush: misc formatting and whitespace fixes - whitespace in crush.h - format is_out() definition and call site to 80 columns - whitespace around local_fallback_tries in crush_choose_firstn() All of this is to shrink the diff with the kernel implementation. Signed-off-by: Ilya Dryomov --- diff --git a/src/crush/crush.h b/src/crush/crush.h index ac7e816ad4129..0da7180b449ab 100644 --- a/src/crush/crush.h +++ b/src/crush/crush.h @@ -25,7 +25,6 @@ #define CRUSH_MAGIC 0x00010000ul /* for detecting algorithm revisions */ - #define CRUSH_MAX_DEPTH 10 /* max crush hierarchy depth */ #define CRUSH_MAX_DEVICE_WEIGHT (100u * 0x10000u) diff --git a/src/crush/mapper.c b/src/crush/mapper.c index 705f779d5883d..76c3b62d0da86 100644 --- a/src/crush/mapper.c +++ b/src/crush/mapper.c @@ -265,7 +265,9 @@ static int crush_bucket_choose(struct crush_bucket *in, int x, int r) * true if device is marked "out" (failed, fully offloaded) * of the cluster */ -static int is_out(const struct crush_map *map, const __u32 *weight, int weight_max, int item, int x) +static int is_out(const struct crush_map *map, + const __u32 *weight, int weight_max, + int item, int x) { if (item >= weight_max) return 1; @@ -392,7 +394,7 @@ static int crush_choose_firstn(const struct crush_map *map, out2, outpos, recurse_tries, 0, local_tries, - local_fallback_tries, + local_fallback_tries, 0, NULL) <= outpos) /* didn't get leaf */ @@ -406,7 +408,8 @@ static int crush_choose_firstn(const struct crush_map *map, if (!reject) { /* out? */ if (itemtype == 0) - reject = is_out(map, weight, weight_max, + reject = is_out(map, weight, + weight_max, item, x); else reject = 0;