[cache_dump, cache_restore] restore/dump cycle works

This commit is contained in:
Joe Thornber
2013-09-19 13:45:56 +01:00
parent c476de1756
commit 61e90998c0
13 changed files with 129 additions and 39 deletions

View File

@@ -1,14 +1,15 @@
#include "caching/restore_emitter.h"
#include "caching/superblock.h"
#include "caching/mapping_array.h"
using namespace std;
using namespace caching;
using namespace mapping_array_detail;
using namespace std;
using namespace superblock_detail;
//----------------------------------------------------------------
namespace {
using namespace superblock_detail;
class restorer : public emitter {
public:
restorer(metadata::ptr md)
@@ -54,6 +55,11 @@ namespace {
sb.read_misses = 0;
sb.write_hits = 0;
sb.write_misses = 0;
struct mapping unmapped_value;
unmapped_value.oblock_ = 0;
unmapped_value.flags_ = 0;
md_->mappings_->grow(nr_cache_blocks, unmapped_value);
}
virtual void end_superblock() {