Commit Graph

1732 Commits

Author SHA1 Message Date
Joe Thornber
b67b587a10 [thin_shrink] Add comment pointing people at Nikhil's PoC 2020-09-22 12:01:17 +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
Joe Thornber
239ae6b6ec [thin_check (rust)] factor out spawn_progress_thread 2020-08-18 09:48:51 +01:00
Joe Thornber
65799f9a14
Merge pull request #150 from mingnus/thin-check-fix-metadata-leaks
Add space-map counting tests
2020-08-18 08:50:32 +01:00
Joe Thornber
e8d7e5cf1e [thin_check (rust)] move report creation to top level 2020-08-17 16:05:06 +01:00
Ming-Hung Tsai
44d025be0c [unit-tests] Add space map counting tests 2020-08-17 22:57:46 +08:00
Ming-Hung Tsai
3c49949796 [space-maps/disk] Support ignoring broken bitmaps on counting index_store 2020-08-17 22:57:26 +08: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
Ming-Hung Tsai
27ca8cc009 [block_counter] Add block_counter::clear() 2020-08-17 15:43:09 +08:00
Ming-Hung Tsai
de843991e3 [transaction_manager] Add transaction_manager::commit()
It should be called by metadata::commit() and reserve_metadata_snap()
(issue #73)
2020-08-17 15:43:04 +08:00
Ming-Hung Tsai
9f3823c97d [metadata_checker] Rename function to reflect command line changes 2020-08-14 18:49:41 +08:00
Joe Thornber
7466cd7182 [functional-tests (rust)] TestDir now creates dir in ./
O_DIRECT doesn't work with /tmp/
2020-08-14 10:54:31 +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
2fa732a93c [functional tests] Port some of Hank's sh tests to Rust.
Run with 'cargo test'
2020-08-13 14:20:29 +01:00
Joe Thornber
a8a2f560ec [build] add symlinks for thin_generate_{mappings/damage} 2020-08-13 13:47:51 +01:00
Joe Thornber
b0e7520fbf [thin/superblock (rust)] Unpack flags 2020-08-13 13:46:07 +01:00
Joe Thornber
c254ebe384 [functional-tests] Port 3 --auto-repair tests from Scheme to Rust 2020-08-12 13:03:01 +01:00
Joe Thornber
5a16f21199 [functional tests] Fixup a few tests that broke when we bumped the version nr. 2020-08-12 12:33:16 +01:00
Joe Thornber
bf202d076b Merge branch '2020-06-13-thin-check-rewrite' 2020-08-12 11:18:28 +01: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
Joe Thornber
afa3f2f04d [thin_check (rust)] Rename Spinner -> Reporter 2020-08-12 10:25:06 +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
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
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
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
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
Joe Thornber
cbc9c2c72a [thin_check (rust)] Improve data_sm handling 2020-08-10 12:56:41 +01:00
Joe Thornber
d5444d2255 [thin_check (rust)] sm bitmap entries were being unpacked incorrectly. 2020-08-10 12:55:05 +01:00