Commit Graph

888 Commits

Author SHA1 Message Date
Joe Thornber
ef517035f1 The file boost/random/uniform_int_distribution.hpp was introduced in boost
version 1.47. If we have older Boost, use random numbers from libc.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:19:25 +00:00
Joe Thornber
50341faa64 Fix these errors:
unit-tests/array_block_t.cc:38: error: using 'typename' outside of template
unit-tests/array_block_t.cc:39: error: using 'typename' outside of template
unit-tests/array_block_t.cc:40: error: using 'typename' outside of template

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:18:21 +00:00
Joe Thornber
f25e0ca6d3 g++-4.2 and older doesn't accept binary constants.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:15:55 +00:00
Joe Thornber
bd2c0df226 Fix this error:
persistent-data/data-structures/bloom_filter.cc:10: error: integer constant is too large for 'unsigned long' type

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:15:01 +00:00
Joe Thornber
fe64da2c7c Fix these errors:
thin-provisioning/thin_pool.cc:206: error: reference to 'sector_t' is ambiguous
./thin-provisioning/metadata.h:40: error: candidates are: typedef uint64_t thin_provisioning::sector_t
./block-cache/block_cache.h:20: error:                 typedef uint64_t bcache::sector_t
thin-provisioning/thin_pool.cc:206: error: reference to 'sector_t' is ambiguous
./thin-provisioning/metadata.h:40: error: candidates are: typedef uint64_t thin_provisioning::sector_t
./block-cache/block_cache.h:20: error:                 typedef uint64_t bcache::sector_t
thin-provisioning/thin_pool.cc:206: error: 'sector_t' does not name a type

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:14:28 +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
Joe Thornber
dd9bd206c6 Old glibc doesn't provide these macros, so we have to define them.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2015-01-16 10:12:30 +00:00
Joe Thornber
8e92158055 [thin_trim] first code drop.
No testing done as yet.
2014-11-18 16:03:03 +00:00
Joe Thornber
e476515087 Merge pull request #19 from aholler/master
Fix compilation bugs with CXXFLAGS=-std=gnu++11 together with gcc 4.8.3 and boost 1.55
2014-11-15 16:14:27 +00:00
Alexander Holler
b56aec4d96 [unit-tests/bloom_filter_t.cc] Fix ambigious uniform_int_distribution (C++11)
uniform_int_distribution exist in the namespace boost as well as in std
of C++11. Use the one provided by boost.

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
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
Alexander Holler
92345b4b64 [persistent-data/space_map.h] Make destructor for space_map_detail::damage public
The compiler is unable to create a default desctructor for the derived
class missing_counts if the virtual destructor for the class damage is
private.

This fixes compilation bugs with CXXFLAGS=-std=gnu++11 together with
gcc 4.8.3 and boost 1.55.
2014-11-15 16:48:53 +01:00
Joe Thornber
2331204475 Update Gemfile 2014-09-04 11:52:12 +01:00
Joe Thornber
bb2c4ec200 bump version 2014-09-04 11:37:31 +01:00
Joe Thornber
626ddd8efb Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2014-09-04 11:36:53 +01:00
Joe Thornber
41354f10f5 provide << operator for optionals 2014-09-04 11:26:43 +01:00
Joe Thornber
39990e675c bump version 2014-09-03 13:15:04 +01:00
Joe Thornber
4c026458d5 Squash a couple of annoying compiler warnings 2014-09-02 10:13:26 +01:00
Joe Thornber
23735a0253 update CHANGES 2014-09-01 15:45:29 +01:00
Joe Thornber
e4296c5393 [cache_dump feature] switch to using the new /cache dump|restore/ pattern 2014-09-01 15:26:42 +01:00
Joe Thornber
27d754bae0 Update Gemfile.lock 2014-09-01 15:26:28 +01:00
Joe Thornber
666c7ac105 [era] add an include that's needed on debian 2014-09-01 15:11:04 +01:00
Joe Thornber
b2d7dec460 [build] add bin/pdata_tools to the PROGRAMS var so 'make clean' removes it 2014-09-01 15:10:32 +01:00
Joe Thornber
99d851cd29 [cache features] add a test for dump/restore cycle being a noop 2014-09-01 14:57:10 +01:00
Joe Thornber
562661c63e [era features] Added tests to check that dump/restore is a noop 2014-09-01 14:45:52 +01:00
Joe Thornber
4c04a18b05 [era] era_dump should show bool values as 'true' or 'false' rather than 0 or 1 2014-09-01 14:45:05 +01:00
Joe Thornber
8761b6defc [progress bar] Add an extra newline at the end 2014-09-01 14:44:37 +01:00
Joe Thornber
93468190bd [bitset] When reopening a bitset some bits could be lost at the far end.
The number of words necessary to store the bits was being miscalculated.
2014-09-01 14:17:44 +01:00
Joe Thornber
14cfcf2dfd [bitset] Don't visit bits in the tail end of the final word if they're beyond the nr bits in the bitset.
Also shift 1ULL in the test.
2014-09-01 14:16:03 +01:00
Joe Thornber
67865e0732 [bitset_t] Add test for walk_bitset 2014-09-01 14:15:32 +01:00
Joe Thornber
5a6b92312e [features] check that quiet mode really outputs nothing.
Previously it was checking the output contained a null string within it.
2014-08-28 14:00:08 +01:00
Joe Thornber
0608df97d8 bug introduced when renaming to pdata_tools 2014-08-28 11:43:02 +01:00
Joe Thornber
5a45f5ac95 [bild] strip the binary when installing 2014-08-28 11:06:16 +01:00
Christian Hesse
3cafc0d6e8 fix symbolic link at install time
Packaging tools often install via

$ make DESTDIR="${pkgdir}" install

which breaks the symbolic links. The package contains symbolic links to
${pkgdir}/$(BINDIR)/pdata_tools, which is wrong. Just use relative path,
which is really easy as binary and symlinks are in the same directory.
2014-08-27 22:31:50 +02:00
Joe Thornber
efe1a2a70f update CHANGES 2014-08-27 14:08:06 +01:00
Joe Thornber
6f8b7e2914 [all] Build a single executable 2014-08-27 14:01:31 +01:00
Joe Thornber
c1e0799367 [build] deps weren't being calculated for the top level source file of some of the tools. 2014-08-26 13:13:32 +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
e31ffe0874 update ignore file 2014-08-26 11:26:18 +01:00
Joe Thornber
7f6bdf2acf Add callgrind files to the ignore file 2014-08-26 11:24:07 +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
930cc9d412 [block-manager] Superblocks weren't being marked as DIRTY
Gulp
2014-08-21 14:25:02 +01:00
Joe Thornber
b493a30b65 [block-cache] tweak when validators are swapped
Makes it more consitent in the face of exceptions
2014-08-21 14:23:14 +01:00
Joe Thornber
6f760ccd87 [block-cache] When changing validators the new validator check fn was only being called if the block was dirty. 2014-08-21 14:22:14 +01:00
Joe Thornber
b5a9cd6043 [block-cache] Create just one noop_validator
No need to create a separate one for each block.
2014-08-21 14:20:36 +01:00
Joe Thornber
4799becb01 [block-cache] fix leaking validators
The memory for the blocks is explicitly managed, and the destructors
for the blocks wasn't being called.
2014-08-21 14:19:36 +01:00
Joe Thornber
0d3942cae8 [block-manager] ensure the superblock cannot be taken concurrently with any other lock. 2014-08-21 12:18:05 +01:00
Joe Thornber
3724f78a13 [block_t] Fix a validator test 2014-08-21 11:51:04 +01:00