Commit Graph

103 Commits

Author SHA1 Message Date
Joe Thornber
4573ebb218 [cache_writeback] work in progress 2016-03-17 15:15:52 +00:00
Joe Thornber
b8659853bb [cache_writeback] stub cache_writeback 2016-03-08 15:27:22 +00:00
Joe Thornber
286f70ceac Merge remote-tracking branch 'remotes/github-m-h-tsai/v0.6.2-repairtool' into 2016-02-29-mingus-merge
Conflicts:
	Makefile.in
	VERSION
	thin-provisioning/commands.cc
	thin-provisioning/commands.h
	thin-provisioning/thin_delta.cc
2016-02-29 10:29:28 +00:00
Ming-Hung Tsai
778c153c1e [block-cache] Add check_raw() to bcache::validator 2016-02-27 15:21:13 +08:00
Joe Thornber
767c39cf71 [build] switch to c++11
Conflicts:
	Makefile.in
	chunker/cache_stream.cc
	chunker/cache_stream.h
	thin-provisioning/thin_archive.cc
	thin-provisioning/thin_show_duplicates.cc
	unit-tests/Makefile.in
2016-02-16 16:45:44 +00:00
Joe Thornber
c93e728ef4 [base] introduce a command type that gets registered with the app 2016-01-08 12:51:52 +00:00
Zdenek Kabelac
271ff67f91 Cache check close RO opened device before reopen.
When check_check is used with --clear-needs-check-flag option,
device needs to be opened in RW exclusive mode, but for this
existing RO exlusive open must be closed.

LVM2 will consider version 0.5.3 as a version without flag support
for cache_check since it cannot successfully pass cache_check.

TODO: when 'RO' parts detects there is nothing to 'clear' it should
completely skip RW open to avoid udev rule processing.
2015-07-28 14:37:44 +01:00
Joe Thornber
6ab0833b2e cache_check: add --clear-needs-check 2015-06-09 14:01:22 +01:00
Joe Thornber
25b4b526f4 Introduce error_string() as a portable replacement for strerror_r() 2015-01-16 12:54:09 +00:00
Joe Thornber
150a3c486d Fix these errors:
caching/superblock.cc:306: error: reference to 'validator' is ambiguous
caching/superblock.cc:271: error: candidates are: namespace validator { }
./block-cache/block_cache.h:22: error:                 class bcache::validator

caching/superblock.cc:316: error: reference to 'validator' is ambiguous
caching/superblock.cc:271: error: candidates are: namespace validator { }
./block-cache/block_cache.h:22: error:                 class bcache::validator

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:13:36 +00:00
Alexander Holler
691ad88261 [caching/hint_array.cc] Fix ambigious array (C++11)
Template array exist in the namespace persistent_data as well as in std
of C++11. Explicitly use the one from persistent_data.

This fixes compilation bugs with CXXFLAGS=-std=gnu++11 together with
gcc 4.8.3 and boost 1.55.
2014-11-15 16:49:08 +01:00
Alexander Holler
baa70ecfe4 [caching/hint_array.cc] Fix ambigious shared_ptr (C++11)
Class shared_ptr exist in the namespace std for C++11 as well as in boost.
Explicitly use the one from boost in order to be compatible.

This fixes compilation bugs with CXXFLAGS=-std=gnu++11 together with
gcc 4.8.3 and boost 1.55.
2014-11-15 16:49:08 +01:00
Joe Thornber
4c026458d5 Squash a couple of annoying compiler warnings 2014-09-02 10:13:26 +01:00
Joe Thornber
6f8b7e2914 [all] Build a single executable 2014-08-27 14:01:31 +01:00
Joe Thornber
828f654800 [*_restore] Add progress bar to cache_restore and era_restore.
A lot of refactoring common code between the restore tools.
2014-08-26 13:05:21 +01:00
Joe Thornber
d17ad86a88 [*_restore] Use a little wrapper class for the expat XML_Parser to ensure it gets destroyed. 2014-08-26 11:23:29 +01:00
Joe Thornber
a7c96c0e1e [everything] Fix circular shared pointer references.
We had a cycle from transaction_manager <-> space_map, and also from
the ref_counters back up to the tm.

This prevented objects being destroyed when various programs exited.

From now on we'll try and only use a shared ptr if ownership is
implied.  Otherwise a reference will be used (eg, for up pointers).
2014-08-26 11:14:49 +01:00
Joe Thornber
1d12d0ff8e remove empty destructor 2014-08-07 15:42:10 +01:00
Joe Thornber
3e5c02459c whitespace 2014-08-06 16:30:26 +01:00
Joe Thornber
1d38b390b5 Factor common code out of the xml_format files. 2014-08-06 15:29:02 +01:00
Joe Thornber
f06a2673c5 wip 2014-07-29 11:34:26 +01:00
Joe Thornber
7e870ea5a6 start removing block_manager<>::block 2014-07-25 14:46:51 +01:00
Joe Thornber
b32908d5c2 work in progress 2014-07-25 10:35:04 +01:00
Joe Thornber
d517684c95 Initial code drop for merging block_cache 2014-07-22 16:41:39 +01:00
Joe Thornber
e77e8715b0 Remove ambiguity between boost::uint64_t and ::uint64_t.
This has been causing people problems on uclibc builds.
2014-07-02 08:19:20 +00:00
Joe Thornber
c5c699e563 whitespace 2014-06-16 13:44:43 +01:00
root
ebb49db5d3 cache_calc_blocks; tidy up the calculation of nr blocks 2014-06-16 13:42:13 +01:00
Joe Thornber
5fe5d213b7 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools into era
Conflicts:
	Makefile.in
2014-01-31 22:35:04 +00:00
Joe Thornber
344f4b1e08 Factor out base/indented_stream.h 2014-01-31 13:43:39 +00:00
Joe Thornber
9e0540e1b6 era_check, era_dump 2014-01-23 00:46:03 +00:00
Joe Thornber
2f1789744f [caching] add missing break in cache_metadata_size 2014-01-15 16:48:46 +00:00
Joe Thornber
ef6066e2cd Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2014-01-15 15:52:33 +00:00
Joe Thornber
cbbdfc37da [cache] cache_metadata_size 2014-01-15 15:52:05 +00:00
Joe Thornber
81fa131748 [cache_check] --super-block-only rather than --superblock-only
Be consistent with help and thin_check
2014-01-08 20:05:55 +00:00
Joe Thornber
be5fa59f90 Merge branch 'era' of github.com:jthornber/thin-provisioning-tools into era 2014-01-08 10:50:26 +00:00
Joe Thornber
1b1df2fe65 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2014-01-08 10:43:20 +00:00
Joe Thornber
8049d369a9 stuff 2013-12-11 17:28:14 +00:00
Joe Thornber
7a2c41022f Remove some 'typename's since older versions of g++ don't like. 2013-12-09 12:46:46 +00:00
Joe Thornber
ecf6692d0f [cache_dump] Only dump the hints array if it exists.
Fixes a null shared ptr bug.
2013-12-09 11:10:49 +00:00
Joe Thornber
9a65e7707c Merge branch 'master' of github.com:jthornber/thin-provisioning-tools into era 2013-12-09 10:42:28 +00:00
Joe Thornber
c00c832378 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2013-12-02 12:07:33 +00:00
Joe Thornber
983a5e84e6 Move endian_utils to base/ 2013-11-19 10:23:35 +00:00
Denys Duchier
3a4c06b772 use persistent-data::bitset to avoid ambiguity 2013-11-16 21:42:23 +01:00
Joe Thornber
31ce9a03fa cache_restore --omit-clean-shutdown 2013-10-29 12:46:23 +00:00
Joe Thornber
dcf4b0a99c [cache_restore] Set the clean shutdown flag before the final commit 2013-10-29 11:35:32 +00:00
Joe Thornber
471abe52b9 [caching] superblock_flags.clear_flag() 2013-10-29 11:35:05 +00:00
Joe Thornber
20bf22e662 [caching] handle VARIABLE_HINT_SIZE incompat flag 2013-10-17 11:45:20 +01:00
Joe Thornber
d3187d25f5 [caching] superblock field wasn't getting initialised in default ctr 2013-10-17 10:08:43 +01:00
Joe Thornber
f8633da296 [cache_restore] --debug-override-metadata-version
A flag that deliberately causes the wrong metadata version to be
written.  Useful for testing the kernel module.
2013-10-15 10:24:12 +01:00
Joe Thornber
3b11749dcf [caching tools] handle version 1 metadata where policy_hint_width is zero 2013-10-14 12:40:13 +01:00