Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
crush.c File Reference
#include <stdlib.h>
#include <assert.h>
#include <linux/crush/crush.h>

Go to the source code of this file.

Macros

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

Functions

const charcrush_bucket_alg_name (int alg)
 
int crush_get_bucket_item_weight (const struct crush_bucket *b, int p)
 
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)
 

Macro Definition Documentation

#define BUG_ON (   x)    assert(!(x))

Definition at line 8 of file crush.c.

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

Definition at line 7 of file crush.c.

Function Documentation

const char* crush_bucket_alg_name ( int  alg)

Definition at line 13 of file crush.c.

void crush_destroy ( struct crush_map map)

crush_destroy - Destroy a crush_map : crush_map pointer

Definition at line 102 of file crush.c.

void crush_destroy_bucket ( struct crush_bucket b)

Definition at line 80 of file crush.c.

void crush_destroy_bucket_list ( struct crush_bucket_list b)

Definition at line 54 of file crush.c.

void crush_destroy_bucket_straw ( struct crush_bucket_straw b)

Definition at line 71 of file crush.c.

void crush_destroy_bucket_tree ( struct crush_bucket_tree b)

Definition at line 63 of file crush.c.

void crush_destroy_bucket_uniform ( struct crush_bucket_uniform b)

Definition at line 47 of file crush.c.

int crush_get_bucket_item_weight ( const 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

Definition at line 29 of file crush.c.