Commit Graph

31 Commits

Author SHA1 Message Date
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
Arusekk
3ed3925370 Fix compilation with uClibc
Closes #12
2020-03-25 15:58:02 +01:00
Joe Thornber
5f2c3bed69 Add some ftests, and fixup whitespace from Nikhil's work 2019-10-28 11:52:21 +00:00
Nikhil Kshirsagar
91b4714e38 Corrupt superblock repair 2019-10-25 15:02:56 +05:30
Joe Thornber
9e20465fd1 [thin-repair, thin_dump] When repairing we now hunt for the best btree roots.
We've had a trickle of users who accidentally activate the same pool on a
VM and host at the same time.  Typically the host doesn't do any IO, but
the kernel will still rewrite the superblock on shutdown.  This leaves
the superblock pointing to very out of date btree roots and so we get
massive metadata loss.

This patch changes thin_repair, and thin_dump --repair.  They now hunt
for the most recent, undamaged and consistent roots of the device and
mapping trees, and use that as the starting point of the repair.
2019-04-17 12:17:13 +01:00
Joe Thornber
aace49cdd6 [thin_repair] work in progress 2019-03-29 12:56:31 +00:00
Joe Thornber
f7d79339e8 [man pages] Various updates. 2017-09-18 16:10:56 +01:00
Joe Thornber
c7813e07e4 [thin_dump] --format custom=<shared lib>
Allow people to use their own emitters held in a shared library.

Put a trivial emitter in contrib/ as an example.
2016-03-24 13:59:08 +00:00
Joe Thornber
872a933072 [thin_dump] start refactoring format code 2016-03-23 10:52:04 +00:00
Joe Thornber
4370f048c0 [thin_dump] --skip-mappings 2016-03-22 15:01:37 +00:00
Joe Thornber
a3f4940f1e [thin_dump] --dev-id 2016-03-22 14:46:33 +00:00
Joe Thornber
0fced25b3e [thin_dump, thin_restore] remove some dead code 2016-02-04 15:24:16 +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
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
6f8b7e2914 [all] Build a single executable 2014-08-27 14:01:31 +01:00
Joe Thornber
6615b25e4b WIP on cache tools 2013-09-11 11:40:46 +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
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
5a039267df thin_dump: support --metadata-snap block# 2013-07-18 14:52:08 +02:00
Heinz Mauelshagen
1b6f9255a1 thin_dump: support --metadata-snap block# 2013-07-16 17:39:40 +02:00
Joe Thornber
2fc95b3a2d [thin_dump] add -o switch 2013-06-28 12:17:43 +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
282e98a6b1 Move source into separate sub directories. 2013-01-02 12:55:41 +00:00