projects
/
cumulus.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEWS and TODO file updates.
[cumulus.git]
/
subfile.cc
diff --git
a/subfile.cc
b/subfile.cc
index
df6d3b2
..
acde97c
100644
(file)
--- 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 <mvrable@cs.ucsd.edu>
+/* 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
*
* 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
@@
-28,8
+27,8
@@
#include <arpa/inet.h>
#include "subfile.h"
#include <arpa/inet.h>
#include "subfile.h"
-#include "chunk.h"
-#include "sha1.h"
+#include "
third_party/
chunk.h"
+#include "
third_party/
sha1.h"
using std::list;
using std::map;
using std::list;
using std::map;
@@
-195,6
+194,12
@@
void Subfile::store_block_signatures(ObjectReference ref, block_summary summary)
free(packed);
}
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 };
/* Compute an incremental representation of the most recent block analyzed. */
enum subfile_item_type { SUBFILE_COPY, SUBFILE_NEW };
@@
-265,8
+270,7
@@
list<ObjectReference> Subfile::create_incremental(TarSegmentStore *tss,
o->write(tss);
ObjectReference ref = o->get_ref();
db->StoreObject(ref, block_csum, analyzed_len, block_age);
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;
ref.set_range(0, analyzed_len, true);
refs.push_back(ref);
delete o;