dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit cc98da662594f5538942073561082e92be19d9fb
parent 0bcb5f2edec8035f5fbfb9a33d51ba1b6b19f168
Author: sin <sin@2f30.org>
Date:   Mon,  4 Mar 2019 15:42:26 +0000

Check cache offset/size against block descriptor

Diffstat:
Mdedup.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -417,6 +417,12 @@ check_cache(struct snapshot *snap, void *arg) if (lookup_cache_entry(cache, &cache_entry) < 0) { *ret = -1; return WALK_STOP; + } else { + if (cache_entry.offset != blk_desc->offset || + cache_entry.size != blk_desc->size) { + *ret = -1; + return WALK_STOP; + } } } return WALK_CONTINUE;