Compare commits
73 Commits
Author | SHA1 | Date |
---|---|---|
Fedora Release Engineering | 20de387ada | |
Marian Csontos | 99369c4f67 | |
Fedora Release Engineering | 126554fe2a | |
Marian Csontos | 60cbba5ee8 | |
Fedora Release Engineering | c6ef39964e | |
Marian Csontos | 266ea5b3cf | |
Marian Csontos | c8a7f0ad3e | |
Fedora Release Engineering | 04960e2a1e | |
Tom Stellard | d369cfa3c5 | |
Marian Csontos | 9537e3e84a | |
Marian Csontos | 17d784aa7f | |
Marian Csontos | 00ee8c1bd2 | |
Fedora Release Engineering | 3a6c7c6f8e | |
Fedora Release Engineering | 8049d4672f | |
Fedora Release Engineering | 421e6526f6 | |
Marian Csontos | fbb64262ce | |
Marian Csontos | b2f4dd907c | |
Marian Csontos | 95fb81b412 | |
Fedora Release Engineering | 63039122dd | |
Igor Gnatenko | b31f85ac26 | |
Igor Gnatenko | 731228e5f9 | |
Jonathan Wakely | 790a1dc624 | |
Fedora Release Engineering | c01e369f7e | |
Marian Csontos | 88778300c5 | |
Marian Csontos | a19342ade3 | |
Fedora Release Engineering | c327b607fe | |
Jonathan Wakely | 40e854a10a | |
Marian Csontos | e2f2093885 | |
Bruno Goncalves | 651216ed6a | |
Marian Csontos | 5d5ebcb425 | |
Marian Csontos | 7d940d6bd5 | |
Fedora Release Engineering | 76f23150c1 | |
Fedora Release Engineering | a3db74c795 | |
Jonathan Wakely | b557b0f646 | |
Marian Csontos | a9f94b0fd5 | |
Marian Csontos | 4378ae0980 | |
Fedora Release Engineering | db4dc6b746 | |
Peter Rajnoha | 4cd2a32be9 | |
Peter Rajnoha | 157df5df7d | |
Peter Rajnoha | f95d0a67cc | |
Peter Rajnoha | de968c0e8c | |
Peter Rajnoha | bbce189d61 | |
Peter Rajnoha | d295f18b54 | |
Fedora Release Engineering | 0a96e398ab | |
Jonathan Wakely | 702f380fa3 | |
Peter Rajnoha | 9e7d28d253 | |
Peter Rajnoha | 413d274654 | |
Peter Rajnoha | 635d3473dc | |
Peter Rajnoha | 5c01a0ad21 | |
Peter Rajnoha | 0e6c2c5e66 | |
Peter Rajnoha | 9e4b69ab08 | |
Peter Rajnoha | 90fbaa7a9d | |
Peter Rajnoha | 18f5b7e6e1 | |
Peter Rajnoha | 99ea430f9d | |
Dennis Gilmore | dc1e2176c5 | |
Peter Rajnoha | 8579281e34 | |
Peter Rajnoha | bcbdabcaa4 | |
Peter Rajnoha | 44d4734254 | |
Jonathan Wakely | ac257c3d7b | |
Jonathan Wakely | 70a39d44f8 | |
Peter Rajnoha | 7b3b0cf9d9 | |
Dennis Gilmore | 4653be1d64 | |
David Tardon | 3fb2f8386a | |
Peter Rajnoha | 854d454495 | |
Peter Rajnoha | fc57c16ec9 | |
Peter Rajnoha | 20c2ae43f9 | |
Peter Rajnoha | 86a94835f6 | |
Peter Rajnoha | 66641de0f9 | |
Peter Rajnoha | cc79a1927d | |
Dennis Gilmore | 1812d33a51 | |
Peter Rajnoha | 5f5f0e1228 | |
Peter Rajnoha | 2f00308a6f | |
Kalev Lember | 6e89b7444e |
|
@ -5,3 +5,37 @@
|
|||
/thin-provisioning-tools-v0.2.8.tar.bz2
|
||||
/thin-provisioning-tools-v0.3.0.tar.bz2
|
||||
/thin-provisioning-tools-v0.3.2.tar.bz2
|
||||
/thin-provisioning-tools-0.5.0.tar.gz
|
||||
/thin-provisioning-tools-0.5.1.tar.gz
|
||||
/thin-provisioning-tools-0.5.2.tar.gz
|
||||
/thin-provisioning-tools-0.5.3.tar.gz
|
||||
/thin-provisioning-tools-0.5.4.tar.gz
|
||||
/thin-provisioning-tools-0.5.5.tar.gz
|
||||
/thin-provisioning-tools-0.5.6.tar.gz
|
||||
/thin-provisioning-tools-0.6.0.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc3.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc4.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc5.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc6.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc7.tar.gz
|
||||
/thin-provisioning-tools-0.6.2-rc8.tar.gz
|
||||
/thin-provisioning-tools-0.6.2.tar.gz
|
||||
/thin-provisioning-tools-0.6.3.tar.gz
|
||||
/thin-provisioning-tools-0.7.0-rc2.tar.gz
|
||||
/thin-provisioning-tools-0.7.0-rc3.tar.gz
|
||||
/thin-provisioning-tools-0.7.0-rc4.tar.gz
|
||||
/thin-provisioning-tools-0.7.0-rc5.tar.gz
|
||||
/thin-provisioning-tools-0.7.0-rc6.tar.gz
|
||||
/v0.7.2.tar.gz
|
||||
/v0.7.3.tar.gz
|
||||
/v0.7.5.tar.gz
|
||||
/v0.7.6.tar.gz
|
||||
/v0.8.0.tar.gz
|
||||
/v0.8.1.tar.gz
|
||||
/v0.8.5.tar.gz
|
||||
/v0.9.0-rc2.tar.gz
|
||||
/device-mapper-persistent-data-0.9.0-rc2-vendor.tar.gz
|
||||
/v0.9.0.tar.gz
|
||||
/dmpd090-vendor.tar.gz
|
||||
/dmpd090-vendor2.tar.gz
|
||||
/dmpd090-vendor3.tar.gz
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
From 4a45e1d7eafb83ec9c76f0b3278f4bc7efbdde9d Mon Sep 17 00:00:00 2001
|
||||
From: Marian Csontos <mcsontos@redhat.com>
|
||||
Date: Tue, 1 Sep 2020 14:55:48 +0200
|
||||
Subject: [PATCH] Update dependencies
|
||||
|
||||
---
|
||||
Cargo.toml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 892ea4c..93fc807 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -9,7 +9,7 @@ license = "GPL3"
|
||||
anyhow = "1.0"
|
||||
byteorder = "1.3"
|
||||
clap = "2.33"
|
||||
-crc32c = "0.4"
|
||||
+crc32c = "0.6"
|
||||
flate2 = "1.0"
|
||||
fixedbitset = "0.3"
|
||||
libc = "0.2.71"
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
From 48676b9f1aac63f8a30ed8061b6e719929b82c98 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 28 Apr 2021 10:34:16 +0800
|
||||
Subject: [PATCH 01/10] [all] Fix resource leaks
|
||||
|
||||
---
|
||||
base/file_utils.cc | 4 +++-
|
||||
thin-provisioning/cache_stream.cc | 2 +-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/base/file_utils.cc b/base/file_utils.cc
|
||||
index e4f3722..8253660 100644
|
||||
--- a/base/file_utils.cc
|
||||
+++ b/base/file_utils.cc
|
||||
@@ -155,8 +155,10 @@ file_utils::zero_superblock(std::string const &path)
|
||||
throw runtime_error("out of memory");
|
||||
|
||||
memset(buffer, 0, SUPERBLOCK_SIZE);
|
||||
- if (::write(fd.fd_, buffer, SUPERBLOCK_SIZE) != SUPERBLOCK_SIZE)
|
||||
+ if (::write(fd.fd_, buffer, SUPERBLOCK_SIZE) != SUPERBLOCK_SIZE) {
|
||||
+ free(buffer);
|
||||
throw runtime_error("couldn't zero superblock");
|
||||
+ }
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
diff --git a/thin-provisioning/cache_stream.cc b/thin-provisioning/cache_stream.cc
|
||||
index 002b6ba..73b01b4 100644
|
||||
--- a/thin-provisioning/cache_stream.cc
|
||||
+++ b/thin-provisioning/cache_stream.cc
|
||||
@@ -62,7 +62,7 @@ chunk const &
|
||||
cache_stream::get()
|
||||
{
|
||||
chunk_wrapper *w = new chunk_wrapper(*this);
|
||||
- return w->c_;
|
||||
+ return w->c_; // wrapper will get freed by the put method
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 691a0237809b5364117446a8a9b0cceeb0a747c1 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Tue, 1 Jun 2021 11:24:11 +0800
|
||||
Subject: [PATCH 02/10] [thin_show_metadata] Fix out-of-bounds access
|
||||
|
||||
---
|
||||
thin-provisioning/thin_show_metadata.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/thin-provisioning/thin_show_metadata.cc b/thin-provisioning/thin_show_metadata.cc
|
||||
index bdbab3f..dbc7a80 100644
|
||||
--- a/thin-provisioning/thin_show_metadata.cc
|
||||
+++ b/thin-provisioning/thin_show_metadata.cc
|
||||
@@ -206,7 +206,8 @@ namespace {
|
||||
|
||||
void run() {
|
||||
auto line_length = 80;
|
||||
- for (block_address b = 0; b < 2000; b++) {
|
||||
+ block_address nr_blocks = std::min<block_address>(2000, bm_.get_nr_blocks());
|
||||
+ for (block_address b = 0; b < nr_blocks; b++) {
|
||||
block_manager::read_ref rr = bm_.read_lock(b);
|
||||
|
||||
if (!(b % line_length)) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 65369d88610069ba7bbd011b00af19523638b0fb Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Tue, 1 Jun 2021 13:32:26 +0800
|
||||
Subject: [PATCH 03/10] [build] Fix customized emitter linkage
|
||||
|
||||
---
|
||||
contrib/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/Makefile.in b/contrib/Makefile.in
|
||||
index 038c41c..7192258 100644
|
||||
--- a/contrib/Makefile.in
|
||||
+++ b/contrib/Makefile.in
|
||||
@@ -18,7 +18,7 @@ contrib/%.a: contrib/%.o
|
||||
$(V)echo " [AR] $@"
|
||||
$(V)$(AR) rcs $@ $^
|
||||
|
||||
-contrib/%.so: contrib/%.a
|
||||
+contrib/%.so: contrib/%.o
|
||||
$(V)echo " [LD] $@"
|
||||
$(V)$(CC) -shared -Wl,-soname,$@ -o $@ $<
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
From 7fbd79cab2e548eb388bc782dd39f1cde027173b Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Tue, 1 Jun 2021 23:37:36 +0800
|
||||
Subject: [PATCH 04/10] [thin_dump] Fix leaked shared object handle
|
||||
|
||||
---
|
||||
thin-provisioning/shared_library_emitter.cc | 113 ++++++++++++++++++++++++----
|
||||
1 file changed, 100 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/thin-provisioning/shared_library_emitter.cc b/thin-provisioning/shared_library_emitter.cc
|
||||
index 58f12d2..2e845f3 100644
|
||||
--- a/thin-provisioning/shared_library_emitter.cc
|
||||
+++ b/thin-provisioning/shared_library_emitter.cc
|
||||
@@ -8,22 +8,109 @@ using namespace thin_provisioning;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
-emitter::ptr
|
||||
-thin_provisioning::create_custom_emitter(string const &shared_lib, ostream &out)
|
||||
-{
|
||||
- emitter::ptr (*create_fn)(ostream &out);
|
||||
- void *handle = dlopen(shared_lib.c_str(), RTLD_LAZY);
|
||||
- if (!handle)
|
||||
- throw runtime_error(dlerror());
|
||||
+struct shared_object {
|
||||
+public:
|
||||
+ shared_object(const char *shared_lib) {
|
||||
+ handle_ = dlopen(shared_lib, RTLD_LAZY);
|
||||
+ if (!handle_)
|
||||
+ throw runtime_error(dlerror());
|
||||
+
|
||||
+ dlerror(); // Clear any existing error
|
||||
+ }
|
||||
+
|
||||
+ virtual ~shared_object() {
|
||||
+ dlclose(handle_);
|
||||
+ }
|
||||
+
|
||||
+ void *get_symbol(const char *symbol) {
|
||||
+ void *sym = dlsym(handle_, symbol);
|
||||
+
|
||||
+ char *error = dlerror();
|
||||
+ if (error)
|
||||
+ throw runtime_error(error);
|
||||
+
|
||||
+ return sym;
|
||||
+ }
|
||||
+
|
||||
+ void *handle_;
|
||||
+};
|
||||
+
|
||||
+class shared_emitter : public emitter {
|
||||
+public:
|
||||
+ shared_emitter(const char *shared_lib, ostream &out): sobj_(shared_lib) {
|
||||
+ emitter::ptr (*create_fn)(ostream &out);
|
||||
+ create_fn = reinterpret_cast<emitter::ptr (*)(ostream &)>(
|
||||
+ sobj_.get_symbol("create_emitter"));
|
||||
+ inner_ = create_fn(out);
|
||||
+ }
|
||||
+
|
||||
+ virtual ~shared_emitter() {
|
||||
+ }
|
||||
+
|
||||
+ void begin_superblock(std::string const &uuid,
|
||||
+ uint64_t time,
|
||||
+ uint64_t trans_id,
|
||||
+ boost::optional<uint32_t> flags,
|
||||
+ boost::optional<uint32_t> version,
|
||||
+ uint32_t data_block_size,
|
||||
+ uint64_t nr_data_blocks,
|
||||
+ boost::optional<uint64_t> metadata_snap) {
|
||||
+ inner_->begin_superblock(uuid,
|
||||
+ time,
|
||||
+ trans_id,
|
||||
+ flags,
|
||||
+ version,
|
||||
+ data_block_size,
|
||||
+ nr_data_blocks,
|
||||
+ metadata_snap);
|
||||
+ }
|
||||
|
||||
- dlerror(); // Clear any existing error
|
||||
- create_fn = reinterpret_cast<emitter::ptr (*)(ostream &)>(dlsym(handle, "create_emitter"));
|
||||
+ void end_superblock() {
|
||||
+ inner_->end_superblock();
|
||||
+ }
|
||||
|
||||
- char *error = dlerror();
|
||||
- if (error)
|
||||
- throw runtime_error(error);
|
||||
+ void begin_device(uint32_t dev_id,
|
||||
+ uint64_t mapped_blocks,
|
||||
+ uint64_t trans_id,
|
||||
+ uint64_t creation_time,
|
||||
+ uint64_t snap_time) {
|
||||
+ inner_->begin_device(dev_id, mapped_blocks, trans_id, creation_time, snap_time);
|
||||
+ }
|
||||
|
||||
- return create_fn(out);
|
||||
+ void end_device() {
|
||||
+ inner_->end_device();
|
||||
+ }
|
||||
+
|
||||
+ void begin_named_mapping(std::string const &name) {
|
||||
+ inner_->begin_named_mapping(name);
|
||||
+ }
|
||||
+
|
||||
+ void end_named_mapping() {
|
||||
+ inner_->end_named_mapping();
|
||||
+ }
|
||||
+
|
||||
+ void identifier(std::string const &name) {
|
||||
+ inner_->identifier(name);
|
||||
+ }
|
||||
+
|
||||
+ void range_map(uint64_t origin_begin, uint64_t data_begin, uint32_t time, uint64_t len) {
|
||||
+ inner_->range_map(origin_begin, data_begin, time, len);
|
||||
+ }
|
||||
+
|
||||
+ void single_map(uint64_t origin_block, uint64_t data_block, uint32_t time) {
|
||||
+ inner_->single_map(origin_block, data_block, time);
|
||||
+ }
|
||||
+
|
||||
+ shared_object sobj_;
|
||||
+ emitter::ptr inner_;
|
||||
+};
|
||||
+
|
||||
+//----------------------------------------------------------------
|
||||
+
|
||||
+emitter::ptr
|
||||
+thin_provisioning::create_custom_emitter(string const &shared_lib, ostream &out)
|
||||
+{
|
||||
+ return emitter::ptr(new shared_emitter(shared_lib.c_str(), out));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From 32de33be68f3892698d492b9ab8f21f9186b3f4c Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 01:23:13 +0800
|
||||
Subject: [PATCH 05/10] [thin_show_duplicates] Fix potential errors
|
||||
|
||||
- Fix error if no --block-sector provided
|
||||
- Fix errors on pools without mappings, or zero-length file
|
||||
---
|
||||
thin-provisioning/thin_show_duplicates.cc | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/thin-provisioning/thin_show_duplicates.cc b/thin-provisioning/thin_show_duplicates.cc
|
||||
index b1eebb7..f7354eb 100644
|
||||
--- a/thin-provisioning/thin_show_duplicates.cc
|
||||
+++ b/thin-provisioning/thin_show_duplicates.cc
|
||||
@@ -56,7 +56,7 @@ using namespace thin_provisioning;
|
||||
|
||||
namespace {
|
||||
bool factor_of(block_address f, block_address n) {
|
||||
- return (n % f) == 0;
|
||||
+ return f && (n % f) == 0;
|
||||
}
|
||||
|
||||
uint64_t parse_int(string const &str, string const &desc) {
|
||||
@@ -132,11 +132,15 @@ namespace {
|
||||
class duplicate_detector {
|
||||
public:
|
||||
void scan_with_variable_sized_chunks(chunk_stream &stream) {
|
||||
+ if (!stream.size())
|
||||
+ return;
|
||||
variable_chunk_stream vstream(stream, 4096);
|
||||
scan(vstream);
|
||||
}
|
||||
|
||||
void scan_with_fixed_sized_chunks(chunk_stream &stream, block_address chunk_size) {
|
||||
+ if (!stream.size())
|
||||
+ return;
|
||||
fixed_chunk_stream fstream(stream, chunk_size);
|
||||
scan(fstream);
|
||||
}
|
||||
@@ -222,7 +226,7 @@ namespace {
|
||||
if (fs.content_based_chunks)
|
||||
detector.scan_with_variable_sized_chunks(pstream);
|
||||
else {
|
||||
- if (*fs.block_size) {
|
||||
+ if (!!fs.block_size) {
|
||||
if (factor_of(*fs.block_size, block_size))
|
||||
block_size = *fs.block_size;
|
||||
else
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
From 35e96e07c956a501cb8a12f5b873db173bb09179 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 11:39:01 +0800
|
||||
Subject: [PATCH 06/10] [thin_metadata_size] Fix potential string overflow
|
||||
|
||||
---
|
||||
thin-provisioning/thin_metadata_size.cc | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/thin-provisioning/thin_metadata_size.cc b/thin-provisioning/thin_metadata_size.cc
|
||||
index b6a5718..f14696c 100644
|
||||
--- a/thin-provisioning/thin_metadata_size.cc
|
||||
+++ b/thin-provisioning/thin_metadata_size.cc
|
||||
@@ -192,9 +192,13 @@ static void printf_aligned(struct global *g, char const *a, char const *b, char
|
||||
{
|
||||
char buf[80];
|
||||
|
||||
- strcpy(buf, b);
|
||||
- if (units)
|
||||
- strcat(buf, mandatory ? "{" :"["), strcat(buf, g->unit.chars), strcat(buf, mandatory ? "}" : "]");
|
||||
+ if (units) {
|
||||
+ char left_bracket = mandatory ? '{' : '[';
|
||||
+ char right_bracket = mandatory ? '}' : ']';
|
||||
+ snprintf(buf, 80, "%s%c%s%c", b, left_bracket, g->unit.chars, right_bracket);
|
||||
+ } else {
|
||||
+ snprintf(buf, 80, "%s", b);
|
||||
+ }
|
||||
|
||||
printf("\t%-4s%-44s%s\n", a, buf, c);
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
From f1e404c33ad14f6784aa1926ae75fa49e614748e Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 12:14:34 +0800
|
||||
Subject: [PATCH 07/10] [all] Fix uninitialized class members
|
||||
|
||||
---
|
||||
era/restore_emitter.cc | 1 +
|
||||
thin-provisioning/metadata_dumper.cc | 10 +++++++---
|
||||
thin-provisioning/thin_delta.cc | 4 +++-
|
||||
3 files changed, 11 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/era/restore_emitter.cc b/era/restore_emitter.cc
|
||||
index c09fa66..7fbac7d 100644
|
||||
--- a/era/restore_emitter.cc
|
||||
+++ b/era/restore_emitter.cc
|
||||
@@ -14,6 +14,7 @@ namespace {
|
||||
: md_(md),
|
||||
in_superblock_(false),
|
||||
in_writeset_(false),
|
||||
+ era_(0),
|
||||
in_era_array_(false) {
|
||||
}
|
||||
|
||||
diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
|
||||
index 4feb40f..665c762 100644
|
||||
--- a/thin-provisioning/metadata_dumper.cc
|
||||
+++ b/thin-provisioning/metadata_dumper.cc
|
||||
@@ -180,7 +180,7 @@ namespace {
|
||||
// This is about classifying and summarising btree nodes. The use of a btree
|
||||
// node may not be obvious when inspecting it in isolation. But more information
|
||||
// may be gleaned by examining child and sibling nodes.
|
||||
-//
|
||||
+//
|
||||
// So the process is:
|
||||
// - scan every metadata block, summarising it's potential uses.
|
||||
// - repeatedly iterate those summaries until we can glean no more useful information.
|
||||
@@ -474,7 +474,7 @@ namespace {
|
||||
node_info get_internal_info(block_manager::read_ref &rr) {
|
||||
node_info info;
|
||||
info.b = rr.get_location();
|
||||
-
|
||||
+
|
||||
// values refer to blocks, so we should have infos for them.
|
||||
auto n = to_node<block_traits>(rr);
|
||||
::uint64_t key_low = 0;
|
||||
@@ -524,7 +524,7 @@ namespace {
|
||||
node_info info;
|
||||
info.b = rr.get_location();
|
||||
|
||||
- auto vsize = to_cpu<uint32_t>(hdr.value_size);
|
||||
+ auto vsize = to_cpu<uint32_t>(hdr.value_size);
|
||||
info.values = to_cpu<uint32_t>(hdr.nr_entries);
|
||||
|
||||
if (vsize == sizeof(device_details_traits::disk_type)) {
|
||||
@@ -645,6 +645,10 @@ namespace {
|
||||
public:
|
||||
mapping_emit_visitor(emitter::ptr e)
|
||||
: e_(e),
|
||||
+ origin_start_(0),
|
||||
+ dest_start_(0),
|
||||
+ time_(0),
|
||||
+ len_(0),
|
||||
in_range_(false) {
|
||||
}
|
||||
|
||||
diff --git a/thin-provisioning/thin_delta.cc b/thin-provisioning/thin_delta.cc
|
||||
index 5b31608..ee48dea 100644
|
||||
--- a/thin-provisioning/thin_delta.cc
|
||||
+++ b/thin-provisioning/thin_delta.cc
|
||||
@@ -259,7 +259,9 @@ namespace local {
|
||||
class simple_emitter : public diff_emitter {
|
||||
public:
|
||||
simple_emitter(indented_stream &out)
|
||||
- : diff_emitter(out) {
|
||||
+ : diff_emitter(out),
|
||||
+ vbegin_(0),
|
||||
+ vend_(0) {
|
||||
}
|
||||
|
||||
void left_only(uint64_t vbegin, uint64_t dbegin, uint64_t len) {
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
From 5d79a5c944d05f71425d3156597a2a61c5f2ab9a Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 13:08:47 +0800
|
||||
Subject: [PATCH 08/10] [thin_dump] Fix warnings on potential NULL pointer
|
||||
|
||||
---
|
||||
base/application.cc | 8 +++++++-
|
||||
base/application.h | 2 +-
|
||||
thin-provisioning/thin_dump.cc | 16 ++--------------
|
||||
3 files changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/base/application.cc b/base/application.cc
|
||||
index 61338ff..dbd55a5 100644
|
||||
--- a/base/application.cc
|
||||
+++ b/base/application.cc
|
||||
@@ -25,8 +25,14 @@ command::die(string const &msg)
|
||||
}
|
||||
|
||||
::uint64_t
|
||||
-command::parse_uint64(string const &str, string const &desc)
|
||||
+command::parse_uint64(char const *str, char const *desc)
|
||||
{
|
||||
+ if (!str) {
|
||||
+ ostringstream out;
|
||||
+ out << "Couldn't parse " << desc << ": NULL";
|
||||
+ die(out.str());
|
||||
+ }
|
||||
+
|
||||
try {
|
||||
// FIXME: check trailing garbage is handled
|
||||
return lexical_cast<::uint64_t>(str);
|
||||
diff --git a/base/application.h b/base/application.h
|
||||
index b799eaf..f071533 100644
|
||||
--- a/base/application.h
|
||||
+++ b/base/application.h
|
||||
@@ -19,7 +19,7 @@ namespace base {
|
||||
virtual ~command() {}
|
||||
|
||||
void die(std::string const &msg);
|
||||
- uint64_t parse_uint64(std::string const &str, std::string const &desc);
|
||||
+ uint64_t parse_uint64(char const *str, char const *desc);
|
||||
|
||||
|
||||
virtual void usage(std::ostream &out) const = 0;
|
||||
diff --git a/thin-provisioning/thin_dump.cc b/thin-provisioning/thin_dump.cc
|
||||
index 74cfa91..c0e73e6 100644
|
||||
--- a/thin-provisioning/thin_dump.cc
|
||||
+++ b/thin-provisioning/thin_dump.cc
|
||||
@@ -143,7 +143,6 @@ thin_dump_cmd::run(int argc, char **argv)
|
||||
int c;
|
||||
char const *output = NULL;
|
||||
const char shortopts[] = "hm::o:f:rV";
|
||||
- char *end_ptr;
|
||||
block_address metadata_snap = 0;
|
||||
::uint64_t dev_id;
|
||||
struct flags flags;
|
||||
@@ -181,13 +180,7 @@ thin_dump_cmd::run(int argc, char **argv)
|
||||
flags.use_metadata_snap = true;
|
||||
if (optarg) {
|
||||
// FIXME: deprecate this option
|
||||
- metadata_snap = strtoull(optarg, &end_ptr, 10);
|
||||
- if (end_ptr == optarg) {
|
||||
- cerr << "couldn't parse <metadata-snap>" << endl;
|
||||
- usage(cerr);
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
+ metadata_snap = parse_uint64(optarg, "metadata-snap");
|
||||
flags.snap_location = metadata_snap;
|
||||
}
|
||||
break;
|
||||
@@ -197,12 +190,7 @@ thin_dump_cmd::run(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 1:
|
||||
- dev_id = strtoull(optarg, &end_ptr, 10);
|
||||
- if (end_ptr == optarg) {
|
||||
- cerr << "couldn't parse <dev-id>\n";
|
||||
- usage(cerr);
|
||||
- return 1;
|
||||
- }
|
||||
+ dev_id = parse_uint64(optarg, "dev-id");
|
||||
flags.opts.select_dev(dev_id);
|
||||
break;
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From 1c50c406ddda77f4c0b20e7bf3cc985e84526f51 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 13:14:30 +0800
|
||||
Subject: [PATCH 09/10] [build] Remove unused sources from the regular build
|
||||
|
||||
---
|
||||
Makefile.in | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b1fd4aa..9b13001 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -96,10 +96,7 @@ SOURCE=\
|
||||
persistent-data/transaction_manager.cc \
|
||||
persistent-data/validators.cc \
|
||||
thin-provisioning/commands.cc \
|
||||
- thin-provisioning/cache_stream.cc \
|
||||
- thin-provisioning/chunk_stream.cc \
|
||||
thin-provisioning/device_tree.cc \
|
||||
- thin-provisioning/fixed_chunk_stream.cc \
|
||||
thin-provisioning/human_readable_format.cc \
|
||||
thin-provisioning/mapping_tree.cc \
|
||||
thin-provisioning/metadata.cc \
|
||||
@@ -107,7 +104,6 @@ SOURCE=\
|
||||
thin-provisioning/metadata_counter.cc \
|
||||
thin-provisioning/metadata_dumper.cc \
|
||||
thin-provisioning/override_emitter.cc \
|
||||
- thin-provisioning/pool_stream.cc \
|
||||
thin-provisioning/restore_emitter.cc \
|
||||
thin-provisioning/rmap_visitor.cc \
|
||||
thin-provisioning/superblock.cc \
|
||||
@@ -124,7 +120,11 @@ SOURCE=\
|
||||
thin-provisioning/xml_format.cc
|
||||
|
||||
DEVTOOLS_SOURCE=\
|
||||
+ thin-provisioning/cache_stream.cc \
|
||||
+ thin-provisioning/chunk_stream.cc \
|
||||
thin-provisioning/damage_generator.cc \
|
||||
+ thin-provisioning/fixed_chunk_stream.cc \
|
||||
+ thin-provisioning/pool_stream.cc \
|
||||
thin-provisioning/thin_journal.cc \
|
||||
thin-provisioning/thin_journal_check.cc \
|
||||
thin-provisioning/thin_ll_dump.cc \
|
||||
@@ -374,4 +374,3 @@ test: functional-test unit-test
|
||||
endif
|
||||
|
||||
-include $(DEPEND_FILES)
|
||||
-
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From 9e94a4349186f7353e0d7b536b46bfa4df2483d0 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Wed, 2 Jun 2021 14:59:29 +0800
|
||||
Subject: [PATCH 10/10] [all] Remove unreachable code
|
||||
|
||||
---
|
||||
block-cache/io_engine.cc | 3 ---
|
||||
caching/hint_array.cc | 6 ------
|
||||
2 files changed, 9 deletions(-)
|
||||
|
||||
diff --git a/block-cache/io_engine.cc b/block-cache/io_engine.cc
|
||||
index 2fe4082..0158723 100644
|
||||
--- a/block-cache/io_engine.cc
|
||||
+++ b/block-cache/io_engine.cc
|
||||
@@ -174,9 +174,6 @@ aio_engine::wait_(timespec *ts)
|
||||
cbs_.free(cb);
|
||||
return optional<wait_result>(make_pair(false, context));
|
||||
}
|
||||
-
|
||||
- // shouldn't get here
|
||||
- return optional<wait_result>(make_pair(false, 0));
|
||||
}
|
||||
|
||||
struct timespec
|
||||
diff --git a/caching/hint_array.cc b/caching/hint_array.cc
|
||||
index 6514968..e133c5c 100644
|
||||
--- a/caching/hint_array.cc
|
||||
+++ b/caching/hint_array.cc
|
||||
@@ -56,9 +56,6 @@ namespace {
|
||||
default:
|
||||
throw runtime_error("invalid hint width");
|
||||
}
|
||||
-
|
||||
- // never get here
|
||||
- return std::shared_ptr<array_base>();
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
@@ -93,9 +90,6 @@ namespace {
|
||||
default:
|
||||
throw runtime_error("invalid hint width");
|
||||
}
|
||||
-
|
||||
- // never get here
|
||||
- return std::shared_ptr<array_base>();
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 677fa789e4136dbdd589c1e65efc7cdaad7506ac Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Fri, 4 Jun 2021 21:37:02 +0800
|
||||
Subject: [PATCH 1/2] [file_utils] Fix resource leak
|
||||
|
||||
---
|
||||
base/file_utils.cc | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/base/file_utils.cc b/base/file_utils.cc
|
||||
index 8253660..e6095f7 100644
|
||||
--- a/base/file_utils.cc
|
||||
+++ b/base/file_utils.cc
|
||||
@@ -159,6 +159,7 @@ file_utils::zero_superblock(std::string const &path)
|
||||
free(buffer);
|
||||
throw runtime_error("couldn't zero superblock");
|
||||
}
|
||||
+ free(buffer);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
From 2e755c67064c0157e646acfa57fbcc738905f7d4 Mon Sep 17 00:00:00 2001
|
||||
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||
Date: Tue, 20 Oct 2020 15:18:06 +0800
|
||||
Subject: [PATCH 2/2] [thin_delta] Clean up duplicated code
|
||||
|
||||
---
|
||||
thin-provisioning/thin_delta.cc | 105 ++++++++++++----------------------------
|
||||
1 file changed, 31 insertions(+), 74 deletions(-)
|
||||
|
||||
diff --git a/thin-provisioning/thin_delta.cc b/thin-provisioning/thin_delta.cc
|
||||
index ee48dea..2ff3e69 100644
|
||||
--- a/thin-provisioning/thin_delta.cc
|
||||
+++ b/thin-provisioning/thin_delta.cc
|
||||
@@ -22,47 +22,7 @@ using namespace thin_provisioning;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
-namespace local {
|
||||
- class application {
|
||||
- public:
|
||||
- application(string const &cmd)
|
||||
- : cmd_(cmd) {
|
||||
- }
|
||||
-
|
||||
- void usage(ostream &out) {
|
||||
- out << "Usage: " << cmd_ << " [options] <device or file>\n"
|
||||
- << "Options:\n"
|
||||
- << " {--thin1, --snap1}\n"
|
||||
- << " {--thin2, --snap2}\n"
|
||||
- << " {-m, --metadata-snap} [block#]\n"
|
||||
- << " {--verbose}\n"
|
||||
- << " {-h|--help}\n"
|
||||
- << " {-V|--version}" << endl;
|
||||
- }
|
||||
-
|
||||
- void die(string const &msg) {
|
||||
- cerr << msg << endl;
|
||||
- usage(cerr);
|
||||
- exit(1);
|
||||
- }
|
||||
-
|
||||
- uint64_t parse_int(string const &str, string const &desc) {
|
||||
- try {
|
||||
- return boost::lexical_cast<uint64_t>(str);
|
||||
-
|
||||
- } catch (...) {
|
||||
- ostringstream out;
|
||||
- out << "Couldn't parse " << desc << ": '" << str << "'";
|
||||
- die(out.str());
|
||||
- }
|
||||
-
|
||||
- return 0; // never get here
|
||||
- }
|
||||
-
|
||||
- private:
|
||||
- string cmd_;
|
||||
- };
|
||||
-
|
||||
+namespace {
|
||||
struct flags {
|
||||
flags()
|
||||
: verbose(false),
|
||||
@@ -96,13 +56,6 @@ namespace local {
|
||||
uint64_t vbegin_, dbegin_, len_;
|
||||
};
|
||||
|
||||
- ostream &operator <<(ostream &out, mapping const &m) {
|
||||
- out << "mapping[vbegin = " << m.vbegin_
|
||||
- << ", dbegin = " << m.dbegin_
|
||||
- << ", len = " << m.len_ << "]";
|
||||
- return out;
|
||||
- }
|
||||
-
|
||||
//--------------------------------
|
||||
|
||||
template <typename Container>
|
||||
@@ -542,7 +495,7 @@ namespace local {
|
||||
out << "</diff>\n";
|
||||
}
|
||||
|
||||
- void delta_(application &app, flags const &fs) {
|
||||
+ void delta_(flags const &fs) {
|
||||
mapping_recorder mr1;
|
||||
mapping_recorder mr2;
|
||||
damage_visitor damage_v;
|
||||
@@ -560,7 +513,7 @@ namespace local {
|
||||
if (!snap1_root) {
|
||||
ostringstream out;
|
||||
out << "Unable to find mapping tree for snap1 (" << *fs.snap1 << ")";
|
||||
- app.die(out.str());
|
||||
+ throw std::runtime_error(out.str());
|
||||
}
|
||||
|
||||
single_mapping_tree snap1(*md->tm_, *snap1_root,
|
||||
@@ -572,7 +525,7 @@ namespace local {
|
||||
if (!snap2_root) {
|
||||
ostringstream out;
|
||||
out << "Unable to find mapping tree for snap2 (" << *fs.snap2 << ")";
|
||||
- app.die(out.str());
|
||||
+ throw std::runtime_error(out.str());
|
||||
}
|
||||
|
||||
single_mapping_tree snap2(*md->tm_, *snap2_root,
|
||||
@@ -609,12 +562,12 @@ namespace local {
|
||||
end_superblock(is);
|
||||
}
|
||||
|
||||
- int delta(application &app, flags const &fs) {
|
||||
+ int delta(flags const &fs) {
|
||||
try {
|
||||
- delta_(app, fs);
|
||||
+ delta_(fs);
|
||||
} catch (exception const &e) {
|
||||
- app.die(e.what());
|
||||
- return 1; // never get here
|
||||
+ cerr << e.what() << endl;
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -633,27 +586,31 @@ thin_delta_cmd::thin_delta_cmd()
|
||||
void
|
||||
thin_delta_cmd::usage(std::ostream &out) const
|
||||
{
|
||||
- // FIXME: finish
|
||||
+ out << "Usage: " << get_name() << " [options] <device or file>\n"
|
||||
+ << "Options:\n"
|
||||
+ << " {--thin1, --snap1}\n"
|
||||
+ << " {--thin2, --snap2}\n"
|
||||
+ << " {-m, --metadata-snap} [block#]\n"
|
||||
+ << " {--verbose}\n"
|
||||
+ << " {-h|--help}\n"
|
||||
+ << " {-V|--version}" << endl;
|
||||
}
|
||||
|
||||
int
|
||||
thin_delta_cmd::run(int argc, char **argv)
|
||||
{
|
||||
- using namespace local;
|
||||
-
|
||||
int c;
|
||||
flags fs;
|
||||
- local::application app(basename(argv[0]));
|
||||
|
||||
char const shortopts[] = "hVm::";
|
||||
option const longopts[] = {
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
+ { "metadata-snap", optional_argument, NULL, 'm' },
|
||||
{ "version", no_argument, NULL, 'V' },
|
||||
{ "thin1", required_argument, NULL, 1 },
|
||||
{ "snap1", required_argument, NULL, 1 },
|
||||
{ "thin2", required_argument, NULL, 2 },
|
||||
{ "snap2", required_argument, NULL, 2 },
|
||||
- { "metadata-snap", optional_argument, NULL, 'm' },
|
||||
{ "verbose", no_argument, NULL, 4 },
|
||||
{ NULL, no_argument, NULL, 0 }
|
||||
};
|
||||
@@ -661,25 +618,25 @@ thin_delta_cmd::run(int argc, char **argv)
|
||||
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
- app.usage(cout);
|
||||
+ usage(cout);
|
||||
return 0;
|
||||
|
||||
+ case 'm':
|
||||
+ fs.use_metadata_snap = true;
|
||||
+ if (optarg)
|
||||
+ fs.metadata_snap = parse_uint64(optarg, "metadata snapshot block");
|
||||
+ break;
|
||||
+
|
||||
case 'V':
|
||||
cout << THIN_PROVISIONING_TOOLS_VERSION << endl;
|
||||
return 0;
|
||||
|
||||
case 1:
|
||||
- fs.snap1 = app.parse_int(optarg, "thin id 1");
|
||||
+ fs.snap1 = parse_uint64(optarg, "thin id 1");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
- fs.snap2 = app.parse_int(optarg, "thin id 2");
|
||||
- break;
|
||||
-
|
||||
- case 'm':
|
||||
- fs.use_metadata_snap = true;
|
||||
- if (optarg)
|
||||
- fs.metadata_snap = app.parse_int(optarg, "metadata snapshot block");
|
||||
+ fs.snap2 = parse_uint64(optarg, "thin id 2");
|
||||
break;
|
||||
|
||||
case 4:
|
||||
@@ -687,23 +644,23 @@ thin_delta_cmd::run(int argc, char **argv)
|
||||
break;
|
||||
|
||||
default:
|
||||
- app.usage(cerr);
|
||||
+ usage(cerr);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (argc == optind)
|
||||
- app.die("No input device provided.");
|
||||
+ die("No input device provided.");
|
||||
else
|
||||
fs.dev = argv[optind];
|
||||
|
||||
if (!fs.snap1)
|
||||
- app.die("--snap1 not specified.");
|
||||
+ die("--snap1 not specified.");
|
||||
|
||||
if (!fs.snap2)
|
||||
- app.die("--snap2 not specified.");
|
||||
+ die("--snap2 not specified.");
|
||||
|
||||
- return delta(app, fs);
|
||||
+ return delta(fs);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index b1fd4aa..77c467d 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -173,7 +173,7 @@ CXXFLAGS+=@CXXDEBUG_FLAG@
|
||||
CXXFLAGS+=@CXX_STRERROR_FLAG@
|
||||
CXXFLAGS+=@LFS_FLAGS@
|
||||
INCLUDES+=-I$(TOP_BUILDDIR) -I$(TOP_DIR) -I$(TOP_DIR)/thin-provisioning
|
||||
-LIBS:=-laio -lexpat -lboost_iostreams -ldl
|
||||
+LIBS:=-laio -lexpat -ldl
|
||||
|
||||
ifeq ("@DEVTOOLS@", "yes")
|
||||
LIBS+=-lncurses
|
|
@ -0,0 +1,848 @@
|
|||
From 0a061474ee8f8183bded35a7c680739c9b75ad4b Mon Sep 17 00:00:00 2001
|
||||
From: Marian Csontos <mcsontos@redhat.com>
|
||||
Date: Mon, 28 Jun 2021 13:14:37 +0200
|
||||
Subject: [PATCH] cargo update
|
||||
|
||||
---
|
||||
Cargo.lock | 486 +++++++++++++++++++++++++++++++++----------------------------
|
||||
1 file changed, 264 insertions(+), 222 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index d42d598..9dc0b8a 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1,567 +1,609 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
[[package]]
|
||||
-name = "adler32"
|
||||
-version = "1.0.4"
|
||||
+name = "adler"
|
||||
+version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
-version = "0.7.10"
|
||||
+version = "0.7.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
|
||||
dependencies = [
|
||||
- "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
dependencies = [
|
||||
- "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
-version = "1.0.31"
|
||||
+version = "1.0.41"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "15af2628f6890fe2609a3b91bef4c83450512802e59489f9c1cb1fa5df064a61"
|
||||
|
||||
[[package]]
|
||||
name = "arrayvec"
|
||||
-version = "0.4.12"
|
||||
+version = "0.5.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-dependencies = [
|
||||
- "nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
-]
|
||||
+checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
- "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "hermit-abi",
|
||||
+ "libc",
|
||||
+ "winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
-version = "1.0.0"
|
||||
+version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
-version = "1.3.4"
|
||||
+version = "1.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
-version = "1.0.54"
|
||||
+version = "1.0.68"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "4a72c244c1ff497a746a7e1fb3d14bd08420ecda70c8f25c7112f2781652d787"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "cfg-if"
|
||||
+version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
-version = "0.1.9"
|
||||
+version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
-version = "2.33.1"
|
||||
+version = "2.33.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
|
||||
dependencies = [
|
||||
- "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "ansi_term",
|
||||
+ "atty",
|
||||
+ "bitflags",
|
||||
+ "strsim",
|
||||
+ "textwrap",
|
||||
+ "unicode-width",
|
||||
+ "vec_map",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc32c"
|
||||
-version = "0.4.0"
|
||||
+version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "210cdf933e6a81212bfabf90cd8762f471b5922e5f6b709547673ad8e04b9448"
|
||||
+dependencies = [
|
||||
+ "rustc_version",
|
||||
+]
|
||||
|
||||
[[package]]
|
||||
name = "crc32fast"
|
||||
-version = "1.2.0"
|
||||
+version = "1.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
|
||||
dependencies = [
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
||||
dependencies = [
|
||||
- "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "log",
|
||||
+ "regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fixedbitset"
|
||||
-version = "0.3.0"
|
||||
+version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "45e780567ed7abc415d12fd464571d265eb4a5710ddc97cdb1a31a4c35bb479d"
|
||||
|
||||
[[package]]
|
||||
name = "flate2"
|
||||
-version = "1.0.14"
|
||||
+version = "1.0.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0"
|
||||
dependencies = [
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
+ "crc32fast",
|
||||
+ "libc",
|
||||
+ "miniz_oxide",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
-version = "0.1.14"
|
||||
+version = "0.1.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce"
|
||||
dependencies = [
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
+ "libc",
|
||||
+ "wasi 0.9.0+wasi-snapshot-preview1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "hermit-abi"
|
||||
-version = "0.1.13"
|
||||
+name = "getrandom"
|
||||
+version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753"
|
||||
dependencies = [
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
+ "libc",
|
||||
+ "wasi 0.10.2+wasi-snapshot-preview1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "lazy_static"
|
||||
-version = "1.4.0"
|
||||
+name = "hermit-abi"
|
||||
+version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
+dependencies = [
|
||||
+ "libc",
|
||||
+]
|
||||
|
||||
[[package]]
|
||||
name = "lexical-core"
|
||||
-version = "0.6.7"
|
||||
+version = "0.7.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe"
|
||||
dependencies = [
|
||||
- "arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "arrayvec",
|
||||
+ "bitflags",
|
||||
+ "cfg-if 1.0.0",
|
||||
+ "ryu",
|
||||
+ "static_assertions",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.71"
|
||||
+version = "0.2.97"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "12b8adadd720df158f4d70dfe7ccc6adb0472d7c55ca83445f6a5ab3e36f8fb6"
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
-version = "0.4.8"
|
||||
+version = "0.4.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
|
||||
dependencies = [
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
-version = "2.3.3"
|
||||
+version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc"
|
||||
|
||||
[[package]]
|
||||
name = "miniz_oxide"
|
||||
-version = "0.3.6"
|
||||
+version = "0.4.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b"
|
||||
dependencies = [
|
||||
- "adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "adler",
|
||||
+ "autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
|
||||
dependencies = [
|
||||
- "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "bitflags",
|
||||
+ "cc",
|
||||
+ "cfg-if 0.1.10",
|
||||
+ "libc",
|
||||
+ "void",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
-name = "nodrop"
|
||||
-version = "0.1.14"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-
|
||||
-[[package]]
|
||||
name = "nom"
|
||||
-version = "5.1.1"
|
||||
+version = "5.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af"
|
||||
dependencies = [
|
||||
- "lexical-core 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "lexical-core",
|
||||
+ "memchr",
|
||||
+ "version_check",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-derive"
|
||||
-version = "0.3.0"
|
||||
+version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d"
|
||||
dependencies = [
|
||||
- "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "syn 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
-version = "0.2.11"
|
||||
+version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
|
||||
dependencies = [
|
||||
- "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
dependencies = [
|
||||
- "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "hermit-abi",
|
||||
+ "libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ppv-lite86"
|
||||
-version = "0.2.8"
|
||||
+version = "0.2.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
-version = "1.0.18"
|
||||
+version = "1.0.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f0d8caf72986c1a598726adc988bb5984792ef84f5ee5aa50209145ee8077038"
|
||||
dependencies = [
|
||||
- "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-xml"
|
||||
version = "0.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "3cc440ee4802a86e357165021e3e255a9143724da31db1e2ea540214c96a0f82"
|
||||
dependencies = [
|
||||
- "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quickcheck"
|
||||
version = "0.9.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
|
||||
dependencies = [
|
||||
- "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "env_logger",
|
||||
+ "log",
|
||||
+ "rand 0.7.3",
|
||||
+ "rand_core 0.5.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quickcheck_macros"
|
||||
version = "0.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "608c156fd8e97febc07dc9c2e2c80bf74cfc6ef26893eae3daf8bc2bc94a4b7f"
|
||||
dependencies = [
|
||||
- "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "syn 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
-version = "1.0.6"
|
||||
+version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
|
||||
dependencies = [
|
||||
- "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
||||
dependencies = [
|
||||
- "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "getrandom 0.1.16",
|
||||
+ "libc",
|
||||
+ "rand_chacha 0.2.2",
|
||||
+ "rand_core 0.5.1",
|
||||
+ "rand_hc 0.2.0",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand"
|
||||
+version = "0.8.4"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
|
||||
+dependencies = [
|
||||
+ "libc",
|
||||
+ "rand_chacha 0.3.1",
|
||||
+ "rand_core 0.6.3",
|
||||
+ "rand_hc 0.3.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
||||
dependencies = [
|
||||
- "ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "ppv-lite86",
|
||||
+ "rand_core 0.5.1",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_chacha"
|
||||
+version = "0.3.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
+dependencies = [
|
||||
+ "ppv-lite86",
|
||||
+ "rand_core 0.6.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
dependencies = [
|
||||
- "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "getrandom 0.1.16",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_core"
|
||||
+version = "0.6.3"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
|
||||
+dependencies = [
|
||||
+ "getrandom 0.2.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_hc"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
+dependencies = [
|
||||
+ "rand_core 0.5.1",
|
||||
+]
|
||||
+
|
||||
+[[package]]
|
||||
+name = "rand_hc"
|
||||
+version = "0.3.1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
|
||||
dependencies = [
|
||||
- "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "rand_core 0.6.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
-version = "0.1.56"
|
||||
+version = "0.2.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "5ab49abadf3f9e1c4bc499e8845e152ad87d2ad2d30371841171169e9d75feee"
|
||||
+dependencies = [
|
||||
+ "bitflags",
|
||||
+]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
-version = "1.3.9"
|
||||
+version = "1.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461"
|
||||
dependencies = [
|
||||
- "aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "aho-corasick",
|
||||
+ "memchr",
|
||||
+ "regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
-version = "0.6.18"
|
||||
+version = "0.6.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
|
||||
|
||||
[[package]]
|
||||
name = "remove_dir_all"
|
||||
version = "0.5.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
||||
dependencies = [
|
||||
- "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
dependencies = [
|
||||
- "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
- "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "static_assertions"
|
||||
-version = "0.3.4"
|
||||
+version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
|
||||
|
||||
[[package]]
|
||||
name = "strsim"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
-version = "1.0.30"
|
||||
+version = "1.0.73"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f71489ff30030d2ae598524f61326b902466f72a0fb1a8564c001cc63425bcc7"
|
||||
dependencies = [
|
||||
- "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "proc-macro2",
|
||||
+ "quote",
|
||||
+ "unicode-xid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
-version = "3.1.0"
|
||||
+version = "3.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22"
|
||||
dependencies = [
|
||||
- "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "cfg-if 1.0.0",
|
||||
+ "libc",
|
||||
+ "rand 0.8.4",
|
||||
+ "redox_syscall",
|
||||
+ "remove_dir_all",
|
||||
+ "winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "textwrap"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
dependencies = [
|
||||
- "unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "unicode-width",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thinp"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
- "anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "crc32c 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "fixedbitset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "nom 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "num-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quick-xml 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "quickcheck_macros 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
-name = "thread_local"
|
||||
-version = "1.0.1"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-dependencies = [
|
||||
- "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "anyhow",
|
||||
+ "byteorder",
|
||||
+ "clap",
|
||||
+ "crc32c",
|
||||
+ "fixedbitset",
|
||||
+ "flate2",
|
||||
+ "libc",
|
||||
+ "nix",
|
||||
+ "nom",
|
||||
+ "num-derive",
|
||||
+ "num-traits",
|
||||
+ "num_cpus",
|
||||
+ "quick-xml",
|
||||
+ "quickcheck",
|
||||
+ "quickcheck_macros",
|
||||
+ "rand 0.7.3",
|
||||
+ "tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-width"
|
||||
-version = "0.1.7"
|
||||
+version = "0.1.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-xid"
|
||||
-version = "0.2.0"
|
||||
+version = "0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
|
||||
|
||||
[[package]]
|
||||
name = "vec_map"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
-version = "0.9.2"
|
||||
+version = "0.9.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe"
|
||||
|
||||
[[package]]
|
||||
name = "void"
|
||||
version = "1.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
+
|
||||
+[[package]]
|
||||
+name = "wasi"
|
||||
+version = "0.10.2+wasi-snapshot-preview1"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
-version = "0.3.8"
|
||||
+version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
- "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
- "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "winapi-i686-pc-windows-gnu",
|
||||
+ "winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-
|
||||
-[metadata]
|
||||
-"checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2"
|
||||
-"checksum aho-corasick 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada"
|
||||
-"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
|
||||
-"checksum anyhow 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f"
|
||||
-"checksum arrayvec 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9"
|
||||
-"checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
-"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
|
||||
-"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
|
||||
-"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
|
||||
-"checksum cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311"
|
||||
-"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33"
|
||||
-"checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129"
|
||||
-"checksum crc32c 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "77ba37ef26c12988c1cee882d522d65e1d5d2ad8c3864665b88ee92767ed84c5"
|
||||
-"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
|
||||
-"checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
|
||||
-"checksum fixedbitset 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2fc4fcacf5cd3681968f6524ea159383132937739c6c40dabab9e37ed515911b"
|
||||
-"checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42"
|
||||
-"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
|
||||
-"checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71"
|
||||
-"checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
-"checksum lexical-core 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f86d66d380c9c5a685aaac7a11818bdfa1f733198dfd9ec09c70b762cd12ad6f"
|
||||
-"checksum libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)" = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
|
||||
-"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
|
||||
-"checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
|
||||
-"checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5"
|
||||
-"checksum nix 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
|
||||
-"checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
|
||||
-"checksum nom 5.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6"
|
||||
-"checksum num-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c8b15b261814f992e33760b1fca9fe8b693d8a65299f20c9901688636cfb746"
|
||||
-"checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096"
|
||||
-"checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
|
||||
-"checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea"
|
||||
-"checksum proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa"
|
||||
-"checksum quick-xml 0.18.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3cc440ee4802a86e357165021e3e255a9143724da31db1e2ea540214c96a0f82"
|
||||
-"checksum quickcheck 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
|
||||
-"checksum quickcheck_macros 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "608c156fd8e97febc07dc9c2e2c80bf74cfc6ef26893eae3daf8bc2bc94a4b7f"
|
||||
-"checksum quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea"
|
||||
-"checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
|
||||
-"checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
|
||||
-"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
|
||||
-"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
|
||||
-"checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84"
|
||||
-"checksum regex 1.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
|
||||
-"checksum regex-syntax 0.6.18 (registry+https://github.com/rust-lang/crates.io-index)" = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
|
||||
-"checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
|
||||
-"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
-"checksum ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e"
|
||||
-"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
-"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
-"checksum static_assertions 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3"
|
||||
-"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
|
||||
-"checksum syn 1.0.30 (registry+https://github.com/rust-lang/crates.io-index)" = "93a56fabc59dce20fe48b6c832cc249c713e7ed88fa28b0ee0a3bfcaae5fe4e2"
|
||||
-"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
|
||||
-"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
|
||||
-"checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
|
||||
-"checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479"
|
||||
-"checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
|
||||
-"checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
|
||||
-"checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
|
||||
-"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
|
||||
-"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
||||
-"checksum winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6"
|
||||
-"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
-"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
# Packaging dmpd
|
||||
|
||||
This is mostly regular package except recent addition of rust to used languages.
|
||||
|
||||
## rust-tools
|
||||
|
||||
To build the rust-tools (`make rust-tools`) one needs:
|
||||
|
||||
- rust >= 1.35
|
||||
- cargo with vendor subcommand (now upstream, included in latest Fedora and RHEL8)
|
||||
|
||||
### cargo vendpr
|
||||
|
||||
- run `cargo vendor` in the disrectory with sources
|
||||
- run `tar czf device-mapper-persistent-data-vendor-$VERSION.tar.gz ./vendor`
|
||||
- copy the file (if version changed) and run the *fedpkg new-sources* command:
|
||||
- `fedpkg new-sources v$VERSION.tar.gz device-mapper-persistent-data-vendor-$VERSION.tar.gz`
|
||||
|
||||
## TODO/NOTES
|
||||
|
||||
Some of the dependencies may be already packaged by Fedora. Can we instruct *cargo vendor* to include only those which are not provided by Fedora?
|
||||
|
||||
*%cargo_install* installs by defualt in */usr/bin* but the package expects */usr/sbin*. For now I run *make install-rust-tools*.
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
diff --git a/man8/thin_dump.8 b/man8/thin_dump.8
|
||||
index b26cc2c..4827e1a 100644
|
||||
--- a/man8/thin_dump.8
|
||||
+++ b/man8/thin_dump.8
|
||||
@@ -5,30 +5,37 @@ thin_dump \- dump thin provisioning metadata from device or file to standard out
|
||||
.SH SYNOPSIS
|
||||
.B thin_dump
|
||||
.RB [options]
|
||||
-.I {metadata device|file}
|
||||
+.I {device|file}
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B thin_dump
|
||||
dumps binary thin provisioning metadata (optionally from alternate block;
|
||||
see option \-\-metadata-snap) created by the device-mapper
|
||||
-thin provisioning target on a device or file to standard output for
|
||||
+thin provisioning target on a
|
||||
+.I device
|
||||
+or
|
||||
+.I file
|
||||
+to standard output for
|
||||
analysis or postprocessing in either XML or human readable format.
|
||||
XML formated metadata can be fed into thin_restore (see
|
||||
.BR thin_restore(8) )
|
||||
-in order to put it back onto a metadata device (to process by
|
||||
-the device-mapper target) or file.
|
||||
+in order to put it back onto a metadata
|
||||
+.I device
|
||||
+(to process by the device-mapper target) or
|
||||
+.I file.
|
||||
|
||||
.IP "\fB\-f, \-\-format\fP \fI{xml|human_readable}\fP".
|
||||
Print output in XML or human readable format.
|
||||
|
||||
.IP "\fB\-r, \-\-repair\fP".
|
||||
+Repair the metadata whilst dumping it.
|
||||
|
||||
.IP "\fB\-m, \-\-metadata_snap\fP [block#]".
|
||||
Dump metadata snapshot created by device-mapper thin provisioning target.
|
||||
If block is not provided, access the default metadata snapshot created by
|
||||
the thin provisioning device-mapper target, else try the one at block#.
|
||||
See the thin provisioning target documentation on how to create or release
|
||||
-a metadata snapshot.
|
||||
+a metadata snapshot and retrieve the block number from the kernel.
|
||||
|
||||
.IP "\fB\-h, \-\-help\fP".
|
||||
Print help and exit.
|
||||
diff --git a/man8/thin_metadata_size.8 b/man8/thin_metadata_size.8
|
||||
index 6b00e73..80e572f 100644
|
||||
--- a/man8/thin_metadata_size.8
|
||||
+++ b/man8/thin_metadata_size.8
|
||||
@@ -27,7 +27,7 @@ Default is in sectors without a pool size unit specifier.
|
||||
.IP "\fB\-m, \-\-max-thins\fP \fI#[bskKmMgGtTpPeEzZyY]\fP"
|
||||
Maximum sum of all thin provisioned devices and snapshots.
|
||||
Unit identifier supported to allow for convenient entry of large quantities, eg. 1000000 = 1M.
|
||||
-Default is absolut quantity without a number unit specifier.
|
||||
+Default is absolute quantity without a number unit specifier.
|
||||
|
||||
.IP "\fB\-u, \-\-unit\fP \fI{bskKmMgGtTpPeEzZyY}\fP"
|
||||
Output unit specifier in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
||||
@@ -43,7 +43,7 @@ Print help and exit.
|
||||
Output version information and exit.
|
||||
|
||||
.SH EXAMPLES
|
||||
-Calculates the thin privisioning metadata device size for block size 64 kilobytes,
|
||||
+Calculates the thin provisioning metadata device size for block size 64 kilobytes,
|
||||
pool size 1 terabytes and maximum number of thin provisioned devices and snapshots of 1000
|
||||
in units of sectors with long output:
|
||||
.sp
|
||||
diff --git a/man8/thin_repair.8 b/man8/thin_repair.8
|
||||
index 69cddea..1048de5 100644
|
||||
--- a/man8/thin_repair.8
|
||||
+++ b/man8/thin_repair.8
|
||||
@@ -12,9 +12,18 @@ thin_repair \- repair thin provisioning binary metadata from device/file to devi
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B thin_repair
|
||||
-repairs binary thin provisioning metadata created by the
|
||||
-respective device-mapper target processing to another device or file.
|
||||
-If repaired to a metadata device, the metadata can be processed
|
||||
+reads binary thin provisioning metadata created by the
|
||||
+respective device-mapper target from one
|
||||
+.I device
|
||||
+or
|
||||
+.I file
|
||||
+, repairs it and writes it to another
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+If written to a metadata
|
||||
+.I device
|
||||
+, the metadata can be processed
|
||||
by the device-mapper target.
|
||||
|
||||
.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
@@ -30,10 +39,10 @@ Print help and exit.
|
||||
Output version information and exit.
|
||||
|
||||
.SH EXAMPLE
|
||||
-Repairs the binary thin provisioning metadata on file
|
||||
+Reads the binary thin provisioning metadata from file
|
||||
.B metadata
|
||||
-to logical volume /dev/vg/metadata for further processing by the
|
||||
-respective device-mapper target:
|
||||
+, repairs it and writes it to logical volume /dev/vg/metadata
|
||||
+for further processing by the respective device-mapper target:
|
||||
.sp
|
||||
.B thin_repair -i metadata -o /dev/vg/metadata
|
||||
|
||||
diff --git a/man8/thin_restore.8 b/man8/thin_restore.8
|
||||
index 8ab2976..dc7eb90 100644
|
||||
--- a/man8/thin_restore.8
|
||||
+++ b/man8/thin_restore.8
|
||||
@@ -15,9 +15,14 @@ thin_restore \- restore thin provisioning metadata file to device or file
|
||||
restores thin provisioning metadata created by the
|
||||
respective device-mapper target dumped into an XML formatted (see
|
||||
.BR thin_dump(8) )
|
||||
-file, which optionally can be preprocessed to another device or file.
|
||||
-If restored to a metadata device, the metadata can be processed
|
||||
-by the device-mapper target.
|
||||
+.I file
|
||||
+, which optionally can be preprocessed before the restore to another
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+If restored to a metadata
|
||||
+.I device
|
||||
+, the metadata can be processed by the device-mapper target.
|
||||
|
||||
.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
Input file or device with metadata.
|
||||
diff --git a/man8/thin_rmap.8 b/man8/thin_rmap.8
|
||||
index d68defb..4d74520 100644
|
||||
--- a/man8/thin_rmap.8
|
||||
+++ b/man8/thin_rmap.8
|
||||
@@ -1,16 +1,20 @@
|
||||
.TH THIN_DUMP 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
.SH NAME
|
||||
-thin_rmap \- output reverse map of a thin provisioned region of blocks
|
||||
+thin_rmap \- output reverse map of a thin provisioned region of blocks from metadata device or file
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B thin_rmap
|
||||
.RB [options]
|
||||
-.I {metadata device|file}
|
||||
+.I {device|file}
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B thin_rmap
|
||||
-outputs the reverse mapping for a region of thin provisioned pool blocks
|
||||
-to the respective thin provisioned devices.
|
||||
+outputs the reverse mapping stored in the metadata on a
|
||||
+.I device
|
||||
+or
|
||||
+.I file
|
||||
+between a region of thin provisioned pool blocks
|
||||
+and the associated thin provisioned devices.
|
||||
|
||||
.IP "\fB\\-\-region\fP \fI<block range>\fP".
|
||||
output reverse map
|
|
@ -1,281 +0,0 @@
|
|||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 1e7bd54..b44cbd7 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -264,7 +264,10 @@ install: $(PROGRAMS)
|
||||
$(INSTALL_DIR) $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/thin_rmap.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/thin_metadata_size.8 $(MANPATH)/man8
|
||||
|
||||
.PHONY: install
|
||||
|
||||
diff --git a/man8/thin_check.8 b/man8/thin_check.8
|
||||
index f9606e0..1489078 100644
|
||||
--- a/man8/thin_check.8
|
||||
+++ b/man8/thin_check.8
|
||||
@@ -55,7 +55,10 @@ returns an exit code of 0 for success or 1 for error.
|
||||
|
||||
.SH SEE ALSO
|
||||
.B thin_dump(8)
|
||||
+.B thin_repair(8)
|
||||
.B thin_restore(8)
|
||||
+.B thin_rmap(8)
|
||||
+.B thin_metadata_size(8)
|
||||
|
||||
.SH AUTHOR
|
||||
Joe Thornber <ejt@redhat.com>
|
||||
diff --git a/man8/thin_dump.8 b/man8/thin_dump.8
|
||||
index 697df83..e60a6e5 100644
|
||||
--- a/man8/thin_dump.8
|
||||
+++ b/man8/thin_dump.8
|
||||
@@ -9,7 +9,8 @@ thin_dump \- dump thin provisioning metadata from device or file to standard out
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B thin_dump
|
||||
-dumps thin provisioning metadata created by the device-mapper
|
||||
+dumps binary thin provisioning metadata (optionally from alternate block;
|
||||
+see option \-\-metadata-snap) created by the device-mapper
|
||||
thin provisioning target on a device or file to standard output for
|
||||
analysis or postprocessing in either XML or human readable format.
|
||||
XML formated metadata can be fed into thin_restore (see
|
||||
@@ -22,6 +23,10 @@ Print output in XML or human readable format.
|
||||
|
||||
.IP "\fB\-r, \-\-repair\fP".
|
||||
|
||||
+.IP "\fB\-m, \-\-metadata_snap\fP block#".
|
||||
+Dump metadata snapshot created by device-mapper thin provisioning target at block#
|
||||
+
|
||||
+
|
||||
.IP "\fB\-h, \-\-help\fP".
|
||||
Print help and exit.
|
||||
|
||||
@@ -45,8 +50,10 @@ returns an exit code of 0 for success or 1 for error.
|
||||
|
||||
.SH SEE ALSO
|
||||
.B thin_check(8)
|
||||
+.B thin_repair(8)
|
||||
.B thin_restore(8)
|
||||
-
|
||||
+.B thin_rmap(8)
|
||||
+.B thin_metadata_size(8)
|
||||
.SH AUTHOR
|
||||
Joe Thornber <ejt@redhat.com>
|
||||
.br
|
||||
diff --git a/man8/thin_metadata_size.8 b/man8/thin_metadata_size.8
|
||||
new file mode 100644
|
||||
index 0000000..33b36b3
|
||||
--- /dev/null
|
||||
+++ b/man8/thin_metadata_size.8
|
||||
@@ -0,0 +1,77 @@
|
||||
+.TH THIN_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+thin_metadata_size \- thin provisioning metadata file/device size calculator.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B thin_metadata_size
|
||||
+.RB [ options ]
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B thin_metadata_size
|
||||
+calculates the size of the thin provisioning metadata based on the block size
|
||||
+of the thin provisioned devices, the size of the thin provisioning pool and
|
||||
+the maximum number of all thin prisioned devices and snapshots. Size/number
|
||||
+option arguments can be followed by unit specifiers in short one character
|
||||
+and long form (eg. -b1m or -b1megabytes).
|
||||
+
|
||||
+.IP "\fB\-b, \-\-block-size\fP \fIBLOCKSIZE[bskKmMgGtTpPeEzZyY]\fP"
|
||||
+Block size of thin provisioned devices in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
||||
+Default is in sectors without a block size unit specifier.
|
||||
+
|
||||
+.IP "\fB\-s, \-\-pool-size\fP \fIPOOLSIZE[bskKmMgGtTpPeEzZyY]\fP"
|
||||
+Thin provisioning pool size in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
||||
+Default is in sectors without a pool size unit specifier.
|
||||
+
|
||||
+.IP "\fB\-m, \-\-max-thins\fP \fI#[bskKmMgGtTpPeEzZyY]\fP"
|
||||
+Maximum sum of all thin provisioned devices and snapshots.
|
||||
+Unit identifier supported to allow for convenient entry of large quantities, eg. 1000000 = 1M.
|
||||
+Default is absolut quantity without a number unit specifier.
|
||||
+
|
||||
+.IP "\fB\-u, \-\-unit\fP \fI{bskKmMgGtTpPeEzZyY}\fP"
|
||||
+Output unit specifier in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
||||
+Default is in sectors without an output unit specifier.
|
||||
+
|
||||
+.IP "\fB\-n, \-\-numeric-only [short|long]\fP"
|
||||
+Limit output to just the size number with the optional unit specifier character/string.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLES
|
||||
+Calculates the thin privisioning metadata device size for block size 64 kilobytes,
|
||||
+pool size 1 terabytes and maximum number of thin provisioned devices and snapshots of 1000
|
||||
+in units of sectors with long output:
|
||||
+.sp
|
||||
+.B thin_metadata_size -b64k -s1t -m1000
|
||||
+
|
||||
+Or (using the long options instead) for block size 1 gigabyte, pool size 1 petabytes and maximum number of thin provisioned devices
|
||||
+and snapshots of 1 million with numeric only output in units of gigabytes:
|
||||
+.sp
|
||||
+.B thin_metadata_size --block-size=1g --pool-size=1p --max-thins=1M --unit=g --numeric-only
|
||||
+
|
||||
+Same as before (1g,1p,1M,numeric-only) but with unit specifier character appended:
|
||||
+.sp
|
||||
+.B thin_metadata_size --block-size=1giga --pool-size=1petabytes --max-thins=1mebi --unit=g --numeric-only=short
|
||||
+
|
||||
+Or with unit specifier string appended:
|
||||
+.sp
|
||||
+.B thin_metadata_size --block-size=1giga --pool-size=1petabytes --max-thins=1mebi --unit=g -nlong
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B thin_metadata_size
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B thin_dump(8)
|
||||
+.B thin_check(8)
|
||||
+.B thin_repair(8)
|
||||
+.B thin_restore(8)
|
||||
+.B thin_rmap(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
diff --git a/man8/thin_repair.8 b/man8/thin_repair.8
|
||||
new file mode 100644
|
||||
index 0000000..69cddea
|
||||
--- /dev/null
|
||||
+++ b/man8/thin_repair.8
|
||||
@@ -0,0 +1,54 @@
|
||||
+.TH THIN_REPAIR 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+thin_repair \- repair thin provisioning binary metadata from device/file to device/file
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B thin_repair
|
||||
+.RB [ options ]
|
||||
+.RB -i
|
||||
+.I {device|file}
|
||||
+.RB -o
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B thin_repair
|
||||
+repairs binary thin provisioning metadata created by the
|
||||
+respective device-mapper target processing to another device or file.
|
||||
+If repaired to a metadata device, the metadata can be processed
|
||||
+by the device-mapper target.
|
||||
+
|
||||
+.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
+Input file or device with binary metadata.
|
||||
+
|
||||
+.IP "\fB\-o, \-\-output\fP \fI{device|file}\fP"
|
||||
+Output file or device for repaired binary metadata.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLE
|
||||
+Repairs the binary thin provisioning metadata on file
|
||||
+.B metadata
|
||||
+to logical volume /dev/vg/metadata for further processing by the
|
||||
+respective device-mapper target:
|
||||
+.sp
|
||||
+.B thin_repair -i metadata -o /dev/vg/metadata
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B thin_repair
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B thin_dump(8)
|
||||
+.B thin_check(8)
|
||||
+.B thin_restore(8)
|
||||
+.B thin_rmap(8)
|
||||
+.B thin_metadata_size(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
diff --git a/man8/thin_restore.8 b/man8/thin_restore.8
|
||||
index b4a07aa..8ab2976 100644
|
||||
--- a/man8/thin_restore.8
|
||||
+++ b/man8/thin_restore.8
|
||||
@@ -40,12 +40,15 @@ respective device-mapper target:
|
||||
.B thin_restore -i metadata -o /dev/vg/metadata
|
||||
|
||||
.SH DIAGNOSTICS
|
||||
-.B thin_dump
|
||||
+.B thin_restore
|
||||
returns an exit code of 0 for success or 1 for error.
|
||||
|
||||
.SH SEE ALSO
|
||||
.B thin_dump(8)
|
||||
.B thin_check(8)
|
||||
+.B thin_repair(8)
|
||||
+.B thin_rmap(8)
|
||||
+.B thin_metadata_size(8)
|
||||
|
||||
.SH AUTHOR
|
||||
Joe Thornber <ejt@redhat.com>
|
||||
diff --git a/man8/thin_rmap.8 b/man8/thin_rmap.8
|
||||
new file mode 100644
|
||||
index 0000000..d68defb
|
||||
--- /dev/null
|
||||
+++ b/man8/thin_rmap.8
|
||||
@@ -0,0 +1,44 @@
|
||||
+.TH THIN_DUMP 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+thin_rmap \- output reverse map of a thin provisioned region of blocks
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B thin_rmap
|
||||
+.RB [options]
|
||||
+.I {metadata device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B thin_rmap
|
||||
+outputs the reverse mapping for a region of thin provisioned pool blocks
|
||||
+to the respective thin provisioned devices.
|
||||
+
|
||||
+.IP "\fB\\-\-region\fP \fI<block range>\fP".
|
||||
+output reverse map
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP".
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP".
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLES
|
||||
+output reverse map for pool blocks 5..45 (denotes blocks 5 to 44 inclusive, but not block 45)
|
||||
+
|
||||
+.sp
|
||||
+.B thin_rmap -r 5..45 /dev/vg/pool
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B thin_rmap
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B thin_check(8)
|
||||
+.B thin_dump(8)
|
||||
+.B thin_repair(8)
|
||||
+.B thin_restore(8)
|
||||
+.B thin_metadata_size(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
|
@ -1,494 +0,0 @@
|
|||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a82ff67..1e7bd54 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -24,7 +24,8 @@ PROGRAMS=\
|
||||
thin_dump \
|
||||
thin_restore \
|
||||
thin_repair \
|
||||
- thin_rmap
|
||||
+ thin_rmap \
|
||||
+ thin_metadata_size
|
||||
|
||||
all: $(PROGRAMS)
|
||||
|
||||
@@ -64,7 +65,7 @@ SOURCE=\
|
||||
|
||||
PDATA_OBJECTS=$(subst .cc,.o,$(SOURCE))
|
||||
|
||||
-PROGRAM_SOURCE=\
|
||||
+CXX_PROGRAM_SOURCE=\
|
||||
cache/check.cc \
|
||||
\
|
||||
thin-provisioning/thin_check.cc \
|
||||
@@ -73,10 +74,15 @@ PROGRAM_SOURCE=\
|
||||
thin-provisioning/thin_repair.cc \
|
||||
thin-provisioning/thin_rmap.cc
|
||||
|
||||
+C_PROGRAM_SOURCE=\
|
||||
+ thin-provisioning/thin_metadata_size.c
|
||||
+
|
||||
+CC:=@CC@
|
||||
CXX:=@CXX@
|
||||
OBJECTS:=$(subst .cc,.o,$(SOURCE))
|
||||
TOP_DIR:=@top_srcdir@
|
||||
TOP_BUILDDIR:=@top_builddir@
|
||||
+CFLAGS+=-g -Wall -O3
|
||||
CXXFLAGS+=-std=c++11 -g -Wall -fno-strict-aliasing
|
||||
CXXFLAGS+=@CXXOPTIMISE_FLAG@
|
||||
CXXFLAGS+=@CXXDEBUG_FLAG@
|
||||
@@ -104,6 +110,14 @@ endif
|
||||
|
||||
.SUFFIXES: .d
|
||||
|
||||
+%.o: %.c
|
||||
+ @echo " [CC] $<"
|
||||
+ $(V) $(CC) -c $(INCLUDES) $(CFLAGS) -o $@ $<
|
||||
+ @echo " [DEP] $<"
|
||||
+ $(V) $(CC) -MM -MT $(subst .c,.o,$<) $(INCLUDES) $(CFLAGS) $< > $*.$$$$; \
|
||||
+ sed 's,\([^ :]*\)\.o[ :]*,\1.o \1.gmo $* : Makefile ,g' < $*.$$$$ > $*.d; \
|
||||
+ $(RM) $*.$$$$
|
||||
+
|
||||
%.o: %.cc
|
||||
@echo " [CXX] $<"
|
||||
$(V) $(CXX) -c $(INCLUDES) $(CXXFLAGS) -o $@ $<
|
||||
@@ -195,6 +209,10 @@ thin_rmap: $(THIN_RMAP_OBJECTS) thin-provisioning/thin_rmap.o
|
||||
@echo " [LD] $@"
|
||||
$(V) $(CXX) $(CXXFLAGS) -o $@ $+ $(LIBS)
|
||||
|
||||
+thin_metadata_size: thin-provisioning/thin_metadata_size.o
|
||||
+ @echo " [LD] $@"
|
||||
+ $(V) $(CC) $(CFLAGS) -o $@ $+ -lm
|
||||
+
|
||||
#----------------------------------------------------------------
|
||||
# Cache tools
|
||||
|
||||
@@ -221,29 +239,33 @@ cache_check: $(CACHE_CHECK_OBJECTS) cache/check.o
|
||||
DEPEND_FILES=\
|
||||
$(subst .cc,.d,$(SOURCE)) \
|
||||
$(subst .cc,.d,$(TEST_SOURCE)) \
|
||||
- $(subst .cc,.d,$(PROGRAM_SOURCE))
|
||||
+ $(subst .cc,.d,$(CXX_PROGRAM_SOURCE)) \
|
||||
+ $(subst .c,.d,$(C_PROGRAM_SOURCE))
|
||||
|
||||
.PHONY: clean distclean
|
||||
|
||||
clean:
|
||||
find . -name \*.o -delete
|
||||
find . -name \*.gmo -delete
|
||||
- $(RM) $(DEPEND_FILES) $(TEST_PROGRAMS) $(PROGRAMS) $(GMOCK_OBJECTS) lib/*.a
|
||||
+ find . -name \*.d -delete
|
||||
+ $(RM) $(TEST_PROGRAMS) $(PROGRAMS) $(GMOCK_OBJECTS) lib/*.a
|
||||
|
||||
distclean: clean
|
||||
$(RM) config.cache config.log config.status configure.h version.h Makefile unit-tests/Makefile
|
||||
|
||||
install: $(PROGRAMS)
|
||||
$(INSTALL_DIR) $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) thin_check $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) thin_dump $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) thin_repair $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) thin_restore $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) thin_rmap $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_check $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_dump $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_repair $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_restore $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_rmap $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_metadata_size $(BINDIR)
|
||||
$(INSTALL_DIR) $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_restore.8 $(MANPATH)/man8
|
||||
+
|
||||
.PHONY: install
|
||||
|
||||
ifeq ("@TESTING@", "yes")
|
||||
diff --git a/configure.in b/configure.in
|
||||
index 78d88c1..8f25002 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -30,6 +30,7 @@ dnl -- Setup the directory where autoconf has auxilary files
|
||||
AC_CONFIG_AUX_DIR(autoconf)
|
||||
AC_CANONICAL_TARGET([])
|
||||
AC_PROG_CXX([g++])
|
||||
+AC_PROG_CC([gcc])
|
||||
AC_LANG(C++)
|
||||
|
||||
################################################################
|
||||
diff --git a/thin-provisioning/thin_metadata_size.c b/thin-provisioning/thin_metadata_size.c
|
||||
new file mode 100755
|
||||
index 0000000..1f52d51
|
||||
--- /dev/null
|
||||
+++ b/thin-provisioning/thin_metadata_size.c
|
||||
@@ -0,0 +1,370 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2013 Red Hat, GmbH
|
||||
+ *
|
||||
+ * Calculates device-mapper thin privisioning
|
||||
+ * metadata device size based on pool, block size and
|
||||
+ * maximum expected thin provisioned devices and snapshots.
|
||||
+ *
|
||||
+ * This file is part of the thin-provisioning-tools source.
|
||||
+ *
|
||||
+ * thin-provisioning-tools is free software: you can redistribute it
|
||||
+ * and/or modify it under the terms of the GNU General Public License
|
||||
+ * as published by the Free Software Foundation, either version 3 of
|
||||
+ * the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * thin-provisioning-tools is distributed in the hope that it will be
|
||||
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along
|
||||
+ * with thin-provisioning-tools. If not, see
|
||||
+ * <http://www.gnu.org/licenses/>.
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <getopt.h>
|
||||
+#include <libgen.h>
|
||||
+#include <math.h>
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+#include "version.h"
|
||||
+
|
||||
+#include <search.h>
|
||||
+
|
||||
+/*----------------------------------------------------------------*/
|
||||
+
|
||||
+enum numeric_options { BLOCKSIZE, POOLSIZE, MAXTHINS, NUMERIC, OPT_END};
|
||||
+enum return_units { RETURN_BYTES, RETURN_SECTORS };
|
||||
+enum numeric_type { NO_NUMBER, NUMBER, NUMBER_SHORT, NUMBER_LONG };
|
||||
+typedef unsigned bool;
|
||||
+enum bool_value { false = 0, true = 1};
|
||||
+struct global {
|
||||
+ char *prg; /* program name */
|
||||
+
|
||||
+ /* Unit representations in characters, strings and numeric factors. */
|
||||
+ struct {
|
||||
+ char *chars;
|
||||
+ char **strings;
|
||||
+ unsigned long long *factors;
|
||||
+ } unit;
|
||||
+
|
||||
+ /* Command line option properties. */
|
||||
+ struct options {
|
||||
+ unsigned unit_idx;
|
||||
+ char *s[OPT_END];
|
||||
+ unsigned long long n[OPT_END];
|
||||
+ } options;
|
||||
+};
|
||||
+
|
||||
+static void exit_prg(struct global *g, int ret)
|
||||
+{
|
||||
+ if (g) {
|
||||
+ unsigned u = OPT_END;
|
||||
+
|
||||
+ while (u--) {
|
||||
+ if (g->options.s[u])
|
||||
+ free (g->options.s[u]);
|
||||
+ }
|
||||
+
|
||||
+ free(g);
|
||||
+ }
|
||||
+
|
||||
+ exit(ret);
|
||||
+}
|
||||
+
|
||||
+static void abort_prg(struct global *g, const char *msg)
|
||||
+{
|
||||
+ fprintf(stderr, "%s - %s\n", g ? g->prg : "fatal", msg);
|
||||
+ exit_prg(g, 1);
|
||||
+}
|
||||
+
|
||||
+static int unit_index(struct global *g, char *unit_string)
|
||||
+{
|
||||
+ unsigned len;
|
||||
+
|
||||
+ if (!unit_string)
|
||||
+ return unit_index(g, "sectors");
|
||||
+
|
||||
+ len = strlen(unit_string);
|
||||
+ if (len == 1) {
|
||||
+ char *o = strchr(g->unit.chars, *unit_string);
|
||||
+
|
||||
+ if (o)
|
||||
+ return o - g->unit.chars;
|
||||
+
|
||||
+ } else {
|
||||
+ char **s;
|
||||
+
|
||||
+ for (s = g->unit.strings; *s; s++)
|
||||
+ if (!strncmp(*s, unit_string, len))
|
||||
+ return s - g->unit.strings;
|
||||
+ }
|
||||
+
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
|
||||
+static struct global *init_prg(char *prg_path)
|
||||
+{
|
||||
+ unsigned u;
|
||||
+ static char *unit_chars = "bskKmMgGtTpPeEzZyY";
|
||||
+ static char *unit_strings[] = { "bytes", "sectors",
|
||||
+ "kilobytes", "kibibytes", "megabytes", "mebibytes",
|
||||
+ "gigabytes", "gibibytes", "terabytes", "tebibytes",
|
||||
+ "petabytes", "pebibytes", "exabytes", "ebibytes",
|
||||
+ "zetabytes", "zebibytes", "yottabytes", "yobibytes", NULL };
|
||||
+ static unsigned long long unit_factors[ARRAY_SIZE(unit_strings) - 1] = { 1, 512, 1024, 1000 };
|
||||
+ struct global *r = malloc(sizeof(*r));
|
||||
+
|
||||
+ if (!r)
|
||||
+ abort_prg(r, "failed to allocate global context!");
|
||||
+
|
||||
+ memset(r, 0, sizeof(*r));
|
||||
+
|
||||
+ for (u = 4; unit_strings[u]; u += 2) {
|
||||
+ unit_factors[u] = unit_factors[u-2] * unit_factors[2];
|
||||
+ unit_factors[u+1] = unit_factors[u-1] * unit_factors[3];
|
||||
+ }
|
||||
+
|
||||
+ r->prg = basename(prg_path);
|
||||
+ r->unit.chars = unit_chars;
|
||||
+ r->unit.strings = unit_strings;
|
||||
+ r->unit.factors = unit_factors;
|
||||
+ r->options.unit_idx = unit_index(r, NULL);
|
||||
+
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static unsigned long long bytes_per_sector(struct global *g)
|
||||
+{
|
||||
+ return g->unit.factors[unit_index(g, "sectors")];
|
||||
+}
|
||||
+
|
||||
+static void check_opts(struct global *g)
|
||||
+{
|
||||
+ struct options *o = &g->options;
|
||||
+
|
||||
+ if (!o->n[BLOCKSIZE])
|
||||
+ abort_prg(g, "block size required!");
|
||||
+ else if (!o->n[POOLSIZE])
|
||||
+ abort_prg(g, "pool size required!");
|
||||
+ else if (!o->n[MAXTHINS])
|
||||
+ abort_prg(g, "max thins required!");
|
||||
+ else if (o->n[BLOCKSIZE] & (o->n[BLOCKSIZE] - 1))
|
||||
+ abort_prg(g, "block size must be 2^^N");
|
||||
+ else if (o->n[POOLSIZE] <= o->n[BLOCKSIZE])
|
||||
+ abort_prg(g, "pool size must be larger than block size");
|
||||
+}
|
||||
+
|
||||
+static unsigned long long to_bytes(struct global *g, char *sz, enum return_units unit, int *index)
|
||||
+{
|
||||
+ int idx;
|
||||
+ unsigned long long r;
|
||||
+ char *us = sz;
|
||||
+
|
||||
+ /* Get pointer to unit identifier. */
|
||||
+ us += strspn(sz, "0123456789");
|
||||
+ if (*us) {
|
||||
+ idx = unit_index(g, us);
|
||||
+ if (idx < 0)
|
||||
+ abort_prg(g, "Invalid unit specifier!");
|
||||
+
|
||||
+ *us = 0;
|
||||
+ *index = idx;
|
||||
+ } else {
|
||||
+ idx = unit_index(g, NULL);
|
||||
+ us = NULL;
|
||||
+ *index = -1;
|
||||
+ }
|
||||
+
|
||||
+ r = atoll(sz) * g->unit.factors[idx];
|
||||
+ return (!us || unit == RETURN_SECTORS) ? r / bytes_per_sector(g) : r;
|
||||
+}
|
||||
+
|
||||
+static void printf_aligned(struct global *g, char *a, char *b, char *c, bool units, bool mandatory)
|
||||
+{
|
||||
+ char buf[80];
|
||||
+
|
||||
+ strcpy(buf, b);
|
||||
+ if (units)
|
||||
+ strcat(buf, mandatory ? "{" :"["), strcat(buf, g->unit.chars), strcat(buf, mandatory ? "}" : "]");
|
||||
+
|
||||
+ printf("\t%-4s%-44s%s\n", a, buf, c);
|
||||
+}
|
||||
+
|
||||
+static void help(struct global *g)
|
||||
+{
|
||||
+ printf ("Thin Provisioning Metadata Device Size Calculator.\nUsage: %s [options]\n", g->prg);
|
||||
+ printf_aligned(g, "-b", "--block-size BLOCKSIZE", "Block size of thin provisioned devices.", true, false);
|
||||
+ printf_aligned(g, "-s", "--pool-size SIZE", "Size of pool device.", true, false);
|
||||
+ printf_aligned(g, "-m", "--max-thins #MAXTHINS", "Maximum sum of all thin devices and snapshots.", true, false);
|
||||
+ printf_aligned(g, "-u", "--unit ", "Output unit specifier.", true, true);
|
||||
+ printf_aligned(g, "-n", "--numeric-only [short|long]", "Output numeric value only (optionally with short/long unit identifier).", false, false);
|
||||
+ printf_aligned(g, "-h", "--help", "This help.", false, false);
|
||||
+ printf_aligned(g, "-V", "--version", "Print thin provisioning tools version.", false, false);
|
||||
+ exit_prg(g, 0);
|
||||
+}
|
||||
+
|
||||
+static void version(struct global *g)
|
||||
+{
|
||||
+ printf("%s\n", THIN_PROVISIONING_TOOLS_VERSION);
|
||||
+ exit_prg(g, 1);
|
||||
+}
|
||||
+
|
||||
+static void check_unit(struct global *g, char *arg)
|
||||
+{
|
||||
+ int idx = unit_index(g, arg);
|
||||
+
|
||||
+ if (idx < 0)
|
||||
+ abort_prg(g, "output unit specifier invalid!");
|
||||
+
|
||||
+ g->options.unit_idx = idx;
|
||||
+}
|
||||
+
|
||||
+static void check_numeric_option(struct global *g, char *arg)
|
||||
+{
|
||||
+ if (g->options.n[NUMERIC] != NO_NUMBER)
|
||||
+ abort_prg(g, "-n already given!");
|
||||
+
|
||||
+ g->options.n[NUMERIC] = NUMBER;
|
||||
+
|
||||
+ if (arg) {
|
||||
+ bool unit_long = !strncmp("long", arg, strlen(arg));
|
||||
+
|
||||
+ if (!*arg || (strncmp("short", arg, strlen(arg)) && !unit_long))
|
||||
+ abort_prg(g, "-n invalid option argument");
|
||||
+
|
||||
+ g->options.n[NUMERIC] = unit_long ? NUMBER_LONG : NUMBER_SHORT;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void check_size(struct global *g, enum numeric_options o, char *arg)
|
||||
+{
|
||||
+ int idx;
|
||||
+ bool valid_index = true;
|
||||
+
|
||||
+ if (g->options.n[o])
|
||||
+ abort_prg(g, "option already given!");
|
||||
+
|
||||
+ g->options.n[o] = to_bytes(g, arg, o == MAXTHINS ? RETURN_BYTES : RETURN_SECTORS, &idx);
|
||||
+ if (idx < 0) {
|
||||
+ valid_index = false;
|
||||
+ idx = g->options.unit_idx;
|
||||
+ }
|
||||
+
|
||||
+ g->options.s[o] = malloc(strlen(arg) + strlen(g->unit.strings[idx]) + 1);
|
||||
+ if (!g->options.s[o])
|
||||
+ abort_prg(g, "failed to allocate string!");
|
||||
+
|
||||
+ strcpy(g->options.s[o], arg);
|
||||
+ if (o != MAXTHINS || valid_index)
|
||||
+ strcat(g->options.s[o], g->unit.strings[idx]);
|
||||
+
|
||||
+}
|
||||
+
|
||||
+static void parse_command_line(struct global *g, int argc, char **argv)
|
||||
+{
|
||||
+ int c;
|
||||
+ static struct option long_options[] = {
|
||||
+ {"block-size", required_argument, NULL, 'b' },
|
||||
+ {"pool-size", required_argument, NULL, 's' },
|
||||
+ {"max-thins", required_argument, NULL, 'm' },
|
||||
+ {"unit", required_argument, NULL, 'u' },
|
||||
+ {"numeric-only",optional_argument, NULL, 'n' },
|
||||
+ {"help", no_argument, NULL, 'h' },
|
||||
+ {"version", no_argument, NULL, 'V' },
|
||||
+ {NULL, 0, NULL, 0 }
|
||||
+ };
|
||||
+
|
||||
+ while ((c = getopt_long(argc, argv, "b:s:m:u:n::hV", long_options, NULL)) != -1) {
|
||||
+ switch (c) {
|
||||
+ case 'b':
|
||||
+ check_size(g, BLOCKSIZE, optarg);
|
||||
+ break;
|
||||
+ case 's':
|
||||
+ check_size(g, POOLSIZE, optarg);
|
||||
+ break;
|
||||
+ case 'm':
|
||||
+ check_size(g, MAXTHINS, optarg);
|
||||
+ break;
|
||||
+ case 'u':
|
||||
+ check_unit(g, optarg);
|
||||
+ break;
|
||||
+ case 'n':
|
||||
+ check_numeric_option(g, optarg);
|
||||
+ break;
|
||||
+ case 'h':
|
||||
+ help(g); /* exits */
|
||||
+ case 'V':
|
||||
+ version(g); /* exits */
|
||||
+ default:
|
||||
+ exit_prg(g, 1);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ check_opts(g);
|
||||
+}
|
||||
+
|
||||
+static const unsigned mappings_per_block(void)
|
||||
+{
|
||||
+ const struct {
|
||||
+ const unsigned node;
|
||||
+ const unsigned node_header;
|
||||
+ const unsigned entry;
|
||||
+ } btree_size = { 4096, 64, 16 };
|
||||
+
|
||||
+ return (btree_size.node - btree_size.node_header) / btree_size.entry;
|
||||
+}
|
||||
+
|
||||
+static void print_precision(struct global *g, double r, unsigned idx)
|
||||
+{
|
||||
+ bool full = g->options.n[NUMERIC] == NO_NUMBER;
|
||||
+ double rtrunc = truncl(r);
|
||||
+
|
||||
+ if (full)
|
||||
+ printf("%s - ", g->prg);
|
||||
+
|
||||
+ if (r == rtrunc)
|
||||
+ printf("%llu", (unsigned long long) r);
|
||||
+ else
|
||||
+ printf(r - rtrunc < 1E-2 ? "%0.2e" : "%0.2f", r);
|
||||
+
|
||||
+ if (full)
|
||||
+ printf(" %s", g->unit.strings[idx]);
|
||||
+ else if (g->options.n[NUMERIC] > NUMBER) {
|
||||
+ if (g->options.n[NUMERIC] == NUMBER_SHORT)
|
||||
+ printf("%c", g->unit.chars[idx]);
|
||||
+ else
|
||||
+ printf("%s", g->unit.strings[idx]);
|
||||
+ }
|
||||
+
|
||||
+ if (full)
|
||||
+ printf(" estimated metadata area size for \"--block-size=%s --pool-size=%s --max-thins=%s\"",
|
||||
+ g->options.s[BLOCKSIZE], g->options.s[POOLSIZE], g->options.s[MAXTHINS]);
|
||||
+
|
||||
+ putchar('\n');
|
||||
+}
|
||||
+
|
||||
+static void print_estimated_result(struct global *g)
|
||||
+{
|
||||
+ double r;
|
||||
+
|
||||
+ /* double-fold # of nodes, because they aren't fully populated in average */
|
||||
+ r = (1.0 + (2 * g->options.n[POOLSIZE] / g->options.n[BLOCKSIZE] / mappings_per_block() + g->options.n[MAXTHINS])); /* in 4k blocks */
|
||||
+ r *= 8 * bytes_per_sector(g); /* in bytes! */
|
||||
+ r /= g->unit.factors[g->options.unit_idx]; /* in requested unit */
|
||||
+
|
||||
+ print_precision(g, r, g->options.unit_idx);
|
||||
+}
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
+ struct global *g = init_prg(*argv);
|
||||
+
|
||||
+ parse_command_line(g, argc, argv);
|
||||
+ print_estimated_result(g);
|
||||
+ exit_prg(g, 0);
|
||||
+ return 0; /* Doesn't get here... */
|
||||
+}
|
|
@ -1,20 +0,0 @@
|
|||
diff -up thin-provisioning-tools-0.2.1/Makefile.in~ thin-provisioning-tools-0.2.1/Makefile.in
|
||||
--- thin-provisioning-tools-0.2.1/Makefile.in~ 2013-07-10 18:43:45.000000000 +0300
|
||||
+++ thin-provisioning-tools-0.2.1/Makefile.in 2013-07-15 22:32:36.294852451 +0300
|
||||
@@ -235,11 +235,11 @@ distclean: clean
|
||||
|
||||
install: $(PROGRAMS)
|
||||
$(INSTALL_DIR) $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) -s thin_check $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) -s thin_dump $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) -s thin_repair $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) -s thin_restore $(BINDIR)
|
||||
- $(INSTALL_PROGRAM) -s thin_rmap $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_check $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_dump $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_repair $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_restore $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) thin_rmap $(BINDIR)
|
||||
$(INSTALL_DIR) $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
|
|
@ -1,166 +0,0 @@
|
|||
diff --git a/man8/thin_dump.8 b/man8/thin_dump.8
|
||||
index e60a6e5..b26cc2c 100644
|
||||
--- a/man8/thin_dump.8
|
||||
+++ b/man8/thin_dump.8
|
||||
@@ -23,9 +23,12 @@ Print output in XML or human readable format.
|
||||
|
||||
.IP "\fB\-r, \-\-repair\fP".
|
||||
|
||||
-.IP "\fB\-m, \-\-metadata_snap\fP block#".
|
||||
-Dump metadata snapshot created by device-mapper thin provisioning target at block#
|
||||
-
|
||||
+.IP "\fB\-m, \-\-metadata_snap\fP [block#]".
|
||||
+Dump metadata snapshot created by device-mapper thin provisioning target.
|
||||
+If block is not provided, access the default metadata snapshot created by
|
||||
+the thin provisioning device-mapper target, else try the one at block#.
|
||||
+See the thin provisioning target documentation on how to create or release
|
||||
+a metadata snapshot.
|
||||
|
||||
.IP "\fB\-h, \-\-help\fP".
|
||||
Print help and exit.
|
||||
@@ -44,6 +47,13 @@ to standard output in XML format:
|
||||
.sp
|
||||
.B thin_dump /dev/vg/metadata
|
||||
|
||||
+Dumps the thin provisioning metadata snapshot on logical volume /dev/vg/metadata
|
||||
+to standard output in human readable format (not processable by
|
||||
+.B thin_restore(8)
|
||||
+):
|
||||
+.sp
|
||||
+.B thin_dump --format human_readable --metadata-snap /dev/vg/metadata
|
||||
+
|
||||
.SH DIAGNOSTICS
|
||||
.B thin_dump
|
||||
returns an exit code of 0 for success or 1 for error.
|
||||
diff --git a/thin-provisioning/metadata.cc b/thin-provisioning/metadata.cc
|
||||
index 771325a..bef75ba 100644
|
||||
--- a/thin-provisioning/metadata.cc
|
||||
+++ b/thin-provisioning/metadata.cc
|
||||
@@ -78,6 +78,7 @@ namespace {
|
||||
<< "data block size " << sb.data_block_size_ << endl
|
||||
<< "metadata block size " << sb.metadata_block_size_ << endl
|
||||
<< "metadata nr blocks " << sb.metadata_nr_blocks_ << endl
|
||||
+ << "metadata snapshot block " << sb.metadata_snap_ << endl
|
||||
;
|
||||
}
|
||||
}
|
||||
diff --git a/thin-provisioning/thin_dump.cc b/thin-provisioning/thin_dump.cc
|
||||
index 029a635..a844038 100644
|
||||
--- a/thin-provisioning/thin_dump.cc
|
||||
+++ b/thin-provisioning/thin_dump.cc
|
||||
@@ -31,23 +31,37 @@ using namespace persistent_data;
|
||||
using namespace std;
|
||||
using namespace thin_provisioning;
|
||||
|
||||
+struct flags {
|
||||
+ bool find_metadata_snap;
|
||||
+ bool repair;
|
||||
+};
|
||||
+
|
||||
namespace {
|
||||
- int dump(string const &path, ostream &out, string const &format, bool repair,
|
||||
+ int dump(string const &path, ostream *out, string const &format, struct flags &flags,
|
||||
block_address metadata_snap = 0) {
|
||||
try {
|
||||
- metadata::ptr md(metadata_snap ? new metadata(path, metadata_snap) : new metadata(path, metadata::OPEN, 0, 0));
|
||||
+ metadata::ptr md(new metadata(path, metadata_snap));
|
||||
emitter::ptr e;
|
||||
+ uint64_t metadata_snap_root = md->sb_.metadata_snap_;
|
||||
+
|
||||
+ if (metadata_snap_root) {
|
||||
+ md.reset();
|
||||
+ md = metadata::ptr(new metadata(path, metadata_snap_root));
|
||||
+ } else if (flags.find_metadata_snap) {
|
||||
+ cerr << "no metadata snapshot found!" << endl;
|
||||
+ exit(1);
|
||||
+ }
|
||||
|
||||
if (format == "xml")
|
||||
- e = create_xml_emitter(out);
|
||||
+ e = create_xml_emitter(*out);
|
||||
else if (format == "human_readable")
|
||||
- e = create_human_readable_emitter(out);
|
||||
+ e = create_human_readable_emitter(*out);
|
||||
else {
|
||||
cerr << "unknown format '" << format << "'" << endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- metadata_dump(md, e, repair);
|
||||
+ metadata_dump(md, e, flags.repair);
|
||||
|
||||
} catch (std::exception &e) {
|
||||
cerr << e.what() << endl;
|
||||
@@ -63,7 +77,7 @@ namespace {
|
||||
<< " {-h|--help}" << endl
|
||||
<< " {-f|--format} {xml|human_readable}" << endl
|
||||
<< " {-r|--repair}" << endl
|
||||
- << " {-m|--metadata-snap} block#" << endl
|
||||
+ << " {-m|--metadata-snap} [block#]" << endl
|
||||
<< " {-o <xml file>}" << endl
|
||||
<< " {-V|--version}" << endl;
|
||||
}
|
||||
@@ -72,16 +86,16 @@ namespace {
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int c;
|
||||
- bool repair = false;
|
||||
char const *output = NULL;
|
||||
- const char shortopts[] = "hm:o:f:rV";
|
||||
+ const char shortopts[] = "hm::o:f:rV";
|
||||
+ char *end_ptr;
|
||||
string format = "xml";
|
||||
block_address metadata_snap = 0;
|
||||
- char *end_ptr;
|
||||
+ struct flags flags = { .find_metadata_snap = false, .repair = false };
|
||||
|
||||
const struct option longopts[] = {
|
||||
{ "help", no_argument, NULL, 'h'},
|
||||
- { "metadata-snap", required_argument, NULL, 'm' },
|
||||
+ { "metadata-snap", optional_argument, NULL, 'm' },
|
||||
{ "output", required_argument, NULL, 'o'},
|
||||
{ "format", required_argument, NULL, 'f' },
|
||||
{ "repair", no_argument, NULL, 'r'},
|
||||
@@ -100,16 +114,24 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
- repair = true;
|
||||
+ flags.repair = true;
|
||||
+ break;
|
||||
+
|
||||
+ case 's':
|
||||
+ flags.find_metadata_snap = true;
|
||||
break;
|
||||
|
||||
case 'm':
|
||||
- metadata_snap = strtoull(optarg, &end_ptr, 10);
|
||||
- if (end_ptr == optarg) {
|
||||
- cerr << "couldn't parse <metadata_snap>" << endl;
|
||||
- usage(cerr, basename(argv[0]));
|
||||
- return 1;
|
||||
- }
|
||||
+ if (optarg) {
|
||||
+ metadata_snap = strtoull(optarg, &end_ptr, 10);
|
||||
+ if (end_ptr == optarg) {
|
||||
+ cerr << "couldn't parse <metadata_snap>" << endl;
|
||||
+ usage(cerr, basename(argv[0]));
|
||||
+ return 1;
|
||||
+ }
|
||||
+ } else
|
||||
+ flags.find_metadata_snap = true;
|
||||
+
|
||||
break;
|
||||
|
||||
case 'o':
|
||||
@@ -132,9 +154,5 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
- if (output) {
|
||||
- ofstream out(output);
|
||||
- return dump(argv[optind], out, format, repair, metadata_snap);
|
||||
- } else
|
||||
- return dump(argv[optind], cout, format, repair, metadata_snap);
|
||||
+ return dump(argv[optind], output ? new ofstream(output) : &cout, format, flags, metadata_snap);
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
diff --git a/thin-provisioning/metadata.cc b/thin-provisioning/metadata.cc
|
||||
index c841614..771325a 100644
|
||||
--- a/thin-provisioning/metadata.cc
|
||||
+++ b/thin-provisioning/metadata.cc
|
||||
@@ -57,15 +57,6 @@ namespace {
|
||||
return tm;
|
||||
}
|
||||
|
||||
- superblock
|
||||
- read_superblock(block_manager<>::ptr bm, block_address location = SUPERBLOCK_LOCATION) {
|
||||
- superblock sb;
|
||||
- block_manager<>::read_ref r = bm->read_lock(location, superblock_validator());
|
||||
- superblock_disk const *sbd = reinterpret_cast<superblock_disk const *>(&r.data());
|
||||
- superblock_traits::unpack(*sbd, sb);
|
||||
- return sb;
|
||||
- }
|
||||
-
|
||||
void
|
||||
copy_space_maps(space_map::ptr lhs, space_map::ptr rhs) {
|
||||
for (block_address b = 0; b < rhs->get_nr_blocks(); b++) {
|
||||
@@ -149,10 +140,10 @@ metadata::metadata(std::string const &dev_path, open_type ot,
|
||||
}
|
||||
}
|
||||
|
||||
-metadata::metadata(std::string const &dev_path)
|
||||
+metadata::metadata(std::string const &dev_path, block_address metadata_snap)
|
||||
{
|
||||
tm_ = open_tm(open_bm(dev_path, false));
|
||||
- sb_ = read_superblock(tm_->get_bm());
|
||||
+ sb_ = read_superblock(tm_->get_bm(), metadata_snap);
|
||||
|
||||
// We don't open the metadata sm for a held root
|
||||
//metadata_sm_ = open_metadata_sm(tm_, &sb_.metadata_space_map_root_);
|
||||
diff --git a/thin-provisioning/metadata.h b/thin-provisioning/metadata.h
|
||||
index 250c216..9749acb 100644
|
||||
--- a/thin-provisioning/metadata.h
|
||||
+++ b/thin-provisioning/metadata.h
|
||||
@@ -62,10 +62,11 @@ namespace thin_provisioning {
|
||||
// Deprecated: it would be better if we passed in an already
|
||||
// constructed block_manager.
|
||||
metadata(std::string const &dev_path, open_type ot,
|
||||
- sector_t data_block_size = 128,
|
||||
+ sector_t data_block_size = 128, // Only used if CREATE
|
||||
block_address nr_data_blocks = 0); // Only used if CREATE
|
||||
|
||||
- metadata(std::string const &dev_path);
|
||||
+ metadata(std::string const &dev_path,
|
||||
+ block_address metadata_snap = 0);
|
||||
|
||||
// ... use these instead ...
|
||||
metadata(block_manager<>::ptr bm, open_type ot,
|
||||
diff --git a/thin-provisioning/superblock.cc b/thin-provisioning/superblock.cc
|
||||
index c23fbc1..bf9544b 100644
|
||||
--- a/thin-provisioning/superblock.cc
|
||||
+++ b/thin-provisioning/superblock.cc
|
||||
@@ -126,17 +126,22 @@ namespace thin_provisioning {
|
||||
}
|
||||
}
|
||||
|
||||
- superblock_detail::superblock read_superblock(block_manager<>::ptr bm)
|
||||
+ superblock_detail::superblock read_superblock(block_manager<>::ptr bm, block_address location)
|
||||
{
|
||||
using namespace superblock_detail;
|
||||
|
||||
superblock sb;
|
||||
- auto r = bm->read_lock(SUPERBLOCK_LOCATION, superblock_validator());
|
||||
+ auto r = bm->read_lock(location, superblock_validator());
|
||||
superblock_disk const *sbd = reinterpret_cast<superblock_disk const *>(&r.data());
|
||||
superblock_traits::unpack(*sbd, sb);
|
||||
return sb;
|
||||
}
|
||||
|
||||
+ superblock_detail::superblock read_superblock(block_manager<>::ptr bm)
|
||||
+ {
|
||||
+ return read_superblock(bm, SUPERBLOCK_LOCATION);
|
||||
+ }
|
||||
+
|
||||
void
|
||||
check_superblock(block_manager<>::ptr bm,
|
||||
superblock_detail::damage_visitor &visitor) {
|
||||
diff --git a/thin-provisioning/superblock.h b/thin-provisioning/superblock.h
|
||||
index e993497..a9377b0 100644
|
||||
--- a/thin-provisioning/superblock.h
|
||||
+++ b/thin-provisioning/superblock.h
|
||||
@@ -123,6 +123,7 @@ namespace thin_provisioning {
|
||||
persistent_data::block_manager<>::validator::ptr superblock_validator();
|
||||
|
||||
superblock_detail::superblock read_superblock(persistent_data::block_manager<>::ptr bm);
|
||||
+ superblock_detail::superblock read_superblock(persistent_data::block_manager<>::ptr bm, persistent_data::block_address location);
|
||||
void check_superblock(persistent_data::block_manager<>::ptr bm,
|
||||
superblock_detail::damage_visitor &visitor);
|
||||
}
|
||||
diff --git a/thin-provisioning/thin_dump.cc b/thin-provisioning/thin_dump.cc
|
||||
index a4bcf66..029a635 100644
|
||||
--- a/thin-provisioning/thin_dump.cc
|
||||
+++ b/thin-provisioning/thin_dump.cc
|
||||
@@ -35,7 +35,7 @@ namespace {
|
||||
int dump(string const &path, ostream &out, string const &format, bool repair,
|
||||
block_address metadata_snap = 0) {
|
||||
try {
|
||||
- metadata::ptr md(new metadata(path, metadata::OPEN));
|
||||
+ metadata::ptr md(metadata_snap ? new metadata(path, metadata_snap) : new metadata(path, metadata::OPEN, 0, 0));
|
||||
emitter::ptr e;
|
||||
|
||||
if (format == "xml")
|
||||
@@ -63,7 +63,7 @@ namespace {
|
||||
<< " {-h|--help}" << endl
|
||||
<< " {-f|--format} {xml|human_readable}" << endl
|
||||
<< " {-r|--repair}" << endl
|
||||
- << " {-m|--metadata-snap}" << endl
|
||||
+ << " {-m|--metadata-snap} block#" << endl
|
||||
<< " {-o <xml file>}" << endl
|
||||
<< " {-V|--version}" << endl;
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
diff --git a/man8/thin_metadata_size.8 b/man8/thin_metadata_size.8
|
||||
index 33b36b3..6b00e73 100644
|
||||
--- a/man8/thin_metadata_size.8
|
||||
+++ b/man8/thin_metadata_size.8
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH THIN_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
.SH NAME
|
||||
-thin_metadata_size \- thin provisioning metadata file/device size calculator.
|
||||
+thin_metadata_size \- thin provisioning metadata device/file size calculator.
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B thin_metadata_size
|
||||
@@ -10,13 +10,15 @@ thin_metadata_size \- thin provisioning metadata file/device size calculator.
|
||||
.B thin_metadata_size
|
||||
calculates the size of the thin provisioning metadata based on the block size
|
||||
of the thin provisioned devices, the size of the thin provisioning pool and
|
||||
-the maximum number of all thin prisioned devices and snapshots. Size/number
|
||||
-option arguments can be followed by unit specifiers in short one character
|
||||
-and long form (eg. -b1m or -b1megabytes).
|
||||
+the maximum number of all thin prisioned devices and snapshots.
|
||||
+Because thin provisioning pools are holding widely variable contents,
|
||||
+this tool is needed to provide sensible initial default size.
|
||||
|
||||
.IP "\fB\-b, \-\-block-size\fP \fIBLOCKSIZE[bskKmMgGtTpPeEzZyY]\fP"
|
||||
Block size of thin provisioned devices in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
||||
Default is in sectors without a block size unit specifier.
|
||||
+Size/number option arguments can be followed by unit specifiers in short one character
|
||||
+and long form (eg. -b1m or -b1megabytes).
|
||||
|
||||
.IP "\fB\-s, \-\-pool-size\fP \fIPOOLSIZE[bskKmMgGtTpPeEzZyY]\fP"
|
||||
Thin provisioning pool size in units of bytes,sectors,kilobytes,kibibytes,... respectively.
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/man8/thin_check.8 b/man8/thin_check.8
|
||||
index 1489078..a8dc81b 100644
|
||||
--- a/man8/thin_check.8
|
||||
+++ b/man8/thin_check.8
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH THIN_REPAIR 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.TH THIN_CHECK 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
.SH NAME
|
||||
thin_check \- repair thin provisioning metadata on device or file
|
||||
|
||||
diff --git a/man8/thin_rmap.8 b/man8/thin_rmap.8
|
||||
index 4d74520..684c86c 100644
|
||||
--- a/man8/thin_rmap.8
|
||||
+++ b/man8/thin_rmap.8
|
||||
@@ -1,4 +1,4 @@
|
||||
-.TH THIN_DUMP 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.TH THIN_RMAP(g 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
.SH NAME
|
||||
thin_rmap \- output reverse map of a thin provisioned region of blocks from metadata device or file
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
--- thin-provisioning-tools-0.2.8/Makefile.in.orig 2013-10-18 17:11:34.320772851 +0200
|
||||
+++ thin-provisioning-tools-0.2.8/Makefile.in 2013-10-18 17:11:09.938219484 +0200
|
||||
@@ -299,6 +299,10 @@
|
||||
|
||||
install: $(PROGRAMS)
|
||||
$(INSTALL_DIR) $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) cache_check $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) cache_dump $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) cache_repair $(BINDIR)
|
||||
+ $(INSTALL_PROGRAM) cache_restore $(BINDIR)
|
||||
$(INSTALL_PROGRAM) thin_check $(BINDIR)
|
||||
$(INSTALL_PROGRAM) thin_dump $(BINDIR)
|
||||
$(INSTALL_PROGRAM) thin_repair $(BINDIR)
|
||||
@@ -306,6 +310,10 @@
|
||||
$(INSTALL_PROGRAM) thin_rmap $(BINDIR)
|
||||
$(INSTALL_PROGRAM) thin_metadata_size $(BINDIR)
|
||||
$(INSTALL_DIR) $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/cache_check.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/cache_dump.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/cache_repair.8 $(MANPATH)/man8
|
||||
+ $(INSTALL_DATA) man8/cache_restore.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_check.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_dump.8 $(MANPATH)/man8
|
||||
$(INSTALL_DATA) man8/thin_repair.8 $(MANPATH)/man8
|
|
@ -1,270 +0,0 @@
|
|||
diff --git a/man8/cache_check.8 b/man8/cache_check.8
|
||||
new file mode 100644
|
||||
index 0000000..5cc7dff
|
||||
--- /dev/null
|
||||
+++ b/man8/cache_check.8
|
||||
@@ -0,0 +1,62 @@
|
||||
+.TH CACHE_CHECK 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+cache_check \- repair cache metadata on device or file
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B cache_check
|
||||
+.RB [ options ]
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B cache_check
|
||||
+checks cache metadata created by
|
||||
+the device-mapper cache target on a
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+
|
||||
+.SH OPTIONS
|
||||
+.IP "\fB\-q, \-\-quiet\fP"
|
||||
+Suppress output messages, return only exit code.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.IP "\fB\-\-super\-block\-only\fP"
|
||||
+Only check the superblock is present.
|
||||
+
|
||||
+.IP "\fB\-\-skip-mappings\fP"
|
||||
+Skip checking of the block mappings which make up the bulk of the
|
||||
+metadata.
|
||||
+
|
||||
+.IP "\fB\-\-skip-hints\fP"
|
||||
+Skip checking of the policy hint values metadata.
|
||||
+
|
||||
+.IP "\fB\-\-skip-discards\fP"
|
||||
+Skip checking of the discard bits in the metadata.
|
||||
+
|
||||
+.SH EXAMPLE
|
||||
+Analyses and repairs cache metadata on logical volume
|
||||
+/dev/vg/metadata:
|
||||
+.sp
|
||||
+.B cache_check /dev/vg/metadata
|
||||
+
|
||||
+The device may not be actively used by the target
|
||||
+when running.
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B cache_check
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B cache_dump(8)
|
||||
+.B cache_repair(8)
|
||||
+.B cache_restore(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
diff --git a/man8/cache_dump.8 b/man8/cache_dump.8
|
||||
new file mode 100644
|
||||
index 0000000..a0c2924
|
||||
--- /dev/null
|
||||
+++ b/man8/cache_dump.8
|
||||
@@ -0,0 +1,59 @@
|
||||
+.TH CACHE_DUMP 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+cache_dump \- dump cache metadata from device or file to standard output
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B cache_dump
|
||||
+.RB [options]
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B cache_dump
|
||||
+dumps binary cache metadata created by
|
||||
+the device-mapper cache target on a
|
||||
+.I device
|
||||
+or
|
||||
+.I file
|
||||
+to standard output for
|
||||
+analysis or postprocessing in XML format.
|
||||
+XML formated metadata can be fed into cache_restore (see
|
||||
+.BR cache_restore(8) )
|
||||
+in order to put it back onto a metadata
|
||||
+.I device
|
||||
+(to process by the device-mapper target) or
|
||||
+.I file.
|
||||
+
|
||||
+.IP "\fB\-r, \-\-repair\fP".
|
||||
+Repair the metadata whilst dumping it.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP".
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP".
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLES
|
||||
+Dumps the cache metadata on logical volume /dev/vg/metadata
|
||||
+to standard output in XML format:
|
||||
+.sp
|
||||
+.B cache_dump /dev/vg/metadata
|
||||
+
|
||||
+.SH EXAMPLES
|
||||
+Dumps the cache metadata on logical volume /dev/vg/metadata
|
||||
+whilst repairing it to standard output in XML format:
|
||||
+.sp
|
||||
+.B cache_dump --repair /dev/vg/metadata
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B cache_dump
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B cache_check(8)
|
||||
+.B cache_repair(8)
|
||||
+.B cache_restore(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
diff --git a/man8/cache_repair.8 b/man8/cache_repair.8
|
||||
new file mode 100644
|
||||
index 0000000..ef04a7f
|
||||
--- /dev/null
|
||||
+++ b/man8/cache_repair.8
|
||||
@@ -0,0 +1,61 @@
|
||||
+.TH CACHE_REPAIR 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+cache_repair \- repair cache binary metadata from device/file to device/file
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B cache_repair
|
||||
+.RB [ options ]
|
||||
+.RB -i
|
||||
+.I {device|file}
|
||||
+.RB -o
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B cache_repair
|
||||
+reads binary cache metadata created by the
|
||||
+respective device-mapper target from one
|
||||
+.I device
|
||||
+or
|
||||
+.I file
|
||||
+, repairs it and writes it to another
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+If written to a metadata
|
||||
+.I device
|
||||
+, the metadata can be processed
|
||||
+by the device-mapper target.
|
||||
+
|
||||
+.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
+Input file or device with binary metadata.
|
||||
+
|
||||
+.IP "\fB\-o, \-\-output\fP \fI{device|file}\fP"
|
||||
+Output file or device for repaired binary metadata.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLE
|
||||
+Reads the binary cache metadata from file
|
||||
+.B metadata
|
||||
+, repairs it and writes it to logical volume /dev/vg/metadata
|
||||
+for further processing by the respective device-mapper target:
|
||||
+.sp
|
||||
+.B cache_repair -i metadata -o /dev/vg/metadata
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B cache_repair
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B cache_dump(8)
|
||||
+.B cache_check(8)
|
||||
+.B cache_restore(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
diff --git a/man8/cache_restore.8 b/man8/cache_restore.8
|
||||
new file mode 100644
|
||||
index 0000000..5f9fdca
|
||||
--- /dev/null
|
||||
+++ b/man8/cache_restore.8
|
||||
@@ -0,0 +1,64 @@
|
||||
+.TH CACHE_RESTORE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+cache_restore \- restore cache metadata file to device or file
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B cache_restore
|
||||
+.RB [ options ]
|
||||
+.RB -i
|
||||
+.I {device|file}
|
||||
+.RB -o
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B cache_restore
|
||||
+restores cache metadata created by the respective
|
||||
+device-mapper target dumped into an XML formatted (see
|
||||
+.BR cache_dump(8) )
|
||||
+.I file
|
||||
+, which optionally can be preprocessed before the restore to another
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+If restored to a metadata
|
||||
+.I device
|
||||
+, the metadata can be processed by the device-mapper target.
|
||||
+
|
||||
+.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
+Input file or device with metadata.
|
||||
+
|
||||
+.IP "\fB\-o, \-\-output\fP \fI{device|file}\fP"
|
||||
+Output file or device.
|
||||
+
|
||||
+.IP "\fB{\-\-debug-override-metadata-version}\fP \fI<integer>\fP"
|
||||
+ONLY FOR DEBUGGING PURPOSES:
|
||||
+.br
|
||||
+override the version stored in the metadata.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLE
|
||||
+Restores the XML formatted cache metadata on file
|
||||
+.B metadata
|
||||
+to logical volume /dev/vg/metadata for further processing by the
|
||||
+respective device-mapper target:
|
||||
+.sp
|
||||
+.B cache_restore -i metadata -o /dev/vg/metadata
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B cache_restore
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B cache_dump(8)
|
||||
+.B cache_check(8)
|
||||
+.B cache_repair(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
|
@ -1,11 +0,0 @@
|
|||
--- a/Makefile.in 2014-11-12 18:46:30.282251378 +0100
|
||||
+++ b/Makefile.in 2014-11-12 18:46:56.108608255 +0100
|
||||
@@ -108,7 +108,7 @@
|
||||
vpath %.cc $(TOP_DIR)
|
||||
|
||||
INSTALL_DIR = $(INSTALL) -m 755 -d
|
||||
-INSTALL_PROGRAM = $(INSTALL) -m 755 -s
|
||||
+INSTALL_PROGRAM = $(INSTALL) -m 755
|
||||
INSTALL_DATA = $(INSTALL) -p -m 644
|
||||
|
||||
ifeq ("@TESTING@", "yes")
|
|
@ -1,15 +0,0 @@
|
|||
--- thin-provisioning-tools-0.4.1/man8/thin_check.8.orig 2014-10-28 14:19:02.800420873 +0100
|
||||
+++ thin-provisioning-tools-0.4.1/man8/thin_check.8 2014-10-28 14:19:47.335924554 +0100
|
||||
@@ -25,6 +25,12 @@
|
||||
.IP "\fB\-V, \-\-version\fP"
|
||||
Output version information and exit.
|
||||
|
||||
+.IP "\fB\-\-clear\-needs\-check\-flag\fP"
|
||||
+Clear the needs-check-flag in case the check of the thin pool metadata succeeded.
|
||||
+If the metadata check failed, the flag is not cleared and a thin_repair run is
|
||||
+needed to fix any issues.
|
||||
+After thin_repair succeeded, you may run thin_check again.
|
||||
+
|
||||
.IP "\fB\-\-super\-block\-only\fP"
|
||||
Only check the superblock is present.
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
--- thin-provisioning-tools-0.4.1/man8/era_restore.8.orig 2014-10-28 14:24:43.356272471 +0100
|
||||
+++ thin-provisioning-tools-0.4.1/man8/era_restore.8 2014-10-28 14:28:56.358133852 +0100
|
||||
@@ -0,0 +1,63 @@
|
||||
+.TH ERA_RESTORE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+era_restore \- restore era metadata file to device or file
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B era_restore
|
||||
+.RB [ options ]
|
||||
+.RB -i
|
||||
+.I {device|file}
|
||||
+.RB -o
|
||||
+.I {device|file}
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B era_restore
|
||||
+restores binary era metadata created by the
|
||||
+respective device-mapper target dumped into an XML formatted (see
|
||||
+.BR era_dump(8) )
|
||||
+.I file
|
||||
+, which optionally can be preprocessed before the restore to another
|
||||
+.I device
|
||||
+or
|
||||
+.I file.
|
||||
+If restored to a metadata
|
||||
+.I device
|
||||
+, the metadata can be processed by the device-mapper target.
|
||||
+
|
||||
+.IP "\fB\-q, \-\-quiet\fP"
|
||||
+Suppress output messages, return only exit code.
|
||||
+
|
||||
+.IP "\fB\-i, \-\-input\fP \fI{device|file}\fP"
|
||||
+Input file or device with metadata.
|
||||
+
|
||||
+.IP "\fB\-o, \-\-output\fP \fI{device|file}\fP"
|
||||
+Output file or device.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLE
|
||||
+Restores the XML formatted era metadata on file
|
||||
+.B metadata
|
||||
+to logical volume /dev/vg/metadata for further processing by the
|
||||
+respective device-mapper target:
|
||||
+.sp
|
||||
+.B era_restore -i metadata -o /dev/vg/metadata
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B era_restore
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B era_check(8)
|
||||
+.B era_dump(8)
|
||||
+.B era_invaidate(8)
|
||||
+.B era_restore(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Joe Thornber <ejt@redhat.com>
|
||||
+.br
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
||||
--- thin-provisioning-tools-0.4.1/man8/cache_metadata_size.8.orig 2014-10-28 14:31:49.116087709 +0100
|
||||
+++ thin-provisioning-tools-0.4.1/man8/cache_metadata_size.8 2014-10-28 14:50:29.337238755 +0100
|
||||
@@ -0,0 +1,47 @@
|
||||
+.TH CACHE_METADATA_SIZE 8 "Thin Provisioning Tools" "Red Hat, Inc." \" -*- nroff -*-
|
||||
+.SH NAME
|
||||
+cache_metadata_size \- cache metadata device/file size calculator.
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B cache_metadata_size
|
||||
+.RB [ options ]
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B cache_metadata_size
|
||||
+calculates the size of the cache metadata based on the block size
|
||||
+of the cache device and the cache block size.
|
||||
+All relates to the size of the fast device (eg, SSD), rather
|
||||
+than the whole cached (i.e. origin) device.
|
||||
+
|
||||
+.IP "\fB\\-\-block\-size <sectors>\fP
|
||||
+Block size of cache in units of sectors.
|
||||
+
|
||||
+.IP "\fB\\-\-device\-size <sectors>\fP
|
||||
+Device size of the cache device in units of sectors.
|
||||
+
|
||||
+.IP "\fB\\-\-nr\-blocks <natural>\fP
|
||||
+Capacity of the cache in number of blocks.
|
||||
+
|
||||
+.IP "\fB\-h, \-\-help\fP"
|
||||
+Print help and exit.
|
||||
+
|
||||
+.IP "\fB\-V, \-\-version\fP"
|
||||
+Output version information and exit.
|
||||
+
|
||||
+.SH EXAMPLES
|
||||
+Calculates the cache metadata device size for block size 256 sectors.and device size of 2GiB
|
||||
+.sp
|
||||
+.B cache_metadata_size --block-size 256 --device-size $((2*1024*1024))
|
||||
+
|
||||
+.SH DIAGNOSTICS
|
||||
+.B cache_metadata_size
|
||||
+returns an exit code of 0 for success or 1 for error.
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+.B cache_check(8)
|
||||
+.B cache_dump(8)
|
||||
+.B cache_repair(8)
|
||||
+.B cache_restore(8)
|
||||
+
|
||||
+.SH AUTHOR
|
||||
+Heinz Mauelshagen <HeinzM@RedHat.com>
|
|
@ -0,0 +1,15 @@
|
|||
Makefile.in | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 0aa9401..0f4f7cb 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -262,7 +262,6 @@ MANPAGES:=$(patsubst %,man8/%.8,$(TOOLS))
|
||||
install: bin/pdata_tools $(MANPAGES)
|
||||
$(INSTALL_DIR) $(BINDIR)
|
||||
$(INSTALL_PROGRAM) bin/pdata_tools $(BINDIR)
|
||||
- $(STRIP) $(BINDIR)/pdata_tools
|
||||
ln -s -f pdata_tools $(BINDIR)/cache_check
|
||||
ln -s -f pdata_tools $(BINDIR)/cache_dump
|
||||
ln -s -f pdata_tools $(BINDIR)/cache_metadata_size
|
|
@ -1,20 +1,44 @@
|
|||
#
|
||||
# Copyright (C) 2011-2014 Red Hat, Inc
|
||||
# Copyright (C) 2011-2017 Red Hat, Inc
|
||||
#
|
||||
|
||||
#%%global version_suffix -rc2
|
||||
#%%global release_suffix .test3
|
||||
|
||||
Summary: Device-mapper Persistent Data Tools
|
||||
Name: device-mapper-persistent-data
|
||||
Version: 0.4.1
|
||||
Release: 3%{?dist}
|
||||
Version: 0.9.0
|
||||
Release: 8%{?dist}%{?release_suffix}
|
||||
License: GPLv3+
|
||||
Group: System Environment/Base
|
||||
URL: https://github.com/jthornber/thin-provisioning-tools
|
||||
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-v%{version}.tar.bz2
|
||||
# Source1: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}.tar.gz
|
||||
BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel
|
||||
#Source0: https://github.com/jthornber/thin-provisioning-tools/archive/thin-provisioning-tools-%%{version}.tar.gz
|
||||
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}%{?version_suffix}.tar.gz
|
||||
Source1: dmpd090-vendor3.tar.gz
|
||||
Patch0: device-mapper-persistent-data-avoid-strip.patch
|
||||
Patch1: 0001-Update-dependencies.patch
|
||||
Patch2: 0001-all-Fix-resource-leaks.patch
|
||||
Patch3: 0002-thin_show_metadata-Fix-out-of-bounds-access.patch
|
||||
Patch4: 0003-build-Fix-customized-emitter-linkage.patch
|
||||
Patch5: 0004-thin_dump-Fix-leaked-shared-object-handle.patch
|
||||
Patch6: 0005-thin_show_duplicates-Fix-potential-errors.patch
|
||||
Patch7: 0006-thin_metadata_size-Fix-potential-string-overflow.patch
|
||||
Patch8: 0007-all-Fix-uninitialized-class-members.patch
|
||||
Patch9: 0008-thin_dump-Fix-warnings-on-potential-NULL-pointer.patch
|
||||
Patch10: 0009-build-Remove-unused-sources-from-the-regular-build.patch
|
||||
Patch11: 0010-all-Remove-unreachable-code.patch
|
||||
Patch12: 0011-file_utils-Fix-resource-leak.patch
|
||||
Patch13: 0012-thin_delta-Clean-up-duplicated-code.patch
|
||||
Patch14: 0013-build-Remove-lboost_iostreams-linker-flag.patch
|
||||
Patch15: 0014-cargo-update.patch
|
||||
|
||||
BuildRequires: autoconf, expat-devel, libaio-devel, libstdc++-devel, boost-devel, gcc-c++
|
||||
Requires: expat
|
||||
Patch0: device-mapper-persistent-data-0.4.1-bz1085620.patch
|
||||
Patch1: device-mapper-persistent-data-0.4.1-missing-man-pages.patch
|
||||
Patch2: device-mapper-persistent-data-0.4.1-avoid-strip.patch
|
||||
%ifarch %{rust_arches}
|
||||
BuildRequires: rust-packaging
|
||||
BuildRequires: rust >= 1.35
|
||||
BuildRequires: cargo
|
||||
%endif
|
||||
BuildRequires: make
|
||||
|
||||
%description
|
||||
thin-provisioning-tools contains check,dump,restore,repair,rmap
|
||||
|
@ -25,62 +49,318 @@ are included and era check, dump, restore and invalidate to manage
|
|||
snapshot eras
|
||||
|
||||
%prep
|
||||
%setup -q -n thin-provisioning-tools-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%setup -q -n thin-provisioning-tools-%{version}%{?version_suffix}
|
||||
%ifarch %{rust_arches}
|
||||
%patch1 -p1 -b .toml_update
|
||||
%patch15 -p1 -b .backup15
|
||||
#%%cargo_prep
|
||||
#%%cargo_generate_buildrequires
|
||||
tar xf %{SOURCE1}
|
||||
mkdir -p .cargo
|
||||
cat > .cargo/config <<END
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
|
||||
END
|
||||
%endif
|
||||
%patch0 -p1 -b .avoid_strip
|
||||
%patch2 -p1 -b .backup2
|
||||
%patch3 -p1 -b .backup3
|
||||
%patch4 -p1 -b .backup4
|
||||
%patch5 -p1 -b .backup5
|
||||
%patch6 -p1 -b .backup6
|
||||
%patch7 -p1 -b .backup7
|
||||
%patch8 -p1 -b .backup8
|
||||
%patch9 -p1 -b .backup9
|
||||
%patch10 -p1 -b .backup10
|
||||
%patch11 -p1 -b .backup11
|
||||
%patch12 -p1 -b .backup12
|
||||
%patch13 -p1 -b .backup13
|
||||
%patch14 -p1 -b .backup14
|
||||
# NOTE: patch 15 is above at the rust setup
|
||||
echo %{version}-%{release} > VERSION
|
||||
|
||||
%generate_buildrequires
|
||||
|
||||
%build
|
||||
autoconf
|
||||
%configure --with-optimisation=
|
||||
make %{?_smp_mflags} V=
|
||||
%ifarch %{rust_arches}
|
||||
%cargo_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
||||
|
||||
%clean
|
||||
%ifarch %{rust_arches}
|
||||
make DESTDIR=%{buildroot} MANDIR=%{_mandir} install-rust-tools
|
||||
# cargo_install installs into /usr/bin
|
||||
#%%cargo_install
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc COPYING README.md
|
||||
%{_mandir}/man8/cache_check.8.gz
|
||||
%{_mandir}/man8/cache_dump.8.gz
|
||||
%{_mandir}/man8/cache_restore.8.gz
|
||||
%{_mandir}/man8/cache_metadata_size.8.gz
|
||||
%{_mandir}/man8/cache_repair.8.gz
|
||||
%{_mandir}/man8/cache_restore.8.gz
|
||||
%{_mandir}/man8/cache_writeback.8.gz
|
||||
%{_mandir}/man8/era_check.8.gz
|
||||
%{_mandir}/man8/era_dump.8.gz
|
||||
%{_mandir}/man8/era_invalidate.8.gz
|
||||
%{_mandir}/man8/era_restore.8.gz
|
||||
%{_mandir}/man8/thin_check.8.gz
|
||||
%{_mandir}/man8/thin_delta.8.gz
|
||||
%{_mandir}/man8/thin_dump.8.gz
|
||||
%{_mandir}/man8/thin_ls.8.gz
|
||||
%{_mandir}/man8/thin_metadata_size.8.gz
|
||||
%{_mandir}/man8/thin_restore.8.gz
|
||||
%{_mandir}/man8/thin_repair.8.gz
|
||||
%{_mandir}/man8/thin_restore.8.gz
|
||||
%{_mandir}/man8/thin_rmap.8.gz
|
||||
%{_mandir}/man8/thin_trim.8.gz
|
||||
%ifarch %{rust_arches}
|
||||
%{_mandir}/man8/thin_metadata_pack.8.gz
|
||||
%{_mandir}/man8/thin_metadata_unpack.8.gz
|
||||
%endif
|
||||
%{_sbindir}/pdata_tools
|
||||
%{_sbindir}/cache_check
|
||||
%{_sbindir}/cache_dump
|
||||
%{_sbindir}/cache_metadata_size
|
||||
%{_sbindir}/cache_restore
|
||||
%{_sbindir}/cache_repair
|
||||
%{_sbindir}/cache_restore
|
||||
%{_sbindir}/cache_writeback
|
||||
%{_sbindir}/era_check
|
||||
%{_sbindir}/era_dump
|
||||
%{_sbindir}/era_restore
|
||||
%{_sbindir}/era_invalidate
|
||||
%{_sbindir}/era_restore
|
||||
%{_sbindir}/thin_check
|
||||
%{_sbindir}/thin_delta
|
||||
%{_sbindir}/thin_dump
|
||||
%{_sbindir}/thin_ls
|
||||
%{_sbindir}/thin_metadata_size
|
||||
%{_sbindir}/thin_restore
|
||||
%{_sbindir}/thin_repair
|
||||
%{_sbindir}/thin_restore
|
||||
%{_sbindir}/thin_rmap
|
||||
%{_sbindir}/thin_trim
|
||||
%ifarch %{rust_arches}
|
||||
%{_sbindir}/thin_metadata_pack
|
||||
%{_sbindir}/thin_metadata_unpack
|
||||
%endif
|
||||
#% {_sbindir}/thin_show_duplicates
|
||||
|
||||
%changelog
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Jul 22 2021 Marian Csontos <mcsontos@redhat.com> - 0.9.0-6
|
||||
- Fix rust-1.53 compilation issues.
|
||||
|
||||
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu Jun 10 2021 Marian Csontos <mcsontos@redhat.com> - 0.9.0-4
|
||||
- Fix gating test syntax.
|
||||
- Fix important issues found by static analysis.
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Mon Sep 21 2020 Marian Csontos <mcsontos@redhat.com> - 0.9.0-2
|
||||
- Update crc32c to version 0.5 supporting non x86 architectures
|
||||
|
||||
* Thu Sep 17 2020 Marian Csontos <mcsontos@redhat.com> - 0.9.0-1
|
||||
- Update to latest upstream version
|
||||
- New tools thin_metadata_pack and thin_metadata_unpack
|
||||
|
||||
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Tue Jun 04 2019 Marian Csontos <mcsontos@redhat.com> - 0.8.5-1
|
||||
- Update to latest upstream version
|
||||
|
||||
* Sat May 04 2019 Marian Csontos <mcsontos@redhat.com> - 0.8.1-1
|
||||
- Fix thin_repair should not require --repair option.
|
||||
|
||||
* Mon Apr 29 2019 Marian Csontos <mcsontos@redhat.com> - 0.8.0-1
|
||||
- Update to latest upstream version
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Jan 25 2019 Jonathan Wakely <jwakely@redhat.com> - 0.7.6-3
|
||||
- Rebuilt for Boost 1.69
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.6-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Apr 24 2018 Marian Csontos <mcsontos@redhat.com> - 0.7.6-1
|
||||
- Update to latest upstream version
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.5-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Tue Jan 23 2018 Jonathan Wakely <jwakely@redhat.com> - 0.7.5-2
|
||||
- Rebuilt for Boost 1.66
|
||||
|
||||
* Tue Nov 14 2017 Marian Csontos <mcsontos@redhat.com> - 0.7.5-1
|
||||
- Fix version 2 metadata corruption in cache_restore.
|
||||
|
||||
* Fri Oct 06 2017 Marian Csontos <mcsontos@redhat.com> - 0.7.3-1
|
||||
- Update to latest bugfix and documentation update release.
|
||||
- *_restore tools wipe superblock as a last resort.
|
||||
- Add thin_check --override-mapping-root.
|
||||
|
||||
* Fri Sep 22 2017 Marian Csontos <mcsontos@redhat.com> - 0.7.2-1
|
||||
- Update to latest upstream release including various bug fixes and new features.
|
||||
- Fix segfault when dump tools are given a tiny metadata file.
|
||||
- Fix -V exiting with 1.
|
||||
- Fix thin_check when running on XML dump instead of binary data.
|
||||
- Speed up free block searching.
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-0.6.rc6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-0.5.rc6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 0.7.0-0.4.rc6
|
||||
- Rebuilt for Boost 1.64
|
||||
|
||||
* Tue May 23 2017 Marian Csontos <mcsontos@redhat.com> - 0.7.0-0.3.rc6
|
||||
- Rebuilt for mass rebuild incorrectly tagging master to .fc26
|
||||
|
||||
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-0.2.rc6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
||||
|
||||
* Mon Mar 27 2017 Peter Rajnoha <prajnoha@redhat.com> - 0.7.0-0.1-rc6
|
||||
- Don't open devices as writeable if --clear-needs-check-flag is not set.
|
||||
- Fix cache metadata format version 2 superblock packing.
|
||||
|
||||
* Wed Mar 22 2017 Peter Rajnoha <prajnoha@redhat.com> - 0.7.0-0.1-rc5
|
||||
- Switch to a faster implementation of crc32 used for checksums.
|
||||
|
||||
* Tue Mar 21 2017 Peter Rajnoha <prajnoha@redhat.com> - 0.7.0-0.1-rc4
|
||||
- Add support for cache metadata format version 2 in cache tools.
|
||||
|
||||
* Thu Mar 16 2017 Peter Rajnoha <prajnoha@redhat.com> - 0.7.0-0.1-rc3
|
||||
- Fix compilation warnings and further code cleanup.
|
||||
|
||||
* Thu Mar 09 2017 Peter Rajnoha <prajnoha@redhat.com> - 0.7.0-0.1-rc2
|
||||
- Update to latest upstream release including various bug fixes and new features.
|
||||
- New thin_show_duplicates command.
|
||||
- Add '--skip-mappings' and '--format custom' options to thin_dump.
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.3-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 0.6.3-2
|
||||
- Rebuilt for Boost 1.63
|
||||
|
||||
* Thu Sep 22 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.3-1
|
||||
- Preallocate output file for thin_repair and thin_restore.
|
||||
|
||||
* Mon Jul 11 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-1
|
||||
- Fixes providing proper use of compiler flags.
|
||||
|
||||
* Mon Apr 11 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc8
|
||||
- Fixes for thin_trim.
|
||||
|
||||
* Tue Mar 22 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc7
|
||||
- Fixes for thin_repair.
|
||||
|
||||
* Wed Mar 09 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc6
|
||||
- Add new fields to thin_ls: MAPPED_BYTES, EXCLUSIVE_BYTES and SHARED_BYTES.
|
||||
|
||||
* Thu Feb 18 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc5
|
||||
- Fixes for thin_delta.
|
||||
|
||||
* Mon Feb 15 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc4
|
||||
- Fix bug in mapping comparison while using thin_delta.
|
||||
|
||||
* Mon Feb 15 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc3
|
||||
- Fix recent regression in thin_repair.
|
||||
- Force g++-98 dialect.
|
||||
|
||||
* Mon Feb 15 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.2-0.1.rc1
|
||||
- Fix bug in thin_dump when using metadata snaps.
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Wed Jan 20 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.6.0-1
|
||||
- New thin_ls command.
|
||||
|
||||
* Wed Jan 20 2016 Peter Rajnoha <prajnoha@redhat.com> - 0.5.6-1
|
||||
- era_invalidate may be run on live metadata if the --metadata-snap
|
||||
option is given.
|
||||
|
||||
* Fri Jan 15 2016 Jonathan Wakely <jwakely@redhat.com> - 0.5.5-3
|
||||
- Rebuilt for Boost 1.60
|
||||
|
||||
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 0.5.5-2
|
||||
- Rebuilt for Boost 1.59
|
||||
|
||||
* Thu Aug 13 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.5-1
|
||||
- Support thin_delta's --metadata_snap option without specifying snap location.
|
||||
- Update man pages to make it clearer that tools shoulnd't be run on live metadata.
|
||||
- Fix bugs in the metadata reference counting for thin_check.
|
||||
|
||||
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
|
||||
|
||||
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 0.5.4-2
|
||||
- rebuild for Boost 1.58
|
||||
|
||||
* Fri Jul 17 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.4-1
|
||||
- Fix cache_check with --clear-needs-check-flag option to
|
||||
make sure metadata device is not open already by the tool
|
||||
when open with O_EXCL mode is requested.
|
||||
|
||||
* Fri Jul 03 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.3-1
|
||||
- Tools now open the metadata device in O_EXCL mode to stop
|
||||
running the tools on active metadata.
|
||||
|
||||
* Fri Jul 03 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.2-1
|
||||
- Fix bug in damage reporting in thin_dump and thin_check.
|
||||
|
||||
* Thu Jun 25 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.1-1
|
||||
- Fix crash if tools are given a very large metadata device to restore to.
|
||||
|
||||
* Mon Jun 22 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.5.0-1
|
||||
- Add space map checking for thin_check.
|
||||
- Add --clear-needs-check option for cache_check.
|
||||
- Update to latest upstream release.
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Mon Jun 08 2015 Peter Rajnoha <prajnoha@redhat.com> - 0.4.2-1
|
||||
- New thin_delta and thin_trim commands.
|
||||
- Update to latest upstream release.
|
||||
|
||||
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.4.1-4
|
||||
- Rebuilt for GCC 5 C++11 ABI change
|
||||
|
||||
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 0.4.1-3
|
||||
- Rebuild for boost 1.57.0
|
||||
|
||||
* Tue Oct 29 2014 Heinz Mauelshagen <heinzm@redhat.com> - 0.4.1-2
|
||||
* Wed Oct 29 2014 Heinz Mauelshagen <heinzm@redhat.com> - 0.4.1-2
|
||||
- Resolves: bz#1159466
|
||||
|
||||
* Tue Oct 29 2014 Heinz Mauelshagen <heinzm@redhat.com> - 0.4.1-1
|
||||
* Wed Oct 29 2014 Heinz Mauelshagen <heinzm@redhat.com> - 0.4.1-1
|
||||
- New upstream version
|
||||
- Manual header additions/fixes
|
||||
|
||||
|
@ -121,7 +401,7 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
|||
* Thu Jul 25 2013 Heinz Mauelshagen <heinzm@redhat.com> - 0.2.1-5
|
||||
- enhance manual pages and fix typos
|
||||
|
||||
* Fri Jul 18 2013 Heinz Mauelshagen <heinzm@redhat.com> - 0.2.1-4
|
||||
* Thu Jul 18 2013 Heinz Mauelshagen <heinzm@redhat.com> - 0.2.1-4
|
||||
- Update thin_metadata_size manual page
|
||||
- thin_dump: support dumping default metadata snapshot
|
||||
|
||||
|
|
3
sources
3
sources
|
@ -1 +1,2 @@
|
|||
a1d5ac4bd865360dff6ac20ec00573cc thin-provisioning-tools-v0.4.1.tar.bz2
|
||||
SHA512 (v0.9.0.tar.gz) = e1796fb3948847d72ca8247cae58017507c0a847a00201b93668eeb8fbfea4107c4c2affa5c211c149798a89b10474e83d2bd61a5545a668299be97aed591e0f
|
||||
SHA512 (dmpd090-vendor3.tar.gz) = 90891c377a27695b20ce260852260d4fe08f3db6dba99401e56f2643a7ec94115c33e9c84b54188845acfde855e682c9b91c72dec3554effeade226b1df3303e
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
|
||||
# is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
# Author: Jakub Krysl <jkrysl@redhat.com>
|
||||
|
||||
# The toplevel namespace within which the test lives.
|
||||
TOPLEVEL_NAMESPACE=kernel
|
||||
|
||||
# The name of the package under test:
|
||||
PACKAGE_NAME=storage
|
||||
|
||||
# The path of the test below the package:
|
||||
RELATIVE_PATH=lvm/device-mapper-persistent-data/thin
|
||||
|
||||
# Version of the Test. Used with make tag.
|
||||
export TESTVERSION=1.0
|
||||
|
||||
# The combined namespace of the test.
|
||||
export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
|
||||
|
||||
|
||||
# A phony target is one that is not really the name of a file.
|
||||
# It is just a name for some commands to be executed when you
|
||||
# make an explicit request. There are two reasons to use a
|
||||
# phony target: to avoid a conflict with a file of the same
|
||||
# name, and to improve performance.
|
||||
.PHONY: all install download clean
|
||||
|
||||
# executables to be built should be added here, they will be generated on the system under test.
|
||||
BUILT_FILES=
|
||||
|
||||
# data files, .c files, scripts anything needed to either compile the test and/or run it.
|
||||
FILES=$(METADATA) runtest.sh PURPOSE
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x ./runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ *.rpm $(BUILT_FILES)
|
||||
|
||||
# You may need to add other targets e.g. to build executables from source code
|
||||
# Add them here:
|
||||
|
||||
|
||||
# Include Common Makefile
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
# Generate the testinfo.desc here:
|
||||
$(METADATA): Makefile
|
||||
@touch $(METADATA)
|
||||
# Change to the test owner's name
|
||||
@echo "Owner: Jakub Krysl <jkrysl@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "License: GPL" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Description: Testing thin tools provided by device-mapper-persistent-data">> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
@echo "RhtsRequires: kernel-kernel-storage-misc-env_setup" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
|
@ -0,0 +1,30 @@
|
|||
#===========================================================================
|
||||
#
|
||||
# PURPOSE file for:
|
||||
# /kernel/storage/lvm/device-mapper-persistent-data/thin
|
||||
#
|
||||
# Description:
|
||||
# Testing thin tools provided by device-mapper-persistent-data
|
||||
#
|
||||
# Bugs related:
|
||||
#
|
||||
#
|
||||
# Author(s):
|
||||
# Jakub Krysl
|
||||
# <jkrysl@redhat.com>
|
||||
#
|
||||
#===========================================================================
|
||||
# Note:
|
||||
# As with some of Storage tests, at the end of the test it will check
|
||||
# for errors on the logs.
|
||||
# This check if implemented on /kernel/storage/include/python_modules
|
||||
# LogChecker.py module
|
||||
#
|
||||
# To avoid Storage tests reporting error that were caused before the test
|
||||
# started to run is recommended to run /kernel/storage/misc/log_checker
|
||||
# just before running this test
|
||||
#===========================================================================
|
||||
# This task takes optional parameters:
|
||||
#
|
||||
#===========================================================================
|
||||
# EndFile
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2017 Red Hat, Inc. All rights reserved. This copyrighted
|
||||
# material is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# Author: Jakub Krysl <jkrysl@redhat.com>
|
||||
rhts-run-simple-test functions_test ./dmpd_functions.py
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
# Tests suitable to run in classic environment
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- tools_not_linked_usr
|
||||
- functions_test
|
||||
required_packages:
|
||||
- findutils # beakerlib needs find command
|
||||
- which # tools_not_linked_usr needs which command
|
||||
|
||||
# Tests suitable to run in container and atomic environments
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- container
|
||||
- atomic
|
||||
tests:
|
||||
- tools_not_linked_usr
|
||||
required_packages:
|
||||
- findutils # beakerlib needs find command
|
||||
- which # tools_not_linked_usr needs which command
|
|
@ -0,0 +1,75 @@
|
|||
# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
|
||||
# is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# Author: Bruno Goncalves <bgoncalv@redhat.com>
|
||||
|
||||
# The toplevel namespace within which the test lives.
|
||||
TOPLEVEL_NAMESPACE=kernel
|
||||
|
||||
# The name of the package under test:
|
||||
PACKAGE_NAME=storage
|
||||
|
||||
# The path of the test below the package:
|
||||
RELATIVE_PATH=lvm/device-mapper-persistent-data/tools_not_linked_usr
|
||||
|
||||
# Version of the Test. Used with make tag.
|
||||
export TESTVERSION=1.0
|
||||
|
||||
# The combined namespace of the test.
|
||||
export TEST=/$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)
|
||||
|
||||
|
||||
# A phony target is one that is not really the name of a file.
|
||||
# It is just a name for some commands to be executed when you
|
||||
# make an explicit request. There are two reasons to use a
|
||||
# phony target: to avoid a conflict with a file of the same
|
||||
# name, and to improve performance.
|
||||
.PHONY: all install download clean
|
||||
|
||||
# executables to be built should be added here, they will be generated on the system under test.
|
||||
BUILT_FILES=
|
||||
|
||||
# data files, .c files, scripts anything needed to either compile the test and/or run it.
|
||||
FILES=$(METADATA) runtest.sh PURPOSE tools_not_linked_usr.py
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x ./runtest.sh
|
||||
chmod a+x ./tools_not_linked_usr.py
|
||||
|
||||
clean:
|
||||
rm -f *~ *.rpm $(BUILT_FILES)
|
||||
|
||||
# You may need to add other targets e.g. to build executables from source code
|
||||
# Add them here:
|
||||
|
||||
|
||||
# Include Common Makefile
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
# Generate the testinfo.desc here:
|
||||
$(METADATA): Makefile
|
||||
@touch $(METADATA)
|
||||
# Change to the test owner's name
|
||||
@echo "Owner: Bruno Goncalves <bgoncalv@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "License: GPL" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Description: Make sure tools are not linked to lib under /usr.">> $(METADATA)
|
||||
@echo "TestTime: 1h" >> $(METADATA)
|
||||
@echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
@echo "Requires: $(PACKAGE_NAME)" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
|
@ -0,0 +1,13 @@
|
|||
#===========================================================================
|
||||
#
|
||||
# Description:
|
||||
# Make sure tools are not using any library that is linked to /usr
|
||||
#
|
||||
# Bugs related:
|
||||
#
|
||||
# Author(s):
|
||||
# Bruno Goncalves
|
||||
# <bgoncalv@redhat.com>
|
||||
#
|
||||
#===========================================================================
|
||||
# EndFile
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted
|
||||
# material is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# Author: Bruno Goncalves <bgoncalv@redhat.com>
|
||||
rhts-run-simple-test tools_not_linked_usr ./tools_not_linked_usr.py
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
# Copyright (c) 2006 Red Hat, Inc. All rights reserved. This copyrighted material
|
||||
# is made available to anyone wishing to use, modify, copy, or
|
||||
# redistribute it subject to the terms and conditions of the GNU General
|
||||
# Public License v.2.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# Author: Bruno Goncalves <bgoncalv@redhat.com>
|
||||
|
||||
from os import walk
|
||||
import subprocess
|
||||
import sys
|
||||
import re
|
||||
|
||||
def run(cmd):
|
||||
print("INFO: Running '%s'..." % cmd)
|
||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
||||
stdout, stderr = p.communicate()
|
||||
|
||||
retcode = p.returncode
|
||||
output = stdout + stderr
|
||||
print(output)
|
||||
return retcode, output
|
||||
|
||||
def start_test():
|
||||
|
||||
#if uses any library linked to /usr this my affect the tools during boot
|
||||
print("INFO: Making sure tools provided by device-mapper-persistent-data "
|
||||
"are not linked to /usr")
|
||||
|
||||
#Paths where we should have no libraries linked from
|
||||
lib_paths = ["/usr/"]
|
||||
|
||||
package = "device-mapper-persistent-data"
|
||||
run("yum install -y %s" % package)
|
||||
#Get all tools that we need to check
|
||||
ret, output = run("rpm -ql %s | grep \"sbin/\"" % package)
|
||||
if ret != 0:
|
||||
print("FAIL: Could not get the tools shipped from %s" % package)
|
||||
return False
|
||||
tools = output.split("\n")
|
||||
|
||||
error = False
|
||||
for tool in tools:
|
||||
if not tool:
|
||||
#skip any blank line
|
||||
continue
|
||||
tool_error = 0
|
||||
for lib_path in lib_paths:
|
||||
print("INFO: Checking if %s is not linked to libraries at %s" % (tool, lib_path))
|
||||
ret, linked_lib = run("ldd %s" % tool)
|
||||
if ret != 0:
|
||||
print("FAIL: Could not list dynamically libraries for %s" % (tool))
|
||||
tool_error += 1
|
||||
else:
|
||||
#The command executed sucessfuly
|
||||
#check if any library linked is from lib_path
|
||||
links = linked_lib.split("\n")
|
||||
for link in links:
|
||||
if re.match(".*%s.*" % lib_path, link):
|
||||
print("FAIL: %s is linked to %s" % (tool, link))
|
||||
tool_error += 1
|
||||
|
||||
if tool_error == 0:
|
||||
print("%s is not linked to %s" % (tool, lib_path))
|
||||
else:
|
||||
#found some error in at least 1 tool
|
||||
error = True
|
||||
|
||||
if error:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
if not start_test():
|
||||
print("FAIL: test failed")
|
||||
sys.exit(1)
|
||||
|
||||
print("PASS: Test pass")
|
||||
sys.exit(0)
|
||||
|
||||
main()
|
||||
|
Loading…
Reference in New Issue