rename metadata_ll -> metadata

This commit is contained in:
Joe Thornber 2011-10-28 12:25:06 +01:00
parent c2dfb0b462
commit b98fc8abb6
11 changed files with 20 additions and 20 deletions

View File

@ -8,9 +8,9 @@ SOURCE=\
error_set.cc \
hex_dump.cc \
human_readable_format.cc \
metadata.cc \
metadata_checker.cc \
metadata_dumper.cc \
metadata_ll.cc \
metadata_disk_structures.cc \
space_map_disk.cc \
thin_pool.cc \

View File

@ -1,4 +1,4 @@
#include "metadata_ll.h"
#include "metadata.h"
#include "math_utils.h"
#include "space_map_disk.h"
@ -82,7 +82,7 @@ namespace {
//----------------------------------------------------------------
metadata_ll::metadata_ll(std::string const &dev_path)
metadata::metadata(std::string const &dev_path)
: tm_(open_tm(dev_path)),
sb_(read_superblock(tm_->get_bm())),
metadata_sm_(open_metadata_sm(tm_, static_cast<void *>(&sb_.metadata_space_map_root_))),
@ -102,7 +102,7 @@ metadata_ll::metadata_ll(std::string const &dev_path)
#endif
void
metadata_ll::commit()
metadata::commit()
{
sb_.data_mapping_root_ = mappings_.get_root();
sb_.device_details_root_ = details_.get_root();

View File

@ -123,14 +123,14 @@ namespace thin_provisioning {
// the in kernel driver. This class gives access to the low-level
// implementation of metadata. Implement more specific interfaces
// on top of this.
struct metadata_ll {
metadata_ll(std::string const &dev_path);
struct metadata {
metadata(std::string const &dev_path);
void commit();
typedef block_manager<>::read_ref read_ref;
typedef block_manager<>::write_ref write_ref;
typedef boost::shared_ptr<metadata_ll> ptr;
typedef boost::shared_ptr<metadata> ptr;
tm_ptr tm_;
superblock sb_;

View File

@ -125,7 +125,7 @@ namespace {
//----------------------------------------------------------------
boost::optional<error_set::ptr>
thin_provisioning::metadata_check(metadata_ll::ptr md)
thin_provisioning::metadata_check(metadata::ptr md)
{
error_set::ptr errors(new error_set("Errors in metadata"));

View File

@ -2,12 +2,12 @@
#define METADATA_CHECKER_H
#include "error_set.h"
#include "metadata_ll.h"
#include "metadata.h"
//----------------------------------------------------------------
namespace thin_provisioning {
boost::optional<persistent_data::error_set::ptr> metadata_check(metadata_ll::ptr md);
boost::optional<persistent_data::error_set::ptr> metadata_check(metadata::ptr md);
}
//----------------------------------------------------------------

View File

@ -123,7 +123,7 @@ namespace {
//----------------------------------------------------------------
void
thin_provisioning::metadata_dump(metadata_ll::ptr md, emitter::ptr e)
thin_provisioning::metadata_dump(metadata::ptr md, emitter::ptr e)
{
e->begin_superblock("", md->sb_.time_, md->sb_.trans_id_, md->sb_.data_block_size_);

View File

@ -2,12 +2,12 @@
#define METADATA_DUMPER_H
#include "emitter.h"
#include "metadata_ll.h"
#include "metadata.h"
//----------------------------------------------------------------
namespace thin_provisioning {
void metadata_dump(metadata_ll::ptr md, emitter::ptr e);
void metadata_dump(metadata::ptr md, emitter::ptr e);
}
//----------------------------------------------------------------

View File

@ -2,7 +2,7 @@
#include "human_readable_format.h"
#include "metadata_dumper.h"
#include "metadata_ll.h"
#include "metadata.h"
#include "xml_format.h"
#include <boost/program_options.hpp>
@ -17,7 +17,7 @@ namespace po = boost::program_options;
namespace {
void dump(string const &path, string const &format) {
metadata_ll::ptr md(new metadata_ll(path));
metadata::ptr md(new metadata(path));
emitter::ptr e;
if (format == "xml")

View File

@ -88,7 +88,7 @@ thin::set_mapped_blocks(block_address count)
//--------------------------------
thin_pool::thin_pool(metadata_ll::ptr md)
thin_pool::thin_pool(metadata::ptr md)
: md_(md)
{
}

View File

@ -1,7 +1,7 @@
#ifndef MULTISNAP_METADATA_H
#define MULTISNAP_METADATA_H
#include "metadata_ll.h"
#include "metadata.h"
#include <string>
#include <boost/shared_ptr.hpp>
@ -41,7 +41,7 @@ namespace thin_provisioning {
public:
typedef boost::shared_ptr<thin_pool> ptr;
thin_pool(metadata_ll::ptr md);
thin_pool(metadata::ptr md);
~thin_pool();
void create_thin(thin_dev_t dev);
@ -67,7 +67,7 @@ namespace thin_provisioning {
friend class thin;
bool device_exists(thin_dev_t dev) const;
metadata_ll::ptr md_;
metadata::ptr md_;
};
};

View File

@ -10,7 +10,7 @@ using namespace thin_provisioning;
namespace {
int check(string const &path) {
metadata_ll::ptr md(new metadata_ll(path));
metadata::ptr md(new metadata(path));
optional<error_set::ptr> maybe_errors = metadata_check(md);
if (maybe_errors) {