diff --git a/CHANGES b/CHANGES index 0f8a19e..7e22fdc 100644 --- a/CHANGES +++ b/CHANGES @@ -15,3 +15,5 @@ v0.4 - Tools rolled into a single executable to save space. +- Fixed some bugs when walking bitsets (possibly effecting cache_dump + and cache_check). \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 06a7697..d05c7a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GEM remote: https://rubygems.org/ specs: - aruba (0.6.0) + aruba (0.6.1) childprocess (>= 0.3.6) cucumber (>= 1.1.1) rspec-expectations (>= 2.7.0) @@ -21,11 +21,11 @@ GEM multi_json (~> 1.3) multi_json (1.10.1) multi_test (0.1.1) - rspec-expectations (3.0.3) + rspec-expectations (3.0.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.0.0) - rspec-support (3.0.3) - thinp_xml (0.0.18) + rspec-support (3.0.4) + thinp_xml (0.0.19) ejt_command_line (>= 0.0.2) PLATFORMS diff --git a/Makefile.in b/Makefile.in index 339fbc5..ff2a2a3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -16,11 +16,13 @@ # with thin-provisioning-tools. If not, see # . -.PHONY: all - V=@ -all: bin/pdata_tools +PROGRAMS=\ + bin/pdata_tools + +.PHONY: all +all: $(PROGRAMS) SOURCE=\ base/application.cc \ diff --git a/VERSION b/VERSION index d15723f..1d0ba9e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.2 +0.4.0 diff --git a/base/xml_utils.h b/base/xml_utils.h index 581e814..f867f56 100644 --- a/base/xml_utils.h +++ b/base/xml_utils.h @@ -7,6 +7,7 @@ #include #include #include +#include using namespace std; diff --git a/caching/cache_metadata_size.cc b/caching/cache_metadata_size.cc index 3fb1bf1..dd806c8 100644 --- a/caching/cache_metadata_size.cc +++ b/caching/cache_metadata_size.cc @@ -17,6 +17,15 @@ namespace { struct flags { flags() : max_hint_width(4) { + + // Dance around some spurious compiler warnings + device_size = 0; + block_size = 0; + nr_blocks = 0; + + device_size.reset(); + block_size.reset(); + nr_blocks.reset(); } boost::optional device_size; diff --git a/era/era_invalidate.cc b/era/era_invalidate.cc index 45ae784..c81b5af 100644 --- a/era/era_invalidate.cc +++ b/era/era_invalidate.cc @@ -88,9 +88,14 @@ namespace { walk_writeset_tree(md.tm_, *md.writeset_tree_, v, dv); } - void mark_blocks_since(metadata const &md, uint32_t threshold, set &result) { - walk_array(*md.era_array_, md.sb_.nr_blocks, threshold, result); - walk_writesets(md, threshold, result); + void mark_blocks_since(metadata const &md, optional const &threshold, set &result) { + if (!threshold) + // Can't get here, just putting in to pacify the compiler + throw std::runtime_error("threshold not set"); + else { + walk_array(*md.era_array_, md.sb_.nr_blocks, *threshold, result); + walk_writesets(md, *threshold, result); + } } //-------------------------------- @@ -155,11 +160,11 @@ namespace { throw runtime_error("no metadata snapshot taken."); metadata::ptr md(new metadata(bm, *sb.metadata_snap)); - mark_blocks_since(*md, *fs.era_threshold_, blocks); + mark_blocks_since(*md, fs.era_threshold_, blocks); } else { metadata::ptr md(new metadata(bm, metadata::OPEN)); - mark_blocks_since(*md, *fs.era_threshold_, blocks); + mark_blocks_since(*md, fs.era_threshold_, blocks); } if (want_stdout(output)) diff --git a/features/cache_dump.feature b/features/cache_dump.feature index 4011c20..3415c6a 100644 --- a/features/cache_dump.feature +++ b/features/cache_dump.feature @@ -44,7 +44,7 @@ Feature: cache_dump Scenario: dump/restore is a noop Given valid cache metadata - When I cache_dump - And I cache_restore - And I cache_dump + When I cache dump + And I cache restore + And I cache dump Then cache dumps 1 and 2 should be identical