From 4edde6a2c949f3e9efd119232c18c42738c0192d Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Mon, 13 Sep 2021 16:46:27 -0400 Subject: [PATCH] rgw: explicitly use std namespace in bucket listing functions Signed-off-by: J. Eric Ivancich --- src/rgw/rgw_rados.cc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 2458b639155..cf16234849a 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -1796,8 +1796,8 @@ int RGWRados::Bucket::update_bucket_id(const string& new_bucket_id, const DoutPr int RGWRados::Bucket::List::list_objects_ordered( const DoutPrefixProvider *dpp, int64_t max_p, - vector *result, - map *common_prefixes, + std::vector *result, + std::map *common_prefixes, bool *is_truncated, optional_yield y) { @@ -1831,8 +1831,8 @@ int RGWRados::Bucket::List::list_objects_ordered( rgw_obj_key prefix_obj(params.prefix); prefix_obj.set_ns(params.ns); - string cur_prefix = prefix_obj.get_index_key_name(); - string after_delim_s; /* needed in !params.delim.empty() AND later */ + std::string cur_prefix = prefix_obj.get_index_key_name(); + std::string after_delim_s; /* needed in !params.delim.empty() AND later */ if (!params.delim.empty()) { after_delim_s = cls_rgw_after_delim(params.delim); @@ -2125,9 +2125,9 @@ done: */ int RGWRados::Bucket::List::list_objects_unordered(const DoutPrefixProvider *dpp, int64_t max_p, - vector *result, - map *common_prefixes, - bool *is_truncated, + std::vector* result, + std::map* common_prefixes, + bool* is_truncated, optional_yield y) { RGWRados *store = target->get_store(); @@ -2164,7 +2164,7 @@ int RGWRados::Bucket::List::list_objects_unordered(const DoutPrefixProvider *dpp rgw_obj_key prefix_obj(params.prefix); prefix_obj.set_ns(params.ns); - string cur_prefix = prefix_obj.get_index_key_name(); + std::string cur_prefix = prefix_obj.get_index_key_name(); while (truncated && count <= max) { std::vector ent_list; @@ -2249,7 +2249,7 @@ int RGWRados::Bucket::List::list_objects_unordered(const DoutPrefixProvider *dpp (0 != obj.name.compare(0, params.prefix.size(), params.prefix))) { ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ": skippping \"" << index_key << - "\" because doesn't match prefix" << dendl; + "\" because doesn't match prefix" << dendl; continue; } @@ -8452,15 +8452,15 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, const int shard_id, const rgw_obj_index_key& start_after, - const string& prefix, - const string& delimiter, + const std::string& prefix, + const std::string& delimiter, const uint32_t num_entries, const bool list_versions, const uint16_t expansion_factor, ent_map_t& m, bool* is_truncated, bool* cls_filtered, - rgw_obj_index_key *last_entry, + rgw_obj_index_key* last_entry, optional_yield y, RGWBucketListNameFilter force_check_filter) { @@ -8487,7 +8487,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, // key - oid (for different shards if there is any) // value - list result for the corresponding oid (shard), it is filled by // the AIO callback - map shard_oids; + std::map shard_oids; int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &shard_oids, nullptr); @@ -8518,7 +8518,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, num_entries << " total entries" << dendl; auto& ioctx = index_pool.ioctx(); - map shard_list_results; + std::map shard_list_results; cls_rgw_obj_key start_after_key(start_after.name, start_after.instance); r = CLSRGWIssueBucketList(ioctx, start_after_key, prefix, delimiter, num_entries_per_shard, @@ -8614,7 +8614,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, rgw_bucket_dir_entry* last_entry_visited = nullptr; // to set last_entry (marker) - map updates; + std::map updates; uint32_t count = 0; while (count < num_entries && !candidates.empty()) { r = 0; @@ -8624,7 +8624,7 @@ int RGWRados::cls_bucket_list_ordered(const DoutPrefixProvider *dpp, tracker_idx = candidates.begin()->second; auto& tracker = results_trackers.at(tracker_idx); - const string& name = tracker.entry_name(); + const std::string& name = tracker.entry_name(); rgw_bucket_dir_entry& dirent = tracker.dir_entry(); ldpp_dout(dpp, 20) << __PRETTY_FUNCTION__ << ": currently processing " << @@ -8760,7 +8760,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, const rgw_obj_index_key& start_after, - const string& prefix, + const std::string& prefix, uint32_t num_entries, bool list_versions, std::vector& ent_list, @@ -8784,7 +8784,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp, *is_truncated = false; RGWSI_RADOS::Pool index_pool; - map oids; + std::map oids; int r = svc.bi_rados->open_bucket_index(dpp, bucket_info, shard_id, &index_pool, &oids, nullptr); if (r < 0) { return r; @@ -8844,7 +8844,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp, } uint32_t count = 0u; - map updates; + std::map updates; rgw_obj_index_key last_added_entry; while (count <= num_entries && ((shard_id >= 0 && current_shard == uint32_t(shard_id)) || @@ -8920,7 +8920,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp, check_updates: // suggest updates if there is any - map::iterator miter = updates.begin(); + std::map::iterator miter = updates.begin(); for (; miter != updates.end(); ++miter) { if (miter->second.length()) { ObjectWriteOperation o; -- 2.39.5