Joe Thornber
c19a05f28f
bump version
2019-06-03 14:11:37 +01:00
Joe Thornber
733c7df798
[thin_repair/thin_dump] Fix some more spurious error messages when doing repair.
...
Repair was falling back to non-repair behaviour if it thought the roots
were ok. Now if --repair is specified the same dumping code is always
executed.
2019-06-03 14:03:24 +01:00
Joe Thornber
e45a211902
[thin/metadata_dumper] Change a couple of confusing class names.
...
metadata_emitter is actually a visitor that passes on it's data
to an encapsulated emitter object.
metadata_emitter -> metadata_emit_visitor
metadata_tree_emitter -> metadata_tree_emit_visitor
2019-06-03 11:07:32 +01:00
Joe Thornber
a13178ffd1
Bump version
2019-05-28 09:24:22 +01:00
Joe Thornber
0624ded67f
[thin_repair, thin_dump] Don't look for better roots if the ones in the sb are ok.
...
Calculating the most recent trees is inexact, so trees other than the ones
in the superblock, which presumably are the most recent, could be chosen.
2019-05-27 16:43:32 +01:00
Joe Thornber
5e6ddbf2da
[thin_dump, thin_repair] Fix bad metadata_damage exception
...
The first pass of the repair process scans all metadata working out the
largest orphan btrees. This scan doesn't use as much validation as
the btree_walk function which subsequently gets called.
This patch catches any exceptions thrown by the btree walk function
and removes that btree from consideration.
2019-05-27 16:06:59 +01:00
Joe Thornber
d299cc66d1
[functional-tests/thin_dump] check no error msg with clean metadata
2019-05-27 15:38:45 +01:00
Joe Thornber
acf2e6e625
[unit-tests] squash some warnings
...
ASSERT_THAT(), defined in google-test needs to be wrapped in braces if
it's the only statement in an if block (dangling else).
2019-05-27 09:19:14 +01:00
Joe Thornber
65264911c1
[thin_repair, thin_dump] --repair falg wasn't being passed through properly.
...
Recent regression.
2019-05-27 09:04:55 +01:00
Joe Thornber
9e87ad8298
bump version to 0.8.1
2019-05-03 15:19:06 +01:00
Joe Thornber
595ddfc50f
[thin_repair/thin_dump] repair flag wasn't being set internally.
...
Introduced by recent changes
2019-05-03 15:15:01 +01:00
Joe Thornber
4bca324c9f
Bump version to 0.8.0
2019-04-17 12:55:15 +01:00
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
b027a1039f
[thin-provisioning] Add a new constructor for the metadata class
...
This one takes a superblock. Used when repairing.
2019-04-17 12:15:46 +01:00
Joe Thornber
b777a77023
[thin-provisioning] pass the tm by reference to the metadata object
2019-04-04 15:06:41 +01:00
Joe Thornber
aace49cdd6
[thin_repair] work in progress
2019-03-29 12:56:31 +00:00
Joe Thornber
95ae4fef6a
[functional tests] Use dd to create zeroed files
...
Previously I was using fallocate, which has issues on some filesystems.
2018-12-12 13:14:09 +00:00
Joe Thornber
e03b878df3
[functional tests] Move test output from /tmp to .
...
tmpfs has trouble with O_DIRECT.
2018-12-12 13:13:11 +00:00
Joe Thornber
cc56214eb8
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2018-12-12 10:25:52 +00:00
Joe Thornber
207ef304c3
[era/restore_emitter] remove a noop
...
Pointless self assignment. Value in suerpblock does get assigned properly.
2018-12-12 10:23:35 +00:00
Joe Thornber
d1a41d01cc
[thin-check] print out some info fields.
...
These are consumed by lvm.
2018-11-09 12:43:21 +00:00
Joe Thornber
5a309dd3bd
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2018-11-09 11:18:27 +00:00
Joe Thornber
de7c9a5781
[thin_journal_check] Checks journal of block manager activity.
...
You need to apply doc/bm-journal.patch to create the journal.
thin_journal_check confirms that if the machine had crashed at any time
during the test run no metadata corruption would have occured.
2018-09-24 14:51:46 +01:00
Joe Thornber
70cdfe12a2
[thin_journal_check] first code drop
2018-08-28 13:12:20 +01:00
Joe Thornber
a512b8754b
Revert "fix compile failed with libc musl ( #103 )"
...
This reverts commit 9311aa6483 .
2018-08-02 07:12:22 +01:00
Joe Thornber
82ff03e5c1
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2018-06-21 10:11:27 +01:00
Joe Thornber
68284c12a8
Merge branch '2018-04-25-thin-discard-bug'
2018-06-21 10:11:21 +01:00
Joe Thornber
498057d00e
ft-lib: add discard()
2018-06-21 10:06:01 +01:00
Joe Thornber
cfe421ab8b
Merge commit '570e11b2da6ee55bc755f5211cf80c4f942b4644'
2018-06-13 16:58:07 +01:00
Joe Thornber
570e11b2da
[dmtests] Add failing test thin/discard/recover-space
...
See bz1563697
2018-06-13 16:54:36 +01:00
Joe Thornber
b6ba3a070d
[restore_emitter] squash a strncpy warning
2018-06-13 12:50:48 +01:00
Joe Thornber
af785461e9
[build] [CXX] -> [CC] for C files
2018-06-13 12:49:57 +01:00
Joe Thornber
80e046a7df
[build] support separate build directories
2018-06-13 09:34:14 +01:00
Joe Thornber
c1e6adc72c
[build] support separate build directories
2018-06-13 09:33:25 +01:00
Joe Thornber
5d3197b8ab
[build] quieten build of C files
2018-04-25 14:05:28 +01:00
Joe Thornber
6f936992b8
bump version
2018-04-23 10:41:48 +01:00
Joe Thornber
1172b2f450
[functional-tests] with-temp-file-sized now takes *either* bytes or a disk-size object
2018-04-18 15:12:28 +01:00
Joe Thornber
e619c6edd0
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2018-04-17 13:33:32 +01:00
Joe Thornber
1433d11f59
[thin-provisioning/metadata] Use latest metadata version (2)
2018-04-17 13:32:49 +01:00
Joe Thornber
58048dc178
[file_utils] Use aligned memory in zero_superblock
2018-04-17 11:42:43 +01:00
Joe Thornber
abb32897e2
[thin_dump] human_readable emitter didn't print the metadata_snap.
2018-04-17 10:29:31 +01:00
Joe Thornber
5bac06d68f
[man] Update manpage for thin_dump
...
--metadata-snap=<block nr>
Wasn't clear.
2018-01-31 14:39:24 +00:00
Joe Thornber
cf9ab80f86
[functional-tests] Fix (thin metadata)
...
It was using the old, spine based interface for btree-each
2018-01-25 16:11:43 +00:00
Joe Thornber
2fd6723712
[functional-tests/block-manager] wrap the C ptr
...
So we get some extra error checking.
2018-01-25 15:48:56 +00:00
Joe Thornber
12c760f05c
[ft-lib/bcache] add a check to list_pop()
2018-01-25 15:47:12 +00:00
Joe Thornber
1122b9a423
[functional-tests] Code up an equivalent of get_opt_long()
2018-01-25 15:46:27 +00:00
Joe Thornber
54c03f10e6
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2018-01-08 10:52:32 +00:00
Joe Thornber
2aa6c05c4b
[functional-tests] simplify (thin create devices-in-reverse-order)
2017-12-20 09:01:46 +00:00
Joe Thornber
0d4fdcc687
[functional-tests] simplify (thin create devices-in-reverse-order)
2017-12-20 08:31:38 +00:00
Joe Thornber
05151c648c
[functional-tests] from-to loop macro
2017-12-20 08:31:17 +00:00
Joe Thornber
fa8d691744
[functional-tests] Improve (thin create devices-in-reverse-order)
2017-12-19 17:25:10 +00:00
Joe Thornber
2fe7a884a2
[functional-tests] (thin create devices-in-reverse-order)
2017-12-19 15:44:33 +00:00
Joe Thornber
324d17981a
[functional-tests] Get (thin delete recover-space) working
2017-12-18 11:43:33 +00:00
Joe Thornber
0dc237c356
[functional-tests] Move get-dev-size to C code
...
Saves forking blockdev
2017-12-15 15:35:24 +00:00
Joe Thornber
8d26c3729f
[functional-tests] add more padding to the .....'s
2017-12-15 11:29:39 +00:00
Joe Thornber
2614078188
[functional-tests] Improve error message in create-device
2017-12-15 11:18:09 +00:00
Joe Thornber
ee40e4becf
[functional-tests] switch map -> for-each in a couple of places
2017-12-15 11:17:26 +00:00
Joe Thornber
19dfed1da9
[functional-tests] Log exceptions properly
2017-12-15 10:21:59 +00:00
Joe Thornber
3c5408e51b
[functional tests] (thin create bs-multiple-of-64k-good/bad)
2017-12-14 15:57:27 +00:00
Joe Thornber
4b90bd8edb
[functional-tests] ditch define-thin-scenario
...
It obfuscates more than it saves
2017-12-14 15:12:09 +00:00
Joe Thornber
2db8ecf9e9
[functional-tests] some thin/delete tests
2017-12-14 14:58:16 +00:00
Joe Thornber
93213135ad
[functional-tests] finish porting the thin/creation tests
2017-12-12 16:56:55 +00:00
Joe Thornber
d6a5ced23b
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2017-12-12 15:28:17 +00:00
Joe Thornber
bca125d97a
[functional-tests] a bunch of thin tests
2017-12-12 15:27:20 +00:00
Joe Thornber
4bb99bf105
[functional-tests] Add math-utils library
2017-12-12 15:23:51 +00:00
Joe Thornber
ddea2c0de7
[functional-tests] thin-calc-ref-counts
...
This is the start of a tool that will analyse the block manager journal
and spot any cases where we're not crash proof.
2017-11-24 11:21:02 +00:00
Joe Thornber
4726854784
[functional-tests] add FIXME
2017-11-24 11:11:32 +00:00
Joe Thornber
29e92772a9
[functional-tests/btree] btree-walk-and-count + stop using a spine.
2017-11-24 11:10:41 +00:00
Joe Thornber
80d8a5b684
[ft-lib/bcache] Make warn and raise variadic
2017-11-24 11:06:45 +00:00
Joe Thornber
09fa32a423
[ft-lib/bcache] alloc_block wasn't checking for an empty free list
2017-11-24 11:05:51 +00:00
Joe Thornber
0569e06e80
[functional-tests] whitespace
2017-11-24 11:04:57 +00:00
Joe Thornber
1253d720e9
update CHANGES
2017-11-13 14:18:07 +00:00
Joe Thornber
f48f533d75
bump version
2017-11-13 14:11:22 +00:00
Joe Thornber
e3b7d82569
[cache_restore] v2 dirty bitset root wasn't being written to superblock.
...
Resulting in corrupt restored data.
2017-11-13 14:02:16 +00:00
Joe Thornber
79c0159108
[dmtest] introduce the segment record.
2017-10-26 13:42:09 +01:00
Joe Thornber
d4edef51b0
[ft-lib/dm-ioctl] Remove a couple of fixmes
2017-10-26 13:13:44 +01:00
Joe Thornber
cfddb495fb
[dm-tests] define-dm-scenario
...
Automatically opens the dm interface, and creates an allocator.
2017-10-23 11:22:33 +01:00
Joe Thornber
94a7d880bb
[functional-tests] add a #include
2017-10-23 10:38:11 +01:00
Joe Thornber
d74823fd53
[functional-tests] More work on the dm-ioctl bindings.
2017-10-13 14:10:44 +01:00
Joe Thornber
a0e709d370
[functional-tests] Split dmtest off from run-tests
2017-10-11 10:28:10 +01:00
Joe Thornber
74e2506734
[functional-tests] use ../bin in the path for tools, even if they're
...
failing.
2017-10-10 16:51:31 +01:00
Joe Thornber
ad208bd22e
bump version
2017-10-10 12:32:01 +01:00
Joe Thornber
7d79a93566
[functional-tests] get the version string from VERSION
2017-10-10 11:44:05 +01:00
Joe Thornber
3a8c42e2d9
[functional-tests] use the tools in bin, rather than those installed on
...
the system.
2017-10-10 11:37:32 +01:00
Joe Thornber
6bf81aab85
[functional-tests] Don't include the dm tests in the ft suite.
...
I'll create a separate program for those.
2017-10-10 11:17:54 +01:00
Joe Thornber
997dbcf2ad
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2017-10-10 10:29:53 +01:00
Joe Thornber
1b7ec80501
[build] fix typo
2017-10-10 10:29:24 +01:00
Joe Thornber
b9230d1bbb
[functional-tests] roll all the C code into a single libft.so
2017-10-10 10:28:56 +01:00
Joe Thornber
edd7d16ced
Merge branch 'master' of github.com:jthornber/thin-provisioning-tools
2017-10-09 11:40:20 +01:00
Joe Thornber
6a668524d7
Update changes.
2017-10-09 11:39:34 +01:00
Joe Thornber
22030bc138
[functional-tests] fix silly library syntax error
2017-10-06 15:51:19 +01:00
Joe Thornber
d9b3133aca
[functional-tests] (device-mapper targets)
2017-10-06 15:26:10 +01:00
Joe Thornber
f80200d179
[era_check] If the superblock fails the checksum try other checks.
2017-10-05 16:21:17 +01:00
Joe Thornber
8e2a415bdc
[functional-tests] Fix *_check/tiny-input-file
2017-10-05 16:18:42 +01:00
Joe Thornber
817fd9a06c
Merge branch 'run-tests-bad-pattern'
2017-10-05 15:08:25 +01:00
Joe Thornber
3eadbaf433
[functional-tests] Fix bug when a pattern matches to tests.
2017-10-05 15:05:22 +01:00
Joe Thornber
db9259d303
bump version to 0.7.3
2017-10-05 13:28:36 +01:00
Joe Thornber
b742d9d4da
[functional-tests] update thin_check help
2017-10-05 13:22:28 +01:00
Joe Thornber
825a58922d
[era_invalidate] Tweak --help message.
2017-10-05 12:48:36 +01:00
Joe Thornber
8a0ee61434
[man pages] Add missing argument to era_invalidate
2017-10-05 12:38:47 +01:00