Ming-Hung Tsai
041ed7858c
[build] Fix customized emitter linkage
2021-06-02 00:51:39 +08:00
Ming-Hung Tsai
0004dced93
[thin_show_metadata] Fix out-of-bounds access
2021-06-02 00:51:39 +08:00
Ming-Hung Tsai
f7e4a8faa9
[all] Fix resource leaks
2021-06-02 00:51:39 +08:00
Joe Thornber
b9df99fd6a
Merge pull request #173 from mingnus/2021-05-12-cache-restore
...
cache_restore wip
2021-06-01 09:15:38 +01:00
Ming-Hung Tsai
b12530f580
[space_map (rust)] Fix nr_allocated tracking in CoreSpaceMap
2021-05-28 20:20:30 +08:00
Ming-Hung Tsai
3a653eaa5f
[thin_restore (rust)] Build metadata and data space maps
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
c142cd0d48
[space_map (rust)] Fix space map building
...
- Fix out-of-bounds index
- Automatically flush queued writes before function return
- Track allocated blocks in write_batcher (might be space consuming)
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
13d6c72ad9
[cache_restore (rust)] Build metadata space map
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
5ecae3ad88
[tests] Fix numeric literal annotation
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
48d4fc51ed
[space_map (rust)] Factor out space_map_metadata
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
d5e6a69af6
[thin (rust)] Fix the unit of metadata_block_size in superblock
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
6a29f6a41a
[cache_check (rust)] Fix discard bitset availability checking
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
ce94ba73a5
[cache_restore (rust)] First draft
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
e336b3a63f
[math (rust)] Make the functions generic
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
1198a3f713
[cache (rust)] Implement Pack for superblock
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
511ae9e908
[checksum] Support cache and era superblock
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
159dda9659
[thin_restore (rust)] Tidy up with the builder pattern
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
1907dab5ee
[cache (rust)] Implement Pack and Default for restoration
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
86e2db3a1a
[cache (rust)] Add visitor traits for cache_restore
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
2a77036fa8
[array_builder] First draft
...
Not tested yet
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
a6e1870b2b
[array (rust)] Implement Pack for restoration
2021-05-28 03:19:42 +08:00
Ming-Hung Tsai
7e2d69ede9
[cache_dump (rust)] Allow partially broken dirty bitset
2021-05-28 03:19:42 +08:00
Joe Thornber
db48f51049
Merge pull request #172 from mingnus/2021-05-04-thin-dump-fixes
...
Make thin_dump runnable
2021-05-27 19:03:05 +01:00
Ming-Hung Tsai
2a9e7cf74f
[thin_dump (rust)] Split runs at the position with multiple references
...
That is, an element with multiple references will serve as the beginning
of an atomic run.
2021-05-28 00:18:27 +08:00
Ming-Hung Tsai
30cfcd9a88
[thin_dump (rust)] Use common leaf sequences to pack metadata
2021-05-28 00:07:32 +08:00
Ming-Hung Tsai
4c47fcabbf
[thin_dump (rust)] Fix missing outputs
2021-05-27 23:51:37 +08:00
Joe Thornber
4f192cea0f
Merge pull request #171 from mingnus/rust-cache-tools
...
Fix bugs in array iteration and text outputs
2021-05-13 15:02:41 +01:00
Ming-Hung Tsai
7e53c36d6b
[cache (rust)] Fix bugs in array iteration and text outputs
...
- Fix array indexing
- Fix panic on empty array
- Remove trailing null characters from the policy name
- Change XML tag naming for backward compatibility
2021-05-13 21:36:52 +08:00
Joe Thornber
11c354b3b1
Merge pull request #170 from mingnus/rust-cache-tools
...
Merge recent changes in cache-tools
2021-05-12 09:29:49 +01:00
Ming-Hung Tsai
1bbb63f06b
[cache_check (rust)] Fix discard bitset size checking
2021-05-12 15:50:14 +08:00
Ming-Hung Tsai
b7bf82b8f2
[all] Fix newline in version string
2021-05-12 12:03:52 +08:00
Ming-Hung Tsai
965fbb6e8f
[all] Apply cargo fmt, and fix clippy warnings
2021-05-11 23:53:31 +08:00
Ming-Hung Tsai
0553a78c04
Add pre-commit hooks
2021-05-11 23:18:43 +08:00
Ming-Hung Tsai
5baeab4a5c
Merge branch 'main' into rust-cache-tools
2021-05-11 23:16:08 +08:00
Joe Thornber
d9a96758b0
Merge pull request #168 from mingnus/2020-10-09-thin-restore-rewrite
...
Merge recent changes in thin_restore
2021-05-04 09:21:40 +01:00
Ming-Hung Tsai
43e433149b
[all] Apply cargo fmt
2021-05-04 16:10:23 +08:00
Ming-Hung Tsai
4b4584c830
[thin_restore (rust)] Apply several fixes
...
- Fix reading queued blocks
- Fix unnecessary block shadowing when there's no remaining values
- Prevent superblock from overwritten
- Flush queued writes before updating superblock
2021-05-03 00:07:34 +08:00
Ming-Hung Tsai
e9899ac610
Add missing math.rs
2021-04-26 12:47:05 +08:00
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