From 60b7690262d2b7c7caa96fa2f1f43542f2421882 Mon Sep 17 00:00:00 2001 From: myoungwon oh Date: Tue, 14 Dec 2021 00:50:57 +0900 Subject: [PATCH] tools/ceph_dedup_tool: add explanations for added two commands Signed-off-by: Myoungwon Oh --- src/tools/ceph_dedup_tool.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/tools/ceph_dedup_tool.cc b/src/tools/ceph_dedup_tool.cc index cf88369a42baa..4b8c926f75ea5 100644 --- a/src/tools/ceph_dedup_tool.cc +++ b/src/tools/ceph_dedup_tool.cc @@ -155,6 +155,9 @@ void usage() cout << " --report-period " << std::endl; cout << " --max-seconds " << std::endl; cout << " --max-read-size " << std::endl; + cout << "explanations: " << std::endl; + cout << " chunk-dedup performs deduplication using a chunk generated by given source" << std::endl; + cout << " offset and length. object-dedup deduplicates the entire object, not a chunk" << std::endl; exit(1); } @@ -1135,6 +1138,12 @@ int make_dedup_object(const std::map < std::string, std::string > &opts, return ret; } + /* + * TODO: add a better way to make an object a manifest object. + * We're using set_chunk with an incorrect object here simply to make + * the object a manifest object, the tier_flush() will remove + * it and replace it with the real contents. + */ // convert object to manifest object ObjectWriteOperation op; bufferlist temp; @@ -1281,6 +1290,16 @@ int main(int argc, const char **argv) return chunk_scrub_common(opts, args); } else if (op_name == "chunk-dedup" || op_name == "object-dedup") { + /* + * chunk-dedup: + * using a chunk generated by given source, + * create a new object in the chunk pool or increase the reference + * if the object exists + * + * object-dedup: + * perform deduplication on the entire object, not a chunk. + * + */ return make_dedup_object(opts, args); } else { cerr << "unrecognized op " << op_name << std::endl; -- 2.39.5