X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=subfile.cc;fp=subfile.cc;h=4f8d0fe656e9c27d13dfb9cc6dce1ff06204e454;hb=1ac0c454ef67468eeea13bec558b5fb11105e2e7;hp=df6d3b2b06165a3be775b7a0c5ad747f9ad00567;hpb=ee4d7decb376b72dcea690e377806d934c6ceabf;p=cumulus.git diff --git a/subfile.cc b/subfile.cc index df6d3b2..4f8d0fe 100644 --- a/subfile.cc +++ b/subfile.cc @@ -195,6 +195,12 @@ void Subfile::store_block_signatures(ObjectReference ref, block_summary summary) free(packed); } +void Subfile::store_analyzed_signatures(ObjectReference ref) +{ + if (analyzed_len >= 16384) + store_block_signatures(ref, new_block_summary); +} + /* Compute an incremental representation of the most recent block analyzed. */ enum subfile_item_type { SUBFILE_COPY, SUBFILE_NEW }; @@ -265,8 +271,7 @@ list Subfile::create_incremental(TarSegmentStore *tss, o->write(tss); ObjectReference ref = o->get_ref(); db->StoreObject(ref, block_csum, analyzed_len, block_age); - if (analyzed_len >= 16384) - store_block_signatures(ref, new_block_summary); + store_analyzed_signatures(ref); ref.set_range(0, analyzed_len, true); refs.push_back(ref); delete o;