From: Samuel Just Date: Fri, 6 Oct 2023 22:59:44 +0000 (-0700) Subject: tools/ceph_dedup_tool: make dedup_threshold a size_t X-Git-Tag: v19.0.0~73^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=08d71e82a34e7ab4eb79b1c81b331e03d5437155;p=ceph.git tools/ceph_dedup_tool: make dedup_threshold a size_t It was variously an int, a uint32_t, or an ssize_t. Standardize it to size_t. Signed-off-by: Samuel Just --- diff --git a/src/tools/ceph_dedup_tool.cc b/src/tools/ceph_dedup_tool.cc index 4808058b866c..c67368f9318c 100644 --- a/src/tools/ceph_dedup_tool.cc +++ b/src/tools/ceph_dedup_tool.cc @@ -180,7 +180,7 @@ po::options_description make_usage() { ("snap", ": deduplciate snapshotted object") ("debug", ": enable debug") ("pgid", ": set pgid") - ("chunk-dedup-threshold", po::value(), ": set the threshold for chunk dedup (number of duplication) ") + ("chunk-dedup-threshold", po::value(), ": set the threshold for chunk dedup (number of duplication) ") ("sampling-ratio", po::value(), ": set the sampling ratio (percentile)") ("daemon", ": execute sample dedup in daemon mode") ("loop", ": execute sample dedup in a loop until terminated. Sleeps 'wakeup-period' seconds between iterations") @@ -686,12 +686,12 @@ public: under_threshold_fp_map.clear(); } - FpMap(ssize_t dedup_threshold) : dedup_threshold(dedup_threshold) {} + FpMap(size_t dedup_threshold) : dedup_threshold(dedup_threshold) {} FpMap() = delete; private: map_t under_threshold_fp_map; map_t over_threshold_fp_map; - const ssize_t dedup_threshold; + const size_t dedup_threshold; }; class FpStore { @@ -757,7 +757,7 @@ public: FpStore fp_store; const double sampling_ratio = -1; SampleDedupGlobal( - int chunk_threshold, + size_t chunk_threshold, int sampling_ratio, uint32_t report_period, size_t fpstore_threshold) : @@ -1756,7 +1756,7 @@ int make_crawling_daemon(const po::variables_map &opts) uint32_t chunk_dedup_threshold = -1; if (opts.count("chunk-dedup-threshold")) { - chunk_dedup_threshold = opts["chunk-dedup-threshold"].as(); + chunk_dedup_threshold = opts["chunk-dedup-threshold"].as(); } std::string chunk_algo = get_opts_chunk_algo(opts);