From cd139974ceb42f96156fc3f93629b29eea2b6362 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Tue, 9 Apr 2019 17:00:18 +0900 Subject: [PATCH] src/tools: fix printing wrong offset. Signed-off-by: Myoungwon Oh --- src/common/rabin.cc | 1 + src/tools/ceph_dedup_tool.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/rabin.cc b/src/common/rabin.cc index 4980960563a..794627a09aa 100644 --- a/src/common/rabin.cc +++ b/src/common/rabin.cc @@ -130,4 +130,5 @@ int RabinChunk::do_rabin_chunks(bufferlist & inputdata, chunks.push_back(make_pair(c_start, c_size)); } + return 0; } diff --git a/src/tools/ceph_dedup_tool.cc b/src/tools/ceph_dedup_tool.cc index f3a53ef5ca7..fa89d340f45 100644 --- a/src/tools/ceph_dedup_tool.cc +++ b/src/tools/ceph_dedup_tool.cc @@ -440,7 +440,7 @@ uint64_t EstimateDedupRatio::rabin_chunk(string oid, uint64_t offset) chunk.append(c_data); chunk.copy_in(0, p.second, outdata.c_str() + p.first); add_chunk_fp_to_stat(chunk); - cout << " oid: " << oid << " offset: " << p.first << " length: " << p.second << std::endl; + cout << " oid: " << oid << " offset: " << p.first + offset << " length: " << p.second << std::endl; } if (outdata.length() < op_size) { -- 2.47.3