-/* 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
#include <string>
#include <vector>
-#include "chunk.h"
#include "localdb.h"
#include "ref.h"
#include "store.h"
+#include "third_party/chunk.h"
class Subfile {
public:
// buffer until all operations referring to it are finished.
void analyze_new_block(const char *buf, size_t len);
+ // Store the signatures for the most recently-analyzed block in the local
+ // database (linked to the specified object), if the block is sufficiently
+ // large. If signatures already exist, they will be overwritten.
+ void store_analyzed_signatures(ObjectReference ref);
+
std::list<ObjectReference> create_incremental(TarSegmentStore *tss,
LbsObject *o,
double block_age);
static const int HASH_SIZE = 20;
private:
+ std::string algorithm_name;
+ size_t hash_size;
+
struct chunk_info {
- char hash[HASH_SIZE];
int offset, len;
+ std::string hash;
};
struct block_summary {
void index_chunks(ObjectReference ref);
void free_analysis();
void store_block_signatures(ObjectReference ref, block_summary summary);
-
- std::string get_algorithm() {
- return chunk_algorithm_name() + "/sha1";
- }
};
#endif // _LBS_SUBFILE_H