From b2d7dec46073cd6f0bb935097b0cae377abdfe4f Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 1 Sep 2014 15:10:32 +0100 Subject: [PATCH 1/7] [build] add bin/pdata_tools to the PROGRAMS var so 'make clean' removes it --- Makefile.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 \ From 666c7ac105860b2c290795bee95948f491620db6 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 1 Sep 2014 15:11:04 +0100 Subject: [PATCH 2/7] [era] add an include that's needed on debian --- base/xml_utils.h | 1 + 1 file changed, 1 insertion(+) 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; From 27d754bae03949427556f10b813da8f38ad05968 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 1 Sep 2014 15:26:28 +0100 Subject: [PATCH 3/7] Update Gemfile.lock --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From e4296c539382ca993d18565b716d29d68970e379 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 1 Sep 2014 15:26:42 +0100 Subject: [PATCH 4/7] [cache_dump feature] switch to using the new /cache dump|restore/ pattern --- features/cache_dump.feature | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 From 23735a0253b913396f816ba4c56923debd527ddc Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Mon, 1 Sep 2014 15:45:29 +0100 Subject: [PATCH 5/7] update CHANGES --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) 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 From 4c026458d508d0df184453bea72cf2e755e4f29a Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 2 Sep 2014 10:13:26 +0100 Subject: [PATCH 6/7] Squash a couple of annoying compiler warnings --- caching/cache_metadata_size.cc | 9 +++++++++ era/era_invalidate.cc | 15 ++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) 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)) From 39990e675c7830f5aeb1e4d7a5582fece0932142 Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Wed, 3 Sep 2014 13:15:04 +0100 Subject: [PATCH 7/7] bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d15723f..1d0ba9e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.2 +0.4.0