diff options
author | Alex Auvolat <alex@adnab.me> | 2023-09-07 13:44:11 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-09-07 13:44:11 +0200 |
commit | 6b008b5bd3843bb236f94a1b4472de11f5755f04 (patch) | |
tree | f9d2afe0e7a21b07bfa0f0e94a607a695f516e65 /src/block/layout.rs | |
parent | 6595efd82fc849c97b964969b6ff935738e7d24a (diff) | |
download | garage-6b008b5bd3843bb236f94a1b4472de11f5755f04.tar.gz garage-6b008b5bd3843bb236f94a1b4472de11f5755f04.zip |
block manager: add rebalance operation to rebalance multi-hdd setups
Diffstat (limited to 'src/block/layout.rs')
-rw-r--r-- | src/block/layout.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/block/layout.rs b/src/block/layout.rs index 8098654f..e32ef785 100644 --- a/src/block/layout.rs +++ b/src/block/layout.rs @@ -252,6 +252,14 @@ impl DataLayout { path.push(hex::encode(&hash.as_slice()[1..2])); path } + + pub(crate) fn without_secondary_locations(&self) -> Self { + Self { + data_dirs: self.data_dirs.clone(), + part_prim: self.part_prim.clone(), + part_sec: self.part_sec.iter().map(|_| vec![]).collect::<Vec<_>>(), + } + } } impl InitialFormat for DataLayout { |