Commit Graph

1652 Commits

Author SHA1 Message Date
pepe 17b8ef8bd9 :) 2023-06-13 21:41:47 +00:00
pepe 4d646c02f2 :( 2023-05-16 21:23:59 +00:00
Joe Thornber d6d93c3157 bump version to 0.9.0 2020-08-12 10:46:26 +01:00
Joe Thornber 2860b4c0b1 [thin_check] rename --fix-metadata-leaks to --auto-repair
This flag will cover all trivial fixes, such as data leaks.
2020-08-12 10:45:20 +01:00
Joe Thornber ebcfc322c0 [build] Update CHANGES file 2020-08-12 10:35:03 +01:00
Joe Thornber d9965a3906
Merge pull request #149 from mingnus/thin-check-fix-metadata-leaks
thin_check enhancements
2020-08-12 10:28:26 +01:00
Ming-Hung Tsai 6c90f9483e [metadata_checker] Support in-place metadata space map modification 2020-08-12 16:57:16 +08:00
Ming-Hung Tsai 0349e9c9e2 [space-maps/disk] Show the block address in exception string 2020-08-12 16:57:16 +08:00
Ming-Hung Tsai 1cfdcd58c5 [metadata_checker] Disable checking data block ref-counts due to performance concerns 2020-08-12 16:57:16 +08:00
Ming-Hung Tsai b16ff123b7 [thin] Stop metadata counting on the first error 2020-08-12 15:56:26 +08:00
Ming-Hung Tsai 12725983db [block_counter] Add the stop-on-error option to prevent silent errors
The stop-on-error option aims to solve the lack of damage_visitor support
in space_map::count_metadata and btree counting_visitor. To prevent
possibly silent errors during space map or btree counting, the option
stops the counting process immediately when a btree or bitmap error
was found.

The bitmap blocks are also validated to avoid potential false-alarm,
if broken bitmap is not counted, and the corresponding ref-count is
also zeroed.
2020-08-12 15:56:26 +08:00
Ming-Hung Tsai 3609b8bee5 [unit-tests] Add test cases for space maps
- Increase test metadata size
- Test block allocation among multiple transactions
- Test the interaction between sm_recursive and sm_careful_alloc
- Test intended in-place modification
2020-08-12 15:53:08 +08:00
Ming-Hung Tsai c952f52c79 [metadata_checker] Fix expected ref-counts in data space map comparison 2020-08-10 20:39:22 +08:00
Ming-Hung Tsai 7c3145633b [space-maps/core] Fix the search start position 2020-08-10 20:39:22 +08:00
Ming-Hung Tsai 2d9eaa1c56 [metadata_checker] Do not update the superblock if the needs_check flag is not set 2020-08-08 01:20:15 +08:00
Ming-Hung Tsai 3f19818c56 [thin] Adopt stateful random number generators 2020-08-05 22:14:01 +08: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
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 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
Arthur Gautier e6faac9b80 autoconf: allow a user to override ar
This is used on specific buildchains (nixos static builds for example).
2020-07-25 15:16:28 -07:00
Ming-Hung Tsai 061d966e7a [io_generator] Support mixed sequential and random io pattern 2020-07-25 17:46:59 +08:00
Ming-Hung Tsai 7ed013fcab [io_generator] Rename offset_generator classes, and fix bugs
- Rename the classes for general-purpose usage
- Fix duplicated sequential number generation while wrap around
- Enable unaligned random number generation
2020-07-25 17:20:59 +08:00
Ming-Hung Tsai d1fed5f5ec [thin_generate_damage] Introduce tools to generate metadata damage 2020-07-25 16:53:44 +08:00
Ming-Hung Tsai e46fabde1a [thin_generate_metadata] Fix command line options
- Remove unused options
- Fix potential option conflict
2020-07-25 16:53:44 +08:00
Ming-Hung Tsai 8d8ee51599 [thin_generate_metadata] Support setting the needs_check flag 2020-07-25 16:53:44 +08:00
Ming-Hung Tsai aabc3a9dbc [io_generator] Add random map to avoid generating repeated addresses 2020-07-25 16:53:44 +08:00
Joe Thornber e9055f5d7d Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2020-07-22 16:09:33 +01:00
Joe Thornber 67622f3c76 Merge branch '2020-06-23-thin-remap' 2020-07-22 16:08:19 +01:00
Joe Thornber 32019ac388 [thin_shrink] add a trivial snapshot test.
Still need much more work on snap tests.
2020-07-22 16:07:34 +01:00
Joe Thornber b7e02d0ae4 [thin_metadata_pack] FIx bug where pack would try and read too much. 2020-07-09 13:53:46 +01:00
Joe Thornber 19138dbd81 [thin_shrink] add unit tests for build_remaps 2020-07-06 11:44:49 +01:00
Joe Thornber 23f3033f61 [functional-tests] bump version nr 2020-07-03 13:28:02 +01:00
Joe Thornber 73d26393ab [functional-tests] bump version in help strings 2020-07-03 13:13:59 +01:00