Commit Graph

1769 Commits

Author SHA1 Message Date
Joe Thornber
4a0582bb5d [thin_check (rust)] start decoding the space maps. 2020-08-06 07:51:48 +01:00
Ming-Hung Tsai
3f19818c56 [thin] Adopt stateful random number generators 2020-08-05 22:14:01 +08:00
Joe Thornber
904d9b0c84 [functional-tests] port thin_metadata_unpack tests to Rust.
cargo test
2020-08-05 10:00:44 +01:00
Joe Thornber
d2678fdf27 [functional-tests] port thin_metadata_pack tests to Rust.
cargo test
2020-08-05 09:09:18 +01:00
Joe Thornber
23568aaa11 [functional-tests] port thin_delta tests to rust.
cargo test
2020-08-05 08:24:52 +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
4ac428128a [functional-tests (rust)] port thin_repair tests to rust.
cargo test
2020-08-04 11:30:46 +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
cdf19b2454 [functional-tests (rust)] remove comment 2020-08-03 11:00:09 +01:00
Joe Thornber
39822a7165 [functional-tests (rust)] squash warnings 2020-08-03 10:59:19 +01:00
Joe Thornber
9552cb4817 [functional-tests] Port thin_rmap tests to Rust.
cargo test
2020-08-03 10:47:03 +01:00
Joe Thornber
ad29fe65fa [functional-tests] Use thin_restore macro 2020-07-31 16:34:04 +01:00
Joe Thornber
baf1fe325f [functional-tests] Move thin_dump tests to Rust.
cargo test
2020-07-31 16:31:10 +01:00
Joe Thornber
78db9a24fa [functional-tests (rust)] factor out TestDir 2020-07-31 14:26:22 +01:00
Joe Thornber
084a26bf85 [functional-tests] Recode thin_restore tests in Rust.
Now part of 'cargo test'
2020-07-31 12:12:40 +01:00
Joe Thornber
fcfcc60b89 [functional-tests] Move thin_check functional tests to Rust.
They'll be run as part of 'cargo test' now.
2020-07-31 11:04:12 +01:00
Joe Thornber
06dfb976c2
Merge pull request #148 from mingnus/thin-check-fix-metadata-leaks
[thin_check] Support fixing leaked metadata blocks
2020-07-30 16:41:22 +01:00
Ming-Hung Tsai
90f2d43a95 [thin_generate_damage] Add help text 2020-07-30 23:00:50 +08:00
Ming-Hung Tsai
80965944c6 [thin_check] Add functional tests for --fix-metadata-leaks 2020-07-30 23:00:50 +08:00
Ming-Hung Tsai
1932c243dd [thin_check] Add functional tests for incompatible options 2020-07-30 23:00:50 +08:00
Ming-Hung Tsai
7b2a18a865 [functional-tests] Update thin_check help 2020-07-30 23:00:50 +08:00
Ming-Hung Tsai
b278f4ffa4 [thin_check] Change the policy of --clear-needs-check-flag to prevent error recurrence
- Disallow clearing the needs_check flag if there's any error,
  i.e., the metadata must be fully examined, and the result must
  be NO_ERROR.
- Disallow combining --clear-needs-check with -m, --super-blocks-only,
  --skip-mappings, --override-mapping-root, or --ignore-non-fatal-errors.
2020-07-30 23:00:50 +08:00
Ming-Hung Tsai
49efa06ffa [thin_check] Support fixing leaked metadata blocks
- The leaked blocks are defined as allocated but not used ones,
  i.e., expected ref-count == 0 and actual ref-count <= 2.
- Blocks with expected ref-count > 0, or actual ref-count > 2,
  are treated as unrepairable leaks.
- The fixing processing won't be executed if there's any
  unrepairable leak or errors.
- The fixing process implicitly clearing the superblock
  needs_check flag if there's no error.
2020-07-30 23:00:50 +08: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
Joe Thornber
8146fba9d2 [thin_check (rust)] Move mutex inside IoEngines.
Makes it easier to share an engine between different threads.
2020-07-30 08:47:16 +01:00
Joe Thornber
4f120911d2 [thin_check (rust)] First attempt at multithreading the tree walking.
Still using a single io engine, so little benefit.
2020-07-29 16:38:52 +01:00
Joe Thornber
d5597d5d36 [thin_check (rust)] Factor out tree walking code 2020-07-29 11:12:03 +01:00
Ming-Hung Tsai
7be6b91420 [metadata_checker] Tidying: rename variables 2020-07-29 16:47:22 +08:00
Ming-Hung Tsai
ecb5226acc [thin] Fix indent and trailing whitespaces 2020-07-29 16:47:22 +08:00
Ming-Hung Tsai
b693c7d6b0 [metadata_checker] Fix missing member initialization 2020-07-29 16:47:22 +08:00
Joe Thornber
ef842888e8
Merge pull request #147 from mingnus/thin-generate-metadata-wip
Add unit tests for sequence_generator, and fix bugs
2020-07-29 09:31:02 +01:00
Ming-Hung Tsai
0c3c5f6c1e [sequence_generator] Fix parameters and span boundary checking 2020-07-29 16:26:14 +08:00
Ming-Hung Tsai
661b4de5de [run_set] Add lower_bound and upper_bound functions 2020-07-29 16:18:23 +08:00
Ming-Hung Tsai
4d56cef5de [unit-tests] Add test cases for sequence_generator 2020-07-29 16:18:23 +08:00
Ming-Hung Tsai
105b8ec1cf [base] Factor out sequence_generator 2020-07-29 15:33:25 +08:00
Ming-Hung Tsai
e62022a200 [base] Move run_set to namespace base 2020-07-29 15:33:25 +08:00
Joe Thornber
71545e56c6
Merge pull request #146 from mingnus/master
[build] Fix the default value for the AR variable (#145)
2020-07-29 08:13:23 +01:00
Ming-Hung Tsai
7a332d43c3 [build] Fix the default value for the AR variable (#145)
Initialize the AR variable during configuration, to avoid leaving
unsubstituted string if the AR shell/environment variable is not set.
2020-07-29 10:06:39 +08:00
Joe Thornber
e9abdd9c88 [thin_check (rust)] Switch to a different io_uring crate.
This one works.
2020-07-28 12:57:30 +01:00
Joe Thornber
a90294e279 [thin_check (rust)] read many blocks at once.
We need to switch to io_uring to really get the benefit of this.
2020-07-28 11:45:25 +01:00
Joe Thornber
062a1b8a2c [thin_check (rust)] Walk mapping tree.
Sync IO, no checks beyond checksumming.
2020-07-28 10:51:48 +01:00
Joe Thornber
8a01679908
Merge pull request #145 from baloo/baloo/fixup-ar
autoconf: allow a user to override ar
2020-07-27 15:57:48 +01:00
Joe Thornber
75ba654b7a
Merge pull request #144 from mingnus/thin-generate-metadata-wip
Enhance thin_generate_mappings, and introduce thin_generate_damage
2020-07-27 15:55:22 +01:00
Joe Thornber
1398cf31d1 [thin_check (Rust)] work in progress 2020-07-27 15:53:42 +01:00
Joe Thornber
3cf6307762 Merge branch 'master' into 2020-06-13-thin-check-rewrite 2020-07-27 15:53:26 +01:00