Commit Graph

1993 Commits

Author SHA1 Message Date
Ming-Hung Tsai
cf4b937ade [cache_check (rust)] Check space map counts
- Support space map checking and auto-repair
2021-04-23 16:23:21 +08:00
Ming-Hung Tsai
636d50a38d [thin_check (rust)] Pull out space map checking routines 2021-04-23 16:04:56 +08:00
Ming-Hung Tsai
e1628f9004 [cache_check (rust)] Add more checks
- Check array indices continuity
- Support ignore_non_fatal
- Report blocknr of IoErrors
- Report array block indeices
2021-04-21 23:35:22 +08:00
Ming-Hung Tsai
239ff7dfa1 [cache_check (rust)] Add more checks
- Report errors
- Support reading partially broken bitset
  - The output is a bitmap of 2-bit entries, indicating availability of bits
2021-04-21 14:09:38 +08:00
Ming-Hung Tsai
3279d8381b [array_walker] Read multiple array blocks at once 2021-04-17 00:10:14 +08:00
Ming-Hung Tsai
c17559791f [bitset] Rename bitset module 2021-04-17 00:10:14 +08:00
Ming-Hung Tsai
1964015d81 [array_walker] Handle the whole array block at once
That gives the visitor more controls over the data processing and locking,
and also improves the performance by 10-15%.
2021-04-17 00:06:09 +08:00
Ming-Hung Tsai
95dee9f66d [cache_check (rust)] Do not remap ArrayErrors to keep the error context 2021-04-16 21:46:30 +08:00
Ming-Hung Tsai
9b4a0607ea [cache_check (rust)] Detect structural errors on arrays
- Define error types for arrays
- Propagate low-level errors to tools
- Rename array_block.rs to array.rs
2021-04-14 16:02:50 +08:00
Ming-Hung Tsai
ace9c1d1e3 [cache_check (rust)] Add more checks
- check version-2 dirty bitset size and consistency
- check discard bitset size
2021-04-11 22:48:10 +08:00
Ming-Hung Tsai
ae630f1fd8 [btree_walker] Fix error returning 2021-04-11 20:18:44 +08:00
Ming-Hung Tsai
860b3ca7d2 [cache_check (rust)] Add more checks
- Check the version-1 dirty flag
- Check mappings against the origin device size, if the cache is clean
- Check superblock fields
2021-04-11 20:18:25 +08:00
Joe Thornber
0119b51a9c Merge branch 'main' of github.com:jthornber/thin-provisioning-tools 2021-04-08 10:47:18 +01:00
Joe Thornber
c41b2e8ec3 Some interface changes to let dm-unit use the thin checking code more easily. 2021-04-08 10:45:50 +01:00
Joe Thornber
89372c3fa7
Merge pull request #167 from mingnus/main
btree minor fixes
2021-03-25 09:31:21 +00:00
Ming-Hung Tsai
c496e8a4c8 [btree] Remove FIXMEs 2021-03-25 16:42:36 +08:00
Ming-Hung Tsai
8bfe7ee6f3 [btree] Fix rebalancing checks 2021-03-25 15:06:52 +08:00
Joe Thornber
040e3bfc2d Lot's of work on thin_restore 2021-03-24 14:20:20 +00:00
Joe Thornber
12c1c6e1f5 Merge branch 'main' into 2020-10-09-thin-restore-rewrite 2021-03-23 11:22:03 +00:00
Ming-Hung Tsai
e0eb8fea87 [btree (rust)] Show out-of-order keys 2021-03-12 12:37:07 +08:00
Joe Thornber
0d46c606dd
Merge pull request #166 from mingnus/main
Fix a syntax error
2021-03-11 17:13:28 +00:00
Ming-Hung Tsai
0ff72374f8 [btree_builder (rust)] Fix the max_entries 2021-03-12 00:42:54 +08:00
Joe Thornber
1b7f43ef9f
Merge pull request #165 from mingnus/main
Fix the max_entries in node_header
2021-03-11 10:54:44 +00:00
Ming-Hung Tsai
7d983e3155 [btree_builder (rust)] Fix the max_entries 2021-03-11 18:24:10 +08:00
Joe Thornber
d0675dd7bf Add missing header.
So many errors from one issue
2021-03-04 11:19:04 +00:00
Joe Thornber
7e869bb8e0 Code review of cache_dump/check
Added support for metadata format2 to cache_dump.  Nothing tested.
2021-03-04 11:13:08 +00:00
Joe Thornber
e6c6275aea Code review of src/pdata/array* 2021-03-03 10:27:57 +00:00
Joe Thornber
fdcc09c27e [cache_dump] Squash some clippy warnings 2021-03-03 09:48:15 +00:00
Joe Thornber
3cf0dba469 [cache_dump] fix how needs_check flag is checked 2021-03-03 09:47:42 +00:00
Ming-Hung Tsai
eb3d181f95 [cache_dump (rust)] First draft of cache_dump 2021-03-03 12:27:51 +08:00
Ming-Hung Tsai
fde0e0e2b8 [cache (rust)] Add Mapping::is_dirty() 2021-03-03 12:14:46 +08:00
Ming-Hung Tsai
74fcb9d505 [cache (rust)] Fix data types 2021-02-26 23:31:12 +08:00
Joe Thornber
3d9b32e509 Merge branch 'main' of github.com:jthornber/thin-provisioning-tools into main 2021-02-26 15:26:33 +00:00
Joe Thornber
d4299a00d0 Make pack_node() and calc_max_entries() public for dm-unit 2021-02-26 15:25:53 +00:00
Joe Thornber
441a000c52
Merge pull request #163 from mingnus/rust-cache-tools
[cache (rust)] Fix merge conflicts
2021-02-24 12:33:50 +00:00
Ming-Hung Tsai
a7ecfba2b4 [cache (rust)] Fix merge conflicts 2021-02-24 20:21:10 +08:00
Joe Thornber
a4ba01cacd
Merge pull request #160 from mingnus/rust-cache-tools
First draft of cache_check in Rust
2021-02-24 09:53:51 +00:00
Ming-Hung Tsai
2bb3bf65b7 [cache_check (rust)] Implement basic functions 2021-02-24 17:39:11 +08:00
Joe Thornber
78c93ce09b
Merge pull request #162 from mingnus/main-thin-debug
[dbg] Enhance debugging tools
2021-02-22 08:28:07 +00:00
Ming-Hung Tsai
e8410dec04 [dbg] Add missing commands to cache/era_debug 2021-02-21 19:16:51 +08:00
Ming-Hung Tsai
29f9182078 [dbg] Remove nested function template to reduce code size 2021-02-21 01:07:55 +08:00
Ming-Hung Tsai
a81cef4467 [dbg] Pull out common code into dbg-lib
- Modularize common routines
- Extract the block_dumper interface for displaying blocks
- Remove inheritance from show_traits
2021-02-21 01:04:35 +08:00
Ming-Hung Tsai
c95e31bef6 [era_debug] Display bitset entries in run-length fashion 2021-02-21 00:02:57 +08:00
Ming-Hung Tsai
afbd913e22 [era] Add era_debug 2021-02-18 23:40:39 +08:00
Ming-Hung Tsai
1bc88bfde8 [cache_debug] Simplify the trait types 2021-02-18 18:20:48 +08:00
Ming-Hung Tsai
e3a646e4d2 [dbg] Improve error resilience of debugging tools
Do not open the metadata. The tool interprets user specified blocks one-by-one.
Thus, there's no need to preload the metadata structures.

Also remove the unused --ignore-metadata-space-map option. It was designed
to control the loading of space maps with the old metadata constructors.
2021-02-18 00:00:55 +08:00
Joe Thornber
58cd881340 Fix regression where era_restore wouldn't work with devices.
check_file_exists() had an extra parameter added with a default, which was
the wrong default for era_restore.
2021-02-17 15:15:57 +00:00
Joe Thornber
763b2d14b2 [io_engine] Add Block::zeroed() constructor 2021-02-09 14:34:26 +00:00
Joe Thornber
c3c6d37aea Fix a lot of clippy warnings 2021-02-08 10:38:21 +00:00
Joe Thornber
e62fa3e835 Merge branch 'main' of github.com:jthornber/thin-provisioning-tools into main 2021-02-04 10:01:17 +00:00