Commit Graph

131 Commits

Author SHA1 Message Date
Joe Thornber
1398cf31d1 [thin_check (Rust)] work in progress 2020-07-27 15:53:42 +01:00
Joe Thornber
3cf6307762 Merge branch 'master' into 2020-06-13-thin-check-rewrite 2020-07-27 15:53:26 +01:00
Joe Thornber
e9055f5d7d Merge branch 'master' of github.com:jthornber/thin-provisioning-tools 2020-07-22 16:09:33 +01:00
Joe Thornber
b7e02d0ae4 [thin_metadata_pack] FIx bug where pack would try and read too much. 2020-07-09 13:53:46 +01:00
Joe Thornber
19138dbd81 [thin_shrink] add unit tests for build_remaps 2020-07-06 11:44:49 +01:00
Joe Thornber
470d0b7532 [thin_shrink] more test cases 2020-07-01 07:52:53 +01:00
Joe Thornber
4d7f9c7ddc [thin_shrink] add some more test cases 2020-06-30 08:32:04 +01:00
Joe Thornber
3618da3a12 [thin_shrink] Get test framework built
This verifies data has been moved to the correct place.
2020-06-29 10:49:40 +01:00
Joe Thornber
d03dac8f75 [thin_shrink] write test harness 2020-06-26 16:44:47 +01:00
Joe Thornber
07da5704d5 [thin_shrink] add --no-copy 2020-06-26 08:57:26 +01:00
Joe Thornber
abf06236b1 [thin_shrink] Tidy up some messages 2020-06-26 08:47:40 +01:00
Joe Thornber
d8a0805753 [thin_shrink] fix some clippy warnings 2020-06-26 08:31:02 +01:00
Joe Thornber
7df56a5a04 [thin_shrink] Squash some warnings 2020-06-26 08:00:53 +01:00
Joe Thornber
27c6e36f5c [thin_shrink] Very simple copier implementation 2020-06-25 16:50:11 +01:00
Joe Thornber
fcf44d46b7 [thin_shrink] remove some debug printlns 2020-06-25 16:12:35 +01:00
Joe Thornber
31abc468be [thin_shrink] Stub the copier 2020-06-25 15:28:45 +01:00
Joe Thornber
d8957e3d86 [thin_shrink] Rewrites xml
Just need to do copying now
2020-06-25 14:57:37 +01:00
Joe Thornber
259eef9eee [thin_shrink] calculate remaps 2020-06-25 10:44:57 +01:00
Joe Thornber
3f1b776359 [thin_shrink] Add NoopVisitor 2020-06-24 13:55:08 +01:00
Joe Thornber
861b2f21ff [thin_shrink] Write thinp xml format reader and writer.
Still need to tidy up the error handling.
2020-06-24 13:32:47 +01:00
Joe Thornber
5e19029e65 Merge branch '2020-06-19-use-anyhow' into 2020-06-13-thin-check-rewrite 2020-06-22 10:16:27 +01:00
Joe Thornber
fdf641aff3 [thin_metadata_{pack,unpak}] use anyhow in toplevel. 2020-06-21 11:50:24 +01:00
Joe Thornber
7d625eb6ff [src/file_utils.rs] Don't print to stderr in file_exists. 2020-06-15 12:48:19 +01:00
Joe Thornber
29d56f62a5 wip 2020-06-14 08:17:46 +01:00
Joe Thornber
7a85e47a20 [rust] squash clippy (linter) warnings 2020-06-10 16:46:38 +01:00
Joe Thornber
f90010e22a [pack/unpack] fix bug in file_utils::file_size() 2020-06-10 15:07:40 +01:00
Joe Thornber
380632565d [thin_metadata_{pack/unpack}] Fix get_nr_blocks()
It didn't work with block devices.
2020-06-10 14:38:42 +01:00
Joe Thornber
821628b004 [pack/unpack] add missing file. 2020-06-09 14:59:13 +01:00
Joe Thornber
409a660082 [pack/unpack] Get the functional tests working again.
There's some hard coded version numbers in the tests, but I'm
leaving for now since I'll rewrite in Rust to avoid too much
of a proliferation of languages.
2020-06-09 13:03:39 +01:00
Joe Thornber
db5a71a53c [rust tools] Get the tools version from autoconf 2020-06-09 10:23:52 +01:00
Joe Thornber
61de3f9287 [thin_metadata_pack/unpack] Replace C++ implementation with a Rust one.
The Rust implementation is multithreaded, performs better in general and
does custom compression of btree nodes to achieve much better compression
ratios.  unpack also checksums expanded metadata to validate it.

Format version has jumped to 3, no backwards compatibility, but I think
that's ok since we never made a release that contained the C++ version
of these tools.

Benchmarks
==========

On an 8 core, 16 hyperthread machine.

metadata 1G, full:

      Pack size    pack time     unpack time
------------------------------------------------------
C++      193M        50.3s          6.9s (no verify)
Rust      70M         1.4s          1.8s (verify)

metadata 16G, sparse:

       Pack size    pack time     unpack time
------------------------------------------------------
C++      21M          68s           1s   (no verify)
Rust      4M           8.6s         0.5s (verify)
2020-06-09 09:15:00 +01:00