From 326fd3408b40b14e6174a3abc77bc11f1ff7ab55 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 10 Jan 2013 21:36:38 +0000 Subject: [PATCH] move space maps to their own sub directory --- Makefile.in | 6 +++--- .../careful_alloc.cc} | 2 +- .../careful_alloc.h} | 2 +- .../{space_map_core.h => space-maps/core.h} | 2 +- .../{space_map_disk.cc => space-maps/disk.cc} | 16 ++++++++-------- .../{space_map_disk.h => space-maps/disk.h} | 5 +++-- .../space-maps/disk_structures.h | 0 .../recursive.cc} | 2 +- .../recursive.h} | 2 +- thin-provisioning/metadata.cc | 4 ++-- thin-provisioning/metadata.h | 5 +++-- unit-tests/btree_t.cc | 2 +- unit-tests/endian_t.cc | 2 +- unit-tests/space_map_t.cc | 8 ++++---- unit-tests/transaction_manager_t.cc | 2 +- 15 files changed, 31 insertions(+), 29 deletions(-) rename persistent-data/{space_map_careful_alloc.cc => space-maps/careful_alloc.cc} (98%) rename persistent-data/{space_map_careful_alloc.h => space-maps/careful_alloc.h} (97%) rename persistent-data/{space_map_core.h => space-maps/core.h} (98%) rename persistent-data/{space_map_disk.cc => space-maps/disk.cc} (98%) rename persistent-data/{space_map_disk.h => space-maps/disk.h} (92%) rename thin-provisioning/space_map_disk_structures.h => persistent-data/space-maps/disk_structures.h (100%) rename persistent-data/{space_map_recursive.cc => space-maps/recursive.cc} (99%) rename persistent-data/{space_map_recursive.h => space-maps/recursive.h} (96%) diff --git a/Makefile.in b/Makefile.in index 1d27643..d476189 100644 --- a/Makefile.in +++ b/Makefile.in @@ -33,9 +33,9 @@ SOURCE=\ persistent-data/hex_dump.cc \ persistent-data/lock_tracker.cc \ persistent-data/space_map.cc \ - persistent-data/space_map_disk.cc \ - persistent-data/space_map_recursive.cc \ - persistent-data/space_map_careful_alloc.cc \ + persistent-data/space-maps/disk.cc \ + persistent-data/space-maps/recursive.cc \ + persistent-data/space-maps/careful_alloc.cc \ persistent-data/transaction_manager.cc \ thin-provisioning/human_readable_format.cc \ thin-provisioning/metadata.cc \ diff --git a/persistent-data/space_map_careful_alloc.cc b/persistent-data/space-maps/careful_alloc.cc similarity index 98% rename from persistent-data/space_map_careful_alloc.cc rename to persistent-data/space-maps/careful_alloc.cc index b9c4115..2a1394a 100644 --- a/persistent-data/space_map_careful_alloc.cc +++ b/persistent-data/space-maps/careful_alloc.cc @@ -16,7 +16,7 @@ // with thin-provisioning-tools. If not, see // . -#include "persistent-data/space_map_careful_alloc.h" +#include "persistent-data/space-maps/careful_alloc.h" #include diff --git a/persistent-data/space_map_careful_alloc.h b/persistent-data/space-maps/careful_alloc.h similarity index 97% rename from persistent-data/space_map_careful_alloc.h rename to persistent-data/space-maps/careful_alloc.h index 358c180..d99a6ed 100644 --- a/persistent-data/space_map_careful_alloc.h +++ b/persistent-data/space-maps/careful_alloc.h @@ -19,7 +19,7 @@ #ifndef SPACE_MAP_CAREFUL_ALLOC_H #define SPACE_MAP_CAREFUL_ALLOC_H -#include "space_map.h" +#include "persistent-data/space_map.h" //---------------------------------------------------------------- diff --git a/persistent-data/space_map_core.h b/persistent-data/space-maps/core.h similarity index 98% rename from persistent-data/space_map_core.h rename to persistent-data/space-maps/core.h index f5aa3a0..63f4bfe 100644 --- a/persistent-data/space_map_core.h +++ b/persistent-data/space-maps/core.h @@ -19,7 +19,7 @@ #ifndef CORE_MAP_H #define CORE_MAP_H -#include "space_map.h" +#include "persistent-data/space_map.h" //---------------------------------------------------------------- diff --git a/persistent-data/space_map_disk.cc b/persistent-data/space-maps/disk.cc similarity index 98% rename from persistent-data/space_map_disk.cc rename to persistent-data/space-maps/disk.cc index 62d9a62..559d161 100644 --- a/persistent-data/space_map_disk.cc +++ b/persistent-data/space-maps/disk.cc @@ -16,15 +16,15 @@ // with thin-provisioning-tools. If not, see // . -#include "space_map_disk.h" +#include "disk.h" +#include "disk_structures.h" +#include "recursive.h" +#include "careful_alloc.h" -#include "checksum.h" -#include "endian_utils.h" -#include "math_utils.h" -#include "space_map_disk_structures.h" -#include "space_map_recursive.h" -#include "space_map_careful_alloc.h" -#include "transaction_manager.h" +#include "persistent-data/checksum.h" +#include "persistent-data/endian_utils.h" +#include "persistent-data/math_utils.h" +#include "persistent-data/transaction_manager.h" using namespace boost; using namespace persistent_data; diff --git a/persistent-data/space_map_disk.h b/persistent-data/space-maps/disk.h similarity index 92% rename from persistent-data/space_map_disk.h rename to persistent-data/space-maps/disk.h index 8e6bff4..636ab5f 100644 --- a/persistent-data/space_map_disk.h +++ b/persistent-data/space-maps/disk.h @@ -19,8 +19,9 @@ #ifndef SPACE_MAP_DISK_H #define SPACE_MAP_DISK_H -#include "btree_checker.h" -#include "space_map.h" +// FIXME: why is btree_checker needed? +#include "persistent-data/btree_checker.h" +#include "persistent-data/space_map.h" //---------------------------------------------------------------- diff --git a/thin-provisioning/space_map_disk_structures.h b/persistent-data/space-maps/disk_structures.h similarity index 100% rename from thin-provisioning/space_map_disk_structures.h rename to persistent-data/space-maps/disk_structures.h diff --git a/persistent-data/space_map_recursive.cc b/persistent-data/space-maps/recursive.cc similarity index 99% rename from persistent-data/space_map_recursive.cc rename to persistent-data/space-maps/recursive.cc index 8283f98..666cbce 100644 --- a/persistent-data/space_map_recursive.cc +++ b/persistent-data/space-maps/recursive.cc @@ -16,7 +16,7 @@ // with thin-provisioning-tools. If not, see // . -#include "persistent-data/space_map_recursive.h" +#include "persistent-data/space-maps/recursive.h" using namespace persistent_data; diff --git a/persistent-data/space_map_recursive.h b/persistent-data/space-maps/recursive.h similarity index 96% rename from persistent-data/space_map_recursive.h rename to persistent-data/space-maps/recursive.h index 63d1aff..423194c 100644 --- a/persistent-data/space_map_recursive.h +++ b/persistent-data/space-maps/recursive.h @@ -19,7 +19,7 @@ #ifndef SPACE_MAP_RECURSIVE_H #define SPACE_MAP_RECURSIVE_H -#include "space_map.h" +#include "persistent-data/space_map.h" //---------------------------------------------------------------- diff --git a/thin-provisioning/metadata.cc b/thin-provisioning/metadata.cc index d3fc8c1..276a7f3 100644 --- a/thin-provisioning/metadata.cc +++ b/thin-provisioning/metadata.cc @@ -19,8 +19,8 @@ #include "thin-provisioning/metadata.h" #include "persistent-data/math_utils.h" -#include "persistent-data/space_map_core.h" -#include "persistent-data/space_map_disk.h" +#include "persistent-data/space-maps/core.h" +#include "persistent-data/space-maps/disk.h" #include #include diff --git a/thin-provisioning/metadata.h b/thin-provisioning/metadata.h index edbea19..1fc545a 100644 --- a/thin-provisioning/metadata.h +++ b/thin-provisioning/metadata.h @@ -22,10 +22,11 @@ #include "persistent-data/block.h" #include "persistent-data/btree.h" #include "persistent-data/endian_utils.h" -#include "thin-provisioning/metadata_disk_structures.h" -#include "persistent-data/space_map_disk.h" +#include "persistent-data/space-maps/disk.h" #include "persistent-data/transaction_manager.h" +#include "thin-provisioning/metadata_disk_structures.h" + //---------------------------------------------------------------- namespace thin_provisioning { diff --git a/unit-tests/btree_t.cc b/unit-tests/btree_t.cc index 6560858..c4daf2a 100644 --- a/unit-tests/btree_t.cc +++ b/unit-tests/btree_t.cc @@ -17,7 +17,7 @@ // . #include "persistent-data/transaction_manager.h" -#include "persistent-data/space_map_core.h" +#include "persistent-data/space-maps/core.h" #include "persistent-data/btree.h" #define BOOST_TEST_MODULE BTreeTests diff --git a/unit-tests/endian_t.cc b/unit-tests/endian_t.cc index 17f2d3c..814d0a4 100644 --- a/unit-tests/endian_t.cc +++ b/unit-tests/endian_t.cc @@ -16,7 +16,7 @@ // with thin-provisioning-tools. If not, see // . -#include "persistent-data/space_map_disk.h" +#include "persistent-data/space-maps/disk.h" #define BOOST_TEST_MODULE EndianTests #include diff --git a/unit-tests/space_map_t.cc b/unit-tests/space_map_t.cc index bd4e05e..7f76513 100644 --- a/unit-tests/space_map_t.cc +++ b/unit-tests/space_map_t.cc @@ -16,10 +16,10 @@ // with thin-provisioning-tools. If not, see // . -#include "persistent-data/space_map_disk.h" -#include "persistent-data/space_map_core.h" -#include "persistent-data/space_map_careful_alloc.h" -#include "persistent-data/space_map_recursive.h" +#include "persistent-data/space-maps/disk.h" +#include "persistent-data/space-maps/core.h" +#include "persistent-data/space-maps/careful_alloc.h" +#include "persistent-data/space-maps/recursive.h" #define BOOST_TEST_MODULE SpaceMapDiskTests #include diff --git a/unit-tests/transaction_manager_t.cc b/unit-tests/transaction_manager_t.cc index 74a6209..236ed68 100644 --- a/unit-tests/transaction_manager_t.cc +++ b/unit-tests/transaction_manager_t.cc @@ -17,7 +17,7 @@ // . #include "persistent-data/transaction_manager.h" -#include "persistent-data/space_map_core.h" +#include "persistent-data/space-maps/core.h" #define BOOST_TEST_MODULE TransactionManagerTests #include