X-Git-Url: http://git.vrable.net/?p=cumulus.git;a=blobdiff_plain;f=subfile.cc;h=70e172766273279039c3ebc64421be4b6ce75ee0;hp=eee3bdf0ff05bb8ad05282323ea7c1a1e8d03234;hb=3d780590edec4583eb3ef0ca16120afd0f7451f9;hpb=35dd99aa3d47805b661fe3126a951710fa7dee11 diff --git a/subfile.cc b/subfile.cc index eee3bdf..70e1727 100644 --- a/subfile.cc +++ b/subfile.cc @@ -1,7 +1,6 @@ -/* Cumulus: Smart Filesystem Backup to Dumb Servers - * - * Copyright (C) 2008 The Regents of the University of California - * Written by Michael Vrable +/* Cumulus: Efficient Filesystem Backup to the Cloud + * Copyright (C) 2008 The Cumulus Developers + * See the AUTHORS file for a list of contributors. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -263,16 +262,11 @@ list Subfile::create_incremental(TarSegmentStore *tss, // No data was matched. The entire block can be written out as is into a // new object, and the new_block_summary used to save chunk signatures. if (!matched_old) { - SHA1Checksum block_hash; - block_hash.process(analyzed_buf, analyzed_len); - string block_csum = block_hash.checksum_str(); - - o->set_data(analyzed_buf, analyzed_len); + o->set_age(block_age); + o->set_data(analyzed_buf, analyzed_len, NULL); o->write(tss); ObjectReference ref = o->get_ref(); - db->StoreObject(ref, block_csum, analyzed_len, block_age); store_analyzed_signatures(ref); - ref.set_range(0, analyzed_len, true); refs.push_back(ref); delete o; return refs; @@ -296,7 +290,7 @@ list Subfile::create_incremental(TarSegmentStore *tss, string block_csum = block_hash.checksum_str(); o->set_group("data"); - o->set_data(literal_buf, new_data); + o->set_data(literal_buf, new_data, NULL); o->write(tss); ObjectReference ref = o->get_ref(); for (i = items.begin(); i != items.end(); ++i) { @@ -306,7 +300,7 @@ list Subfile::create_incremental(TarSegmentStore *tss, } } - db->StoreObject(ref, block_csum, new_data, 0.0); + //db->StoreObject(ref, 0.0); block_summary summary; summary.ref = ref;