Commit Graph

1535 Commits

Author SHA1 Message Date
Joe Thornber
779f9e7cb4 More tidying of the BTreeDamageVisitorTests 2013-05-13 16:26:16 +01:00
Joe Thornber
4d2c3a7c14 A couple more tests for BTreeDamageVisitorTests 2013-05-13 14:09:18 +01:00
Joe Thornber
185f0fc758 Some refactoring of the BTreeDamageVisitorTests 2013-05-13 13:40:20 +01:00
Joe Thornber
01f1117ea4 BTreeDamageVisitorTests.visiting_a_populated_tree_with_a_sequence_of_damaged_leaf_nodes 2013-05-13 12:48:03 +01:00
Joe Thornber
88c63f620f Lots of work on the btree_damage_visitor 2013-05-13 12:36:57 +01:00
Joe Thornber
0dba0abe88 Bump up the nr of blocks in the cache from 64 to 1024. 2013-05-13 12:34:52 +01:00
Joe Thornber
08c5fde04f btree_damage_tracker 2013-05-13 11:27:38 +01:00
Joe Thornber
42a4221499 A little optimisation for the core space map. 2013-05-09 14:09:47 +01:00
Joe Thornber
8ecf2f27ed btree_damage_visitor stuff. 2013-05-09 13:31:04 +01:00
Joe Thornber
ab66e9f8e3 Some more work on btree_damage_visitor 2013-05-08 16:38:38 +01:00
Joe Thornber
a7adefbae8 Move range.h to persistent-data 2013-05-08 16:38:04 +01:00
Joe Thornber
23ef3b387d Start btree_damage_visitor. 2013-05-08 12:00:24 +01:00
Joe Thornber
f6acd473a7 Move with_directory and with_temporary_directory to test_utils. 2013-05-08 11:47:15 +01:00
Joe Thornber
bac19b3c94 [btree_checker] no longer need to check the checksum, since the block validator has already done this. 2013-05-07 15:47:43 +01:00
Joe Thornber
44d0b1903f [btree] allow visitors to trap node access failures such as checksum error. 2013-05-07 15:22:13 +01:00
Joe Thornber
8e0271b3bf [btree] When walking a btree use a validator when taking the locks.
We really can't rely on anything in the block if the checksum is
wrong.
2013-05-07 14:54:20 +01:00
Joe Thornber
1e14e1cd10 [metadata_checker_t] fix silly allocation bug in the devices_visitor. 2013-05-07 14:29:54 +01:00
Joe Thornber
d113ff6e5a thin restorer is now careful to share the mapping tree for empty devices.
This saves a lot of metadata space if you're creating lots of empty
devs (4k per dev).  Also makes things faster since we don't have to
allocate.
2013-05-07 14:24:59 +01:00
Joe Thornber
edf16f59c7 [restorer] Mappings only get inserted when the device is completed.
This saves looking up the device mapping tree for every insert.
2013-05-02 12:59:42 +01:00
Joe Thornber
5a231a7db0 [metadata_checker_t] add damage_should_include() method. 2013-05-02 12:51:55 +01:00
Joe Thornber
c976fc3d6c [metadata_checker_t] Make device_checker a member of DeviceCheckerTests 2013-05-02 12:43:16 +01:00
Joe Thornber
a828cde96d [btree] visitor now passed as a reference rather than shared_ptr 2013-05-02 12:31:33 +01:00
Joe Thornber
5913de5e38 [metadata_checker_t] check the range for missing_devices_damage. 2013-05-02 12:22:54 +01:00
Joe Thornber
008a4d495c [metadata_checker_t] Some more work on the devices_visitor. 2013-05-02 12:04:05 +01:00
Joe Thornber
3832fd5952 More work on metadata_checker_t 2013-05-01 16:33:42 +01:00
Joe Thornber
647cb68b76 Some test utils 2013-05-01 16:33:24 +01:00
Joe Thornber
21603c5a5d ostream operator << for range template. 2013-05-01 16:30:59 +01:00
Joe Thornber
e1c5d485eb Tidy up a typedef 2013-05-01 16:29:44 +01:00
Joe Thornber
5d0b23beea Some btree visitor tidying.
Introduce node_location to replace the long list of parameters.  Also
add a depth field to keep track of the depth from root.
2013-05-01 16:16:23 +01:00
Joe Thornber
1884233a2b DeviceCheckerTests.passes_with_valid_metadata_containing_some_devices 2013-04-29 16:35:03 +01:00
Joe Thornber
c782da7a34 Use a mock of the metadata_damage_visitor to confirm the type off damage reported from the device_checker. 2013-04-29 16:13:18 +01:00
Joe Thornber
fa96ec6301 Add operator == for the range template 2013-04-29 16:12:34 +01:00
Joe Thornber
5e26d51372 add equality operators for the metadata_damage classes. 2013-04-29 16:12:05 +01:00
Joe Thornber
969a5f62c6 Working on device_checker 2013-04-29 15:37:53 +01:00
Joe Thornber
524f9474cf Add a range class 2013-04-29 15:10:01 +01:00
Joe Thornber
6422b22610 Move block_manager member down into checker base class. 2013-04-29 13:31:33 +01:00
Joe Thornber
1a8b1b29e8 Start device_checker 2013-04-29 13:24:19 +01:00
Joe Thornber
c0b14ce280 fluff 2013-04-29 12:49:32 +01:00
Joe Thornber
034abaff1e Stop metadata:commit printing the superblock out to stderr. 2013-04-29 12:48:58 +01:00
Joe Thornber
2b8b74065b add fixme 2013-04-29 12:40:56 +01:00
Joe Thornber
925dbdbc53 [block_t] verify any exception thrown by validator->check() gets passed up, and the lock is not consequently taken. 2013-04-29 12:32:04 +01:00
Joe Thornber
a7c0b0c39b [block, lock_checker] add an is_locked() method for use in unit tests. 2013-04-29 12:31:30 +01:00
Joe Thornber
a0f53f47aa [block_t] a superblock_zero test was mistakenly calling plain write_lock. 2013-04-29 12:05:55 +01:00
Joe Thornber
1fe0df9f1a [block_t] make sure validator->check isn't called unexpectedly. 2013-04-29 12:03:47 +01:00
Joe Thornber
441cba7185 Small work on metadata_checker tests. 2013-04-26 15:55:45 +01:00
Joe Thornber
b1e0ca2207 [block] make sure we can change validators 2013-04-26 15:54:15 +01:00
Joe Thornber
5367631c8c [various data structures] Reuse validators rather than always creating a new one. 2013-04-26 14:15:20 +01:00
Joe Thornber
53ac7b8119 [block_manager] Allow people to change the validator for a block 2013-04-26 14:14:28 +01:00
Joe Thornber
0b4c359a63 [block manager] The dirty flag for blocks was never being cleared, causes redundant writes. 2013-04-26 13:18:24 +01:00
Joe Thornber
a55f6fcf78 A stack of thin_check refactorings 2013-04-25 16:27:07 +01:00