*/
-#define CRUSH_MAGIC 0x00010000ul
+#define CRUSH_MAGIC 0x00010000ul /* for detecting algorithm revisions */
-#define CRUSH_MAX_DEPTH 10
-#define CRUSH_MAX_SET 10
+#define CRUSH_MAX_DEPTH 10 /* max crush hierarchy depth */
+#define CRUSH_MAX_SET 10 /* max size of a mapping result */
/*
#ifndef _CRUSH_MAPPER_H
#define _CRUSH_MAPPER_H
-#include "crush.h"
-
/*
* CRUSH functions for find rules and then mapping an input to an
* output set.
*
* LGPL2
*/
+
+#include "crush.h"
+
extern int crush_find_rule(struct crush_map *map, int pool, int type, int size);
extern int crush_do_rule(struct crush_map *map,
int ruleno,
int x, int *result, int result_max,
- int forcefeed,
- __u32 *weights); /* -1 for none */
+ int forcefeed, /* -1 for none */
+ __u32 *weights);
#endif