[pbs-devel] [PATCH v3 proxmox-backup 36/58] datastore: dynamic index: add method to get digest

Christian Ebner c.ebner at proxmox.com
Thu Mar 28 13:36:45 CET 2024


In preparation for injecting reused payload chunks in payload streams
for regular files with unchanged metaddata.

Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
changes since version 2:
- not present in previous version

 pbs-datastore/src/dynamic_index.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pbs-datastore/src/dynamic_index.rs b/pbs-datastore/src/dynamic_index.rs
index 71a5082e1..b8047b5b1 100644
--- a/pbs-datastore/src/dynamic_index.rs
+++ b/pbs-datastore/src/dynamic_index.rs
@@ -72,6 +72,11 @@ impl DynamicEntry {
     pub fn end(&self) -> u64 {
         u64::from_le(self.end_le)
     }
+
+    #[inline]
+    pub fn digest(&self) -> [u8; 32] {
+        self.digest
+    }
 }
 
 pub struct DynamicIndexReader {
-- 
2.39.2





More information about the pbs-devel mailing list