Add some comments to explain type fields - dedup - deduplicating backup program HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 578a83321e46eade65fa2d2a4cff5e57f4f4ba03 DIR parent 083901e286dddcf542979c1037dea36a5f7ab1b1 HTML Author: sin <sin@2f30.org> Date: Thu, 28 Feb 2019 13:24:02 +0000 Add some comments to explain type fields Diffstat: M dedup.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) --- DIR diff --git a/dedup.h b/dedup.h @@ -23,46 +23,46 @@ struct cache; struct chunker; struct snapshot_hdr { - uint64_t flags; - uint64_t size; + uint64_t flags; /* bottom 16 bits are maj/min version */ + uint64_t size; /* size of snapshots file */ uint64_t nr_snapshots; uint64_t reserved[4]; }; struct stats { - uint64_t orig_size; - uint64_t comp_size; - uint64_t dedup_size; + uint64_t orig_size; /* original store size */ + uint64_t comp_size; /* compressed store size */ + uint64_t dedup_size; /* deduplicated store size */ uint64_t min_blk_size; uint64_t max_blk_size; - uint64_t nr_blks; + uint64_t nr_blks; /* number of unique blocks */ uint64_t reserved[6]; }; struct blk_hdr { - uint64_t flags; - uint64_t size; + uint64_t flags; /* bottom 16 bits are maj/min version */ + uint64_t size; /* size of store file */ struct stats st; }; struct blk_desc { - uint8_t md[MDSIZE]; - uint64_t offset; - uint64_t size; + uint8_t md[MDSIZE]; /* hash of block */ + uint64_t offset; /* offset into store file */ + uint64_t size; /* size of block */ }; struct snapshot { - uint64_t size; - uint8_t msg[MSGSIZE]; + uint64_t size; /* size of snapshot (including block descriptors) */ + uint8_t msg[MSGSIZE]; /* arbitrary message attached to snapshot */ uint8_t md[MDSIZE]; /* hash of snapshot */ uint64_t nr_blk_descs; struct blk_desc blk_desc[]; }; struct cache_entry { - uint8_t md[MDSIZE]; - uint64_t offset; - uint64_t size; + uint8_t md[MDSIZE]; /* hash of block */ + uint64_t offset; /* offset into store file */ + uint64_t size; /* size of block */ }; /* dedup.c */