[cache tools] knock out OPEN from the metadata enum

This commit is contained in:
Joe Thornber 2016-10-07 15:01:16 -04:00
parent 05c4b7b400
commit d710cad52b
4 changed files with 4 additions and 5 deletions

View File

@ -36,7 +36,7 @@ namespace {
int dump(string const &dev, string const &output, flags const &fs) {
try {
block_manager<>::ptr bm = open_bm(dev, block_manager<>::READ_ONLY);
metadata::ptr md(new metadata(bm, metadata::OPEN));
metadata::ptr md(new metadata(bm));
if (want_stdout(output)) {
emitter::ptr e = create_xml_emitter(cout);

View File

@ -19,7 +19,7 @@ using namespace caching;
namespace {
metadata::ptr open_metadata_for_read(string const &path) {
block_manager<>::ptr bm = open_bm(path, block_manager<>::READ_ONLY);
return metadata::ptr(new metadata(bm, metadata::OPEN));
return metadata::ptr(new metadata(bm));
}
emitter::ptr output_emitter(string const &path) {

View File

@ -298,7 +298,7 @@ namespace {
int writeback_(flags const &f) {
block_manager<>::ptr bm = open_bm(*f.metadata_dev, block_manager<>::READ_WRITE);
metadata md(bm, metadata::OPEN);
metadata md(bm);
// FIXME: we're going to have to copy runs to get the through put with small block sizes
unsigned max_ios = f.cache_size / (md.sb_.data_block_size << SECTOR_SHIFT);

View File

@ -19,8 +19,7 @@ namespace caching {
class metadata {
public:
enum open_type {
CREATE,
OPEN
CREATE
};
typedef block_manager<>::read_ref read_ref;