Compare commits
10 Commits
2dd0f0ef55
...
2d18703d22
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d18703d22 | ||
|
|
45d0c88fbe | ||
|
|
2b95d6c80e | ||
|
|
d81801f4ac | ||
|
|
536c812565 | ||
|
|
849e1e700d | ||
|
|
f10a811dce | ||
|
|
c86c488b8d | ||
|
|
ab7cd504e7 | ||
|
|
cf59bfc248 |
26
0002-build-remove-lboost_iostreams-linker-flag.patch
Normal file
26
0002-build-remove-lboost_iostreams-linker-flag.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 6b7e66d8f9257c09052586baad692ecae89aaa68 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
Date: Tue, 22 Jun 2021 21:23:52 +0100
|
||||||
|
Subject: [PATCH] [build] Remove -lboost_iostreams linker flag
|
||||||
|
|
||||||
|
This was previously needed for thin-provisioning/thin_metadata_pack.cc
|
||||||
|
but that file was rewritten in Rust and no longer needs Boost. The flag
|
||||||
|
causes every binary to have a completely redundant depedency on
|
||||||
|
libboost_iostream.so, which is an issue for RHEL packaging.
|
||||||
|
---
|
||||||
|
Makefile.in | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/Makefile.in b/Makefile.in
|
||||||
|
index b29551d9..ec665ca0 100644
|
||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -190,7 +190,7 @@ CXXFLAGS+=@CXX_STRERROR_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,44 @@
|
|||||||
|
From f3c2ade90acbd1ac9a9391ff8e09fbe252a63b45 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||||
|
Date: Tue, 12 Oct 2021 23:19:00 +0800
|
||||||
|
Subject: [PATCH] [thin_ll_dump] Fix potential segfault while reading invalid
|
||||||
|
subtree roots
|
||||||
|
|
||||||
|
---
|
||||||
|
thin-provisioning/thin_ll_dump.cc | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/thin-provisioning/thin_ll_dump.cc b/thin-provisioning/thin_ll_dump.cc
|
||||||
|
index e6048d0..9207cd2 100644
|
||||||
|
--- a/thin-provisioning/thin_ll_dump.cc
|
||||||
|
+++ b/thin-provisioning/thin_ll_dump.cc
|
||||||
|
@@ -135,7 +135,9 @@ namespace {
|
||||||
|
public:
|
||||||
|
ll_mapping_tree_emitter(block_manager::ptr bm,
|
||||||
|
indented_stream &out)
|
||||||
|
- : bm_(bm), out_(out) {
|
||||||
|
+ : bm_(bm),
|
||||||
|
+ nv_(create_btree_node_validator()),
|
||||||
|
+ out_(out) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void visit(btree_path const &path, block_address tree_root) {
|
||||||
|
@@ -147,6 +149,7 @@ namespace {
|
||||||
|
try {
|
||||||
|
block_manager::read_ref rr = bm_->read_lock(tree_root);
|
||||||
|
node_ref<uint64_traits> n = btree_detail::to_node<uint64_traits>(rr);
|
||||||
|
+ nv_->check(n.raw(), tree_root);
|
||||||
|
node_info ni;
|
||||||
|
convert_to_node_info(n, ni);
|
||||||
|
output_node_info(out_, ni);
|
||||||
|
@@ -160,6 +163,7 @@ namespace {
|
||||||
|
}
|
||||||
|
private:
|
||||||
|
block_manager::ptr bm_;
|
||||||
|
+ bcache::validator::ptr nv_;
|
||||||
|
indented_stream& out_;
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
From d2d6ab79266fb8778c67b803d654eefdc94791f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||||
|
Date: Tue, 24 Aug 2021 16:20:50 +0800
|
||||||
|
Subject: [PATCH] Check consistency of thin_ids before running a regular dump
|
||||||
|
|
||||||
|
---
|
||||||
|
thin-provisioning/metadata_dumper.cc | 8 ++++++--
|
||||||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
|
||||||
|
index 4feb40f..b462781 100644
|
||||||
|
--- a/thin-provisioning/metadata_dumper.cc
|
||||||
|
+++ b/thin-provisioning/metadata_dumper.cc
|
||||||
|
@@ -405,6 +405,9 @@ namespace {
|
||||||
|
if (rhs == ms.end())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
+ if (lhs->second != rhs->second)
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
filtered.push_back(make_pair(p.first.b, p.second.b));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -867,8 +870,9 @@ namespace {
|
||||||
|
|
||||||
|
auto tm = open_tm(bm, superblock_detail::SUPERBLOCK_LOCATION);
|
||||||
|
|
||||||
|
- if (!get_dev_ids(*tm, msb->device_details_root_) ||
|
||||||
|
- !get_map_ids(*tm, msb->data_mapping_root_))
|
||||||
|
+ auto maybe_dev_ids = get_dev_ids(*tm, msb->device_details_root_);
|
||||||
|
+ auto maybe_map_ids = get_map_ids(*tm, msb->data_mapping_root_);
|
||||||
|
+ if (!maybe_dev_ids || !maybe_map_ids || (*maybe_dev_ids) != (*maybe_map_ids))
|
||||||
|
find_better_roots_(bm, *msb);
|
||||||
|
|
||||||
|
emit_trees_(bm, *msb, e, opts);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
67
0005-Fix-sorting-of-data-mapping-candidates.patch
Normal file
67
0005-Fix-sorting-of-data-mapping-candidates.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
From c286041f2595c50ced44987343c81a34d7698c23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||||
|
Date: Mon, 16 Aug 2021 18:16:29 +0800
|
||||||
|
Subject: [PATCH] [thin_repair/thin_dump] Fix sorting of data mapping
|
||||||
|
candidates
|
||||||
|
|
||||||
|
- Fix the references for sorting. The timestamp statistics is stored
|
||||||
|
in node_info corresponding to the second element.
|
||||||
|
- Fix the timestamp comparison routine. The mapping root with more recent
|
||||||
|
blocks should have higher priority.
|
||||||
|
---
|
||||||
|
thin-provisioning/metadata_dumper.cc | 37 +++++++++++++++++-----------
|
||||||
|
1 file changed, 22 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/thin-provisioning/metadata_dumper.cc b/thin-provisioning/metadata_dumper.cc
|
||||||
|
index 665c7624..37c69694 100644
|
||||||
|
--- a/thin-provisioning/metadata_dumper.cc
|
||||||
|
+++ b/thin-provisioning/metadata_dumper.cc
|
||||||
|
@@ -252,26 +252,33 @@ namespace {
|
||||||
|
|
||||||
|
bool cmp_time_counts(pair<node_info, node_info> const &lhs_pair,
|
||||||
|
pair<node_info, node_info> const &rhs_pair) {
|
||||||
|
- auto const &lhs = lhs_pair.first.time_counts;
|
||||||
|
- auto const &rhs = rhs_pair.first.time_counts;
|
||||||
|
+ auto const &lhs = lhs_pair.second.time_counts;
|
||||||
|
+ auto const &rhs = rhs_pair.second.time_counts;
|
||||||
|
|
||||||
|
- for (auto lhs_it = lhs.crbegin(); lhs_it != lhs.crend(); lhs_it++) {
|
||||||
|
- for (auto rhs_it = rhs.crbegin(); rhs_it != rhs.crend(); rhs_it++) {
|
||||||
|
- if (lhs_it->first > rhs_it->first)
|
||||||
|
- return true;
|
||||||
|
|
||||||
|
- else if (rhs_it->first > lhs_it->first)
|
||||||
|
- return false;
|
||||||
|
+ auto lhs_it = lhs.crbegin();
|
||||||
|
+ auto rhs_it = rhs.crbegin();
|
||||||
|
+ while (lhs_it != lhs.crend() && rhs_it != rhs.crend()) {
|
||||||
|
|
||||||
|
- else if (lhs_it->second > rhs_it->second)
|
||||||
|
- return true;
|
||||||
|
+ auto lhs_time = lhs_it->first;
|
||||||
|
+ auto rhs_time = rhs_it->first;
|
||||||
|
+ auto lhs_count = lhs_it->second;
|
||||||
|
+ auto rhs_count = rhs_it->second;
|
||||||
|
|
||||||
|
- else if (rhs_it->second > lhs_it->second)
|
||||||
|
- return false;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ if (lhs_time > rhs_time)
|
||||||
|
+ return true;
|
||||||
|
+ else if (rhs_time > lhs_time)
|
||||||
|
+ return false;
|
||||||
|
+ else if (lhs_count > rhs_count)
|
||||||
|
+ return true;
|
||||||
|
+ else if (rhs_count > lhs_count)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ lhs_it++;
|
||||||
|
+ rhs_it++;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- return true;
|
||||||
|
+ return (lhs_it != lhs.crend()) ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
class gatherer {
|
||||||
22
0006-btree-Fix-rebalancing-checks.patch
Normal file
22
0006-btree-Fix-rebalancing-checks.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 8bfe7ee6f3fa89482a09d3c6ea933759f4d4b4a7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ming-Hung Tsai <mtsai@redhat.com>
|
||||||
|
Date: Thu, 25 Mar 2021 15:06:52 +0800
|
||||||
|
Subject: [PATCH] [btree] Fix rebalancing checks
|
||||||
|
|
||||||
|
---
|
||||||
|
persistent-data/data-structures/btree.tcc | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/persistent-data/data-structures/btree.tcc b/persistent-data/data-structures/btree.tcc
|
||||||
|
index 059ebaab..27c9adc2 100644
|
||||||
|
--- a/persistent-data/data-structures/btree.tcc
|
||||||
|
+++ b/persistent-data/data-structures/btree.tcc
|
||||||
|
@@ -338,7 +338,7 @@ namespace persistent_data {
|
||||||
|
unsigned nr_right = rhs.get_nr_entries();
|
||||||
|
unsigned max_entries = get_max_entries();
|
||||||
|
|
||||||
|
- if (nr_left - count > max_entries || nr_right - count > max_entries)
|
||||||
|
+ if (nr_left - count > max_entries || nr_right + count > max_entries)
|
||||||
|
throw runtime_error("too many entries");
|
||||||
|
|
||||||
|
if (count > 0) {
|
||||||
39
0007-all-Fix-resource-leaks.patch
Normal file
39
0007-all-Fix-resource-leaks.patch
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
From f7e4a8faa920a1d9746b056e9820da13b5b488e7 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] [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 e4f37228..82536608 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 002b6ba9..73b01b4e 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
|
||||||
23
0008-thin_show_metadata-Fix-out-of-bounds-access.patch
Normal file
23
0008-thin_show_metadata-Fix-out-of-bounds-access.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
From 0004dced935879e190dd660e1f82f1d751454c78 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] [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 bdbab3f7..dbc7a80c 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)) {
|
||||||
22
0009-build-Fix-customized-emitter-linkage.patch
Normal file
22
0009-build-Fix-customized-emitter-linkage.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 041ed7858c887f2ae0c300741c61b8c8af7afe55 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] [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 038c41c7..71922588 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 $@ $<
|
||||||
|
|
||||||
136
0010-thin_dump-Fix-leaked-shared-object-handle.patch
Normal file
136
0010-thin_dump-Fix-leaked-shared-object-handle.patch
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
From 75c0a3656c700eabf13a4bbf09421871c77a5f43 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] [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 58f12d29..2e845f34 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------
|
||||||
49
0011-thin_show_duplicates-Fix-potential-errors.patch
Normal file
49
0011-thin_show_duplicates-Fix-potential-errors.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From 759407445f4e1c31cc0d7bff2881ebd981e2d8fe 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] [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 b1eebb74..f7354eb4 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
|
||||||
80
0012-all-Fix-uninitialized-class-members.patch
Normal file
80
0012-all-Fix-uninitialized-class-members.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 2e62363446389f6d160a0a10d7ab3e735401bb6c 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] [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 c09fa665..7fbac7db 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 4feb40f6..665c7624 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 0eb119e6..56f97fac 100644
|
||||||
|
--- a/thin-provisioning/thin_delta.cc
|
||||||
|
+++ b/thin-provisioning/thin_delta.cc
|
||||||
|
@@ -214,7 +214,9 @@ namespace {
|
||||||
|
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) {
|
||||||
30
0013-thin_metadata_size-Fix-potential-string-overflow.patch
Normal file
30
0013-thin_metadata_size-Fix-potential-string-overflow.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 3145a1f4ded700cfda3f2dffc203cc5c3cfb1d13 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] [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 b6a5718e..f14696c3 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);
|
||||||
|
}
|
||||||
21
0014-file_utils-Fix-resource-leak.patch
Normal file
21
0014-file_utils-Fix-resource-leak.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
From 429e7f01d73f65952a844c406191d27258b353db 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] [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 82536608..e6095f7a 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,47 +0,0 @@
|
|||||||
From 2c9ee45c8c7836674194739a2bcc4bb4db08d27e Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Tue, 9 Apr 2019 21:27:36 +0800
|
|
||||||
Subject: [PATCH 1/4] [build] Fix static build by including contrib/Makefile
|
|
||||||
early (#100) Closes: #99
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile.in | 8 +++-----
|
|
||||||
1 file changed, 3 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile.in b/Makefile.in
|
|
||||||
index df590b4..5e9f30a 100644
|
|
||||||
--- a/Makefile.in
|
|
||||||
+++ b/Makefile.in
|
|
||||||
@@ -29,6 +29,8 @@ endif
|
|
||||||
.PHONY: all
|
|
||||||
all: $(PROGRAMS) $(TESTLIBS)
|
|
||||||
|
|
||||||
+include contrib/Makefile
|
|
||||||
+
|
|
||||||
SOURCE=\
|
|
||||||
base/output_file_requirements.cc \
|
|
||||||
base/application.cc \
|
|
||||||
@@ -140,10 +142,8 @@ CXX:=@CXX@
|
|
||||||
STRIP:=@STRIP@
|
|
||||||
OBJECTS:=$(subst .cc,.o,$(SOURCE))
|
|
||||||
|
|
||||||
-# FIXME EMITTERS += $(PLUGIN_LIBS) doesn't work, probably because it's empty at
|
|
||||||
-# the time of use?
|
|
||||||
ifeq ("@STATIC@", "yes")
|
|
||||||
-EMITTERS += contrib/*.a
|
|
||||||
+EMITTERS += $(PLUGIN_LIBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
TOP_DIR:=@top_srcdir@
|
|
||||||
@@ -318,8 +318,6 @@ endif
|
|
||||||
|
|
||||||
.PHONY: install
|
|
||||||
|
|
||||||
-include contrib/Makefile
|
|
||||||
-
|
|
||||||
ifeq ("@TESTING@", "yes")
|
|
||||||
include unit-tests/Makefile
|
|
||||||
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
From 9b1acc658fdf5b066a2afc5324de8e3067fa5912 Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Tue, 9 Apr 2019 21:29:33 +0800
|
|
||||||
Subject: [PATCH 2/4] [restore_emitter] squash a strncpy warning
|
|
||||||
|
|
||||||
---
|
|
||||||
caching/restore_emitter.cc | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/caching/restore_emitter.cc b/caching/restore_emitter.cc
|
|
||||||
index b7a573f..5c30b9f 100644
|
|
||||||
--- a/caching/restore_emitter.cc
|
|
||||||
+++ b/caching/restore_emitter.cc
|
|
||||||
@@ -26,7 +26,7 @@ namespace {
|
|
||||||
|
|
||||||
superblock &sb = md_->sb_;
|
|
||||||
sb.version = metadata_version_;
|
|
||||||
- strncpy((char *) sb.policy_name, policy.c_str(), sizeof(sb.policy_name));
|
|
||||||
+ strncpy((char *) sb.policy_name, policy.c_str(), sizeof(sb.policy_name) - 1);
|
|
||||||
memset(sb.policy_version, 0, sizeof(sb.policy_version)); // FIXME: should come from xml
|
|
||||||
sb.policy_hint_size = hint_width;
|
|
||||||
md_->setup_hint_array(hint_width);
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
From 5276bce4b8bca71cad36f48b309bdef23fac1134 Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Tue, 9 Apr 2019 21:33:29 +0800
|
|
||||||
Subject: [PATCH 3/4] [run_set] fix invalid iterator operations (#113)
|
|
||||||
|
|
||||||
---
|
|
||||||
persistent-data/run_set.h | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/persistent-data/run_set.h b/persistent-data/run_set.h
|
|
||||||
index 68a5f46..6c23dc1 100644
|
|
||||||
--- a/persistent-data/run_set.h
|
|
||||||
+++ b/persistent-data/run_set.h
|
|
||||||
@@ -64,13 +64,13 @@ namespace base {
|
|
||||||
|
|
||||||
typename rset::const_iterator it = runs_.lower_bound(run<T>(v));
|
|
||||||
|
|
||||||
- if (it->begin_ == v)
|
|
||||||
+ if (it != runs_.end() && it->begin_ == v)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
- it--;
|
|
||||||
-
|
|
||||||
- if (it != runs_.end())
|
|
||||||
+ if (it != runs_.begin()) {
|
|
||||||
+ it--;
|
|
||||||
return it->contains(v);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
From 529a7cf3f5d5780d5e44c8508d2d42903672f7e8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: root <root@localhost.localdomain>
|
|
||||||
Date: Tue, 9 Apr 2019 21:36:22 +0800
|
|
||||||
Subject: [PATCH 4/4] [space-map-disk] fix the search range (#117)
|
|
||||||
|
|
||||||
---
|
|
||||||
persistent-data/space-maps/disk.cc | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/persistent-data/space-maps/disk.cc b/persistent-data/space-maps/disk.cc
|
|
||||||
index ce6a42c..d8db76f 100644
|
|
||||||
--- a/persistent-data/space-maps/disk.cc
|
|
||||||
+++ b/persistent-data/space-maps/disk.cc
|
|
||||||
@@ -390,7 +390,8 @@ namespace {
|
|
||||||
|
|
||||||
bitmap bm(tm_, ie, bitmap_validator_);
|
|
||||||
unsigned bit_begin = (index == begin_index) ? (begin % ENTRIES_PER_BLOCK) : 0;
|
|
||||||
- unsigned bit_end = (index == end_index - 1) ? (end % ENTRIES_PER_BLOCK) : ENTRIES_PER_BLOCK;
|
|
||||||
+ unsigned bit_end = (index == end_index - 1) ?
|
|
||||||
+ (end - ENTRIES_PER_BLOCK * index) : ENTRIES_PER_BLOCK;
|
|
||||||
|
|
||||||
boost::optional<unsigned> maybe_b = bm.find_free(bit_begin, bit_end);
|
|
||||||
if (maybe_b) {
|
|
||||||
--
|
|
||||||
2.19.1
|
|
||||||
|
|
||||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# thin-provisioning-tools
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
A suite of tools for manipulating the metadata of the dm-thin, dm-cache and dm-era device-mapper targets.
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# thin-provisioning-tools
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
A suite of tools for manipulating the metadata of the dm-thin, dm-cache and dm-era device-mapper targets.
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
@ -1,20 +1,30 @@
|
|||||||
Name: thin-provisioning-tools
|
Name: thin-provisioning-tools
|
||||||
Version: 0.7.6
|
Version: 0.9.0
|
||||||
Release: 6
|
Release: 5
|
||||||
Summary: Tools for manipulating Device-mapper metadata
|
Summary: Tools for manipulating Device-mapper metadata
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://github.com/jthornber/thin-provisioning-tools
|
URL: https://github.com/jthornber/thin-provisioning-tools
|
||||||
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}.tar.gz
|
Source0: https://github.com/jthornber/thin-provisioning-tools/archive/v%{version}.tar.gz
|
||||||
Patch0: 0000-device-mapper-persistent-data-avoid-strip.patch
|
Patch1: 0001-device-mapper-persistent-data-avoid-strip.patch
|
||||||
Patch1: 6000-build-Fix-static-build-by-including-contrib-Makefile.patch
|
Patch2: 0002-build-remove-lboost_iostreams-linker-flag.patch
|
||||||
Patch2: 6001-restore_emitter-squash-a-strncpy-warning.patch
|
Patch3: 0003-thin_ll_dump-Fix-potential-segfault-while-reading-in.patch
|
||||||
Patch3: 6002-run_set-fix-invalid-iterator-operations-113.patch
|
Patch4: 0004-Check-consistency-of-thin_ids-before-running-a-regul.patch
|
||||||
Patch4: 6003-space-map-disk-fix-the-search-range-117.patch
|
Patch5: 0005-Fix-sorting-of-data-mapping-candidates.patch
|
||||||
|
Patch6: 0006-btree-Fix-rebalancing-checks.patch
|
||||||
|
Patch7: 0007-all-Fix-resource-leaks.patch
|
||||||
|
Patch8: 0008-thin_show_metadata-Fix-out-of-bounds-access.patch
|
||||||
|
Patch9: 0009-build-Fix-customized-emitter-linkage.patch
|
||||||
|
Patch10: 0010-thin_dump-Fix-leaked-shared-object-handle.patch
|
||||||
|
Patch11: 0011-thin_show_duplicates-Fix-potential-errors.patch
|
||||||
|
Patch12: 0012-all-Fix-uninitialized-class-members.patch
|
||||||
|
Patch13: 0013-thin_metadata_size-Fix-potential-string-overflow.patch
|
||||||
|
Patch14: 0014-file_utils-Fix-resource-leak.patch
|
||||||
|
|
||||||
BuildRequires: autoconf, expat-devel
|
BuildRequires: autoconf, expat-devel
|
||||||
BuildRequires: libaio-devel, libstdc++-devel
|
BuildRequires: libaio-devel, libstdc++-devel
|
||||||
BuildRequires: boost-devel, gcc-c++
|
BuildRequires: boost-devel, gcc-c++
|
||||||
Requires: expat
|
Requires: expat
|
||||||
|
Recommends: %{name}-help = %{version}-%{release}
|
||||||
Provides: device-mapper-persistent-data
|
Provides: device-mapper-persistent-data
|
||||||
Obsoletes: device-mapper-persistent-data
|
Obsoletes: device-mapper-persistent-data
|
||||||
|
|
||||||
@ -53,6 +63,21 @@ make DESTDIR=%{buildroot} MANDIR=%{_mandir} install
|
|||||||
%{_mandir}/man*/*
|
%{_mandir}/man*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 31 2024 wangzhiqiang <wangzhiqiang95@huawei.com> - 0.9.0-5
|
||||||
|
- backport bugfix patch from community
|
||||||
|
|
||||||
|
* Fri Nov 4 2022 wuguanghao <wuguanghao3@huawei.com> - 0.9.0-4
|
||||||
|
- backport bugfix patch from community
|
||||||
|
|
||||||
|
* Wed Sep 15 2021 Liu Zixian <liuzixian4@huawei.com> - 0.9.0-3
|
||||||
|
- Remove redundant dependency
|
||||||
|
|
||||||
|
* Mon Nov 9 2020 lixiaokeng<lixiaokeng@huawei.com> - 0.9.0-2
|
||||||
|
- Set help package as install require
|
||||||
|
|
||||||
|
* Tue Aug 26 2020 lixiaokeng<lixiaokeng@huawei.com> - 0.9.0-1
|
||||||
|
- upgrade to 0.9.0
|
||||||
|
|
||||||
* Tue Aug 18 2020 smileknife<jackshan2010@aliyun.com> - 0.7.6-6
|
* Tue Aug 18 2020 smileknife<jackshan2010@aliyun.com> - 0.7.6-6
|
||||||
- update release for rebuilding
|
- update release for rebuilding
|
||||||
|
|
||||||
|
|||||||
BIN
v0.7.6.tar.gz
BIN
v0.7.6.tar.gz
Binary file not shown.
BIN
v0.9.0.tar.gz
Normal file
BIN
v0.9.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user