Commit Graph

296 Commits

Author SHA1 Message Date
Joe Thornber
38f8195a99 thin_show_blocks 2014-02-19 15:01:07 +00:00
Joe Thornber
5fe5d213b7 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools into era
Conflicts:
	Makefile.in
2014-01-31 22:35:04 +00:00
Joe Thornber
344f4b1e08 Factor out base/indented_stream.h 2014-01-31 13:43:39 +00:00
Joe Thornber
ef6066e2cd Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2014-01-15 15:52:33 +00:00
Joe Thornber
c24fa93f2c whitespace 2014-01-15 15:50:50 +00:00
Joe Thornber
be5fa59f90 Merge branch 'era' of github.com:jthornber/thin-provisioning-tools into era 2014-01-08 10:50:26 +00:00
Joe Thornber
8049d369a9 stuff 2013-12-11 17:28:14 +00:00
Joe Thornber
983a5e84e6 Move endian_utils to base/ 2013-11-19 10:23:35 +00:00
Joe Thornber
05effffdf9 [thin-provisioning] re-write metadata_dumper.cc 2013-10-16 10:20:43 +01:00
Joe Thornber
b87742ccff [thin-provisioning] walk_mapping_tree() 2013-10-16 10:20:15 +01:00
Joe Thornber
a06139ef9f [thin-provisioning] walk_device_tree() 2013-10-16 10:19:29 +01:00
Joe Thornber
9dc4a97cb7 [thin_check] thin_check wasn't giving a non-zero exit code for damage in mapping trees 2013-10-15 10:40:26 +01:00
Joe Thornber
61e90998c0 [cache_dump, cache_restore] restore/dump cycle works 2013-09-19 13:45:56 +01:00
Joe Thornber
7ce306cb6d [thin_restore] check the input file exists.
Previously we were hanging if it didn't
2013-09-16 13:43:06 +01:00
Joe Thornber
6615b25e4b WIP on cache tools 2013-09-11 11:40:46 +01:00
Joe Thornber
7ada06aa77 fluff 2013-08-16 14:34:51 +01:00
Joe Thornber
be6f90f16c [thin_restore] use full paths for includes. 2013-08-16 14:33:19 +01:00
Joe Thornber
67551d81f1 Put error_state into into it's own file. 2013-08-16 14:07:04 +01:00
Joe Thornber
94bd3aef3b Put nested_output in it's own file 2013-08-16 13:48:25 +01:00
Joe Thornber
500e508c6d fix up some coverity issues 2013-08-15 16:26:17 +01:00
Joe Thornber
77286e0bc7 Take out some 'typename's to support older versions of gcc (Heinz). 2013-08-15 10:35:07 +01:00
Joe Thornber
0029962f20 Give up with --std=c++11
There are too many distros that use old versions of g++ that don't support it adequately.
2013-08-08 10:49:59 +01:00
Joe Thornber
dd26ec76b2 [thin_repair] don't open the space maps in the old metadata, we'll regenerate. 2013-08-02 13:14:49 +01:00
Heinz Mauelshagen
13293d0640 Fix missing quote in xml output with metadata_snap= 2013-07-31 12:07:16 +02:00
Heinz Mauelshagen
bdb8d6e5cc thin_dump: cleanup metadata snapshot support 2013-07-30 17:10:41 +02:00
Heinz Mauelshagen
78389803bc thin_dump.cc: fix metadata snapshot logic 2013-07-30 15:31:36 +02:00
Heinz Mauelshagen
e16b7c8ea0 Fluff 2013-07-29 12:29:05 +02:00
Heinz Mauelshagen
28a8351e12 Fluff 2013-07-19 12:12:31 +02:00
Heinz Mauelshagen
d02bcbab56 Merge branch 'Work_1' of github.com:lvmguy/thin-provisioning-tools into Work_1
Conflicts:
	Makefile.in
	man8/thin_dump.8
	man8/thin_metadata_size.8
	thin-provisioning/thin_dump.cc
2013-07-19 12:11:28 +02:00
Heinz Mauelshagen
dd1e4c1233 thin_dump: support optional block# with --metadata-snap to allow for default snapshot stored in metadata to be used; update manual page 2013-07-19 11:48:15 +02:00
Heinz Mauelshagen
e8f9fc6dff thin_metadata_size: use NOO_NUMBER whilst defining full bool 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
b7ca980664 thin_metadata_size: support short/long --numeric-only options; man page adjustment; change long output; stremaline 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
ce4e01d8c9 thin_metadata_size: remove superfluous array; streamline 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
03d2ca3a99 thin_metadata_size: support long unit specifiers; make sure exit_prg() is being called; update manual page 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
e4912f548c thin_metadata_size.c: support -V option; support -n option argument for unit specifier; add input parameter set to long output 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
5a039267df thin_dump: support --metadata-snap block# 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
ed88882007 autconf: support build of thin_metadata_size.c 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
80be0d0f54 thin_metadata_size.c: indenting 2013-07-18 14:51:09 +02:00
Heinz Mauelshagen
e1067455c4 thin_metadata_size.c: fix --maxthins unit processing 2013-07-18 14:51:09 +02:00
Heinz Mauelshagen
74cd1f6b28 thin_metadata_size.c: format output enhancements 2013-07-18 14:51:09 +02:00
Heinz Mauelshagen
65598e3132 thin_metadata_size.c: new C implementation of metadata size calculation tool 2013-07-18 14:51:09 +02:00
Heinz Mauelshagen
9fac224f25 thin_metadata_size: use NOO_NUMBER whilst defining full bool 2013-07-18 14:19:06 +02:00
Heinz Mauelshagen
3ee6985bbc thin_metadata_size: support short/long --numeric-only options; man page adjustment; change long output; stremaline 2013-07-18 14:03:27 +02:00
Heinz Mauelshagen
175c70ecf2 thin_metadata_size: remove superfluous array; streamline 2013-07-17 17:24:55 +02:00
Heinz Mauelshagen
ffb585cbc5 thin_metadata_size: support long unit specifiers; make sure exit_prg() is being called; update manual page 2013-07-17 16:00:39 +02:00
Heinz Mauelshagen
4ba612f506 thin_metadata_size.c: support -V option; support -n option argument for unit specifier; add input parameter set to long output 2013-07-17 13:25:03 +02:00
Heinz Mauelshagen
1b6f9255a1 thin_dump: support --metadata-snap block# 2013-07-16 17:39:40 +02:00
Heinz Mauelshagen
69ff5d5513 autconf: support build of thin_metadata_size.c 2013-07-15 16:48:36 +02:00
Heinz Mauelshagen
a7e196cc3a thin_metadata_size.c: indenting 2013-07-12 17:09:14 +02:00
Heinz Mauelshagen
931221647c thin_metadata_size.c: fix --maxthins unit processing 2013-07-12 13:29:12 +02:00
Heinz Mauelshagen
99a1b96b2f thin_metadata_size.c: format output enhancements 2013-07-12 12:58:53 +02:00
Heinz Mauelshagen
3a95c7f830 thin_metadata_size.c: new C implementation of metadata size calculation tool 2013-07-11 18:34:00 +02:00
Heinz Mauelshagen
7a8b223c30 create_xml_data: fix mapping variation check 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
9e32e25ac4 create_xml_data: simplify to mappings; drop all units 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
fe4776f2cb create_xml_data: fiddling 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
f9988c7312 create_xml_data: adjust to thinp_xml output 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
cb23845c17 create_xml_data: adjust filed order to thin_dumo format; fix nr_data_blocks 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
979c479e1a create_xml_data: remove space in dev_id ouput 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
42a1db8792 create_xml_data: support --size-variation and check for block size > 0 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
8ca0a87eda thin_metadata_size: check for block size > 0 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
31df9b6d10 thin_metadata_size: drop signe_mapping to = 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
11cec295ce thin_metadata_size,create_xml_data: fix units 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
2fa1ce95eb create_xml_data: fix device and range_mapping 2013-07-10 17:15:18 +02:00
Heinz Mauelshagen
6ba44c54a3 create_xml_data: fix nr_data_blocks 2013-07-10 17:15:18 +02:00
Joe Thornber
f2fe3ba2b3 [metadata_dumper] Fix bug where ranges were appearing in all devices for small metadata.
Author: Teng-Feng Yang
2013-07-09 13:28:36 +01:00
Joe Thornber
e701b96642 [thin_dump] bug in last bug fix 2013-06-28 14:24:39 +01:00
Joe Thornber
fe8e1592a9 [thin_dump] Fix regression where mappings for all devices were being listed in every device. 2013-06-28 13:43:28 +01:00
Joe Thornber
2fc95b3a2d [thin_dump] add -o switch 2013-06-28 12:17:43 +01:00
Joe Thornber
7cab21c8e7 [thin_restore] Tweak usage message. 2013-06-27 09:44:46 +01:00
Heinz Mauelshagen
4f2af9b719 create_xml_data: fix range support 2013-06-26 13:08:16 +02:00
Heinz Mauelshagen
2631d377b5 thin_metadata_size: fix units 2013-06-26 13:01:51 +02:00
Heinz Mauelshagen
63c140d26e create_xml_data: new xml metadata creation tool 2013-06-26 12:45:19 +02:00
Joe Thornber
eb8d4c6f0b Get tools building with g++ 4.8.1 2013-06-25 13:48:02 +01:00
Heinz Mauelshagen
2d74d47373 thin_metadata_size: allow for very small sizes 2013-06-24 13:52:46 +02:00
Heinz Mauelshagen
6ff5e418eb thin_metadata_size: missed estimated_result() return 2013-06-24 13:21:14 +02:00
Heinz Mauelshagen
b20caae5cc thin_metadata_size: add get_index(); streamline 2013-06-24 13:18:33 +02:00
Heinz Mauelshagen
bea157cf70 thin_metadata_size: suppurt bytes unit 2013-06-24 12:30:43 +02:00
Heinz Mauelshagen
92028bcef6 thin_metadata_size: add an index variable to init_units and fiy a message type 2013-06-21 15:46:39 +02:00
Heinz Mauelshagen
b4db483647 thin_metadata_size: avoid unit_chars variable and adjust estimated output message 2013-06-21 14:58:53 +02:00
Heinz Mauelshagen
8d2ae677ff thin_metadata_size: algorithm corrections and output adjustments 2013-06-21 14:33:14 +02:00
Heinz Mauelshagen
0b29c22ba9 thin_metadata_size: new metadata size calculation tool 2013-06-21 12:41:53 +02:00
Heinz Mauelshagen
f376fdfb49 thin_check.cc: remove superfluous 'if (enabled)' 2013-06-21 12:35:06 +02:00
Heinz Mauelshagen
9900c91c1b thin_check.cc: support --quiet in nested_output 2013-06-21 12:35:06 +02:00
Joe Thornber
83a09e1a2a [btree] use a block_ref_counter for internal nodes 2013-06-20 14:29:48 +01:00
Heinz Mauelshagen
5d6a3c184b thin_check.cc: remove superfluous 'if (enabled)' 2013-06-19 14:15:53 +02:00
Heinz Mauelshagen
41287e182f thin_check.cc: support --quiet in nested_output 2013-06-19 14:12:44 +02:00
Heinz Mauelshagen
88f9252a03 thin_check.cc: reenable --quiet option 2013-06-19 13:41:29 +02:00
Joe Thornber
21074456ca thin_repair 2013-06-19 12:39:28 +01:00
Joe Thornber
0938d24ea1 Take held root support out of thin_dump.
Temporary, just to get things building.
2013-06-19 12:11:34 +01:00
Joe Thornber
055b237126 tweaks to metadata constructor, and some updated features. 2013-06-19 11:34:01 +01:00
Joe Thornber
acd197ed6f [thin_restore] restore_emitter now checks the mappings against the data device length. 2013-06-18 14:18:39 +01:00
Joe Thornber
8781685a10 whitespace 2013-06-14 14:32:50 +01:00
Joe Thornber
6706493304 Remove some global 'using namespace's 2013-05-28 13:48:10 +01:00
Joe Thornber
e64dda95f6 rename range<> -> run<> 2013-05-28 12:20:05 +01:00
Joe Thornber
83d6b609eb [range.h] rename to run.h 2013-05-28 11:51:44 +01:00
Joe Thornber
82324d1d27 [thin_rmap] rmap_visitor now sorts the rmap into ascending data_block order. 2013-05-24 14:01:03 +01:00
Joe Thornber
8fab2e37af [thin_rmap] now produces ranged output. 2013-05-24 13:43:55 +01:00
Joe Thornber
41204dceaa [thin_rmap] rmap_visitor 2013-05-24 13:30:17 +01:00
Joe Thornber
4d17d3f7ec [thin_rmap] finish implementing 2013-05-23 15:06:57 +01:00
Joe Thornber
25a090279f [thin_rmap] region parsing 2013-05-23 13:57:57 +01:00
Joe Thornber
5498e0bc46 [thin_check] fluff 2013-05-23 13:57:15 +01:00
Joe Thornber
bc67fc17b1 [thin_rmap] Stub 2013-05-23 13:15:00 +01:00
Joe Thornber
063769cd12 [thin_check] we don't need to import the persistent_data namespace any more. 2013-05-23 12:00:36 +01:00
Joe Thornber
e7303a11c6 [thin_check] --ignore-non-fatal-errors 2013-05-23 11:57:02 +01:00
Joe Thornber
84858ab86e whitespace 2013-05-23 11:46:06 +01:00
Joe Thornber
f8efc4f58c [thin_check] Add cucumber test for --skip-mappings 2013-05-23 11:45:08 +01:00
Joe Thornber
8ccfff6c34 [thin-check] wire up superblock-only and skip-mappings 2013-05-23 11:25:54 +01:00
Joe Thornber
6fe92d4a63 [thin_check] wire up mapping tree checker 2013-05-22 14:55:28 +01:00
Joe Thornber
b456f16aa0 [thin_check] Wire up check_device_tree. 2013-05-21 15:49:20 +01:00
Joe Thornber
f91b8f2fba [thin_check] nested_output 2013-05-21 15:05:25 +01:00
Joe Thornber
4d83b7775b [thin_check] start wiring up the new damage visitor infrastructure, starting with superblock corruption. 2013-05-21 14:38:33 +01:00
Joe Thornber
6fcda37dbc superblock damage visitor 2013-05-21 14:01:17 +01:00
Joe Thornber
24ddc4f5c4 Move superblock_validator into superblock.{h,cc} 2013-05-21 13:20:03 +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
4e61578508 mapping_tree.{h,cc} 2013-05-21 11:46:37 +01:00
Joe Thornber
8f2ab2d676 Introduce mapping_tree.h 2013-05-20 17:37:46 +01:00
Joe Thornber
35880f3038 Move device_details_traits into the device_tree_detail namespace. 2013-05-20 16:35:26 +01:00
Joe Thornber
fcb617f858 device_tree 2013-05-20 16:09:13 +01:00
Joe Thornber
b0d1fa0851 Sanitise btree_detail::node_location 2013-05-15 13:37:30 +01:00
Joe Thornber
a7adefbae8 Move range.h to persistent-data 2013-05-08 16:38:04 +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
a828cde96d [btree] visitor now passed as a reference rather than shared_ptr 2013-05-02 12:31:33 +01:00
Joe Thornber
21603c5a5d ostream operator << for range template. 2013-05-01 16:30:59 +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
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
441cba7185 Small work on metadata_checker tests. 2013-04-26 15:55:45 +01:00
Joe Thornber
a55f6fcf78 A stack of thin_check refactorings 2013-04-25 16:27:07 +01:00
Joe Thornber
20ff78c818 [thin_check] Start refactoring metadata_checker. 2013-04-23 15:21:44 +01:00
Joe Thornber
dde775ef52 thin_metadata_t now reproduces the recursive new_block() error. 2013-04-11 13:41:43 +01:00
Joe Thornber
3629e1e2b5 cucumber test for thin_check --super-block-only 2013-04-11 13:40:47 +01:00
Joe Thornber
be7801f111 some __le -> le issues 2013-03-22 15:48:43 +00:00
Joe Thornber
907dc34499 rename some parameters 2013-03-15 14:59:32 +00:00
Joe Thornber
7d18b08b91 rename NoOpRefCounter -> no_op_ref_counter 2013-02-01 14:49:26 +00:00
Joe Thornber
779f8e1fd4 Introduce a mode enum to block_io<> 2013-01-11 20:16:40 +00:00
Joe Thornber
aacca8d963 Introduce persistent-data/data-structures/ 2013-01-11 19:26:51 +00:00
Joe Thornber
326fd3408b move space maps to their own sub directory 2013-01-10 21:36:38 +00:00
Joe Thornber
282e98a6b1 Move source into separate sub directories. 2013-01-02 12:55:41 +00:00