X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=subfile.cc;h=4f8d0fe656e9c27d13dfb9cc6dce1ff06204e454;hp=df6d3b2b06165a3be775b7a0c5ad747f9ad00567;hb=f38dd9bcb0caffd3fc9126b05788c936690e8288;hpb=6450a89067119296800fc1148bb8a88d26857b6e 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;