diff --git a/.gitignore b/.gitignore index e3335b4..842b6ef 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /thin-provisioning-tools-0.5.1.tar.gz /thin-provisioning-tools-0.5.2.tar.gz /thin-provisioning-tools-0.5.3.tar.gz +/thin-provisioning-tools-0.5.4.tar.gz diff --git a/device-mapper-persistent-data-fix-cache-check-exclusive-open.patch b/device-mapper-persistent-data-fix-cache-check-exclusive-open.patch new file mode 100644 index 0000000..028eb8c --- /dev/null +++ b/device-mapper-persistent-data-fix-cache-check-exclusive-open.patch @@ -0,0 +1,36 @@ + VERSION | 2 +- + caching/cache_check.cc | 7 ++++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/VERSION b/VERSION +index cb0c939..7d85683 100644 +--- a/VERSION ++++ b/VERSION +@@ -1 +1 @@ +-0.5.2 ++0.5.4 +diff --git a/caching/cache_check.cc b/caching/cache_check.cc +index 005159e..9bd34be 100644 +--- a/caching/cache_check.cc ++++ b/caching/cache_check.cc +@@ -220,7 +220,9 @@ namespace { + write_superblock(bm, sb); + } + +- error_state metadata_check(block_manager<>::ptr bm, flags const &fs) { ++ error_state metadata_check(string const &path, flags const &fs) { ++ block_manager<>::ptr bm = open_bm(path, block_manager<>::READ_ONLY); ++ + nested_output out(cerr, 2); + if (fs.quiet_) + out.disable(); +@@ -295,8 +297,7 @@ namespace { + throw runtime_error(msg.str()); + } + +- block_manager<>::ptr bm = open_bm(path, block_manager<>::READ_ONLY); +- err = metadata_check(bm, fs); ++ err = metadata_check(path, fs); + + bool success = false; + diff --git a/device-mapper-persistent-data.spec b/device-mapper-persistent-data.spec index ed869b5..742cd6d 100644 --- a/device-mapper-persistent-data.spec +++ b/device-mapper-persistent-data.spec @@ -3,7 +3,7 @@ # Summary: Device-mapper Persistent Data Tools Name: device-mapper-persistent-data -Version: 0.5.3 +Version: 0.5.4 Release: 1%{?dist} License: GPLv3+ Group: System Environment/Base @@ -13,6 +13,7 @@ Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provi Patch0: device-mapper-persistent-data-document-clear-needs-check-flag.patch Patch1: device-mapper-persistent-data-add-era_restore-and-cache_metadata_size-man-pages.patch Patch2: device-mapper-persistent-avoid-strip.patch +Patch3: device-mapper-persistent-data-fix-cache-check-exclusive-open.patch BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel Requires: expat @@ -30,6 +31,7 @@ snapshot eras %patch0 -p1 -b .clear_needs_check_flag %patch1 -p1 -b .man_pages %patch2 -p1 -b .avoid_strip +%patch3 -p1 -b .cache_check_excl echo %{version}-%{release} > VERSION %build @@ -79,6 +81,11 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install %{_sbindir}/thin_trim %changelog +* Fri Jul 17 2015 Peter Rajnoha - 0.5.4-1 +- Fix cache_check with --clear-needs-check-flag option to + make sure metadata device is not open already by the tool + when open with O_EXCL mode is requested. + * Fri Jul 03 2015 Peter Rajnoha - 0.5.3-1 - Tools now open the metadata device in O_EXCL mode to stop running the tools on active metadata. diff --git a/sources b/sources index 181f6a6..0749834 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b5e371c81b85366cfaa06dd21cd436cd thin-provisioning-tools-0.5.3.tar.gz +4feeedca8c9e16fd4830156d8511a601 thin-provisioning-tools-0.5.4.tar.gz