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
magic: u32
max_buckets: i32
max_rules: u32
max_devices: i32
buckets: Vec<BucketTypes>
rules: Vec<Option<Rule>>
type_map: Vec<(i32, String)>
name_map: Vec<(i32, String)>
rule_name_map: Vec<(i32, String)>
choose_local_tries: Option<u32>
choose local retries before re-descent
choose_local_fallback_tries: Option<u32>
choose local attempts using a fallback permutation before re-descent
choose_total_tries: Option<u32>
choose attempts before giving up
chooseleaf_descend_once: Option<u32>
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.
chooseleaf_vary_r: Option<u8>
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.
straw_calc_version: Option<u8>
allowed_bucket_algorithms: Option<u32>
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).
chooseleaf_stable: Option<u8>
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]
fn with_tunables(self, version: CephVersion) -> Self
fn next_bucket_id(&self) -> i32
fn add_bucket(self, bucket_type: BucketTypes) -> Self
Trait Implementations
impl Debug for CrushMap
[src]
impl Clone for CrushMap
[src]
fn clone(&self) -> CrushMap
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for CrushMap
[src]
impl PartialEq for CrushMap
[src]
fn eq(&self, __arg_0: &CrushMap) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &CrushMap) -> bool
This method tests for !=
.
impl Decodable for CrushMap
[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<CrushMap, __D::Error>
Deserialize a value using a Decoder
.
impl Encodable for CrushMap
[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>
Serialize a value using an Encoder
.