Commit Graph

180 Commits

Author SHA1 Message Date
Joe Thornber
83d6b609eb [range.h] rename to run.h 2013-05-28 11:51:44 +01:00
Joe Thornber
bde2b2b40d [range.h] Make ctr explicit 2013-05-28 11:48:12 +01:00
Joe Thornber
12d6b8a2a7 [btree_damage_visitor] Make sure the path for a value includes it's key. 2013-05-23 14:37:24 +01:00
Joe Thornber
553f73b826 superblock_checker.* -> superblock.*, remove metadata_disk_structures.* and rearrange namespaces a bit. 2013-05-21 12:46:07 +01:00
Joe Thornber
49587a7577 Forgot to commit btree_damage_checker.cc 2013-05-21 11:45:10 +01:00
Joe Thornber
fcb617f858 device_tree 2013-05-20 16:09:13 +01:00
Joe Thornber
1ee8afd814 [btree_damage_visitor] fluff 2013-05-20 13:15:51 +01:00
Joe Thornber
d7c1eabfc0 [btree_damage_tracker] track the paths 2013-05-20 12:31:47 +01:00
Joe Thornber
d3fa4102c2 [btree_damage_visitor] pass the btree_path to both the damage and value visitors. 2013-05-17 12:05:13 +01:00
Joe Thornber
38dcde0c37 [btree_damage_visitor] Introduce a DamagedKeys matcher in the tests. 2013-05-17 11:42:55 +01:00
Joe Thornber
08b2749191 Remove level from btree_details::damage 2013-05-17 11:35:46 +01:00
Joe Thornber
f016161e9a [btree_damage_visitor] Hide this behind a utility function btree_visit_values(). 2013-05-17 11:29:34 +01:00
Joe Thornber
7f3a269757 [range] contains method. 2013-05-17 11:14:12 +01:00
Joe Thornber
b98dac8978 [btree] introduce a btree_path typedef 2013-05-17 10:58:34 +01:00
Joe Thornber
49da293be9 [test-utils] Make a template for outputting any optional. 2013-05-17 10:54:45 +01:00
Joe Thornber
b0d1fa0851 Sanitise btree_detail::node_location 2013-05-15 13:37:30 +01:00
Joe Thornber
224ef1f429 switch to -std=c++11 2013-05-14 15:37:57 +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
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
a828cde96d [btree] visitor now passed as a reference rather than shared_ptr 2013-05-02 12:31:33 +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
a7c0b0c39b [block, lock_checker] add an is_locked() method for use in unit tests. 2013-04-29 12:31:30 +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
d8a208cbc8 A stack of space map tweaks.
new_block() is now a concrete method implemented using the virtual
find_free() and inc() methods.

recursive space map is better at giving correct reference counts.
2013-04-23 10:57:47 +01:00
Joe Thornber
4cb19a06ba Pull subtracting_span_iterator out into separate file + test. 2013-04-22 13:41:34 +01:00
Joe Thornber
0a70c17268 Convert bitset_t to gmock 2013-03-22 14:36:31 +00:00
Joe Thornber
f9bf18adf6 Move array_t to gmock 2013-03-22 13:42:20 +00:00
Joe Thornber
c044c2c729 Convert buffer_t to gmock. 2013-03-22 12:04:38 +00:00
Joe Thornber
12dff31358 bitset 2013-03-14 13:13:18 +00:00
Joe Thornber
add23c1709 Array data structure 2013-03-13 13:28:03 +00:00
Joe Thornber
3c54e2b23a Updates to array_block 2013-03-13 12:59:11 +00:00
Joe Thornber
11a41c4cf4 Pull ref_counter out of btree.h 2013-03-13 12:58:05 +00:00
Joe Thornber
7d18b08b91 rename NoOpRefCounter -> no_op_ref_counter 2013-02-01 14:49:26 +00:00
Joe Thornber
4eadd9438e add fixme 2013-02-01 12:01:23 +00:00
Joe Thornber
5aaa710b53 [data-structures] array_block 2013-02-01 12:00:49 +00:00
Joe Thornber
92d70ad9c2 [block] read and write refs defined BLOCK_SIZE 2013-02-01 11:55:46 +00:00
Joe Thornber
0f3a9cc567 Merge remote-tracking branch 'github-heinz/Work' into heinz
Conflicts:
	unit-tests/buffer_t.cc
2013-01-29 11:40:56 +00:00
Joe Thornber
7a6d09866a [array] add array_t 2013-01-29 11:35:37 +00:00
Heinz Mauelshagen
1b49f95c0c Introduce COMPILE_TIME_ERROR conditionals around tests failing at compile time 2013-01-23 15:08:05 +01:00
Heinz Mauelshagen
dc06c88758 Joe's BOOST_STATIC_ASSERT addition 2013-01-23 14:39:42 +01:00
Joe Thornber
9e5213530f fix last push 2013-01-23 13:34:38 +00:00
Joe Thornber
aa12870c22 [buffer.h] add static test for alignment 2013-01-23 13:32:33 +00:00
Heinz Mauelshagen
ca7de05e62 buffer_t.cc: more tests 2013-01-23 14:32:03 +01:00
Joe Thornber
c2ab5390cb buffer_t const assignment fails 2013-01-23 13:12:17 +00:00
Joe Thornber
bb3d8b9aee whitespace 2013-01-23 12:54:54 +00:00
Heinz Mauelshagen
78563e1709 buffer.h: remove protected 2013-01-23 13:51:13 +01:00
Heinz Mauelshagen
635eb6949a buffer_t.cc 2013-01-23 13:47:58 +01:00
Heinz Mauelshagen
5f336e4b41 buffer.h: comment 2013-01-23 13:39:23 +01:00
Heinz Mauelshagen
eed2dfdc38 buffer_t.cc: more tests 2013-01-23 13:28:00 +01:00
Heinz Mauelshagen
a762d34009 factored buffer.h out of block.h 2013-01-22 13:46:38 +01:00
Joe Thornber
f19135f768 [block.h] add a TODO list for Heinz 2013-01-22 10:27:00 +00:00
Joe Thornber
0455cfbf13 [block] use lseek to size a new block file rather than fallocate.
Which sadly returned operation not supported for some reason.
2013-01-15 04:06:57 +00:00
Joe Thornber
fb1ad01e19 Add a CREATE mode to the block_io class. 2013-01-15 03:23:55 +00:00
Joe Thornber
779f8e1fd4 Introduce a mode enum to block_io<> 2013-01-11 20:16:40 +00:00
Joe Thornber
2b86309961 persistent-data/cache.h hadn't been checked in. 2013-01-11 19:31:22 +00:00
Joe Thornber
aacca8d963 Introduce persistent-data/data-structures/ 2013-01-11 19:26:51 +00:00
Joe Thornber
d362fdc867 array data structure wip 2013-01-10 23:00:50 +00:00
Joe Thornber
6f723e6c5a rename run_list -> span 2013-01-10 22:59:54 +00:00
Joe Thornber
326fd3408b move space maps to their own sub directory 2013-01-10 21:36:38 +00:00
Joe Thornber
186b0aa6c1 Change the signature of the space_map->new_block() method, introducing
a span_iterator abstraction.

Rename sm_transactional -> sm_careful_alloc.  Still not happy with the name.

Fix failing test.
2013-01-10 21:05:10 +00:00
Joe Thornber
3d9f91eee2 Test space_map_transactional 2013-01-10 12:15:50 +00:00
Joe Thornber
1cc6737c26 Remove the typedef block_ptr and change code to use block::ptr instead 2013-01-10 11:02:06 +00:00
Joe Thornber
3e39e8bfeb A big raft of changes to the unit-tests 2013-01-09 20:24:11 +00:00
Joe Thornber
b63a921d44 make lock_tracker throw if the superblock is unlocked while other locks are still held. 2013-01-07 15:57:19 +00:00
Joe Thornber
26b97908bd Add superblock_lock method to lock_tracker. 2013-01-07 15:30:51 +00:00
Joe Thornber
2a427ca925 Add persistent_data/lock_tracker for more sanity checking. 2013-01-07 14:59:41 +00:00
Joe Thornber
282e98a6b1 Move source into separate sub directories. 2013-01-02 12:55:41 +00:00