]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/ceph_dedup_tool: add explanations for added two commands 43686/head
authormyoungwon oh <ohmyoungwon@gmail.com>
Mon, 13 Dec 2021 15:50:57 +0000 (00:50 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 14 Dec 2021 09:52:24 +0000 (18:52 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/tools/ceph_dedup_tool.cc

index cf88369a42baa5f5cd3bbdc7a5dd6886df706425..4b8c926f75ea55ec4705e046589548005f297652 100644 (file)
@@ -155,6 +155,9 @@ void usage()
   cout << "   --report-period <seconds> " << std::endl;
   cout << "   --max-seconds <seconds>" << std::endl;
   cout << "   --max-read-size <bytes> " << 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;