Struct crushtool::CrushMap [] [src]

pub struct CrushMap {
    pub magic: u32,
    pub max_buckets: i32,
    pub max_rules: u32,
    pub max_devices: i32,
    pub buckets: Vec<BucketTypes>,
    pub rules: Vec<Option<Rule>>,
    pub type_map: Vec<(i32, String)>,
    pub name_map: Vec<(i32, String)>,
    pub rule_name_map: Vec<(i32, String)>,
    pub choose_local_tries: Option<u32>,
    pub choose_local_fallback_tries: Option<u32>,
    pub choose_total_tries: Option<u32>,
    pub chooseleaf_descend_once: Option<u32>,
    pub chooseleaf_vary_r: Option<u8>,
    pub straw_calc_version: Option<u8>,
    pub allowed_bucket_algorithms: Option<u32>,
    pub chooseleaf_stable: Option<u8>,
}

CrushMap includes all buckets, rules, etc.

Fields

choose local retries before re-descent

choose local attempts using a fallback permutation before re-descent

choose attempts before giving up

attempt chooseleaf inner descent once for firstn mode; on reject retry outer descent. Note that this does not apply to a collision: in that case we will retry as we used to.

if non-zero, feed r into chooseleaf, bit-shifted right by (r-1) bits. a value of 1 is best for new clusters. for legacy clusters that want to limit reshuffling, a value of 3 or 4 will make the mappings line up a bit better with previous mappings.

allowed_bucket_algorithms is a bitmask, here the bit positions are BucketAlg::*. note that these are bits and BucketAlg* values are not, so we need to or together (1 << BucketAlg::Some_Value). The 0th bit is not used to minimize confusion (bucket type values start at 1).

if set to 1, it makes chooseleaf firstn to return stable results (if no local retry) so that data migrations would be optimal when some device fails.

Methods

impl CrushMap
[src]

Trait Implementations

impl Debug for CrushMap
[src]

Formats the value using the given formatter.

impl Clone for CrushMap
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for CrushMap
[src]

impl PartialEq for CrushMap
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Decodable for CrushMap
[src]

Deserialize a value using a Decoder.

impl Encodable for CrushMap
[src]

Serialize a value using an Encoder.

impl Default for CrushMap
[src]

Returns the "default value" for a type. Read more