Defines | Functions

crush.cpp File Reference

#include <stdlib.h>
#include <assert.h>
#include "crush.h"
#include <stdio.h>
Include dependency graph for crush.cpp:

Defines

#define kfree(x)   do { if (x) free(x); } while (0)
#define BUG_ON(x)   assert(!(x))

Functions

const char * crush_bucket_alg_name (int alg)
int crush_get_bucket_item_weight (struct crush_bucket *b, int p)
void crush_calc_parents (struct crush_map *map)
void crush_destroy_bucket_uniform (struct crush_bucket_uniform *b)
void crush_destroy_bucket_list (struct crush_bucket_list *b)
void crush_destroy_bucket_tree (struct crush_bucket_tree *b)
void crush_destroy_bucket_straw (struct crush_bucket_straw *b)
void crush_destroy_bucket (struct crush_bucket *b)
void crush_destroy (struct crush_map *map)

Define Documentation

#define BUG_ON (   x )    assert(!(x))
#define kfree (   x )    do { if (x) free(x); } while (0)

Function Documentation

const char* crush_bucket_alg_name ( int  alg )
void crush_calc_parents ( struct crush_map map )

crush_calc_parents - Calculate parent vectors for the given crush map. : crush_map pointer

void crush_destroy ( struct crush_map map )

crush_destroy - Destroy a crush_map : crush_map pointer

void crush_destroy_bucket ( struct crush_bucket b )
void crush_destroy_bucket_list ( struct crush_bucket_list b )
void crush_destroy_bucket_straw ( struct crush_bucket_straw b )
void crush_destroy_bucket_tree ( struct crush_bucket_tree b )
void crush_destroy_bucket_uniform ( struct crush_bucket_uniform b )
int crush_get_bucket_item_weight ( struct crush_bucket b,
int  p 
)

crush_get_bucket_item_weight - Get weight of an item in given bucket : bucket pointer : item index in bucket