Ming-Hung Tsai
f8c40a1fda
[thin_check (rust)] Set compatibility between options
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
2f22a8c55d
[all (rust)] Fix errors in testing input option
...
- Fix file mode bits checking
- Return error reason from stat
2021-09-22 17:05:59 +08:00
Ming-Hung Tsai
4ed2348b36
[cache_restore (rust)] Fix errors in tests
...
- Move error messages to stderr (fixes unwritable_output_file,
input_file_not_found, and missing_input_option)
- Validate XML structures implicitly (fixes corrupted_input_data)
- Check output file size (fixes tiny_output_file)
- Allow restoring XML without the hints (for creating test fixtures)
- Provide XML error context
- Remove unused option
2021-09-22 17:05:29 +08:00
Ming-Hung Tsai
0acc57d17f
[thin_restore (rust)] Fix errors in tests
...
- Move error messages to stderr (fixes unwritable_output_file,
input_file_not_found, and missing_input_option)
- Validate XML structures implicitly (fixes corrupted_input_data)
- Check output file size (fixes tiny_output_file)
- Provide XML error context
- Fix mk_valid_input()
2021-09-16 21:55:46 +08:00
Ming-Hung Tsai
8a822cebec
[thin_repair/thin_dump (rust)] Support rebuilding superblock
2021-08-27 02:17:57 +08:00
Ming-Hung Tsai
213442bffd
[all (rust)] Fix cosmetic names for argument values
2021-08-27 02:17:57 +08:00
Ming-Hung Tsai
7239204b01
[cache_repair (rust)] First pass at cache_repair
2021-07-27 23:51:20 +08:00
Ming-Hung Tsai
4b9766846e
[cache (rust)] Prepare for cache_repair
...
- Adapt function interfaces for repairing purpose
- Finalize the metadata in the Restorer
- Make the Restorer public
2021-07-27 23:51:20 +08:00
Ming-Hung Tsai
85581cdf5a
[thin_repair (rust)] First pass at thin_repair
2021-07-27 23:51:20 +08:00
Ming-Hung Tsai
dccd844714
[thin_restore (rust)] Prepare for thin_repair
...
- Finalize the metadata in the Restorer
- Make the Restorer public
2021-07-27 23:51:20 +08:00
Ming-Hung Tsai
a50c9d97e2
[thin_metadata_unpack] Fix truncated output file on invalid input
...
Check the input header before creating or truncating the output file
2021-07-09 01:22:22 +08:00
Ming-Hung Tsai
d00388f68a
[thin_shrink] Support short options
2021-07-07 16:06:04 +08:00
Ming-Hung Tsai
1526ab3472
[all] Apply cargo fmt, and fix clippy warning of branches_sharing_code
2021-07-02 16:17:52 +08:00
Kay Lin
c18cd42d35
[build] Update dependencies
...
- Update crc32c to 0.6, which allows it to be built on AArch64.
- Update base64 to 0.13
- Update byteorder to 0.14
- Update io-uring to 0.4
- Update libc to 0.2.83
- Update nix to 0.19
- Update nom to 6.0.1
- Update quick-xml to 0.20
- Update rand to 0.8
- Update tempfile to 3.2
- Update tui to 0.14
Signed-off-by: Kay Lin <i@v2bv.net>
2021-06-26 00:08:58 +08:00
Ming-Hung Tsai
2cb84236d4
[all (rust)] Tidy command line options
2021-06-23 14:33:28 +08:00
Ming-Hung Tsai
cd48f00191
[all (rust)] Make sync-io the default
...
Multithreaded sync-io has performance similar to async-io. Also,
sync-io saves the hassle of setting ulimits to get io_uring working
on some systems (commit ba7fd7b
). Now we default to sync-io, and
leave async-io as a hidden option for testing and benchmarking.
2021-06-23 14:33:28 +08:00
Ming-Hung Tsai
fba2adbe56
[tests] Fix minor test errors
...
- Fix command line arguments
- Adapt error messages for rust implementations
2021-06-21 23:27:51 +08:00
Ming-Hung Tsai
7daff7350a
[thin/cache_dump (rust)] Add buffered outputs, and fix command line options
2021-06-21 23:27:51 +08:00
Ming-Hung Tsai
ce94ba73a5
[cache_restore (rust)] First draft
2021-05-28 03:19:42 +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
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
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
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
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
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
040e3bfc2d
Lot's of work on thin_restore
2021-03-24 14:20:20 +00:00
Ming-Hung Tsai
eb3d181f95
[cache_dump (rust)] First draft of cache_dump
2021-03-03 12:27:51 +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
c3c6d37aea
Fix a lot of clippy warnings
2021-02-08 10:38:21 +00:00
Ming-Hung Tsai
ca7e79a828
Merge commit 'b67b587' into main
2021-01-12 02:50:12 +08:00
Joe Thornber
ba7fd7bd2b
[thin_check (rust)] Make --sync-io the default.
...
For some systems you have to adjust the ulimits to get io_uring
to work, so we now default to using sync io.
Also added --async-io flag.
2020-12-02 11:33:05 +00:00
Joe Thornber
37ea0280df
[thin_restore] first pass at btree_builder.
...
No tests yet
2020-10-26 12:05:27 +00:00
Joe Thornber
f60ae770c2
[thin_explore] Explore devices tree, including path support.
2020-10-15 11:53:09 +01:00
Joe Thornber
e9fbcc31de
[thin_dump (rust)] First pass at thin_dump.
...
Doesn't include --repair.
This includes <def> and <ref> sections for shared regions.
2020-09-28 15:45:13 +01:00
Joe Thornber
66b6a1ba48
[thin_check (rust)] --superblock-only, --skip-mappings, INFO fields
2020-09-24 13:55:58 +01:00
Joe Thornber
b67b587a10
[thin_shrink] Add comment pointing people at Nikhil's PoC
2020-09-22 12:01:17 +01:00
Joe Thornber
819fc6d54c
[thin_explore] accept a node path on the command line
...
Helpful to examine thin_check failures.
2020-09-22 10:47:04 +01:00
Joe Thornber
b193d19603
[thin_check (rust)] output complete node paths with errors.
...
This can be used with thin_explore
2020-09-18 11:16:09 +01:00
Joe Thornber
bc058f8baf
[thin_check (rust)] BTree values must now implement Copy
2020-09-18 10:06:33 +01:00
Joe Thornber
bcfb9a73a1
[thin_explore] display ranges where possible
2020-09-18 09:12:51 +01:00
Joe Thornber
8493cf7081
[thin_explore] First code drop
2020-09-16 15:10:01 +01:00
Joe Thornber
67a54b4ebc
[thin_check (rust)] add --auto-repair switch
2020-08-18 11:47:42 +01:00
Joe Thornber
239ae6b6ec
[thin_check (rust)] factor out spawn_progress_thread
2020-08-18 09:48:51 +01:00
Joe Thornber
e8d7e5cf1e
[thin_check (rust)] move report creation to top level
2020-08-17 16:05:06 +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