#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <iostream>
#include "crush.h"
#include "hash.h"
Defines | |
#define | BUG_ON(x) assert(!(x)) |
#define | dprintk(args...) |
#define | kmalloc(x, f) malloc(x) |
#define | kfree(x) free(x) |
Functions | |
int | crush_find_rule (struct crush_map *map, int ruleset, int type, int size) |
int | crush_do_rule (VDRIVE::Distributor *dist, struct crush_map *map, int ruleno, int64_t x, int *result, int result_max, int force, uint32_t *weight) |
#define BUG_ON | ( | x ) | assert(!(x)) |
#define dprintk | ( | args... ) |
#define kfree | ( | x ) | free(x) |
#define kmalloc | ( | x, | |
f | |||
) | malloc(x) |
int crush_do_rule | ( | VDRIVE::Distributor * | dist, |
struct crush_map * | map, | ||
int | ruleno, | ||
int64_t | x, | ||
int * | result, | ||
int | result_max, | ||
int | force, | ||
uint32_t * | weight | ||
) |
crush_do_rule - calculate a mapping with the given input and rule : the crush_map : the rule id : hash input
int crush_find_rule | ( | struct crush_map * | map, |
int | ruleset, | ||
int | type, | ||
int | size | ||
) |
crush_find_rule - find a crush_rule id for a given ruleset, type, and size. : the crush_map : the storage ruleset id (user defined) : storage ruleset type (user defined) : output set size