]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: explicitly use std namespace in bucket listing functions 43153/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Mon, 13 Sep 2021 20:46:27 +0000 (16:46 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Mon, 25 Oct 2021 19:30:55 +0000 (15:30 -0400)
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_rados.cc

index 2458b639155ce79ad69cc66cd7c96737bcfa83ac..cf16234849ac507699c69cf3432aadf37e57ebf4 100644 (file)
@@ -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<rgw_bucket_dir_entry> *result,
-  map<string, bool> *common_prefixes,
+  std::vector<rgw_bucket_dir_entry> *result,
+  std::map<std::string, bool> *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<rgw_bucket_dir_entry> *result,
-                                                  map<string, bool> *common_prefixes,
-                                                  bool *is_truncated,
+                                                  std::vector<rgw_bucket_dir_entry>* result,
+                                                  std::map<std::string, bool>* common_prefixes,
+                                                  boolis_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<rgw_bucket_dir_entry> 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_keylast_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<int, string> shard_oids;
+  std::map<int, std::string> 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<int, rgw_cls_list_ret> shard_list_results;
+  std::map<int, rgw_cls_list_ret> 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<string, bufferlist> updates;
+  std::map<std::string, bufferlist> 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<rgw_bucket_dir_entry>& ent_list,
@@ -8784,7 +8784,7 @@ int RGWRados::cls_bucket_list_unordered(const DoutPrefixProvider *dpp,
   *is_truncated = false;
   RGWSI_RADOS::Pool index_pool;
 
-  map<int, string> oids;
+  std::map<int, std::string> 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<string, bufferlist> updates;
+  std::map<std::string, bufferlist> 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<string, bufferlist>::iterator miter = updates.begin();
+  std::map<std::string, bufferlist>::iterator miter = updates.begin();
   for (; miter != updates.end(); ++miter) {
     if (miter->second.length()) {
       ObjectWriteOperation o;