]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tool/ceph_dedup: remove unused code
authormyoungwon oh <ohmyoungwon@gmail.com>
Thu, 12 Oct 2023 15:19:37 +0000 (15:19 +0000)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 12 Mar 2024 01:53:58 +0000 (01:53 +0000)
Since the ceph-dedup-daemon exclusively uses set-chunk op,
dedup options in pool_info_t is not necessary.
These options are relevant only when handling tier-flush op.

Plus, this commit include the removal of unused code that is
no longer in use.

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/tools/ceph_dedup/ceph_dedup_daemon.cc
src/tools/ceph_dedup/common.h

index cbc3c60e47e6d059d053270d1141e7fb969215d0..4bad4b4ff6f913452e8773f0f4f7559403b14738 100644 (file)
@@ -19,15 +19,8 @@ po::options_description make_usage() {
     ("chunk-pool", po::value<std::string>(), ": set chunk pool name")
     ("max-thread", po::value<int>(), ": set max thread")
     ("report-period", po::value<int>(), ": set report-period")
-    ("max-seconds", po::value<int>(), ": set max runtime")
-    ("max-read-size", po::value<int>(), ": set max read size")
     ("pool", po::value<std::string>(), ": set pool name")
-    ("min-chunk-size", po::value<int>(), ": min chunk size (byte)")
-    ("max-chunk-size", po::value<int>(), ": max chunk size (byte)")
-    ("dedup-cdc-chunk-size", po::value<unsigned int>(), ": set dedup chunk size for cdc")
     ("snap", ": deduplciate snapshotted object")
-    ("debug", ": enable debug")
-    ("pgid", ": set pgid")
     ("chunk-dedup-threshold", po::value<int>(), ": set the threshold for chunk dedup (number of duplication) ")
     ("sampling-ratio", po::value<int>(), ": set the sampling ratio (percentile)")
     ("wakeup-period", po::value<int>(), ": set the wakeup period of crawler thread (sec)")
@@ -293,7 +286,6 @@ private:
     size_t max_object_count);
   std::vector<size_t> sample_object(size_t count);
   void try_dedup_and_accumulate_result(ObjectItem &object, snap_t snap = 0);
-  bool ok_to_dedup_all();
   int do_chunk_dedup(chunk_t &chunk, snap_t snap);
   bufferlist read_object(ObjectItem &object);
   std::vector<std::tuple<bufferlist, pair<uint64_t, uint64_t>>> do_cdc(
@@ -644,35 +636,6 @@ int make_crawling_daemon(const po::variables_map &opts)
       << cpp_strerror(ret) << std::endl;
     return -EINVAL;
   }
-  bufferlist inbl;
-  ret = rados.mon_command(
-      make_pool_str(base_pool_name, "fingerprint_algorithm", fp_algo),
-      inbl, NULL, NULL);
-  if (ret < 0) {
-    cerr << " operate fail : " << cpp_strerror(ret) << std::endl;
-    return ret;
-  }
-  ret = rados.mon_command(
-      make_pool_str(base_pool_name, "dedup_chunk_algorithm", "fastcdc"),
-      inbl, NULL, NULL);
-  if (ret < 0) {
-    cerr << " operate fail : " << cpp_strerror(ret) << std::endl;
-    return ret;
-  }
-  ret = rados.mon_command(
-      make_pool_str(base_pool_name, "dedup_cdc_chunk_size", chunk_size),
-      inbl, NULL, NULL);
-  if (ret < 0) {
-    cerr << " operate fail : " << cpp_strerror(ret) << std::endl;
-    return ret;
-  }
-  ret = rados.mon_command(
-      make_pool_str(base_pool_name, "dedup_tier", chunk_pool_name),
-      inbl, NULL, NULL);
-  if (ret < 0) {
-    cerr << " operate fail : " << cpp_strerror(ret) << std::endl;
-    return ret;
-  }
 
   cout << "SampleRatio : " << sampling_ratio << std::endl
     << "Chunk Dedup Threshold : " << chunk_dedup_threshold << std::endl
index d79331d8f3a13ea8e185aeea46b9c0ac1893c286..ccc1da5217d24edd8f594911fcb57bce4932ba41 100644 (file)
@@ -47,8 +47,6 @@ namespace po = boost::program_options;
 using namespace librados;
 
 constexpr unsigned default_op_size = 1 << 26;
-constexpr unsigned default_max_thread = 2;
-constexpr int32_t default_report_period = 10;
 
 string get_opts_pool_name(const po::variables_map &opts);
 string get_opts_chunk_algo(const po::variables_map &opts);