Ming-Hung Tsai
8d59a83f7c
[functional-tests] Update thin_delta help text
2021-01-12 02:50:46 +08:00
Ming-Hung Tsai
ca7e79a828
Merge commit 'b67b587' into main
2021-01-12 02:50:12 +08:00
Joe Thornber
443b3c8f0b
[io_engine (rust)] get_nr_blocks() wasn't handling block devices.
...
Now calls file_utils::file_size()
2020-12-02 15:20:14 +00:00
Joe Thornber
ba7fd7bd2b
[thin_check (rust)] Make --sync-io the default.
...
For some systems you have to adjust the ulimits to get io_uring
to work, so we now default to using sync io.
Also added --async-io flag.
2020-12-02 11:33:05 +00:00
Joe Thornber
0e4622f337
[Rust tools] squash lots of warnings
2020-12-01 11:50:32 +00:00
Joe Thornber
327fc80fb0
Merge branch 'main' into 2020-10-09-thin-restore-rewrite
2020-11-25 11:20:28 +00:00
Joe Thornber
83eea11d12
Merge pull request #155 from mingnus/thin-check-fix-metadata-leaks
...
thin_check fixes
2020-11-24 10:30:35 +00:00
Ming-Hung Tsai
565c656ed2
[thin_generate_damage] Do not open a new transaction to prevent ref-count underflow
...
There's a chance that thin_generate_damage tries to change ref-counts of
space map blocks due to its random nature, which could lead to problems.
If the ref-counts of metadata space map blocks (shadow source) is changed
to zero, then the ref-counts will become underflow after a shadow operation.
In-place space map modification is a way to prevent that value underflow.
An alternative approach is to avoid changing ref-counts of space map blocks.
2020-11-24 18:18:21 +08:00
Ming-Hung Tsai
c932a76f08
[unit-tests] Add underfull nodes counting tests
2020-11-24 18:18:21 +08:00
Ming-Hung Tsai
61f07573e1
[metadata_counter] Count under populated nodes if the option is provided
2020-11-24 18:18:21 +08:00
Ming-Hung Tsai
1fe8a0dbde
[thin_check] Allow using --clear-needs-check and --skip-mappings together
...
Although it is not recommended to clear the flag without a full
examination, however, the usage has been documented as an approach
to reduce lvchange run time [1]. For the purpose of backward
compatibility and avoiding boot failure after upgrading thin_check [2],
the limitation is now removed.
[1] https://wiki.archlinux.org/index.php/LVM#Thinly-provisioned_root_volume_device_times_out
[2] Community feedback on previous commit:
https://github.com/jthornber/thin-provisioning-tools/commit/b278f4f
2020-11-24 18:17:36 +08:00
Ming-Hung Tsai
f364de35bc
[unit-tests] Fix unflushed trashed blocks and variable referencing
2020-11-24 17:55:17 +08:00
Joe Thornber
5af95167b4
Merge pull request #154 from mingnus/main
...
thin development tools update
2020-11-24 09:31:23 +00:00
Ming-Hung Tsai
becdbbdb49
[build] Update Rust package version
2020-11-24 16:03:58 +08:00
Ming-Hung Tsai
7ceb500fc8
[thin_delta] Support comparing two specific subtrees
2020-11-24 15:58:01 +08:00
Ming-Hung Tsai
1d5b52b0dd
[thin_delta] Clean up duplicated code
2020-11-24 15:17:35 +08:00
Ming-Hung Tsai
b42408ef41
[thin] Introduce thin_patch_superblock to override superblock fields
2020-11-24 14:57:05 +08:00
Joe Thornber
1ae62adec6
work in progress
2020-11-18 14:33:56 +00:00
Joe Thornber
37ea0280df
[thin_restore] first pass at btree_builder.
...
No tests yet
2020-10-26 12:05:27 +00:00
Joe Thornber
f60ae770c2
[thin_explore] Explore devices tree, including path support.
2020-10-15 11:53:09 +01:00
Joe Thornber
c42b623e39
Merge branch '2020-08-13-thin-check-rewrite' into main
2020-10-09 11:21:12 +01:00
Joe Thornber
e9fbcc31de
[thin_dump (rust)] First pass at thin_dump.
...
Doesn't include --repair.
This includes <def> and <ref> sections for shared regions.
2020-09-28 15:45:13 +01:00
Joe Thornber
a88ae3ca18
[thin_check (rust)] factor out device detail
2020-09-25 09:59:16 +01:00
Joe Thornber
66b6a1ba48
[thin_check (rust)] --superblock-only, --skip-mappings, INFO fields
2020-09-24 13:55:58 +01:00
Joe Thornber
34052c540c
[thin_check (rust)] Reinstate walk_node_threaded
2020-09-24 09:40:38 +01:00
Joe Thornber
b67b587a10
[thin_shrink] Add comment pointing people at Nikhil's PoC
2020-09-22 12:01:17 +01:00
Joe Thornber
f4c3098e02
[thin_check (rust)] fix bug in key range splitting.
...
Ranges were not being ommitted when a block was ommitted due to
being shared and already visited.
2020-09-22 10:47:23 +01:00
Joe Thornber
819fc6d54c
[thin_explore] accept a node path on the command line
...
Helpful to examine thin_check failures.
2020-09-22 10:47:04 +01:00
Joe Thornber
b193d19603
[thin_check (rust)] output complete node paths with errors.
...
This can be used with thin_explore
2020-09-18 11:16:09 +01:00
Joe Thornber
bc058f8baf
[thin_check (rust)] BTree values must now implement Copy
2020-09-18 10:06:33 +01:00
Joe Thornber
bcfb9a73a1
[thin_explore] display ranges where possible
2020-09-18 09:12:51 +01:00
Joe Thornber
8493cf7081
[thin_explore] First code drop
2020-09-16 15:10:01 +01:00
Joe Thornber
5168621f02
[thin_check (rust)] Optimise SyncIoEngine
...
*_many no longer get/put for each block
2020-09-02 13:28:16 +01:00
Joe Thornber
44142f657a
[thin_check (rust)] Add error handling to io_engine interface
2020-09-02 12:57:47 +01:00
Joe Thornber
b82307d8a5
[thin_check (rust)] drop O_DIRECT for the sync_io engine.
...
O_DIRECT slows us down, and there's no correctness reason for having it.
2020-08-21 11:39:41 +01:00
Joe Thornber
cda92de441
[thin_check (rust)] Add a threaded version of btree walk.
...
Bottom level mappings use this if there are few devices. Performance
is a bit slower for io_uring, and much slower for sync io (which I think
is due to io scheduling which I can't do much about).
2020-08-21 10:10:49 +01:00
Joe Thornber
b01a0a46d1
[thin_metadata_pack/unpack] Use Vec::with_capacity() to avoid reallocs.
...
Gives a small speed boost to both pack and unpack.
2020-08-21 09:14:54 +01:00
Joe Thornber
c9a759b4e8
[thin_check (rust)] Use vec::with_capacity() to avoid reallocations.
2020-08-21 09:00:21 +01:00
Joe Thornber
2cc2dffab5
[thin_check (rust)] Make NodeVisitor::visit non mut.
...
Preparation for making btree_walk multithreaded
2020-08-20 11:05:14 +01:00
Joe Thornber
a1c206b774
[thin_check (rust)] NodeVisitor only needs to see leaf nodes
2020-08-20 10:55:38 +01:00
Joe Thornber
936e06e132
[thin_check (rust)] Remove some unused params from NodeVisitor::visit
2020-08-20 10:46:06 +01:00
Joe Thornber
1999343d2f
[thin_check (rust)] squash a couple of warnings
2020-08-20 10:33:02 +01:00
Joe Thornber
0372e689e5
Merge branch '2020-08-13-thin-check-rewrite'
2020-08-19 14:32:40 +01:00
Joe Thornber
7834d661e2
[thin_check (rust)] auto repair space map leaks
2020-08-19 14:31:01 +01:00
Joe Thornber
cdd0beb527
[thin_check (rust)] Change io_engine trait to use slices rather than Vecs
2020-08-18 12:57:05 +01:00
Joe Thornber
2aa6859502
[thin_check (rust)] add write support to io_engine
2020-08-18 12:52:16 +01:00
Joe Thornber
67a54b4ebc
[thin_check (rust)] add --auto-repair switch
2020-08-18 11:47:42 +01:00
Joe Thornber
8eec84fbec
[thin_check (rust)] introduce ASpaceMap type alias
2020-08-18 11:06:15 +01:00
Joe Thornber
04f3ba5a33
[thin_check (rust)] Pass ctx to check_space_map
2020-08-18 10:59:04 +01:00
Joe Thornber
4beb2db337
[thin_check (rust)] Factor out check_mapping_bottom_level
2020-08-18 10:53:11 +01:00