Commit Graph

1900 Commits

Author SHA1 Message Date
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
Joe Thornber
e3d459a148 [era_restore] add some cucumber tests 2014-08-21 11:27:52 +01:00
Joe Thornber
feb8a03d5f [btree_damage_tracker] Initialise all path_tracker objects with a null path.
This fixes an insidious bug that took me ages to track down.  Without
it the non-existent front() of a list was sometimes being accessed.
2014-08-21 11:25:07 +01:00
Joe Thornber
1a632f9d53 [era/xml restorer] bug fixes 2014-08-21 11:22:12 +01:00
Joe Thornber
5465c95134 [era/xml format] bring in line with the Ruby library 2014-08-21 11:21:47 +01:00
Joe Thornber
85ab149685 [era/metadata.{h,cc}] Support creation of new metadata 2014-08-21 11:20:43 +01:00
Joe Thornber
bf1b65e62f Update gemfile.lock 2014-08-21 11:18:06 +01:00
Joe Thornber
6f804cab24 [block_manager] Track the number of superblocks, throw an exception if someone tries to open two a once. 2014-08-21 11:17:20 +01:00
Joe Thornber
94356a1648 [era_check] Was returning after just checking the superblock.
Presumably old debug.
2014-08-15 10:11:35 +01:00
Joe Thornber
157eca4dd0 [era_restore] tweak help message 2014-08-12 10:20:29 +01:00
Joe Thornber
75a797253e [build] build era_restore by default 2014-08-12 10:18:58 +01:00
Joe Thornber
ad38cfe9c9 [block cache] Comment out the statistics output for now 2014-08-12 10:15:14 +01:00
Joe Thornber
56e79676f3 update Gemfile.lock 2014-08-12 10:09:30 +01:00
Joe Thornber
283ab4ad99 first drop of era_restore 2014-08-07 15:43:01 +01:00
Joe Thornber
1d12d0ff8e remove empty destructor 2014-08-07 15:42:10 +01:00
Joe Thornber
936e14441f Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2014-08-06 16:32:04 +01:00
Joe Thornber
8f73241119 [era] parser for the XML format 2014-08-06 16:30:38 +01:00
Joe Thornber
3e5c02459c whitespace 2014-08-06 16:30:26 +01:00
Joe Thornber
efe597f097 [README] Add dep for libaio 2014-08-06 16:29:50 +01:00
Joe Thornber
7e2ea38534 [configure.ac] Make sure libaio.h is present, and remove deps for a couple of boost headers we're no longer using. 2014-08-06 16:27:18 +01:00
Joe Thornber
1d38b390b5 Factor common code out of the xml_format files. 2014-08-06 15:29:02 +01:00
Joe Thornber
d8f678b079 Rename configure.in to configure.ac to stop auto tools bleating 2014-08-06 15:20:40 +01:00
Joe Thornber
a75a2118a0 era_invalidate: update help to reflect --metadata-snapshot 2014-08-06 11:15:18 +01:00
Joe Thornber
aa08c8393a Man pages were being installed in a v. funny place. 2014-08-06 11:14:15 +01:00
Joe Thornber
672582b2a8 Install era manpages 2014-08-06 11:10:22 +01:00
Joe Thornber
bdec4b353c tweak some man pages 2014-08-06 10:33:23 +01:00
Joe Thornber
41ade2a259 Add era_invalidate manpage 2014-08-06 10:32:39 +01:00
Joe Thornber
a2d6e86c51 Add era_dump man page. 2014-08-05 15:43:54 +01:00
Joe Thornber
460c0ef8d2 era_check man page 2014-08-05 15:17:43 +01:00
Joe Thornber
48c6dc0762 Flush the block cache stats when they're complete 2014-08-05 14:53:03 +01:00
Joe Thornber
bf138c2a50 update gem lock file 2014-08-05 14:50:35 +01:00
Joe Thornber
ea62f6e06e add changes file 2014-08-05 12:21:06 +01:00
Joe Thornber
d00aef9219 [thini_restore] add a quiet option to turn off the progress monitor 2014-08-05 12:10:34 +01:00
Joe Thornber
fccc1dfcb0 [thin_restore] Add a progress monitor 2014-08-05 11:47:57 +01:00
Joe Thornber
8321bdcf59 Merge pull request #13 from bgilbert/fix-units
thin_metadata_size: Fix long names of units
2014-08-05 09:34:37 +01:00
Joe Thornber
f534664f96 Add stats to block cache and remove the info fn 2014-07-31 12:18:01 +01:00
Joe Thornber
eee9004354 whitespace 2014-07-30 12:27:33 +01:00
Joe Thornber
74de9a1a94 [btree_damage_visitor] some tweaks to stop constructing so many btree_paths. 2014-07-30 12:21:34 +01:00
Joe Thornber
a99d6896a8 Fix a bug in the block cache read path. 2014-07-29 13:41:45 +01:00
Joe Thornber
f06a2673c5 wip 2014-07-29 11:34:26 +01:00
Joe Thornber
d482a76bda Use placement new to initialise the blocks 2014-07-28 14:32:33 +01:00
Joe Thornber
5c82d50204 remove some debug 2014-07-28 14:32:20 +01:00