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
Joe Thornber
b915257e10
[thin_check (rust)] Fix race in btree walking.
...
The seen bitset was locked once to test, and separately to insert.
2020-08-10 12:30:12 +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
7cf239b878
[thin_check (rust)] speed up CoreSpaceMap
2020-08-08 12:36:13 +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
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
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
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