Commit Graph

58 Commits

Author SHA1 Message Date
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
8493cf7081 [thin_explore] First code drop 2020-09-16 15:10:01 +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
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
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
7834d661e2 [thin_check (rust)] auto repair space map leaks 2020-08-19 14:31:01 +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
Joe Thornber
239ae6b6ec [thin_check (rust)] factor out spawn_progress_thread 2020-08-18 09:48:51 +01:00
Joe Thornber
e8d7e5cf1e [thin_check (rust)] move report creation to top level 2020-08-17 16:05:06 +01:00
Joe Thornber
5743e3e9ba [thin_check (rust)] Add title method to reports 2020-08-17 15:36:21 +01:00
Joe Thornber
9995751dde [thin_check (rust)] Provide 3 different report types.
ProgressBar for interactive use.
Simple for when not a tty
and quiet for -q
2020-08-17 13:10:32 +01:00
Joe Thornber
e1cfc3866b [thin_check (rust)] Mappings top level weren't being ref counted 2020-08-13 14:43:19 +01:00
Joe Thornber
092447d17a [thin_check (rust)] remove some dead code 2020-08-13 14:30:04 +01:00
Joe Thornber
afa3f2f04d [thin_check (rust)] Rename Spinner -> Reporter 2020-08-12 10:25:06 +01:00
Joe Thornber
544335ae4a [thin_check (rust)] Send all reporting through the Spinner.
This means the spinner doesn't overwrite messages.
2020-08-12 09:35:21 +01:00
Joe Thornber
3757e1d947 [thin_check (rust)] check metadata space map 2020-08-12 08:02:29 +01:00
Joe Thornber
e65d2dec6f [thin_check (rust)] Add progress bar 2020-08-11 13:44:33 +01:00
Joe Thornber
34425521e2 [thin_check (rust)] change BTreeWalker to use a space map rather than seen bitset 2020-08-11 10:50:43 +01:00
Joe Thornber
50bde693a1 [thin_check (rust)] Factor out pdata/unpack 2020-08-10 15:42:10 +01:00
Joe Thornber
55ee4bfad8 [thin_check (rust)] replace IndexVisitor with a call to btree_to_map 2020-08-10 14:56:39 +01:00
Joe Thornber
e28c602c3d [thin_check (rust)] factor out btree_to_map() fn 2020-08-10 14:45:35 +01:00
Joe Thornber
cbc9c2c72a [thin_check (rust)] Improve data_sm handling 2020-08-10 12:56:41 +01:00
Joe Thornber
4e4b7ca2b1 [thin_check (rust)] add --sync-io flag
Makes it easier to switch between engines
2020-08-10 11:24:50 +01:00
Joe Thornber
0f865856ed [thin_check (rust)] Improve SyncIoEngine.
Now opens the file multiple times so different threads can do io in parallel.
2020-08-10 10:44:47 +01:00
Joe Thornber
f0df17af9e [thin_check (rust)] Get SyncIoEngine working again. 2020-08-10 08:59:02 +01:00
Joe Thornber
08e3ea948e [thin_check (rust)] rename block_manager.rs -> io_engine.rs 2020-08-10 08:29:32 +01:00
Joe Thornber
fd0c0ffc1d [thin_check (rust)] data space map now checked. 2020-08-08 16:42:32 +01:00
Joe Thornber
4054b1be4c [thin_check (rust)] Switch to BTreeMap.
It's faster.
2020-08-08 14:58:13 +01:00
Joe Thornber
1e4a038b41 [thin_check (rust)] Reimplement CoreSpaceMap
We now use a simple vector of elements that can hold 'nr thin devs'.  Much faster.
2020-08-08 13:29:30 +01:00
Joe Thornber
ec8f7b7fa8 [thin_check (rust)] Keep track of data block ref counts
as we walk the mapping tree.
2020-08-08 09:54:16 +01:00
Joe Thornber
8f76371bb2 [functional-tests] Fix clippy warnings 2020-08-07 15:41:21 +01:00
Joe Thornber
fa4ea3e2d9 [functional-tests] port some of the cache_check tests to Rust 2020-08-07 14:30:00 +01:00
Joe Thornber
4a0582bb5d [thin_check (rust)] start decoding the space maps. 2020-08-06 07:51:48 +01:00
Joe Thornber
197e4ffbfd [thin_check (rust)] Rename ValueType trait to Unpack 2020-08-05 08:01:02 +01:00
Joe Thornber
1d44025584 [thin_check (rust)] Walk the top level and bottom level of the mapping tree separately 2020-08-04 12:11:36 +01:00
Joe Thornber
f56ea2d031 [thin_check (rust)] walk devices tree. 2020-08-03 16:22:08 +01:00
Joe Thornber
1368227a71 [thin_check (rust)] add btree node checks 2020-08-03 15:04:59 +01:00
Joe Thornber
cc2582b8b1 [thin_check (rust)] factor out pdata/btree.rs 2020-08-03 12:37:32 +01:00
Joe Thornber
7243f95380 [thin_check (rust)] Drop nr threads down to 4
We get very little benefit from threads atm.  Need to improve IO handling first.
2020-07-30 10:17:36 +01:00
Joe Thornber
de172147d3 [thin_check (rust)] squash a lot of warnings 2020-07-30 10:12:51 +01:00
Joe Thornber
f7623e6264 [thin_check (rust)] remove spurious mutex. 2020-07-30 09:59:02 +01:00