61de3f9287
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)
33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
#include "thin-provisioning/commands.h"
|
|
|
|
using namespace base;
|
|
using namespace thin_provisioning;
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
void
|
|
thin_provisioning::register_thin_commands(base::application &app)
|
|
{
|
|
app.add_cmd(command::ptr(new thin_check_cmd()));
|
|
app.add_cmd(command::ptr(new thin_delta_cmd()));
|
|
app.add_cmd(command::ptr(new thin_dump_cmd()));
|
|
app.add_cmd(command::ptr(new thin_ls_cmd()));
|
|
app.add_cmd(command::ptr(new thin_metadata_size_cmd()));
|
|
app.add_cmd(command::ptr(new thin_restore_cmd()));
|
|
app.add_cmd(command::ptr(new thin_repair_cmd()));
|
|
app.add_cmd(command::ptr(new thin_rmap_cmd()));
|
|
app.add_cmd(command::ptr(new thin_trim_cmd()));
|
|
|
|
#ifdef DEV_TOOLS
|
|
app.add_cmd(command::ptr(new thin_ll_dump_cmd()));
|
|
app.add_cmd(command::ptr(new thin_ll_restore_cmd()));
|
|
app.add_cmd(command::ptr(new thin_scan_cmd()));
|
|
app.add_cmd(command::ptr(new thin_generate_metadata_cmd()));
|
|
app.add_cmd(command::ptr(new thin_show_duplicates_cmd()));
|
|
app.add_cmd(command::ptr(new thin_show_metadata_cmd()));
|
|
app.add_cmd(command::ptr(new thin_journal_cmd()));
|
|
#endif
|
|
}
|
|
|
|
//----------------------------------------------------------------
|