Joe Thornber
e801cc607b
[block_manager] Hard code block size to 4k.
...
We're never going to use anything other than 4k, and by hard coding it we
avoid making block_manager a template.
2020-04-30 14:30:01 +01:00
Joe Thornber
3c761e6822
[all tools] Factor out open_bm() and open_tm.
...
Many duplicates of this code.
2017-10-05 11:53:40 +01:00
Joe Thornber
a424417475
[thin_delta] long opts weren't being terminated properly.
...
This caused a seg fault with an unknown switch
2017-09-15 12:28:19 +01:00
Joe Thornber
f193a70a31
[thin-delta] fix bug in earlier refactor
2016-02-18 11:31:43 +00:00
Joe Thornber
1f10017635
[thin_delta] tidy up the comparison function
2016-02-17 15:17:02 +00:00
Joe Thornber
7c2b3fb671
[thin_delta] Fix bug when comparing the mappings
2016-02-17 14:35:11 +00:00
Joe Thornber
0d510924d5
[thin_delta] set nr_data_blocks to zero if there are no space maps.
...
ie. a metadata_snap is being used.
2016-02-17 14:35:02 +00:00
Joe Thornber
c93e728ef4
[base] introduce a command type that gets registered with the app
2016-01-08 12:51:52 +00:00
Joe Thornber
a709b9718b
[thin] Make the metadata class resposible for locating metadata snapshots
2015-12-15 10:08:07 +00:00
Joe Thornber
29c2a949f4
remove a bit of debug
2015-08-13 14:56:30 +01:00
Joe Thornber
3a881e9513
[thin_delta] Allow optional arg when using -m
2015-07-28 11:29:00 +01:00
Joe Thornber
cc44652cc3
[thin_delta] support metadata snapshots
2015-03-25 11:10:18 +00:00
Joe Thornber
0e72f772d0
[thin_delta] Add superblock and diff tags
2015-03-25 10:09:39 +00:00
Joe Thornber
45422dbf7a
[thin_delta] Mappings were being missed off from the tail of a device
2015-03-24 13:36:45 +00:00
Joe Thornber
6f8b7e2914
[all] Build a single executable
2014-08-27 14:01:31 +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
d517684c95
Initial code drop for merging block_cache
2014-07-22 16:41:39 +01:00
Joe Thornber
e4d82d04bd
[thin_delta] Fix bug when detecting right_only mappings
2014-06-17 16:20:38 +01:00
Joe Thornber
c8f408ac3c
[thin_delta] Update the usage
2014-06-17 15:00:38 +01:00
Joe Thornber
bb57104542
[thin_delta] By default output a simpler format that ignores the data locations.
...
Most people will access the data via the thin device itself, so
there's really no need to output the locations of the data on pool
device. Doing this allows us to run together adjacent thin blocks
(even if they are not adjacent on the pool dev).
Simple format:
<same begin="0" length="1"/>
<different begin="1" length="4"/>
<same begin="5" length="1"/>
<different begin="6" length="6"/>
<same begin="12" length="1"/>
<different begin="13" length="9"/>
<same begin="22" length="1"/>
<different begin="23" length="4"/>
<same begin="27" length="1"/>
<different begin="28" length="3"/>
<same begin="31" length="1"/>
<different begin="32" length="1"/>
The old format is available using the --verbose switch:
<same>
<range begin="0" data_begin="0" length="1"/>
</same>
<different>
<range begin="1" left_data_begin="24576" right_data_begin="16384" length="1"/>
<range begin="2" left_data_begin="24577" right_data_begin="2" length="1"/>
<range begin="3" left_data_begin="24578" right_data_begin="16385" length="1"/>
<range begin="4" left_data_begin="24579" right_data_begin="4" length="1"/>
</different>
<same>
<range begin="5" data_begin="5" length="1"/>
</same>
<different>
<range begin="6" left_data_begin="24580" right_data_begin="16386" length="1"/>
<range begin="7" left_data_begin="7" right_data_begin="16387" length="1"/>
<range begin="8" left_data_begin="24581" right_data_begin="8" length="1"/>
<range begin="9" left_data_begin="24582" right_data_begin="16388" length="1"/>
<range begin="10" left_data_begin="10" right_data_begin="16389" length="1"/>
<range begin="11" left_data_begin="24583" right_data_begin="11" length="1"/>
</different>
<same>
<range begin="12" data_begin="12" length="1"/>
</same>
<different>
<range begin="13" left_data_begin="24584" right_data_begin="13" length="1"/>
<range begin="14" left_data_begin="24585" right_data_begin="16390" length="1"/>
<range begin="15" left_data_begin="24586" right_data_begin="15" length="1"/>
<range begin="16" left_data_begin="16" right_data_begin="16391" length="1"/>
<range begin="17" left_data_begin="24587" right_data_begin="16392" length="1"/>
<range begin="18" left_data_begin="18" right_data_begin="16393" length="3"/>
<range begin="21" left_data_begin="24588" right_data_begin="21" length="1"/>
</different>
<same>
<range begin="22" data_begin="22" length="1"/>
</same>
<different>
<range begin="23" left_data_begin="24589" right_data_begin="23" length="1"/>
<range begin="24" left_data_begin="24590" right_data_begin="16396" length="1"/>
<range begin="25" left_data_begin="24591" right_data_begin="25" length="1"/>
<range begin="26" left_data_begin="26" right_data_begin="16397" length="1"/>
</different>
<same>
<range begin="27" data_begin="27" length="1"/>
</same>
<different>
<range begin="28" left_data_begin="24592" right_data_begin="28" length="2"/>
<range begin="30" left_data_begin="30" right_data_begin="16398" length="1"/>
</different>
<same>
<range begin="31" data_begin="31" length="1"/>
</same>
<different>
<range begin="32" left_data_begin="24594" right_data_begin="32" length="1"/>
</different>
2014-06-17 14:20:33 +01:00
Joe Thornber
0e62a1c4de
[thin_delta] provide a more complete diff output.
2014-06-17 12:39:13 +01:00
Joe Thornber
f80c2dc77f
[thin_delta] Don't use endl which also flushes
2014-06-16 13:58:25 +01:00
Joe Thornber
d7d293ee4f
thin_delta now works
2014-06-10 16:38:20 +01:00
Joe Thornber
e851b35954
[thin_delta] read in the snaps and dev
2014-06-09 13:26:55 +01:00
Joe Thornber
b03fa373a1
[thin_delta] Print usage on unrecognised switch
2014-06-09 10:51:10 +01:00
Joe Thornber
83f2cce597
[thin_delta] -h/--help
2014-06-09 10:48:29 +01:00
Joe Thornber
87fa6dc079
[thin_delta] --version/-V
2014-06-09 10:37:46 +01:00