Commit Graph

331 Commits

Author SHA1 Message Date
Joe Thornber
e670a27638 Merge pull request #46 from mingnus/v0.6.2-repairtool
Code cleanup for new dev-tools
2016-03-06 16:15:35 +00:00
Ming-Hung Tsai
220ece1dc8 [thin] Cleanup: move methods before data member declaration 2016-03-06 23:21:09 +08:00
Ming-Hung Tsai
8232feb855 [thin_scan] Cleanup: remove unnecessary variables 2016-03-06 11:42:38 +08:00
Ming-Hung Tsai
9f15c5589f [thin_scan] Cleanup: move methods before data member declaration 2016-03-06 11:42:38 +08:00
Joe Thornber
752163b681 Merge pull request #45 from mingnus/v0.6.2-repairtool
Minor fixes for new dev-tools
2016-03-05 15:36:12 +00:00
Ming-Hung Tsai
6fb5f8241d [thin_scan] Factor out range manipulation code 2016-03-05 22:31:09 +08:00
Ming-Hung Tsai
400613305c [thin_ll_restore] Cleanup: use device_details' constructor 2016-03-05 14:12:58 +08:00
Ming-Hung Tsai
08219a60b6 [thin] Add default constructor to struct device_details 2016-03-05 14:12:13 +08:00
Joe Thornber
8676198e76 [file_utils] rename get_nr_blocks() -> get_nr_metadata_blocks() and introduce get_nr_blocks() 2016-03-04 10:43:58 +00:00
Joe Thornber
286f70ceac Merge remote-tracking branch 'remotes/github-m-h-tsai/v0.6.2-repairtool' into 2016-02-29-mingus-merge
Conflicts:
	Makefile.in
	VERSION
	thin-provisioning/commands.cc
	thin-provisioning/commands.h
	thin-provisioning/thin_delta.cc
2016-02-29 10:29:28 +00:00
Ming-Hung Tsai
08a7093cd5 [thin_ll_dump][thin_ll_restore] first draft 2016-02-27 15:24:28 +08:00
Ming-Hung Tsai
b05b9aa227 [thin_scan] first draft 2016-02-27 15:24:14 +08:00
Ming-Hung Tsai
80783e7729 Add metadata_counter.{h,cc} 2016-02-27 15:23:06 +08:00
Ming-Hung Tsai
778c153c1e [block-cache] Add check_raw() to bcache::validator 2016-02-27 15:21:13 +08:00
Ming-Hung Tsai
992ad02ce9 [restore_emitter] Recount device_details::mapped_blocks_ 2016-02-27 15:20:56 +08:00
Ming-Hung Tsai
ced9929ca6 [metadata_dumper] Support dump a bottom-level data mapping tree 2016-02-27 15:20:31 +08:00
Ming-Hung Tsai
7ec47158b5 [emitter] Preserve the flags and version entries in superblock 2016-02-27 15:20:02 +08:00
Ming-Hung Tsai
b47c02ed8b Show the wanted checksum in bad-superblock-checksum exception 2016-02-27 15:04:08 +08:00
Joe Thornber
e78de5d3ad [thin_show_metadata] ncurses render 2016-02-26 12:50:17 +00:00
Joe Thornber
c4215c0cf6 [thin_show_metadata] thin_show_blocks.cc -> thin_show_metadata.cc 2016-02-24 15:32:05 +00:00
Joe Thornber
0349956015 Merge branch 'low_level_examine_metadata' into merge-show-blocks
Conflicts:
	.gitignore
	Makefile.in
	persistent-data/space-maps/disk.cc
2016-02-24 15:24:43 +00:00
Joe Thornber
a5a53648c9 Merge branch '2015-08-19-thin-show-duplicates' into merge-thin-ls
Conflicts:
	Makefile.in
	block-cache/block_cache.h
	main.cc
	thin-provisioning/commands.h
2016-02-24 14:31:51 +00:00
Joe Thornber
5f879237f5 [build] add --enable-dev-tools configure flag
This builds tools that I want to keep in the same code base, but not
intended for general release.
2016-02-24 13:41:43 +00:00
Joe Thornber
0ec27c7835 [thin_delta] backport cherry-picked changes to c++98 2016-02-18 11:37:51 +00:00
Joe Thornber
a21cee55c7 [thin-delta] fix bug in earlier refactor 2016-02-18 11:34:19 +00:00
Joe Thornber
2461cdce43 [thin_delta] tidy up the comparison function 2016-02-18 11:34:09 +00: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
768bbd2715 [thin_delta] Fix bug when comparing the mappings 2016-02-17 11:44:44 +00:00
Joe Thornber
09ce099c2f [thin_delta] set nr_data_blocks to zero if there are no space maps.
ie. a metadata_snap is being used.
2016-02-17 10:42:42 +00:00
Joe Thornber
767c39cf71 [build] switch to c++11
Conflicts:
	Makefile.in
	chunker/cache_stream.cc
	chunker/cache_stream.h
	thin-provisioning/thin_archive.cc
	thin-provisioning/thin_show_duplicates.cc
	unit-tests/Makefile.in
2016-02-16 16:45:44 +00:00
Joe Thornber
2815aeace9 [thin_repair] fix regression in thin_repair
When opening the corrupted metadata we don't need to touch the space
maps.  This used to be achieved by pretending we were opening a
metadata snap at block 0 (superblock location).  But got changed in
the recent rationalisation of the metadata constructors.

This patch introduces a bool to the metadata OPEN constructor that
says whether the space maps are needed or not.
2016-02-16 14:08:43 +00:00
Joe Thornber
6101398b02 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2016-02-10 14:25:50 +00:00
Joe Thornber
c8c4442b2f [thin_dump] We can't give the number of data blocks with a metadata snap.
No space maps.
2016-02-10 13:34:07 +00:00
Joe Thornber
0fced25b3e [thin_dump, thin_restore] remove some dead code 2016-02-04 15:24:16 +00:00
Joe Thornber
c369045790 Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
Conflicts:
	thin-provisioning/metadata.cc
	thin-provisioning/thin_trim.cc
2016-01-20 15:37:04 +00:00
Joe Thornber
f385198cfc [thin_ls] get it working with a metadata snap 2016-01-20 14:45:38 +00:00
Joe Thornber
7a4a5aa87e [thin_ls] fluff 2016-01-20 13:25:09 +00:00
Joe Thornber
944b9c0c57 [thin_ls] wire up -o 2016-01-20 06:59:55 +00:00
Joe Thornber
e15b11edb1 [thin_ls, base] Factor out grid_layout 2016-01-20 06:58:59 +00:00
Joe Thornber
5aaa26fe34 [thin_ls] only run pass1 if needed 2016-01-19 15:50:15 +00:00
Joe Thornber
f3e23c5417 [thin_ls] add --no-headers 2016-01-19 14:56:48 +00:00
Joe Thornber
f6f38fbc1f [thin_ls] tweak enum names 2016-01-19 14:50:04 +00:00
Joe Thornber
8030a98bd8 [thin_ls] add MAPPED_SECTORS, EXCLUSIVE_SECTORS, SHARED_SECTORS 2016-01-19 14:43:37 +00:00
Joe Thornber
3dd45e1ceb [thin_ls] tweak the field names 2016-01-19 14:30:13 +00:00
Joe Thornber
87d8d630f6 [thin_ls] more tidying 2016-01-19 14:16:02 +00:00
Joe Thornber
c5a1a814f3 [thin_ls] rationalise the field names by using a static array of names 2016-01-19 14:11:31 +00:00
Joe Thornber
d65bf29eb7 [thin_ls] change default fields 2016-01-19 13:54:15 +00:00
Joe Thornber
208fdd86e6 [thin_ls] add support for --format 2016-01-19 13:40:36 +00:00
Joe Thornber
7ce4e451ff [base, thin_ls] factor out disk_units code 2016-01-19 11:40:00 +00:00
Joe Thornber
47bd31da8d [thin_ls] more work on thin_ls 2016-01-19 11:16:25 +00:00
Joe Thornber
c3973c044c [thin_ls] First code drop.
Output still needs formatting.  More testing needed in dmtest.
2016-01-12 15:02:19 +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
30a3bf67d1 [thin tools] Change the metadata contructors to take a block_manager<>::ptr
Also check any metadata snap passed in matches what's in the superblock.
2015-12-14 15:29:57 +00:00
Ming-Hung Tsai
e528fa1972 Add BLKDISCARD definition 2015-11-27 23:38:42 +08:00
Ming-Hung Tsai
856bd95d8e Fix the unit of superblock::metadata_block_size_ to be sector-based 2015-11-27 23:38:37 +08:00
Ming-Hung Tsai
03590d3c91 Fix bug in superblock UUID string copy 2015-11-27 23:38:27 +08:00
Joe Thornber
664841ad03 [thin_show_dups] Support fractions of a pool block size 2015-09-08 17:09:41 +01:00
Joe Thornber
c58c15e788 [thin_show_dups] move scan_with_variable_sized_chunks() into the dup detector 2015-09-08 13:17:52 +01:00
Joe Thornber
b6e3a12297 [thin_show_dups] move scan into the duplicate_detector 2015-09-07 15:40:35 +01:00
Joe Thornber
cb56b47400 [thin-show-dups] add --content-based-chunks 2015-09-04 15:27:48 +01:00
Joe Thornber
251762e6d9 [thin_show_dups] tidy up reporting 2015-09-04 15:16:49 +01:00
Joe Thornber
41a1b85c27 [thin_show_dups] take out some old assertions 2015-09-04 13:56:38 +01:00
Joe Thornber
216e5acb6c [thin_show_dups] remove variable number of mems per chunks.
Too slow and not used.
2015-09-04 13:48:02 +01:00
Joe Thornber
7633c5d7ae [thin_show_dups] get the progress bar working again 2015-09-04 10:36:39 +01:00
Joe Thornber
5d383c0293 [thin_show_dups] get the backup break working in the rolling hash 2015-09-04 10:10:41 +01:00
Joe Thornber
750ce0f47b [thin_show_dups] variable_chunk_stream 2015-09-03 13:02:29 +01:00
Joe Thornber
d44a817c60 [thin_show_dups] Track zero blocks 2015-08-25 09:14:40 +01:00
Joe Thornber
6dd6fcb4cd [thin_show_dups] fix bug calculating block size for linear volumes 2015-08-25 08:38:01 +01:00
Joe Thornber
10f93be8b1 [thin_show_dups] put linear branch back in 2015-08-25 08:22:16 +01:00
Joe Thornber
3470ede50b [thin_show_dups] pull the various streams out to their own files 2015-08-24 16:55:53 +01:00
Joe Thornber
46fe4525bb [thin_show_dups] factor out a pool stream 2015-08-24 14:29:06 +01:00
Joe Thornber
ac4104d063 add prefetching 2015-08-24 11:24:55 +01:00
Joe Thornber
c8d3ce6af5 [thin_show_duplicates] start factoring out a chunk_stream abstraction 2015-08-24 11:18:31 +01:00
Joe Thornber
d954f230fa [thin_show_duplicates] wip 2015-08-21 13:10:49 +01:00
Joe Thornber
94636b63d7 [thin_show_duplicates] print out the percentage of duplicates 2015-08-19 13:46:02 +01:00
Joe Thornber
929a824184 [thin_show_duplicates] add --block-sectors switch 2015-08-19 13:07:56 +01:00
Joe Thornber
519cbfd855 [thin_show_duplicates] add a progress bar 2015-08-19 12:53:11 +01:00
Joe Thornber
59a622670c [thin_show_duplicates] wip 2015-08-19 12:32:57 +01:00
Joe Thornber
dbd0c65088 [thin_show_duplicates] stub new command 2015-08-19 09:41:14 +01:00
Joe Thornber
29c2a949f4 remove a bit of debug 2015-08-13 14:56:30 +01:00
Joe Thornber
5d28c05dc3 [thin_check] detail and mapping trees weren't being counted properly for the metadata snap.
This could result in block counts being unexpectedly non zero.
2015-08-04 15:14:02 +01:00
Joe Thornber
7134a58134 [thin_metadata_size] use floor rather than truncl 2015-07-30 11:45:13 +01:00
Joe Thornber
3a881e9513 [thin_delta] Allow optional arg when using -m 2015-07-28 11:29:00 +01:00
Joe Thornber
93fb540bd4 [thinp tools] move find_metadata_snap to superblock.cc 2015-07-27 14:30:09 +01:00
Joe Thornber
642ae6e7c2 Tools now open the metadata device in O_EXCL mode.
An attempt to stop people running the tools on active metadata.
2015-07-07 13:47:00 +01:00
Joe Thornber
f85b7cef3f thin_dump, thin_check: Fix bug in damage reporting 2015-07-03 13:00:13 +01:00
Joe Thornber
082491d140 thin_check: tidy up some unintuitive code 2015-06-22 11:13:19 +01:00
Joe Thornber
270c0f7041 [thin_check] factor out check_space_map_counts() 2015-04-08 14:07:38 +01:00
Joe Thornber
0fee897fda [thin_check] A space map count being too high should be a NON_FATAL error. 2015-04-08 12:32:31 +01:00
Joe Thornber
20079f3d28 Pass tm's by reference 2015-04-07 13:31:45 +01:00
Joe Thornber
ee200ba85b Merge branch 'master' into space-map-checking 2015-04-07 12:18:23 +01:00
Joe Thornber
7f643b7050 [thin] Use specific damage visitors to improve error messages.
There's now a damage visitor for dev_trees, mapping_trees and
single_mapping_trees.
2015-04-07 12:16:46 +01:00
Joe Thornber
f581f34be8 add comment explaining mtree_traits 2015-04-07 12:10:38 +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