From e62022a200c1e4bef5ba2209cc8d1dcec4a06c10 Mon Sep 17 00:00:00 2001 From: Ming-Hung Tsai Date: Mon, 27 Jul 2020 10:48:54 +0800 Subject: [PATCH] [base] Move run_set to namespace base --- base/io_generator.cc | 2 +- {persistent-data => base}/run.h | 4 ++-- {persistent-data => base}/run_set.h | 6 +++--- persistent-data/block_counter.h | 2 +- persistent-data/data-structures/bitset.h | 2 +- persistent-data/data-structures/btree_damage_visitor.h | 2 +- persistent-data/space-maps/subtracting_span_iterator.h | 2 +- persistent-data/space_map.h | 2 +- thin-provisioning/device_tree.h | 2 +- thin-provisioning/mapping_tree.h | 2 +- thin-provisioning/rmap_visitor.h | 2 +- thin-provisioning/thin_delta.cc | 2 +- thin-provisioning/thin_rmap.cc | 2 +- unit-tests/btree_damage_visitor_t.cc | 2 +- unit-tests/run_set_t.cc | 2 +- unit-tests/span_iterator_t.cc | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) rename {persistent-data => base}/run.h (94%) rename {persistent-data => base}/run_set.h (97%) diff --git a/base/io_generator.cc b/base/io_generator.cc index 88c2927..024f04f 100644 --- a/base/io_generator.cc +++ b/base/io_generator.cc @@ -1,5 +1,5 @@ #include "base/io_generator.h" -#include "persistent-data/run_set.h" +#include "base/run_set.h" #include #include #include diff --git a/persistent-data/run.h b/base/run.h similarity index 94% rename from persistent-data/run.h rename to base/run.h index 78db2a5..b3dcc55 100644 --- a/persistent-data/run.h +++ b/base/run.h @@ -1,5 +1,5 @@ -#ifndef PERSISTENT_DATA_RANGE_H -#define PERSISTENT_DATA_RANGE_H +#ifndef BASE_DATA_RANGE_H +#define BASE_DATA_RANGE_H #include #include diff --git a/persistent-data/run_set.h b/base/run_set.h similarity index 97% rename from persistent-data/run_set.h rename to base/run_set.h index 6c23dc1..604daa8 100644 --- a/persistent-data/run_set.h +++ b/base/run_set.h @@ -1,7 +1,7 @@ -#ifndef PERSISTENT_DATA_H -#define PERSISTENT_DATA_H +#ifndef BASE_RUN_SET_H +#define BASE_RUN_SET_H -#include "persistent-data/run.h" +#include "base/run.h" #include #include diff --git a/persistent-data/block_counter.h b/persistent-data/block_counter.h index 0b7ba5b..6fc885c 100644 --- a/persistent-data/block_counter.h +++ b/persistent-data/block_counter.h @@ -19,8 +19,8 @@ #ifndef BLOCK_COUNTER_H #define BLOCK_COUNTER_H +#include "base/run_set.h" #include "block.h" -#include "run_set.h" //---------------------------------------------------------------- diff --git a/persistent-data/data-structures/bitset.h b/persistent-data/data-structures/bitset.h index ca98a86..e540237 100644 --- a/persistent-data/data-structures/bitset.h +++ b/persistent-data/data-structures/bitset.h @@ -19,7 +19,7 @@ #ifndef PERSISTENT_DATA_DATA_STRUCTURES_BITSET_H #define PERSISTENT_DATA_DATA_STRUCTURES_BITSET_H -#include "persistent-data/run.h" +#include "base/run.h" //---------------------------------------------------------------- diff --git a/persistent-data/data-structures/btree_damage_visitor.h b/persistent-data/data-structures/btree_damage_visitor.h index 7eaa8d2..2c8e28c 100644 --- a/persistent-data/data-structures/btree_damage_visitor.h +++ b/persistent-data/data-structures/btree_damage_visitor.h @@ -1,9 +1,9 @@ #ifndef PERSISTENT_DATA_DATA_STRUCTURES_DAMAGE_VISITOR_H #define PERSISTENT_DATA_DATA_STRUCTURES_DAMAGE_VISITOR_H +#include "base/run.h" #include "persistent-data/data-structures/btree.h" #include "persistent-data/data-structures/btree_node_checker.h" -#include "persistent-data/run.h" //---------------------------------------------------------------- diff --git a/persistent-data/space-maps/subtracting_span_iterator.h b/persistent-data/space-maps/subtracting_span_iterator.h index 8d83188..6a803ad 100644 --- a/persistent-data/space-maps/subtracting_span_iterator.h +++ b/persistent-data/space-maps/subtracting_span_iterator.h @@ -1,8 +1,8 @@ #ifndef SPAN_ITERATOR_H #define SPAN_ITERATOR_H +#include "base/run_set.h" #include "persistent-data/space_map.h" -#include "persistent-data/run_set.h" #include diff --git a/persistent-data/space_map.h b/persistent-data/space_map.h index 15b6076..3584d59 100644 --- a/persistent-data/space_map.h +++ b/persistent-data/space_map.h @@ -19,9 +19,9 @@ #ifndef SPACE_MAP_H #define SPACE_MAP_H +#include "base/run.h" #include "persistent-data/block.h" #include "persistent-data/block_counter.h" -#include "persistent-data/run.h" #include #include diff --git a/thin-provisioning/device_tree.h b/thin-provisioning/device_tree.h index 5bfefda..ee241a5 100644 --- a/thin-provisioning/device_tree.h +++ b/thin-provisioning/device_tree.h @@ -1,8 +1,8 @@ #ifndef THIN_DEVICE_CHECKER_H #define THIN_DEVICE_CHECKER_H +#include "base/run.h" #include "persistent-data/data-structures/btree.h" -#include "persistent-data/run.h" //---------------------------------------------------------------- diff --git a/thin-provisioning/mapping_tree.h b/thin-provisioning/mapping_tree.h index 7545b74..870d614 100644 --- a/thin-provisioning/mapping_tree.h +++ b/thin-provisioning/mapping_tree.h @@ -1,8 +1,8 @@ #ifndef MAPPING_TREE_H #define MAPPING_TREE_H +#include "base/run.h" #include "persistent-data/data-structures/btree.h" -#include "persistent-data/run.h" //---------------------------------------------------------------- diff --git a/thin-provisioning/rmap_visitor.h b/thin-provisioning/rmap_visitor.h index 98fb9fc..d9cb97d 100644 --- a/thin-provisioning/rmap_visitor.h +++ b/thin-provisioning/rmap_visitor.h @@ -1,7 +1,7 @@ #ifndef THIN_RMAP_VISITOR_H #define THIN_RMAP_VISITOR_H -#include "persistent-data/run.h" +#include "base/run.h" #include "thin-provisioning/mapping_tree.h" //---------------------------------------------------------------- diff --git a/thin-provisioning/thin_delta.cc b/thin-provisioning/thin_delta.cc index b1055d1..5b31608 100644 --- a/thin-provisioning/thin_delta.cc +++ b/thin-provisioning/thin_delta.cc @@ -7,8 +7,8 @@ #include "version.h" #include "base/indented_stream.h" +#include "base/run.h" #include "persistent-data/data-structures/btree_damage_visitor.h" -#include "persistent-data/run.h" #include "persistent-data/space-maps/core.h" #include "persistent-data/space-maps/disk.h" #include "persistent-data/file_utils.h" diff --git a/thin-provisioning/thin_rmap.cc b/thin-provisioning/thin_rmap.cc index 8f73c60..6782c77 100644 --- a/thin-provisioning/thin_rmap.cc +++ b/thin-provisioning/thin_rmap.cc @@ -6,8 +6,8 @@ #include "version.h" +#include "base/run.h" #include "persistent-data/data-structures/btree_damage_visitor.h" -#include "persistent-data/run.h" #include "persistent-data/space-maps/core.h" #include "persistent-data/file_utils.h" #include "thin-provisioning/commands.h" diff --git a/unit-tests/btree_damage_visitor_t.cc b/unit-tests/btree_damage_visitor_t.cc index 25855f7..c5590fa 100644 --- a/unit-tests/btree_damage_visitor_t.cc +++ b/unit-tests/btree_damage_visitor_t.cc @@ -3,10 +3,10 @@ #include "test_utils.h" #include "base/endian_utils.h" +#include "base/run.h" #include "persistent-data/data-structures/btree_damage_visitor.h" #include "persistent-data/space-maps/core.h" #include "persistent-data/transaction_manager.h" -#include "persistent-data/run.h" using namespace base; using namespace std; diff --git a/unit-tests/run_set_t.cc b/unit-tests/run_set_t.cc index 53d1bc1..33c2b02 100644 --- a/unit-tests/run_set_t.cc +++ b/unit-tests/run_set_t.cc @@ -1,6 +1,6 @@ #include "gmock/gmock.h" -#include "persistent-data/run_set.h" +#include "base/run_set.h" #include diff --git a/unit-tests/span_iterator_t.cc b/unit-tests/span_iterator_t.cc index c0771d8..76ff70e 100644 --- a/unit-tests/span_iterator_t.cc +++ b/unit-tests/span_iterator_t.cc @@ -1,7 +1,7 @@ #include "gmock/gmock.h" +#include "base/run_set.h" #include "persistent-data/space-maps/subtracting_span_iterator.h" -#include "persistent-data/run_set.h" using namespace std; using namespace persistent_data;