aboutsummaryrefslogtreecommitdiff
path: root/src/block/block.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-09-11 10:52:01 +0000
committerAlex <alex@adnab.me>2023-09-11 10:52:01 +0000
commit7228fbfd4f62942cf0212d838446ece5ee7f8ef2 (patch)
treeef742d50efb5c3d66145f8a5583e4728c483cb9f /src/block/block.rs
parent4b4f2000f45a83b4dad3f2a8fd8392a245a30286 (diff)
parentba7ac52c196c452e0b09fef63862264e0c4582bb (diff)
downloadgarage-7228fbfd4f62942cf0212d838446ece5ee7f8ef2.tar.gz
garage-7228fbfd4f62942cf0212d838446ece5ee7f8ef2.zip
Merge pull request 'multi-hdd support (fix #218)' (#625) from multihdd into next
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/625
Diffstat (limited to 'src/block/block.rs')
-rw-r--r--src/block/block.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/block/block.rs b/src/block/block.rs
index 935aa900..20f57aa5 100644
--- a/src/block/block.rs
+++ b/src/block/block.rs
@@ -1,3 +1,5 @@
+use std::path::PathBuf;
+
use bytes::Bytes;
use serde::{Deserialize, Serialize};
use zstd::stream::{decode_all as zstd_decode, Encoder};
@@ -19,6 +21,14 @@ pub enum DataBlock {
Compressed(Bytes),
}
+#[derive(Debug)]
+pub enum DataBlockPath {
+ /// Uncompressed data fail
+ Plain(PathBuf),
+ /// Compressed data fail
+ Compressed(PathBuf),
+}
+
impl DataBlock {
/// Query whether this block is compressed
pub fn is_compressed(&self) -> bool {