#define _LBS_METADATA_H
#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#include <list>
#include <string>
#include <sstream>
#include "ref.h"
#include "util.h"
+extern bool flag_full_metadata;
+
/* Metadata for a single inode, ready to be written out. */
struct MetadataItem {
int offset;
ObjectReference close();
bool find(const std::string& path);
- ObjectReference *old_ref() const {
+ ObjectReference old_ref() const {
return ObjectReference::parse(old_metadata_loc);
}
+ bool is_unchanged(const struct stat *stat_buf);
+
dictionary get_old_metadata() const { return old_metadata; }
+ std::list<ObjectReference> get_blocks();
+ std::string get_checksum() { return old_metadata["checksum"]; }
private:
void metadata_flush();