#include <crushwrapper.h>
Public Member Functions | |
CrushWrapper () | |
~CrushWrapper () | |
void | create () |
int | get_num_type_names () |
int | get_type_id (const char *s) |
const char * | get_type_name (int t) |
void | set_type_name (int i, const char *n) |
int | get_item_id (const char *s) |
const char * | get_item_name (int t) |
void | set_item_name (int i, const char *n) |
int | get_rule_id (const char *n) |
const char * | get_rule_name (int t) |
void | set_rule_name (int i, const char *n) |
int | get_max_devices () |
int | get_max_rules () |
bool | rule_exists (unsigned ruleno) |
int | add_rule (int len, int pool, int type, int minsize, int maxsize, int ruleno) |
int | set_rule_step (unsigned ruleno, unsigned step, int op, int arg1, int arg2) |
int | set_rule_step_take (unsigned ruleno, unsigned step, int val) |
int | set_rule_step_choose_firstn (unsigned ruleno, unsigned step, int val, int type) |
int | set_rule_step_choose_indep (unsigned ruleno, unsigned step, int val, int type) |
int | set_rule_step_choose_leaf_firstn (unsigned ruleno, unsigned step, int val, int type) |
int | set_rule_step_choose_leaf_indep (unsigned ruleno, unsigned step, int val, int type) |
int | set_rule_step_emit (unsigned ruleno, unsigned step) |
int | get_max_buckets () |
int | get_next_bucket_id () |
int | add_bucket (int bucketno, int alg, int hash, int type, int size, int *items, int *weights) |
void | finalize () |
void | set_max_devices (int m) |
int | find_rule (int pool, int type, int size) |
void | do_rule (VDRIVE::Distributor *dist, int rule, int64_t x, vector< int > &out, int maxout, int forcefeed, vector< uint32_t > &weight) const |
Public Attributes | |
struct crush_map * | crush |
std::map< int, string > | type_map |
std::map< int, string > | name_map |
std::map< int, string > | rule_name_map |
bool | have_rmaps |
std::map< string, int > | type_rmap |
std::map< string, int > | name_rmap |
std::map< string, int > | rule_name_rmap |
CrushWrapper::CrushWrapper | ( | ) | [inline] |
CrushWrapper::~CrushWrapper | ( | ) | [inline] |
int CrushWrapper::add_bucket | ( | int | bucketno, |
int | alg, | ||
int | hash, | ||
int | type, | ||
int | size, | ||
int * | items, | ||
int * | weights | ||
) | [inline] |
int CrushWrapper::add_rule | ( | int | len, |
int | pool, | ||
int | type, | ||
int | minsize, | ||
int | maxsize, | ||
int | ruleno | ||
) | [inline] |
void CrushWrapper::create | ( | ) | [inline] |
void CrushWrapper::do_rule | ( | VDRIVE::Distributor * | dist, |
int | rule, | ||
int64_t | x, | ||
vector< int > & | out, | ||
int | maxout, | ||
int | forcefeed, | ||
vector< uint32_t > & | weight | ||
) | const [inline] |
void CrushWrapper::finalize | ( | ) | [inline] |
int CrushWrapper::find_rule | ( | int | pool, |
int | type, | ||
int | size | ||
) | [inline] |
int CrushWrapper::get_item_id | ( | const char * | s ) | [inline] |
const char* CrushWrapper::get_item_name | ( | int | t ) | [inline] |
int CrushWrapper::get_max_buckets | ( | ) | [inline] |
int CrushWrapper::get_max_devices | ( | ) | [inline] |
int CrushWrapper::get_max_rules | ( | ) | [inline] |
int CrushWrapper::get_next_bucket_id | ( | ) | [inline] |
int CrushWrapper::get_num_type_names | ( | ) | [inline] |
int CrushWrapper::get_rule_id | ( | const char * | n ) | [inline] |
const char* CrushWrapper::get_rule_name | ( | int | t ) | [inline] |
int CrushWrapper::get_type_id | ( | const char * | s ) | [inline] |
const char* CrushWrapper::get_type_name | ( | int | t ) | [inline] |
bool CrushWrapper::rule_exists | ( | unsigned | ruleno ) | [inline] |
void CrushWrapper::set_item_name | ( | int | i, |
const char * | n | ||
) | [inline] |
void CrushWrapper::set_max_devices | ( | int | m ) | [inline] |
void CrushWrapper::set_rule_name | ( | int | i, |
const char * | n | ||
) | [inline] |
int CrushWrapper::set_rule_step | ( | unsigned | ruleno, |
unsigned | step, | ||
int | op, | ||
int | arg1, | ||
int | arg2 | ||
) | [inline] |
int CrushWrapper::set_rule_step_choose_firstn | ( | unsigned | ruleno, |
unsigned | step, | ||
int | val, | ||
int | type | ||
) | [inline] |
int CrushWrapper::set_rule_step_choose_indep | ( | unsigned | ruleno, |
unsigned | step, | ||
int | val, | ||
int | type | ||
) | [inline] |
int CrushWrapper::set_rule_step_choose_leaf_firstn | ( | unsigned | ruleno, |
unsigned | step, | ||
int | val, | ||
int | type | ||
) | [inline] |
int CrushWrapper::set_rule_step_choose_leaf_indep | ( | unsigned | ruleno, |
unsigned | step, | ||
int | val, | ||
int | type | ||
) | [inline] |
int CrushWrapper::set_rule_step_emit | ( | unsigned | ruleno, |
unsigned | step | ||
) | [inline] |
int CrushWrapper::set_rule_step_take | ( | unsigned | ruleno, |
unsigned | step, | ||
int | val | ||
) | [inline] |
void CrushWrapper::set_type_name | ( | int | i, |
const char * | n | ||
) | [inline] |
struct crush_map* CrushWrapper::crush |
std::map<int, string> CrushWrapper::name_map |
std::map<string, int> CrushWrapper::name_rmap |
std::map<int, string> CrushWrapper::rule_name_map |
std::map<string, int> CrushWrapper::rule_name_rmap |
std::map<int, string> CrushWrapper::type_map |
std::map<string, int> CrushWrapper::type_rmap |