From b98fc8abb6ebe7cf476f65e0fa510a6ce4d778a3 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Fri, 28 Oct 2011 12:25:06 +0100 Subject: [PATCH] rename metadata_ll -> metadata --- Makefile | 2 +- metadata_ll.cc => metadata.cc | 6 +++--- metadata_ll.h => metadata.h | 6 +++--- metadata_checker.cc | 2 +- metadata_checker.h | 4 ++-- metadata_dumper.cc | 2 +- metadata_dumper.h | 4 ++-- thin_dump.cc | 4 ++-- thin_pool.cc | 2 +- thin_pool.h | 6 +++--- thin_repair.cc | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) rename metadata_ll.cc => metadata.cc (97%) rename metadata_ll.h => metadata.h (96%) diff --git a/Makefile b/Makefile index ffb728a..dec9b18 100644 --- a/Makefile +++ b/Makefile @@ -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 \ diff --git a/metadata_ll.cc b/metadata.cc similarity index 97% rename from metadata_ll.cc rename to metadata.cc index 11be8a1..54be060 100644 --- a/metadata_ll.cc +++ b/metadata.cc @@ -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(&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(); diff --git a/metadata_ll.h b/metadata.h similarity index 96% rename from metadata_ll.h rename to metadata.h index a40819a..494b7d2 100644 --- a/metadata_ll.h +++ b/metadata.h @@ -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 ptr; + typedef boost::shared_ptr ptr; tm_ptr tm_; superblock sb_; diff --git a/metadata_checker.cc b/metadata_checker.cc index 9d86966..c212076 100644 --- a/metadata_checker.cc +++ b/metadata_checker.cc @@ -125,7 +125,7 @@ namespace { //---------------------------------------------------------------- boost::optional -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")); diff --git a/metadata_checker.h b/metadata_checker.h index 69c3063..263e888 100644 --- a/metadata_checker.h +++ b/metadata_checker.h @@ -2,12 +2,12 @@ #define METADATA_CHECKER_H #include "error_set.h" -#include "metadata_ll.h" +#include "metadata.h" //---------------------------------------------------------------- namespace thin_provisioning { - boost::optional metadata_check(metadata_ll::ptr md); + boost::optional metadata_check(metadata::ptr md); } //---------------------------------------------------------------- diff --git a/metadata_dumper.cc b/metadata_dumper.cc index fb0f6c6..b60841b 100644 --- a/metadata_dumper.cc +++ b/metadata_dumper.cc @@ -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_); diff --git a/metadata_dumper.h b/metadata_dumper.h index ba6073e..b795b9b 100644 --- a/metadata_dumper.h +++ b/metadata_dumper.h @@ -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); } //---------------------------------------------------------------- diff --git a/thin_dump.cc b/thin_dump.cc index 49ae3a2..da89043 100644 --- a/thin_dump.cc +++ b/thin_dump.cc @@ -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 @@ -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") diff --git a/thin_pool.cc b/thin_pool.cc index eccd6b1..c1fdc8d 100644 --- a/thin_pool.cc +++ b/thin_pool.cc @@ -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) { } diff --git a/thin_pool.h b/thin_pool.h index 4682121..50530a7 100644 --- a/thin_pool.h +++ b/thin_pool.h @@ -1,7 +1,7 @@ #ifndef MULTISNAP_METADATA_H #define MULTISNAP_METADATA_H -#include "metadata_ll.h" +#include "metadata.h" #include #include @@ -41,7 +41,7 @@ namespace thin_provisioning { public: typedef boost::shared_ptr 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_; }; }; diff --git a/thin_repair.cc b/thin_repair.cc index b559641..29abf4e 100644 --- a/thin_repair.cc +++ b/thin_repair.cc @@ -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 maybe_errors = metadata_check(md); if (maybe_errors) {