Check cache offset/size against block descriptor - dedup - deduplicating backup program
 (HTM) git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit cc98da662594f5538942073561082e92be19d9fb
 (DIR) parent 0bcb5f2edec8035f5fbfb9a33d51ba1b6b19f168
 (HTM) Author: sin <sin@2f30.org>
       Date:   Mon,  4 Mar 2019 15:42:26 +0000
       
       Check cache offset/size against block descriptor
       
       Diffstat:
         M dedup.c                             |       6 ++++++
       
       1 file changed, 6 insertions(+), 0 deletions(-)
       ---
 (DIR) 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;