]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: misc formatting and whitespace fixes 987/head
authorIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 23 Dec 2013 16:12:56 +0000 (18:12 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Mon, 23 Dec 2013 16:12:56 +0000 (18:12 +0200)
- 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 <ilya.dryomov@inktank.com>
src/crush/crush.h
src/crush/mapper.c

index ac7e816ad412990d658ef0ad689fd5fd4099ed47..0da7180b449ab838ffd46cd64908add4046e5242 100644 (file)
@@ -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)
index 705f779d5883d8abf0c6f7ebaaf84145266107c8..76c3b62d0da86dac21bd79b6b71b52cfd756b5fb 100644 (file)
@@ -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;