]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: build without "using namespace std"
authorKefu Chai <kchai@redhat.com>
Wed, 11 Aug 2021 03:43:42 +0000 (11:43 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 13 Aug 2021 04:21:38 +0000 (12:21 +0800)
* add "std::" prefix in headers
* add "using" declarations in .cc files.

so we don't rely on "using namespace std" in one or more included
headers.

Signed-off-by: Kefu Chai <kchai@redhat.com>
254 files changed:
src/rgw/cls_fifo_legacy.cc
src/rgw/librgw.cc
src/rgw/rgw_acl.cc
src/rgw/rgw_acl.h
src/rgw/rgw_acl_s3.cc
src/rgw/rgw_acl_s3.h
src/rgw/rgw_acl_swift.cc
src/rgw/rgw_admin.cc
src/rgw/rgw_arn.cc
src/rgw/rgw_asio_frontend.cc
src/rgw/rgw_auth.cc
src/rgw/rgw_auth.h
src/rgw/rgw_auth_filters.h
src/rgw/rgw_auth_keystone.cc
src/rgw/rgw_auth_keystone.h
src/rgw/rgw_auth_s3.cc
src/rgw/rgw_auth_s3.h
src/rgw/rgw_basic_types.cc
src/rgw/rgw_basic_types.h
src/rgw/rgw_bucket.cc
src/rgw/rgw_bucket.h
src/rgw/rgw_bucket_encryption.h
src/rgw/rgw_bucket_sync.cc
src/rgw/rgw_bucket_sync.h
src/rgw/rgw_cache.cc
src/rgw/rgw_cache.h
src/rgw/rgw_client_io.h
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_compression.cc
src/rgw/rgw_compression.h
src/rgw/rgw_compression_types.h
src/rgw/rgw_coroutine.cc
src/rgw/rgw_coroutine.h
src/rgw/rgw_cors.cc
src/rgw/rgw_cors.h
src/rgw/rgw_cors_s3.cc
src/rgw/rgw_cors_s3.h
src/rgw/rgw_cors_swift.h
src/rgw/rgw_cr_rados.cc
src/rgw/rgw_cr_rados.h
src/rgw/rgw_cr_rest.cc
src/rgw/rgw_cr_rest.h
src/rgw/rgw_cr_tools.cc
src/rgw/rgw_cr_tools.h
src/rgw/rgw_crypt.cc
src/rgw/rgw_crypt.h
src/rgw/rgw_d3n_datacache.cc
src/rgw/rgw_d3n_datacache.h
src/rgw/rgw_data_sync.cc
src/rgw/rgw_data_sync.h
src/rgw/rgw_datalog.cc
src/rgw/rgw_datalog.h
src/rgw/rgw_dencoder.cc
src/rgw/rgw_env.cc
src/rgw/rgw_es_main.cc
src/rgw/rgw_es_query.cc
src/rgw/rgw_es_query.h
src/rgw/rgw_etag_verifier.h
src/rgw/rgw_file.cc
src/rgw/rgw_file.h
src/rgw/rgw_formats.cc
src/rgw/rgw_formats.h
src/rgw/rgw_frontend.cc
src/rgw/rgw_frontend.h
src/rgw/rgw_gc.cc
src/rgw/rgw_gc.h
src/rgw/rgw_http_client.cc
src/rgw/rgw_http_client.h
src/rgw/rgw_iam_policy.cc
src/rgw/rgw_iam_policy.h
src/rgw/rgw_json_enc.cc
src/rgw/rgw_jsonparser.cc
src/rgw/rgw_keystone.cc
src/rgw/rgw_keystone.h
src/rgw/rgw_kms.cc
src/rgw/rgw_kms.h
src/rgw/rgw_lc.cc
src/rgw/rgw_lc.h
src/rgw/rgw_lc_s3.cc
src/rgw/rgw_lc_s3.h
src/rgw/rgw_ldap.cc
src/rgw/rgw_lib.h
src/rgw/rgw_lib_frontend.h
src/rgw/rgw_loadgen.cc
src/rgw/rgw_loadgen_process.cc
src/rgw/rgw_log.cc
src/rgw/rgw_log.h
src/rgw/rgw_log_backing.cc
src/rgw/rgw_log_backing.h
src/rgw/rgw_lua.cc
src/rgw/rgw_main.cc
src/rgw/rgw_mdlog.h
src/rgw/rgw_meta_sync_status.h
src/rgw/rgw_metadata.cc
src/rgw/rgw_metadata.h
src/rgw/rgw_multi.cc
src/rgw/rgw_multi.h
src/rgw/rgw_multi_del.cc
src/rgw/rgw_multi_del.h
src/rgw/rgw_multiparser.cc
src/rgw/rgw_obj_manifest.cc
src/rgw/rgw_obj_manifest.h
src/rgw/rgw_object_expirer_core.cc
src/rgw/rgw_object_expirer_core.h
src/rgw/rgw_object_lock.cc
src/rgw/rgw_object_lock.h
src/rgw/rgw_oidc_provider.cc
src/rgw/rgw_oidc_provider.h
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_opa.cc
src/rgw/rgw_orphan.cc
src/rgw/rgw_orphan.h
src/rgw/rgw_policy_s3.cc
src/rgw/rgw_policy_s3.h
src/rgw/rgw_process.cc
src/rgw/rgw_process.h
src/rgw/rgw_public_access.cc
src/rgw/rgw_public_access.h
src/rgw/rgw_pubsub.cc
src/rgw/rgw_pubsub.h
src/rgw/rgw_putobj_processor.cc
src/rgw/rgw_putobj_processor.h
src/rgw/rgw_quota.cc
src/rgw/rgw_rados.h
src/rgw/rgw_request.h
src/rgw/rgw_reshard.cc
src/rgw/rgw_reshard.h
src/rgw/rgw_resolve.cc
src/rgw/rgw_resolve.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_bucket.cc
src/rgw/rgw_rest_client.cc
src/rgw/rgw_rest_client.h
src/rgw/rgw_rest_config.cc
src/rgw/rgw_rest_conn.cc
src/rgw/rgw_rest_conn.h
src/rgw/rgw_rest_iam.cc
src/rgw/rgw_rest_iam.h
src/rgw/rgw_rest_log.cc
src/rgw/rgw_rest_log.h
src/rgw/rgw_rest_metadata.cc
src/rgw/rgw_rest_metadata.h
src/rgw/rgw_rest_oidc_provider.cc
src/rgw/rgw_rest_oidc_provider.h
src/rgw/rgw_rest_pubsub.cc
src/rgw/rgw_rest_pubsub_common.h
src/rgw/rgw_rest_realm.cc
src/rgw/rgw_rest_role.cc
src/rgw/rgw_rest_role.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_s3website.h
src/rgw/rgw_rest_sts.cc
src/rgw/rgw_rest_sts.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h
src/rgw/rgw_rest_usage.cc
src/rgw/rgw_rest_user.cc
src/rgw/rgw_rest_user_policy.cc
src/rgw/rgw_rest_user_policy.h
src/rgw/rgw_role.cc
src/rgw/rgw_role.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_rados.cc
src/rgw/rgw_sal_rados.h
src/rgw/rgw_service.cc
src/rgw/rgw_sts.cc
src/rgw/rgw_sts.h
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_sync.cc
src/rgw/rgw_sync.h
src/rgw/rgw_sync_module.h
src/rgw/rgw_sync_module_aws.cc
src/rgw/rgw_sync_module_aws.h
src/rgw/rgw_sync_module_es.cc
src/rgw/rgw_sync_module_es.h
src/rgw/rgw_sync_module_es_rest.cc
src/rgw/rgw_sync_module_log.cc
src/rgw/rgw_sync_module_pubsub.cc
src/rgw/rgw_sync_module_pubsub_rest.cc
src/rgw/rgw_sync_policy.cc
src/rgw/rgw_sync_policy.h
src/rgw/rgw_sync_trace.cc
src/rgw/rgw_sync_trace.h
src/rgw/rgw_tag.cc
src/rgw/rgw_tag_s3.cc
src/rgw/rgw_token.cc
src/rgw/rgw_token.h
src/rgw/rgw_tools.cc
src/rgw/rgw_tools.h
src/rgw/rgw_torrent.cc
src/rgw/rgw_torrent.h
src/rgw/rgw_trim_bilog.cc
src/rgw/rgw_usage.cc
src/rgw/rgw_user.cc
src/rgw/rgw_user.h
src/rgw/rgw_website.cc
src/rgw/rgw_worker.h
src/rgw/rgw_xml.cc
src/rgw/rgw_xml.h
src/rgw/rgw_xml_enc.cc
src/rgw/rgw_zone.cc
src/rgw/rgw_zone.h
src/rgw/services/svc_bi_rados.cc
src/rgw/services/svc_bi_rados.h
src/rgw/services/svc_bilog_rados.cc
src/rgw/services/svc_bilog_rados.h
src/rgw/services/svc_bucket.cc
src/rgw/services/svc_bucket.h
src/rgw/services/svc_bucket_sobj.cc
src/rgw/services/svc_bucket_sobj.h
src/rgw/services/svc_bucket_sync_sobj.cc
src/rgw/services/svc_bucket_sync_sobj.h
src/rgw/services/svc_cls.cc
src/rgw/services/svc_cls.h
src/rgw/services/svc_config_key.h
src/rgw/services/svc_config_key_rados.cc
src/rgw/services/svc_config_key_rados.h
src/rgw/services/svc_finisher.cc
src/rgw/services/svc_mdlog.cc
src/rgw/services/svc_mdlog.h
src/rgw/services/svc_meta.cc
src/rgw/services/svc_meta.h
src/rgw/services/svc_meta_be.cc
src/rgw/services/svc_meta_be.h
src/rgw/services/svc_meta_be_otp.cc
src/rgw/services/svc_meta_be_otp.h
src/rgw/services/svc_meta_be_sobj.cc
src/rgw/services/svc_meta_be_sobj.h
src/rgw/services/svc_notify.cc
src/rgw/services/svc_notify.h
src/rgw/services/svc_otp.cc
src/rgw/services/svc_otp.h
src/rgw/services/svc_rados.cc
src/rgw/services/svc_rados.h
src/rgw/services/svc_sys_obj.cc
src/rgw/services/svc_sys_obj.h
src/rgw/services/svc_sys_obj_cache.cc
src/rgw/services/svc_sys_obj_cache.h
src/rgw/services/svc_sys_obj_core.cc
src/rgw/services/svc_sys_obj_core.h
src/rgw/services/svc_sys_obj_core_types.h
src/rgw/services/svc_tier_rados.cc
src/rgw/services/svc_tier_rados.h
src/rgw/services/svc_user.h
src/rgw/services/svc_user_rados.cc
src/rgw/services/svc_user_rados.h
src/rgw/services/svc_zone.cc
src/rgw/services/svc_zone.h
src/rgw/services/svc_zone_utils.cc
src/rgw/services/svc_zone_utils.h

index 80af90055255a98bf882cc3b4a8c613d878c6278..6c752814b1594181b82803331f709881a0f95714 100644 (file)
@@ -404,7 +404,7 @@ std::optional<marker> FIFO::to_marker(std::string_view s)
   }
 
   auto pos = s.find(':');
-  if (pos == string::npos) {
+  if (pos == s.npos) {
     return std::nullopt;
   }
 
@@ -1222,7 +1222,7 @@ int FIFO::read_meta(const DoutPrefixProvider *dpp, std::uint64_t tid, optional_y
   std::uint32_t _phs;
   std::uint32_t _peo;
 
-  auto r = get_meta(dpp, ioctx, oid, nullopt, &_info, &_phs, &_peo, tid, y);
+  auto r = get_meta(dpp, ioctx, oid, std::nullopt, &_info, &_phs, &_peo, tid, y);
   if (r < 0) {
     ldpp_dout(dpp, -1) << __PRETTY_FUNCTION__ << ":" << __LINE__
               << " get_meta failed: r=" << r << " tid=" << tid << dendl;
index 2ea361eeb2728635374e952c41c132d631f9dd81..89f79a13de358b3959ed938f11c0a454ef4e99b4 100644 (file)
@@ -69,6 +69,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 bool global_stop = false;
 
 static void handle_sigterm(int signum)
index a87cd8e2b1e5ce4c307163ff7e6b5a50d2e4fc4b..413b88a9b76d9cb927f97b7f89c240bb4d4fbc97 100644 (file)
@@ -15,6 +15,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 bool operator==(const ACLPermission& lhs, const ACLPermission& rhs) {
   return lhs.flags == rhs.flags;
 }
index 89257fe783da0a5dea00a1b1604fffa0481e3c19..6fc16c78003261892f34b0e2eca792ed7db5e56b 100644 (file)
@@ -67,7 +67,7 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<ACLPermission*>& o);
+  static void generate_test_instances(std::list<ACLPermission*>& o);
 
   friend bool operator==(const ACLPermission& lhs, const ACLPermission& rhs);
   friend bool operator!=(const ACLPermission& lhs, const ACLPermission& rhs);
@@ -96,7 +96,7 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<ACLGranteeType*>& o);
+  static void generate_test_instances(std::list<ACLGranteeType*>& o);
 
   friend bool operator==(const ACLGranteeType& lhs, const ACLGranteeType& rhs);
   friend bool operator!=(const ACLGranteeType& lhs, const ACLGranteeType& rhs);
@@ -116,12 +116,12 @@ class ACLGrant
 protected:
   ACLGranteeType type;
   rgw_user id;
-  string email;
+  std::string email;
   mutable rgw_user email_id;
   ACLPermission permission;
-  string name;
+  std::string name;
   ACLGroupTypeEnum group;
-  string url_spec;
+  std::string url_spec;
 
 public:
   ACLGrant() : group(ACL_GROUP_NONE) {}
@@ -161,15 +161,15 @@ public:
   ACLPermission& get_permission() { return permission; }
   const ACLPermission& get_permission() const { return permission; }
   ACLGroupTypeEnum get_group() const { return group; }
-  const string& get_referer() const { return url_spec; }
+  const std::string& get_referer() const { return url_spec; }
 
   void encode(bufferlist& bl) const {
     ENCODE_START(5, 3, bl);
     encode(type, bl);
-    string s;
+    std::string s;
     id.to_str(s);
     encode(s, bl);
-    string uri;
+    std::string uri;
     encode(uri, bl);
     encode(email, bl);
     encode(permission, bl);
@@ -182,10 +182,10 @@ public:
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START_LEGACY_COMPAT_LEN(5, 3, 3, bl);
     decode(type, bl);
-    string s;
+    std::string s;
     decode(s, bl);
     id.from_str(s);
-    string uri;
+    std::string uri;
     decode(uri, bl);
     decode(email, bl);
     decode(permission, bl);
@@ -205,11 +205,11 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<ACLGrant*>& o);
+  static void generate_test_instances(std::list<ACLGrant*>& o);
 
-  ACLGroupTypeEnum uri_to_group(string& uri);
+  ACLGroupTypeEnum uri_to_group(std::string& uri);
 
-  void set_canon(const rgw_user& _id, const string& _name, const uint32_t perm) {
+  void set_canon(const rgw_user& _id, const std::string& _name, const uint32_t perm) {
     type.set(ACL_TYPE_CANON_USER);
     id = _id;
     name = _name;
@@ -318,9 +318,9 @@ protected:
   CephContext *cct;
   /* FIXME: in the feature we should consider switching to uint32_t also
    * in data structures. */
-  map<string, int> acl_user_map;
-  map<uint32_t, int> acl_group_map;
-  list<ACLReferer> referer_list;
+  std::map<std::string, int> acl_user_map;
+  std::map<uint32_t, int> acl_group_map;
+  std::list<ACLReferer> referer_list;
   ACLGrantMap grant_map;
   void _add_grant(ACLGrant *grant);
 public:
@@ -371,7 +371,7 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWAccessControlList*>& o);
+  static void generate_test_instances(std::list<RGWAccessControlList*>& o);
 
   void add_grant(ACLGrant *grant);
   void remove_canon_user_grant(rgw_user& user_id);
@@ -379,7 +379,7 @@ public:
   ACLGrantMap& get_grant_map() { return grant_map; }
   const ACLGrantMap& get_grant_map() const { return grant_map; }
 
-  void create_default(const rgw_user& id, string name) {
+  void create_default(const rgw_user& id, std::string name) {
     acl_user_map.clear();
     acl_group_map.clear();
     referer_list.clear();
@@ -398,7 +398,7 @@ class ACLOwner
 {
 protected:
   rgw_user id;
-  string display_name;
+  std::string display_name;
 public:
   ACLOwner() {}
   ACLOwner(const rgw_user& _id) : id(_id) {}
@@ -406,7 +406,7 @@ public:
 
   void encode(bufferlist& bl) const {
     ENCODE_START(3, 2, bl);
-    string s;
+    std::string s;
     id.to_str(s);
     encode(s, bl);
     encode(display_name, bl);
@@ -414,7 +414,7 @@ public:
   }
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, bl);
-    string s;
+    std::string s;
     decode(s, bl);
     id.from_str(s);
     decode(display_name, bl);
@@ -422,14 +422,14 @@ public:
   }
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<ACLOwner*>& o);
+  static void generate_test_instances(std::list<ACLOwner*>& o);
   void set_id(const rgw_user& _id) { id = _id; }
-  void set_name(const string& name) { display_name = name; }
+  void set_name(const std::string& name) { display_name = name; }
 
   rgw_user& get_id() { return id; }
   const rgw_user& get_id() const { return id; }
-  string& get_display_name() { return display_name; }
-  const string& get_display_name() const { return display_name; }
+  std::string& get_display_name() { return display_name; }
+  const std::string& get_display_name() const { return display_name; }
   friend bool operator==(const ACLOwner& lhs, const ACLOwner& rhs);
   friend bool operator!=(const ACLOwner& lhs, const ACLOwner& rhs);
 };
@@ -477,7 +477,7 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWAccessControlPolicy*>& o);
+  static void generate_test_instances(std::list<RGWAccessControlPolicy*>& o);
   void decode_owner(bufferlist::const_iterator& bl) { // sometimes we only need that, should be faster
     DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
     decode(owner, bl);
@@ -489,7 +489,7 @@ public:
     return owner;
   }
 
-  void create_default(const rgw_user& id, string& name) {
+  void create_default(const rgw_user& id, std::string& name) {
     acl.create_default(id, name);
     owner.set_id(id);
     owner.set_name(name);
@@ -501,7 +501,7 @@ public:
     return acl;
   }
 
-  virtual bool compare_group_name(string& id, ACLGroupTypeEnum group) { return false; }
+  virtual bool compare_group_name(std::string& id, ACLGroupTypeEnum group) { return false; }
   bool is_public(const DoutPrefixProvider *dpp) const;
 
   friend bool operator==(const RGWAccessControlPolicy& lhs, const RGWAccessControlPolicy& rhs);
index 316125935fc7930ff03fac1ea1f0eaab7bbba708..82496e753433bcf45d869bc87330fc3f1c0c63b8 100644 (file)
@@ -19,6 +19,8 @@
 #define RGW_URI_ALL_USERS      "http://acs.amazonaws.com/groups/global/AllUsers"
 #define RGW_URI_AUTH_USERS     "http://acs.amazonaws.com/groups/global/AuthenticatedUsers"
 
+using namespace std;
+
 static string rgw_uri_all_users = RGW_URI_ALL_USERS;
 static string rgw_uri_auth_users = RGW_URI_AUTH_USERS;
 
index c4afad4c30f0437aae93f31fc67684700ca72356..657fb1f6716594eded0d4dc7d3100b42ca5a3ac4 100644 (file)
@@ -23,7 +23,7 @@ public:
   ~ACLPermission_S3() override {}
 
   bool xml_end(const char *el) override;
-  void to_xml(ostream& out);
+  void to_xml(std::ostream& out);
 };
 
 class ACLGrantee_S3 : public ACLGrantee, public XMLObj
@@ -42,12 +42,12 @@ public:
   ACLGrant_S3() {}
   ~ACLGrant_S3() override {}
 
-  void to_xml(CephContext *cct, ostream& out);
+  void to_xml(CephContext *cct, std::ostream& out);
   bool xml_end(const char *el) override;
   bool xml_start(const char *el, const char **attr);
 
-  static ACLGroupTypeEnum uri_to_group(string& uri);
-  static bool group_to_uri(ACLGroupTypeEnum group, string& uri);
+  static ACLGroupTypeEnum uri_to_group(std::string& uri);
+  static bool group_to_uri(ACLGroupTypeEnum group, std::string& uri);
 };
 
 class RGWAccessControlList_S3 : public RGWAccessControlList, public XMLObj
@@ -57,9 +57,9 @@ public:
   ~RGWAccessControlList_S3() override {}
 
   bool xml_end(const char *el) override;
-  void to_xml(ostream& out);
+  void to_xml(std::ostream& out);
 
-  int create_canned(ACLOwner& owner, ACLOwner& bucket_owner, const string& canned_acl);
+  int create_canned(ACLOwner& owner, ACLOwner& bucket_owner, const std::string& canned_acl);
   int create_from_grants(std::list<ACLGrant>& grants);
 };
 
@@ -70,7 +70,7 @@ public:
   ~ACLOwner_S3() override {}
 
   bool xml_end(const char *el) override;
-  void to_xml(ostream& out);
+  void to_xml(std::ostream& out);
 };
 
 class RGWEnv;
@@ -83,12 +83,12 @@ public:
 
   bool xml_end(const char *el) override;
 
-  void to_xml(ostream& out);
+  void to_xml(std::ostream& out);
   int rebuild(const DoutPrefixProvider *dpp, rgw::sal::Store* store, ACLOwner *owner,
              RGWAccessControlPolicy& dest, std::string &err_msg);
-  bool compare_group_name(string& id, ACLGroupTypeEnum group) override;
+  bool compare_group_name(std::string& id, ACLGroupTypeEnum group) override;
 
-  virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, const string& canned_acl) {
+  virtual int create_canned(ACLOwner& _owner, ACLOwner& bucket_owner, const std::string& canned_acl) {
     RGWAccessControlList_S3& _acl = static_cast<RGWAccessControlList_S3 &>(acl);
     if (_owner.get_id() == rgw_user("anonymous")) {
       owner = bucket_owner;
index 175590caac0295018d8af49805fc135d14eade28..f02eb2dbfa71d3d5bf2513864633ad61ac3f4bba 100644 (file)
@@ -24,6 +24,8 @@
 
 #define SWIFT_GROUP_ALL_USERS ".r:*"
 
+using namespace std;
+
 static int parse_list(const char* uid_list,
                       std::vector<std::string>& uids)           /* out */
 {
index 2f8cb246dca4546eadf9a2aa0bc320a0382e1e27..d69a9e99f6aee48fa8c0ea4a672c5bf9256efd8f 100644 (file)
@@ -74,6 +74,8 @@ extern "C" {
 #define SECRET_KEY_LEN 40
 #define PUBLIC_ID_LEN 20
 
+using namespace std;
+
 static rgw::sal::Store* store = NULL;
 
 static const DoutPrefixProvider* dpp() {
index d8b4ed39c74224f00ea28d6ab53f81c45f4c8ce3..fddc3d769cc26700cf9d3840f7c28eac34880f23 100644 (file)
@@ -5,6 +5,8 @@
 #include "rgw_common.h"
 #include <regex>
 
+using namespace std;
+
 namespace rgw {
 
 namespace {
index 5ef28d862aa2db0dc2f5734ce1bfb13998ef756d..daad86eb1ff2415bee422aeace75ecdd8778e165 100644 (file)
@@ -51,6 +51,8 @@ auto make_stack_allocator() {
   return boost::context::protected_fixedsize_stack{512*1024};
 }
 
+using namespace std;
+
 template <typename Stream>
 class StreamIO : public rgw::asio::ClientIO {
   CephContext* const cct;
index 897c9c2487d96c66000d5dd0830a547d1da4f868..daf4535d1ad0ad7fb508cb81ba2b8b90d76df692 100644 (file)
@@ -17,6 +17,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 namespace rgw {
 namespace auth {
index c4660c4de0fcae2606b6ce5e84cc5caf41eec637..92c3a20b69beee990ad5edf4428e51ed294204f7 100644 (file)
@@ -75,12 +75,12 @@ public:
   virtual uint32_t get_identity_type() const = 0;
 
   /* Name of Account */
-  virtual string get_acct_name() const = 0;
+  virtual std::string get_acct_name() const = 0;
 
   /* Subuser of Account */
-  virtual string get_subuser() const = 0;
+  virtual std::string get_subuser() const = 0;
 
-  virtual string get_role_tenant() const { return ""; }
+  virtual std::string get_role_tenant() const { return ""; }
 };
 
 inline std::ostream& operator<<(std::ostream& out,
@@ -367,21 +367,21 @@ class WebIdentityApplier : public IdentityApplier {
 protected:
   CephContext* const cct;
   rgw::sal::Store* store;
-  string role_session;
-  string role_tenant;
+  std::string role_session;
+  std::string role_tenant;
   rgw::web_idp::WebTokenClaims token_claims;
 
-  string get_idp_url() const;
+  std::string get_idp_url() const;
 
   void create_account(const DoutPrefixProvider* dpp,
                       const rgw_user& acct_user,
-                      const string& display_name,
+                      const std::string& display_name,
                       RGWUserInfo& user_info) const;     /* out */
 public:
   WebIdentityApplier( CephContext* const cct,
                       rgw::sal::Store* store,
-                      const string& role_session,
-                      const string& role_tenant,
+                      const std::string& role_session,
+                      const std::string& role_tenant,
                       const rgw::web_idp::WebTokenClaims& token_claims)
     : cct(cct),
       store(store),
@@ -421,11 +421,11 @@ public:
     return TYPE_WEB;
   }
 
-  string get_acct_name() const override {
+  std::string get_acct_name() const override {
     return token_claims.user_name;
   }
 
-  string get_subuser() const override {
+  std::string get_subuser() const override {
     return {};
   }
 
@@ -434,8 +434,8 @@ public:
 
     virtual aplptr_t create_apl_web_identity( CephContext* cct,
                                               const req_state* s,
-                                              const string& role_session,
-                                              const string& role_tenant,
+                                              const std::string& role_session,
+                                              const std::string& role_tenant,
                                               const rgw::web_idp::WebTokenClaims& token) const = 0;
   };
 };
@@ -561,8 +561,8 @@ public:
   void to_str(std::ostream& out) const override;
   void load_acct_info(const DoutPrefixProvider* dpp, RGWUserInfo& user_info) const override; /* out */
   uint32_t get_identity_type() const override { return info.acct_type; }
-  string get_acct_name() const override { return info.acct_name; }
-  string get_subuser() const override { return {}; }
+  std::string get_acct_name() const override { return info.acct_name; }
+  std::string get_subuser() const override { return {}; }
 
   struct Factory {
     virtual ~Factory() {}
@@ -623,8 +623,8 @@ public:
   void to_str(std::ostream& out) const override;
   void load_acct_info(const DoutPrefixProvider* dpp, RGWUserInfo& user_info) const override; /* out */
   uint32_t get_identity_type() const override { return TYPE_RGW; }
-  string get_acct_name() const override { return {}; }
-  string get_subuser() const override { return subuser; }
+  std::string get_acct_name() const override { return {}; }
+  std::string get_subuser() const override { return subuser; }
 
   struct Factory {
     virtual ~Factory() {}
@@ -639,27 +639,27 @@ public:
 class RoleApplier : public IdentityApplier {
 public:
   struct Role {
-    string id;
-    string name;
-    string tenant;
-    vector<string> role_policies;
+    std::string id;
+    std::string name;
+    std::string tenant;
+    std::vector<std::string> role_policies;
   } role;
 protected:
   const rgw_user user_id;
-  string token_policy;
-  string role_session_name;
-  std::vector<string> token_claims;
-  string token_issued_at;
+  std::string token_policy;
+  std::string role_session_name;
+  std::vector<std::string> token_claims;
+  std::string token_issued_at;
 
 public:
 
   RoleApplier(CephContext* const cct,
                const Role& role,
                const rgw_user& user_id,
-               const string& token_policy,
-               const string& role_session_name,
-               const std::vector<string>& token_claims,
-               const string& token_issued_at)
+               const std::string& token_policy,
+               const std::string& role_session_name,
+               const std::vector<std::string>& token_claims,
+               const std::string& token_issued_at)
     : role(role),
       user_id(user_id),
       token_policy(token_policy),
@@ -683,10 +683,10 @@ public:
   void to_str(std::ostream& out) const override;
   void load_acct_info(const DoutPrefixProvider* dpp, RGWUserInfo& user_info) const override; /* out */
   uint32_t get_identity_type() const override { return TYPE_ROLE; }
-  string get_acct_name() const override { return {}; }
-  string get_subuser() const override { return {}; }
+  std::string get_acct_name() const override { return {}; }
+  std::string get_subuser() const override { return {}; }
   void modify_request_state(const DoutPrefixProvider* dpp, req_state* s) const override;
-  string get_role_tenant() const override { return role.tenant; }
+  std::string get_role_tenant() const override { return role.tenant; }
 
   struct Factory {
     virtual ~Factory() {}
@@ -696,7 +696,7 @@ public:
                                       const rgw_user& user_id,
                                       const std::string& token_policy,
                                       const std::string& role_session,
-                                      const std::vector<string>& token_claims,
+                                      const std::vector<std::string>& token_claims,
                                       const std::string& token_issued_at) const = 0;
     };
 };
index be95219ac23dcbcd4743ae211683692c534d9033..063208fc91209a665c18428bb30865eebb0dce2b 100644 (file)
@@ -90,11 +90,11 @@ public:
     return get_decoratee().get_identity_type();
   }
 
-  string get_acct_name() const override {
+  std::string get_acct_name() const override {
     return get_decoratee().get_acct_name();
   }
 
-  string get_subuser() const override {
+  std::string get_subuser() const override {
     return get_decoratee().get_subuser();
   }
 
@@ -107,7 +107,7 @@ public:
     get_decoratee().to_str(out);
   }
 
-  string get_role_tenant() const override {     /* in/out */
+  std::string get_role_tenant() const override {     /* in/out */
     return get_decoratee().get_role_tenant();
   }
 
index 124b50793e4da3b7e63d1f9a8487c0155b5cbe67..f0b29d5ca34704deb5b5a2fe479eb6c1a2cef3d1 100644 (file)
@@ -25,6 +25,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 namespace rgw {
 namespace auth {
index 4ad20442b96beb729e25c199461ef9821d2d2a55..117708c37562256ef18adc9bd7d7baa2b386bd78 100644 (file)
@@ -79,7 +79,7 @@ class SecretCache {
     token_envelope_t token;
     std::string secret;
     utime_t expires;
-    list<std::string>::iterator lru_iter;
+    std::list<std::string>::iterator lru_iter;
   };
 
   const boost::intrusive_ptr<CephContext> cct;
index b253c93f89f225294f243a7327ebb9e57b609a35..d6eaf7d127af829cbcb46f37208cd66414fdafad 100644 (file)
@@ -24,6 +24,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static const auto signed_subresources = {
   "acl",
   "cors",
index 7c51327406542819a9740071d88422a482ede6af..5de9e46a5ac13e0101aad064b2ab1071b6d9c207 100644 (file)
@@ -612,7 +612,7 @@ get_v4_canonical_headers(const req_info& info,
                          bool force_boto2_compat);
 
 std::string gen_v4_canonical_headers(const req_info& info,
-                                     const map<string, string>& extra_headers,
+                                     const std::map<std::string, std::string>& extra_headers,
                                      string *signed_hdrs);
 
 extern sha256_digest_t
index 01cca48c2185cf91b6dea8ea68e29df6a26b9539..ed7806e6a5772abf5076070a092b83b51c4a14a3 100644 (file)
@@ -11,6 +11,7 @@
 #include "rgw_xml.h"
 #include "common/ceph_json.h"
 
+using std::ostream;
 using std::string;
 using std::stringstream;
 
index fee9fa4b99f9b671e08c893e82ed2820d3bc1a30..fc155fb1c13ef48fbb2ace114b90a65c9f1939c3 100644 (file)
@@ -82,15 +82,15 @@ struct rgw_user {
     size_t pos = str.find('$');
     if (pos != std::string::npos) {
       tenant = str.substr(0, pos);
-      string_view sv = str;
-      string_view ns_id = sv.substr(pos + 1);
+      std::string_view sv = str;
+      std::string_view ns_id = sv.substr(pos + 1);
       size_t ns_pos = ns_id.find('$');
       if (ns_pos != std::string::npos) {
-        ns = string(ns_id.substr(0, ns_pos));
-        id = string(ns_id.substr(ns_pos + 1));
+        ns = std::string(ns_id.substr(0, ns_pos));
+        id = std::string(ns_id.substr(ns_pos + 1));
       } else {
         ns.clear();
-        id = string(ns_id);
+        id = std::string(ns_id);
       }
     } else {
       tenant.clear();
@@ -599,11 +599,11 @@ public:
     return idp_url;
   }
 
-  const string& get_role_session() const {
+  const std::string& get_role_session() const {
     return u.id;
   }
 
-  const string& get_role() const {
+  const std::string& get_role() const {
     return u.id;
   }
 
index b020ac21205123830e5807b3a1c7a65761a6fbba..bc34ec821aa70ab851287558fe20a34a7722a341 100644 (file)
@@ -57,6 +57,8 @@
 
 #define BUCKET_TAG_TIMEOUT 30
 
+using namespace std;
+
 // default number of entries to list with each bucket listing call
 // (use marker to bridge between calls)
 static constexpr size_t listing_max_entries = 1000;
index 30e1fd76942f036fa6f97dbc95955c813d8ddc2b..6ec09b9f667e6785efb74bfcf8c6be9ad98c9745 100644 (file)
@@ -28,7 +28,7 @@
 #include "services/svc_bucket_sync.h"
 
 // define as static when RGWBucket implementation completes
-extern void rgw_get_buckets_obj(const rgw_user& user_id, string& buckets_obj_id);
+extern void rgw_get_buckets_obj(const rgw_user& user_id, std::string& buckets_obj_id);
 
 class RGWSI_Meta;
 class RGWBucketMetadataHandler;
@@ -38,20 +38,20 @@ class RGWBucketCtl;
 class RGWZone;
 struct RGWZoneParams;
 
-extern int rgw_bucket_parse_bucket_instance(const string& bucket_instance, string *bucket_name, string *bucket_id, int *shard_id);
-extern int rgw_bucket_parse_bucket_key(CephContext *cct, const string& key,
+extern int rgw_bucket_parse_bucket_instance(const std::string& bucket_instance, std::string *bucket_name, std::string *bucket_id, int *shard_id);
+extern int rgw_bucket_parse_bucket_key(CephContext *cct, const std::string& key,
                                        rgw_bucket* bucket, int *shard_id);
 
 extern std::string rgw_make_bucket_entry_name(const std::string& tenant_name,
                                               const std::string& bucket_name);
 
-extern void rgw_parse_url_bucket(const string& bucket,
-                                 const string& auth_tenant,
-                                 string &tenant_name, string &bucket_name);
+extern void rgw_parse_url_bucket(const std::string& bucket,
+                                 const std::string& auth_tenant,
+                                 std::string &tenant_name, std::string &bucket_name);
 
 // this is used as a filter to RGWRados::cls_bucket_list_ordered; it
 // conforms to the type declaration of RGWRados::check_filter_t.
-extern bool rgw_bucket_object_check_filter(const string& oid);
+extern bool rgw_bucket_object_check_filter(const std::string& oid);
 
 void init_default_bucket_layout(CephContext *cct, rgw::BucketLayout& layout,
                                const RGWZone& zone,
@@ -60,7 +60,7 @@ void init_default_bucket_layout(CephContext *cct, rgw::BucketLayout& layout,
 
 struct RGWBucketCompleteInfo {
   RGWBucketInfo info;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
@@ -68,14 +68,14 @@ struct RGWBucketCompleteInfo {
 
 class RGWBucketEntryMetadataObject : public RGWMetadataObject {
   RGWBucketEntryPoint ep;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 public:
   RGWBucketEntryMetadataObject(RGWBucketEntryPoint& _ep, const obj_version& v, real_time m) : ep(_ep) {
     objv = v;
     mtime = m;
     set_pattrs (&attrs);
   }
-  RGWBucketEntryMetadataObject(RGWBucketEntryPoint& _ep, const obj_version& v, real_time m, std::map<string, bufferlist>&& _attrs) :
+  RGWBucketEntryMetadataObject(RGWBucketEntryPoint& _ep, const obj_version& v, real_time m, std::map<std::string, bufferlist>&& _attrs) :
     ep(_ep), attrs(std::move(_attrs)) {
     objv = v;
     mtime = m;
@@ -90,7 +90,7 @@ public:
     return ep;
   }
 
-  map<string, bufferlist>& get_attrs() {
+  std::map<std::string, bufferlist>& get_attrs() {
     return attrs;
   }
 };
@@ -143,8 +143,8 @@ public:
   /**
    * Check if the user owns a bucket by the given name.
    */
-  bool owns(string& name) {
-    map<string, RGWBucketEnt>::iterator iter;
+  bool owns(std::string& name) {
+    std::map<std::string, RGWBucketEnt>::iterator iter;
     iter = buckets.find(name);
     return (iter != buckets.end());
   }
@@ -159,8 +159,8 @@ public:
   /**
    * Remove a bucket from the user's list by name.
    */
-  void remove(const string& name) {
-    map<string, RGWBucketEnt>::iterator iter;
+  void remove(const std::string& name) {
+    std::map<std::string, RGWBucketEnt>::iterator iter;
     iter = buckets.find(name);
     if (iter != buckets.end()) {
       buckets.erase(iter);
@@ -170,7 +170,7 @@ public:
   /**
    * Get the user's buckets as a map.
    */
-  map<string, RGWBucketEnt>& get_buckets() { return buckets; }
+  std::map<std::string, RGWBucketEnt>& get_buckets() { return buckets; }
 
   /**
    * Cleanup data structure
@@ -288,10 +288,10 @@ struct RGWBucketAdminOpState {
     bucket_stored = true;
   }
 
-  void set_bucket_id(const string& bi) {
+  void set_bucket_id(const std::string& bi) {
     bucket_id = bi;
   }
-  const string& get_bucket_id() { return bucket_id; }
+  const std::string& get_bucket_id() { return bucket_id; }
 
   bool will_fetch_stats() { return stat_buckets; }
   bool will_fix_index() { return fix_index; }
@@ -341,16 +341,16 @@ public:
 
   int check_index(const DoutPrefixProvider *dpp,
           RGWBucketAdminOpState& op_state,
-          map<RGWObjCategory, RGWStorageStats>& existing_stats,
-          map<RGWObjCategory, RGWStorageStats>& calculated_stats,
+          std::map<RGWObjCategory, RGWStorageStats>& existing_stats,
+          std::map<RGWObjCategory, RGWStorageStats>& calculated_stats,
           std::string *err_msg = NULL);
 
-  int chown(RGWBucketAdminOpState& op_state, const string& marker,
+  int chown(RGWBucketAdminOpState& op_state, const std::string& marker,
             optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
   int set_quota(RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
 
   int remove_object(const DoutPrefixProvider *dpp, RGWBucketAdminOpState& op_state, std::string *err_msg = NULL);
-  int policy_bl_to_stream(bufferlist& bl, ostream& o);
+  int policy_bl_to_stream(bufferlist& bl, std::ostream& o);
   int get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, optional_yield y, const DoutPrefixProvider *dpp);
   int sync(RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
 
@@ -366,11 +366,11 @@ public:
   static int get_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state,
                   RGWAccessControlPolicy& policy, const DoutPrefixProvider *dpp);
   static int dump_s3_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state,
-                  ostream& os, const DoutPrefixProvider *dpp);
+                  std::ostream& os, const DoutPrefixProvider *dpp);
 
   static int unlink(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp);
-  static int link(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL);
-  static int chown(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err_msg = NULL);
+  static int link(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
+  static int chown(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const std::string& marker, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
 
   static int check_index(rgw::sal::Store* store, RGWBucketAdminOpState& op_state,
                   RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp);
@@ -396,14 +396,14 @@ public:
   static int fix_obj_expiry(rgw::sal::Store* store, RGWBucketAdminOpState& op_state,
                            RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp, bool dry_run = false);
 
-  static int sync_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL);
+  static int sync_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, std::string *err_msg = NULL);
 };
 
 struct rgw_ep_info {
   RGWBucketEntryPoint &ep;
-  map<std::string, buffer::list>& attrs;
+  std::map<std::string, buffer::list>& attrs;
   RGWObjVersionTracker ep_objv;
-  rgw_ep_info(RGWBucketEntryPoint &ep, map<string, bufferlist>& attrs)
+  rgw_ep_info(RGWBucketEntryPoint &ep, std::map<std::string, bufferlist>& attrs)
     : ep(ep), attrs(attrs) {}
 };
 
@@ -445,7 +445,7 @@ public:
     struct GetParams {
       RGWObjVersionTracker *objv_tracker{nullptr};
       real_time *mtime{nullptr};
-      map<string, bufferlist> *attrs{nullptr};
+      std::map<std::string, bufferlist> *attrs{nullptr};
       rgw_cache_entry_info *cache_info{nullptr};
       boost::optional<obj_version> refresh_version;
       std::optional<RGWSI_MetaBackend_CtxParams> bectx_params;
@@ -462,7 +462,7 @@ public:
         return *this;
       }
 
-      GetParams& set_attrs(map<string, bufferlist> *_attrs) {
+      GetParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -487,7 +487,7 @@ public:
       RGWObjVersionTracker *objv_tracker{nullptr};
       ceph::real_time mtime;
       bool exclusive{false};
-      map<string, bufferlist> *attrs{nullptr};
+      std::map<std::string, bufferlist> *attrs{nullptr};
 
       PutParams() {}
 
@@ -506,7 +506,7 @@ public:
         return *this;
       }
 
-      PutParams& set_attrs(map<string, bufferlist> *_attrs) {
+      PutParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -527,7 +527,7 @@ public:
   struct BucketInstance {
     struct GetParams {
       real_time *mtime{nullptr};
-      map<string, bufferlist> *attrs{nullptr};
+      std::map<std::string, bufferlist> *attrs{nullptr};
       rgw_cache_entry_info *cache_info{nullptr};
       boost::optional<obj_version> refresh_version;
       RGWObjVersionTracker *objv_tracker{nullptr};
@@ -540,7 +540,7 @@ public:
         return *this;
       }
 
-      GetParams& set_attrs(map<string, bufferlist> *_attrs) {
+      GetParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -571,7 +571,7 @@ public:
                                                    nullptr: orig_info was not found (new bucket instance */
       ceph::real_time mtime;
       bool exclusive{false};
-      map<string, bufferlist> *attrs{nullptr};
+      std::map<std::string, bufferlist> *attrs{nullptr};
       RGWObjVersionTracker *objv_tracker{nullptr};
 
       PutParams() {}
@@ -591,7 +591,7 @@ public:
         return *this;
       }
 
-      PutParams& set_attrs(map<string, bufferlist> *_attrs) {
+      PutParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -662,7 +662,7 @@ public:
 
 
   int set_bucket_instance_attrs(RGWBucketInfo& bucket_info,
-                                map<string, bufferlist>& attrs,
+                                std::map<std::string, bufferlist>& attrs,
                                 RGWObjVersionTracker *objv_tracker,
                                 optional_yield y,
                                 const DoutPrefixProvider *dpp);
@@ -686,7 +686,7 @@ public:
             const rgw_user& user_id, const std::string& display_name,
             const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp);
 
-  int read_buckets_stats(map<string, RGWBucketEnt>& m,
+  int read_buckets_stats(std::map<std::string, RGWBucketEnt>& m,
                          optional_yield y,
                          const DoutPrefixProvider *dpp);
 
@@ -732,7 +732,7 @@ private:
                                   RGWBucketInfo *orig_info,
                                   bool exclusive, real_time mtime,
                                   obj_version *pep_objv,
-                                  map<string, bufferlist> *pattrs,
+                                  std::map<std::string, bufferlist> *pattrs,
                                   bool create_entry_point,
                                  optional_yield,
                                   const DoutPrefixProvider *dpp);
@@ -755,5 +755,5 @@ private:
 
 };
 
-bool rgw_find_bucket_by_id(const DoutPrefixProvider *dpp, CephContext *cct, rgw::sal::Store* store, const string& marker,
-                           const string& bucket_id, rgw_bucket* bucket_out);
+bool rgw_find_bucket_by_id(const DoutPrefixProvider *dpp, CephContext *cct, rgw::sal::Store* store, const std::string& marker,
+                           const std::string& bucket_id, rgw_bucket* bucket_out);
index 9df9ed527eaf9f1a82d814858de9a9bce0f0d6d3..b279e3a166ac15d170e464657283d949410f07b8 100644 (file)
@@ -8,17 +8,17 @@ class XMLObj;
 
 class ApplyServerSideEncryptionByDefault
 {
-  string kmsMasterKeyID;
-  string sseAlgorithm;
+  std::string kmsMasterKeyID;
+  std::string sseAlgorithm;
 
 public:
   ApplyServerSideEncryptionByDefault(): kmsMasterKeyID(""), sseAlgorithm("") {};
 
-  const string& kms_master_key_id() const {
+  const std::string& kms_master_key_id() const {
     return kmsMasterKeyID;
   }
 
-  const string& sse_algorithm() const {
+  const std::string& sse_algorithm() const {
     return sseAlgorithm;
   }
 
@@ -50,11 +50,11 @@ protected:
 public:
   ServerSideEncryptionConfiguration(): bucketKeyEnabled(false) {};
 
-  const string& kms_master_key_id() const {
+  const std::string& kms_master_key_id() const {
     return applyServerSideEncryptionByDefault.kms_master_key_id();
   }
 
-  const string& sse_algorithm() const {
+  const std::string& sse_algorithm() const {
     return applyServerSideEncryptionByDefault.sse_algorithm();
   }
 
@@ -90,11 +90,11 @@ protected:
 public:
   RGWBucketEncryptionConfig(): rule_exist(false) {}
 
-  const string& kms_master_key_id() const {
+  const std::string& kms_master_key_id() const {
     return rule.kms_master_key_id();
   }
 
-  const string& sse_algorithm() const {
+  const std::string& sse_algorithm() const {
     return rule.sse_algorithm();
   }
 
index 30449e49008246c45d8148453f4f0f698865eb8e..d4b937a4713b18bd26f06a0432e1e8a09a8c2304 100644 (file)
@@ -10,6 +10,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 ostream& operator<<(ostream& os, const rgw_sync_bucket_entity& e) {
   os << "{b=" << rgw_sync_bucket_entities::bucket_key(e.bucket) << ",z=" << e.zone.value_or(rgw_zone_id()) << ",az=" << (int)e.all_zones << "}";
index 112f71abcc1e882eff8ef5565dad16cfea65a3ba..76143773e8dde0c71ac8b6378a78598c6a53d765 100644 (file)
@@ -65,7 +65,7 @@ struct rgw_sync_group_pipe_map {
                   const std::vector<rgw_sync_bucket_pipes>& pipes,
                   CB filter_cb);
           
-  pair<zb_pipe_map_t::const_iterator, zb_pipe_map_t::const_iterator> find_pipes(const zb_pipe_map_t& m,
+  std::pair<zb_pipe_map_t::const_iterator, zb_pipe_map_t::const_iterator> find_pipes(const zb_pipe_map_t& m,
                                                                                 const rgw_zone_id& zone,
                                                                                 std::optional<rgw_bucket> b) const;
 
@@ -81,7 +81,7 @@ struct rgw_sync_group_pipe_map {
   /*
    * find all relevant pipes in our zone that match {dest_bucket} <- {source_zone, source_bucket}
    */
-  vector<rgw_sync_bucket_pipe> find_source_pipes(const rgw_zone_id& source_zone,
+  std::vector<rgw_sync_bucket_pipe> find_source_pipes(const rgw_zone_id& source_zone,
                                                  std::optional<rgw_bucket> source_bucket,
                                                  std::optional<rgw_bucket> dest_bucket) const;
 
@@ -89,14 +89,14 @@ struct rgw_sync_group_pipe_map {
    * find all relevant pipes in other zones that pull from a specific
    * source bucket in out zone {source_bucket} -> {dest_zone, dest_bucket}
    */
-  vector<rgw_sync_bucket_pipe> find_dest_pipes(std::optional<rgw_bucket> source_bucket,
+  std::vector<rgw_sync_bucket_pipe> find_dest_pipes(std::optional<rgw_bucket> source_bucket,
                                                const rgw_zone_id& dest_zone,
                                                std::optional<rgw_bucket> dest_bucket) const;
 
   /*
    * find all relevant pipes from {source_zone, source_bucket} -> {dest_zone, dest_bucket}
    */
-  vector<rgw_sync_bucket_pipe> find_pipes(const rgw_zone_id& source_zone,
+  std::vector<rgw_sync_bucket_pipe> find_pipes(const rgw_zone_id& source_zone,
                                           std::optional<rgw_bucket> source_bucket,
                                           const rgw_zone_id& dest_zone,
                                           std::optional<rgw_bucket> dest_bucket) const;
@@ -140,9 +140,9 @@ public:
     std::list<rgw_sync_bucket_pipe> pipes;
 
   public:
-    using prefix_map_t = multimap<string, rgw_sync_bucket_pipe *>;
+    using prefix_map_t = std::multimap<std::string, rgw_sync_bucket_pipe *>;
 
-    map<string, rgw_sync_bucket_pipe *> tag_refs;
+    std::map<std::string, rgw_sync_bucket_pipe *> tag_refs;
     prefix_map_t prefix_refs;
 
     void insert(const rgw_sync_bucket_pipe& pipe);
@@ -150,14 +150,14 @@ public:
     bool find_basic_info_without_tags(const rgw_obj_key& key,
                                       std::optional<rgw_user> *user,
                                       std::optional<rgw_user> *acl_translation,
-                                      std::optional<string> *storage_class,
+                                      std::optional<std::string> *storage_class,
                                       rgw_sync_pipe_params::Mode *mode,
                                       bool *need_more_info) const;
     bool find_obj_params(const rgw_obj_key& key, 
                          const RGWObjTags::tag_map_t& tags,
                          rgw_sync_pipe_params *params) const;
 
-    void scan_prefixes(std::vector<string> *prefixes) const;
+    void scan_prefixes(std::vector<std::string> *prefixes) const;
 
     prefix_map_t::const_iterator prefix_begin() const {
       return prefix_refs.begin();
@@ -187,7 +187,7 @@ public:
     bool find_basic_info_without_tags(const rgw_obj_key& key,
                                       std::optional<rgw_user> *user,
                                       std::optional<rgw_user> *acl_translation,
-                                      std::optional<string> *storage_class,
+                                      std::optional<std::string> *storage_class,
                                       rgw_sync_pipe_params::Mode *mode,
                                       bool *need_more_info) const {
       if (!rules) {
@@ -208,7 +208,7 @@ public:
 
   struct pipe_set {
     std::map<endpoints_pair, pipe_rules_ref> rules;
-    std::multimap<string, rgw_sync_bucket_pipe> pipe_map;
+    std::multimap<std::string, rgw_sync_bucket_pipe> pipe_map;
 
     std::set<pipe_handler> handlers;
 
@@ -242,7 +242,7 @@ private:
 
   const RGWBucketSyncFlowManager *parent{nullptr};
 
-  map<string, rgw_sync_group_pipe_map> flow_groups;
+  std::map<std::string, rgw_sync_group_pipe_map> flow_groups;
 
   std::set<rgw_zone_id> all_zones;
 
@@ -273,7 +273,7 @@ public:
 
 };
 
-static inline ostream& operator<<(ostream& os, const RGWBucketSyncFlowManager::endpoints_pair& e) {
+static inline std::ostream& operator<<(std::ostream& os, const RGWBucketSyncFlowManager::endpoints_pair& e) {
   os << e.dest << " -> " << e.source;
   return os;
 }
@@ -285,7 +285,7 @@ class RGWBucketSyncPolicyHandler {
   RGWSI_Bucket_Sync *bucket_sync_svc;
   rgw_zone_id zone_id;
   std::optional<RGWBucketInfo> bucket_info;
-  std::optional<map<string, bufferlist> > bucket_attrs;
+  std::optional<std::map<std::string, bufferlist> > bucket_attrs;
   std::optional<rgw_bucket> bucket;
   std::unique_ptr<RGWBucketSyncFlowManager> flow_mgr;
   rgw_sync_policy_info sync_policy;
@@ -293,8 +293,8 @@ class RGWBucketSyncPolicyHandler {
   RGWBucketSyncFlowManager::pipe_set source_pipes;
   RGWBucketSyncFlowManager::pipe_set target_pipes;
 
-  map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> sources; /* source pipes by source zone id */
-  map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> targets; /* target pipes by target zone id */
+  std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> sources; /* source pipes by source zone id */
+  std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> targets; /* target pipes by target zone id */
 
   std::set<rgw_zone_id> source_zones;
   std::set<rgw_zone_id> target_zones;
@@ -315,7 +315,7 @@ class RGWBucketSyncPolicyHandler {
 
   RGWBucketSyncPolicyHandler(const RGWBucketSyncPolicyHandler *_parent,
                              const RGWBucketInfo& _bucket_info,
-                             map<string, bufferlist>&& _bucket_attrs);
+                             std::map<std::string, bufferlist>&& _bucket_attrs);
 
   RGWBucketSyncPolicyHandler(const RGWBucketSyncPolicyHandler *_parent,
                              const rgw_bucket& _bucket,
@@ -327,7 +327,7 @@ public:
                              std::optional<rgw_zone_id> effective_zone = std::nullopt);
 
   RGWBucketSyncPolicyHandler *alloc_child(const RGWBucketInfo& bucket_info,
-                                          map<string, bufferlist>&& bucket_attrs) const;
+                                          std::map<std::string, bufferlist>&& bucket_attrs) const;
   RGWBucketSyncPolicyHandler *alloc_child(const rgw_bucket& bucket,
                                           std::optional<rgw_sync_policy_info> sync_policy) const;
 
@@ -335,8 +335,8 @@ public:
 
   void reflect(const DoutPrefixProvider *dpp, RGWBucketSyncFlowManager::pipe_set *psource_pipes,
                RGWBucketSyncFlowManager::pipe_set *ptarget_pipes,
-               map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> *psources,
-               map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> *ptargets,
+               std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> *psources,
+               std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set> *ptargets,
                std::set<rgw_zone_id> *psource_zones,
                std::set<rgw_zone_id> *ptarget_zones,
                bool only_enabled) const;
@@ -363,15 +363,15 @@ public:
     return target_zones;
   }
 
-  const  map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set>& get_sources() {
+  const  std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set>& get_sources() {
     return sources;
   }
 
-  multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_sources() const;
-  multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_dests() const;
-  multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_dests_in_zone(const rgw_zone_id& zone_id) const;
+  std::multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_sources() const;
+  std::multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_dests() const;
+  std::multimap<rgw_zone_id, rgw_sync_bucket_pipe> get_all_dests_in_zone(const rgw_zone_id& zone_id) const;
 
-  const  map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set>& get_targets() {
+  const std::map<rgw_zone_id, RGWBucketSyncFlowManager::pipe_set>& get_targets() {
     return targets;
   }
 
@@ -379,7 +379,7 @@ public:
     return bucket_info;
   }
 
-  const std::optional<map<string, bufferlist> >& get_bucket_attrs() const {
+  const std::optional<std::map<std::string, bufferlist> >& get_bucket_attrs() const {
     return bucket_attrs;
   }
 
index b46c26d5b9997e99e468f7bb4c3b8447ad3cc4e2..3a325c81c2c2a4d4858cf2f55e1b88b9ecc7a27f 100644 (file)
@@ -8,6 +8,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 int ObjectCache::get(const DoutPrefixProvider *dpp, const string& name, ObjectCacheInfo& info, uint32_t mask, rgw_cache_entry_info *cache_info)
 {
index 08eaffca226540316846f26c9255565678e18eae..cffa6573d63e897c1cb03bd60f89c2cc8daf2a07 100644 (file)
@@ -45,7 +45,7 @@ struct ObjectMetaInfo {
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<ObjectMetaInfo*>& o);
+  static void generate_test_instances(std::list<ObjectMetaInfo*>& o);
 };
 WRITE_CLASS_ENCODER(ObjectMetaInfo)
 
@@ -54,8 +54,8 @@ struct ObjectCacheInfo {
   uint32_t flags = 0;
   uint64_t epoch = 0;
   bufferlist data;
-  map<string, bufferlist> xattrs;
-  map<string, bufferlist> rm_xattrs;
+  std::map<std::string, bufferlist> xattrs;
+  std::map<std::string, bufferlist> rm_xattrs;
   ObjectMetaInfo meta;
   obj_version version = {};
   ceph::coarse_mono_time time_added;
@@ -90,7 +90,7 @@ struct ObjectCacheInfo {
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<ObjectCacheInfo*>& o);
+  static void generate_test_instances(std::list<ObjectCacheInfo*>& o);
 };
 WRITE_CLASS_ENCODER(ObjectCacheInfo)
 
@@ -99,7 +99,7 @@ struct RGWCacheNotifyInfo {
   rgw_raw_obj obj;
   ObjectCacheInfo obj_info;
   off_t ofs;
-  string ns;
+  std::string ns;
 
   RGWCacheNotifyInfo() : op(0), ofs(0) {}
 
@@ -122,7 +122,7 @@ struct RGWCacheNotifyInfo {
     DECODE_FINISH(ibl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWCacheNotifyInfo*>& o);
+  static void generate_test_instances(std::list<RGWCacheNotifyInfo*>& o);
 };
 WRITE_CLASS_ENCODER(RGWCacheNotifyInfo)
 inline std::ostream& operator <<(std::ostream& m, const RGWCacheNotifyInfo& cni) {
@@ -134,48 +134,48 @@ inline std::ostream& operator <<(std::ostream& m, const RGWCacheNotifyInfo& cni)
 class RGWChainedCache {
 public:
   virtual ~RGWChainedCache() {}
-  virtual void chain_cb(const string& key, void *data) = 0;
-  virtual void invalidate(const string& key) = 0;
+  virtual void chain_cb(const std::string& key, void *data) = 0;
+  virtual void invalidate(const std::string& key) = 0;
   virtual void invalidate_all() = 0;
   virtual void unregistered() {}
 
   struct Entry {
     RGWChainedCache *cache;
-    const string& key;
+    const std::string& key;
     void *data;
 
-    Entry(RGWChainedCache *_c, const string& _k, void *_d) : cache(_c), key(_k), data(_d) {}
+    Entry(RGWChainedCache *_c, const std::string& _k, void *_d) : cache(_c), key(_k), data(_d) {}
   };
 };
 
 
 struct ObjectCacheEntry {
   ObjectCacheInfo info;
-  std::list<string>::iterator lru_iter;
+  std::list<std::string>::iterator lru_iter;
   uint64_t lru_promotion_ts;
   uint64_t gen;
-  std::vector<pair<RGWChainedCache *, string> > chained_entries;
+  std::vector<std::pair<RGWChainedCache *, std::string> > chained_entries;
 
   ObjectCacheEntry() : lru_promotion_ts(0), gen(0) {}
 };
 
 class ObjectCache {
-  std::unordered_map<string, ObjectCacheEntry> cache_map;
-  std::list<string> lru;
+  std::unordered_map<std::string, ObjectCacheEntry> cache_map;
+  std::list<std::string> lru;
   unsigned long lru_size;
   unsigned long lru_counter;
   unsigned long lru_window;
   ceph::shared_mutex lock = ceph::make_shared_mutex("ObjectCache");
   CephContext *cct;
 
-  vector<RGWChainedCache *> chained_cache;
+  std::vector<RGWChainedCache *> chained_cache;
 
   bool enabled;
   ceph::timespan expiry;
 
-  void touch_lru(const DoutPrefixProvider *dpp, const string& name, ObjectCacheEntry& entry,
-                std::list<string>::iterator& lru_iter);
-  void remove_lru(const string& name, std::list<string>::iterator& lru_iter);
+  void touch_lru(const DoutPrefixProvider *dpp, const std::string& name, ObjectCacheEntry& entry,
+                std::list<std::string>::iterator& lru_iter);
+  void remove_lru(const std::string& name, std::list<std::string>::iterator& lru_iter);
   void invalidate_lru(ObjectCacheEntry& entry);
 
   void do_invalidate_all();
index 41232c8ae7d7bcc8730128fecf16c440ebb07377..9626d289fc9dac740293d0c179abac8411d71fdf 100644 (file)
@@ -431,7 +431,7 @@ class RGWClientIOStream : private RGWClientIOStreamBuf, public std::istream {
 public:
   explicit RGWClientIOStream(RGWRestfulIO &s)
     : RGWClientIOStreamBuf(s, 1, 2),
-      istream(static_cast<RGWClientIOStreamBuf *>(this)) {
+      std::istream(static_cast<RGWClientIOStreamBuf *>(this)) {
   }
 };
 
index f099590b72e00508db76f48bf09aee2ad1039a78..d846aeac99a1b697cf1c81365956d4b07cae6b19 100644 (file)
@@ -162,6 +162,7 @@ rgw_http_errors rgw_http_iam_errors({
     { ERR_INTERNAL_ERROR, {500, "ServiceFailure" }},
 });
 
+using namespace std;
 using namespace ceph::crypto;
 
 rgw_err::
index 80e6059c623f273ecfdd9e4969681d80c4b7d60c..1a24707c358f832844def27af636cd5890fb5f51 100644 (file)
@@ -340,9 +340,9 @@ class RGWHTTPArgs {
   }
   /** parse the received arguments */
   int parse(const DoutPrefixProvider *dpp);
-  void append(const std::string& name, const string& val);
+  void append(const std::string& name, const std::string& val);
   /** Get the value for a specific argument parameter */
-  const string& get(const std::string& name, bool *exists = NULL) const;
+  const std::string& get(const std::string& name, bool *exists = NULL) const;
   boost::optional<const std::string&>
   get_optional(const std::string& name) const;
   int get_bool(const std::string& name, bool *val, bool *exists);
@@ -401,9 +401,9 @@ class RGWHTTPArgs {
   }
 }; // RGWHTTPArgs
 
-const char *rgw_conf_get(const map<string, string, ltstr_nocase>& conf_map, const char *name, const char *def_val);
-int rgw_conf_get_int(const map<string, string, ltstr_nocase>& conf_map, const char *name, int def_val);
-bool rgw_conf_get_bool(const map<string, string, ltstr_nocase>& conf_map, const char *name, bool def_val);
+const char *rgw_conf_get(const std::map<std::string, std::string, ltstr_nocase>& conf_map, const char *name, const char *def_val);
+int rgw_conf_get_int(const std::map<std::string, std::string, ltstr_nocase>& conf_map, const char *name, int def_val);
+bool rgw_conf_get_bool(const std::map<std::string, std::string, ltstr_nocase>& conf_map, const char *name, bool def_val);
 
 class RGWEnv;
 
@@ -422,7 +422,7 @@ public:
 };
 
 class RGWEnv {
-  std::map<string, string, ltstr_nocase> env_map;
+  std::map<std::string, std::string, ltstr_nocase> env_map;
   RGWConf conf;
 public:
   void init(CephContext *cct);
@@ -435,7 +435,7 @@ public:
   bool exists(const char *name) const;
   bool exists_prefix(const char *prefix) const;
   void remove(const char *name);
-  const std::map<string, string, ltstr_nocase>& get_map() const { return env_map; }
+  const std::map<std::string, std::string, ltstr_nocase>& get_map() const { return env_map; }
   int get_enable_ops_log() const {
     return conf.enable_ops_log;
   }
@@ -468,9 +468,9 @@ class RGWAccessControlPolicy;
 class JSONObj;
 
 struct RGWAccessKey {
-  string id; // AccessKey
-  string key; // SecretKey
-  string subuser;
+  std::string id; // AccessKey
+  std::string key; // SecretKey
+  std::string subuser;
 
   RGWAccessKey() {}
   RGWAccessKey(std::string _id, std::string _key)
@@ -493,8 +493,8 @@ struct RGWAccessKey {
   }
   void dump(Formatter *f) const;
   void dump_plain(Formatter *f) const;
-  void dump(Formatter *f, const string& user, bool swift) const;
-  static void generate_test_instances(list<RGWAccessKey*>& o);
+  void dump(Formatter *f, const std::string& user, bool swift) const;
+  static void generate_test_instances(std::list<RGWAccessKey*>& o);
 
   void decode_json(JSONObj *obj);
   void decode_json(JSONObj *obj, bool swift);
@@ -502,7 +502,7 @@ struct RGWAccessKey {
 WRITE_CLASS_ENCODER(RGWAccessKey)
 
 struct RGWSubUser {
-  string name;
+  std::string name;
   uint32_t perm_mask;
 
   RGWSubUser() : perm_mask(0) {}
@@ -520,8 +520,8 @@ struct RGWSubUser {
      DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  void dump(Formatter *f, const string& user) const;
-  static void generate_test_instances(list<RGWSubUser*>& o);
+  void dump(Formatter *f, const std::string& user) const;
+  static void generate_test_instances(std::list<RGWSubUser*>& o);
 
   void decode_json(JSONObj *obj);
 };
@@ -529,15 +529,15 @@ WRITE_CLASS_ENCODER(RGWSubUser)
 
 class RGWUserCaps
 {
-  map<string, uint32_t> caps;
+  std::map<std::string, uint32_t> caps;
 
-  int get_cap(const string& cap, string& type, uint32_t *perm);
-  int add_cap(const string& cap);
-  int remove_cap(const string& cap);
+  int get_cap(const std::string& cap, std::string& type, uint32_t *perm);
+  int add_cap(const std::string& cap);
+  int remove_cap(const std::string& cap);
 public:
-  static int parse_cap_perm(const string& str, uint32_t *perm);
-  int add_from_string(const string& str);
-  int remove_from_string(const string& str);
+  static int parse_cap_perm(const std::string& str, uint32_t *perm);
+  int add_from_string(const std::string& str);
+  int remove_from_string(const std::string& str);
 
   void encode(bufferlist& bl) const {
      ENCODE_START(1, 1, bl);
@@ -549,8 +549,8 @@ public:
      decode(caps, bl);
      DECODE_FINISH(bl);
   }
-  int check_cap(const string& cap, uint32_t perm) const;
-  bool is_valid_cap_type(const string& tp);
+  int check_cap(const std::string& cap, uint32_t perm) const;
+  bool is_valid_cap_type(const std::string& tp);
   void dump(Formatter *f) const;
   void dump(Formatter *f, const char *name) const;
 
@@ -575,15 +575,15 @@ enum RGWIdentityType
   TYPE_WEB=5,
 };
 
-static string RGW_STORAGE_CLASS_STANDARD = "STANDARD";
+static std::string RGW_STORAGE_CLASS_STANDARD = "STANDARD";
 
 struct rgw_placement_rule {
   std::string name;
   std::string storage_class;
 
   rgw_placement_rule() {}
-  rgw_placement_rule(const string& _n, const string& _sc) : name(_n), storage_class(_sc) {}
-  rgw_placement_rule(const rgw_placement_rule& _r, const string& _sc) : name(_r.name) {
+  rgw_placement_rule(const std::string& _n, const std::string& _sc) : name(_n), storage_class(_sc) {}
+  rgw_placement_rule(const rgw_placement_rule& _r, const std::string& _sc) : name(_r.name) {
     if (!_sc.empty()) {
       storage_class = _sc;
     } else {
@@ -609,19 +609,19 @@ struct rgw_placement_rule {
     storage_class.clear();
   }
 
-  void init(const string& n, const string& c) {
+  void init(const std::string& n, const std::string& c) {
     name = n;
     storage_class = c;
   }
 
-  static const string& get_canonical_storage_class(const string& storage_class) {
+  static const std::string& get_canonical_storage_class(const std::string& storage_class) {
     if (storage_class.empty()) {
       return RGW_STORAGE_CLASS_STANDARD;
     }
     return storage_class;
   }
 
-  const string& get_storage_class() const {
+  const std::string& get_storage_class() const {
     return get_canonical_storage_class(storage_class);
   }
   
@@ -685,17 +685,17 @@ WRITE_CLASS_ENCODER(rgw_placement_rule)
 void encode_json(const char *name, const rgw_placement_rule& val, ceph::Formatter *f);
 void decode_json_obj(rgw_placement_rule& v, JSONObj *obj);
 
-inline ostream& operator<<(ostream& out, const rgw_placement_rule& rule) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_placement_rule& rule) {
   return out << rule.to_str();
 }
 struct RGWUserInfo
 {
   rgw_user user_id;
-  string display_name;
-  string user_email;
-  map<string, RGWAccessKey> access_keys;
-  map<string, RGWAccessKey> swift_keys;
-  map<string, RGWSubUser> subusers;
+  std::string display_name;
+  std::string user_email;
+  std::map<std::string, RGWAccessKey> access_keys;
+  std::map<std::string, RGWAccessKey> swift_keys;
+  std::map<std::string, RGWSubUser> subusers;
   __u8 suspended;
   int32_t max_buckets;
   uint32_t op_mask;
@@ -703,13 +703,13 @@ struct RGWUserInfo
   __u8 admin;
   __u8 system;
   rgw_placement_rule default_placement;
-  list<string> placement_tags;
+  std::list<std::string> placement_tags;
   RGWQuotaInfo bucket_quota;
-  map<int, string> temp_url_keys;
+  std::map<int, std::string> temp_url_keys;
   RGWQuotaInfo user_quota;
   uint32_t type;
-  set<string> mfa_ids;
-  string assumed_role_arn;
+  std::set<std::string> mfa_ids;
+  std::string assumed_role_arn;
 
   RGWUserInfo()
     : suspended(0),
@@ -720,7 +720,7 @@ struct RGWUserInfo
       type(TYPE_NONE) {
   }
 
-  RGWAccessKey* get_key(const string& access_key) {
+  RGWAccessKey* get_key(const std::string& access_key) {
     if (access_keys.empty())
       return nullptr;
 
@@ -734,10 +734,10 @@ struct RGWUserInfo
   void encode(bufferlist& bl) const {
      ENCODE_START(22, 9, bl);
      encode((uint64_t)0, bl); // old auid
-     string access_key;
-     string secret_key;
+     std::string access_key;
+     std::string secret_key;
      if (!access_keys.empty()) {
-       map<string, RGWAccessKey>::const_iterator iter = access_keys.begin();
+       std::map<std::string, RGWAccessKey>::const_iterator iter = access_keys.begin();
        const RGWAccessKey& k = iter->second;
        access_key = k.id;
        secret_key = k.key;
@@ -746,10 +746,10 @@ struct RGWUserInfo
      encode(secret_key, bl);
      encode(display_name, bl);
      encode(user_email, bl);
-     string swift_name;
-     string swift_key;
+     std::string swift_name;
+     std::string swift_key;
      if (!swift_keys.empty()) {
-       map<string, RGWAccessKey>::const_iterator iter = swift_keys.begin();
+       std::map<std::string, RGWAccessKey>::const_iterator iter = swift_keys.begin();
        const RGWAccessKey& k = iter->second;
        swift_name = k.id;
        swift_key = k.key;
@@ -784,8 +784,8 @@ struct RGWUserInfo
        uint64_t old_auid;
        decode(old_auid, bl);
      }
-     string access_key;
-     string secret_key;
+     std::string access_key;
+     std::string secret_key;
     decode(access_key, bl);
     decode(secret_key, bl);
     if (struct_v < 6) {
@@ -797,8 +797,8 @@ struct RGWUserInfo
     decode(display_name, bl);
     decode(user_email, bl);
     /* We populate swift_keys map later nowadays, but we have to decode. */
-    string swift_name;
-    string swift_key;
+    std::string swift_name;
+    std::string swift_key;
     if (struct_v >= 3) decode(swift_name, bl);
     if (struct_v >= 4) decode(swift_key, bl);
     if (struct_v >= 5)
@@ -868,7 +868,7 @@ struct RGWUserInfo
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWUserInfo*>& o);
+  static void generate_test_instances(std::list<RGWUserInfo*>& o);
 
   void decode_json(JSONObj *obj);
 };
@@ -883,7 +883,7 @@ struct rgw_raw_obj {
   rgw_raw_obj(const rgw_pool& _pool, const std::string& _oid) {
     init(_pool, _oid);
   }
-  rgw_raw_obj(const rgw_pool& _pool, const std::string& _oid, const string& _loc) : loc(_loc) {
+  rgw_raw_obj(const rgw_pool& _pool, const std::string& _oid, const std::string& _loc) : loc(_loc) {
     init(_pool, _oid);
   }
 
@@ -944,7 +944,7 @@ struct rgw_raw_obj {
 };
 WRITE_CLASS_ENCODER(rgw_raw_obj)
 
-inline ostream& operator<<(ostream& out, const rgw_raw_obj& o) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_raw_obj& o) {
   out << o.pool << ":" << o.oid;
   return out;
 }
@@ -991,13 +991,13 @@ struct RGWObjVersionTracker {
   void generate_new_write_ver(CephContext *cct);
 };
 
-inline ostream& operator<<(ostream& out, const obj_version &v)
+inline std::ostream& operator<<(std::ostream& out, const obj_version &v)
 {
   out << v.tag << ":" << v.ver;
   return out;
 }
 
-inline ostream& operator<<(ostream& out, const RGWObjVersionTracker &ot)
+inline std::ostream& operator<<(std::ostream& out, const RGWObjVersionTracker &ot)
 {
   out << "{r=" << ot.read_version << ",w=" << ot.write_version << "}";
   return out;
@@ -1018,7 +1018,7 @@ struct RGWBucketInfo {
   rgw_bucket bucket;
   rgw_user owner;
   uint32_t flags{0};
-  string zonegroup;
+  std::string zonegroup;
   ceph::real_time creation_time;
   rgw_placement_rule placement_rule;
   bool has_instance_obj{false};
@@ -1042,13 +1042,13 @@ struct RGWBucketInfo {
   RGWBucketWebsiteConf website_conf;
 
   bool swift_versioning{false};
-  string swift_ver_location;
+  std::string swift_ver_location;
 
-  map<string, uint32_t> mdsearch_config;
+  std::map<std::string, uint32_t> mdsearch_config;
 
   // resharding
   cls_rgw_reshard_status reshard_status{cls_rgw_reshard_status::NOT_RESHARDING};
-  string new_bucket_instance_id;
+  std::string new_bucket_instance_id;
 
   RGWObjectLock obj_lock;
 
@@ -1058,7 +1058,7 @@ struct RGWBucketInfo {
   void decode(bufferlist::const_iterator& bl);
 
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWBucketInfo*>& o);
+  static void generate_test_instances(std::list<RGWBucketInfo*>& o);
 
   void decode_json(JSONObj *obj);
 
@@ -1135,7 +1135,7 @@ struct RGWBucketEntryPoint
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWBucketEntryPoint*>& o);
+  static void generate_test_instances(std::list<RGWBucketEntryPoint*>& o);
 };
 WRITE_CLASS_ENCODER(RGWBucketEntryPoint)
 
@@ -1182,15 +1182,15 @@ struct req_info {
   RGWHTTPArgs args;
   meta_map_t x_meta_map;
 
-  string host;
+  std::string host;
   const char *method;
-  string script_uri;
-  string request_uri;
-  string request_uri_aws4;
-  string effective_uri;
-  string request_params;
-  string domain;
-  string storage_class;
+  std::string script_uri;
+  std::string request_uri;
+  std::string request_uri_aws4;
+  std::string effective_uri;
+  std::string request_params;
+  std::string domain;
+  std::string storage_class;
 
   req_info(CephContext *cct, const RGWEnv *env);
   void rebuild_from(req_info& src);
@@ -1200,22 +1200,22 @@ struct req_info {
 typedef cls_rgw_obj_key rgw_obj_index_key;
 
 struct rgw_obj_key {
-  string name;
-  string instance;
-  string ns;
+  std::string name;
+  std::string instance;
+  std::string ns;
 
   rgw_obj_key() {}
   // cppcheck-suppress noExplicitConstructor
-  rgw_obj_key(const string& n) : name(n) {}
-  rgw_obj_key(const string& n, const string& i) : name(n), instance(i) {}
-  rgw_obj_key(const string& n, const string& i, const string& _ns) : name(n), instance(i), ns(_ns) {}
+  rgw_obj_key(const std::string& n) : name(n) {}
+  rgw_obj_key(const std::string& n, const std::string& i) : name(n), instance(i) {}
+  rgw_obj_key(const std::string& n, const std::string& i, const std::string& _ns) : name(n), instance(i), ns(_ns) {}
 
   rgw_obj_key(const rgw_obj_index_key& k) {
     parse_index_key(k.name, &name, &ns);
     instance = k.instance;
   }
 
-  static void parse_index_key(const string& key, string *name, string *ns) {
+  static void parse_index_key(const std::string& key, std::string *name, std::string *ns) {
     if (key[0] != '_') {
       *name = key;
       ns->clear();
@@ -1238,19 +1238,19 @@ struct rgw_obj_key {
     *ns = key.substr(1, pos -1);
   }
 
-  void set(const string& n) {
+  void set(const std::string& n) {
     name = n;
     instance.clear();
     ns.clear();
   }
 
-  void set(const string& n, const string& i) {
+  void set(const std::string& n, const std::string& i) {
     name = n;
     instance = i;
     ns.clear();
   }
 
-  void set(const string& n, const string& i, const string& _ns) {
+  void set(const std::string& n, const std::string& i, const std::string& _ns) {
     name = n;
     instance = i;
     ns = _ns;
@@ -1264,11 +1264,11 @@ struct rgw_obj_key {
     return true;
   }
 
-  void set_instance(const string& i) {
+  void set_instance(const std::string& i) {
     instance = i;
   }
 
-  const string& get_instance() const {
+  const std::string& get_instance() const {
     return instance;
   }
 
@@ -1280,17 +1280,17 @@ struct rgw_obj_key {
     return ns;
   }
 
-  string get_index_key_name() const {
+  std::string get_index_key_name() const {
     if (ns.empty()) {
       if (name.size() < 1 || name[0] != '_') {
         return name;
       }
-      return string("_") + name;
+      return std::string("_") + name;
     };
 
     char buf[ns.size() + 16];
     snprintf(buf, sizeof(buf), "_%s_", ns.c_str());
-    return string(buf) + name;
+    return std::string(buf) + name;
   };
 
   void get_index_key(rgw_obj_index_key *key) const {
@@ -1298,7 +1298,7 @@ struct rgw_obj_key {
     key->instance = instance;
   }
 
-  string get_loc() const {
+  std::string get_loc() const {
     /*
      * For backward compatibility. Older versions used to have object locator on all objects,
      * however, the name was the effective object locator. This had the same effect as not
@@ -1309,7 +1309,7 @@ struct rgw_obj_key {
       return name;
     }
 
-    return string();
+    return {};
   }
 
   bool empty() const {
@@ -1328,18 +1328,18 @@ struct rgw_obj_key {
     return have_instance() && !have_null_instance();
   }
 
-  string get_oid() const {
+  std::string get_oid() const {
     if (ns.empty() && !need_to_encode_instance()) {
       if (name.size() < 1 || name[0] != '_') {
         return name;
       }
-      return string("_") + name;
+      return std::string("_") + name;
     }
 
-    string oid = "_";
+    std::string oid = "_";
     oid.append(ns);
     if (need_to_encode_instance()) {
-      oid.append(string(":") + instance);
+      oid.append(std::string(":") + instance);
     }
     oid.append("_");
     oid.append(name);
@@ -1363,7 +1363,7 @@ struct rgw_obj_key {
     return !(k < *this);
   }
 
-  static void parse_ns_field(string& ns, string& instance) {
+  static void parse_ns_field(std::string& ns, std::string& instance) {
     int pos = ns.find(':');
     if (pos >= 0) {
       instance = ns.substr(pos + 1);
@@ -1375,7 +1375,7 @@ struct rgw_obj_key {
 
   // takes an oid and parses out the namespace (ns), name, and
   // instance
-  static bool parse_raw_oid(const string& oid, rgw_obj_key *key) {
+  static bool parse_raw_oid(const std::string& oid, rgw_obj_key *key) {
     key->instance.clear();
     key->ns.clear();
     if (oid[0] != '_') {
@@ -1392,7 +1392,7 @@ struct rgw_obj_key {
       return false;
 
     size_t pos = oid.find('_', 2); // oid must match ^_[^_].+$
-    if (pos == string::npos)
+    if (pos == std::string::npos)
       return false;
 
     key->ns = oid.substr(1, pos - 1);
@@ -1410,7 +1410,7 @@ struct rgw_obj_key {
    * and cuts down the name to the unmangled version. If it is not
    * part of the given namespace, it returns false.
    */
-  static bool oid_to_key_in_ns(const string& oid, rgw_obj_key *key, const string& ns) {
+  static bool oid_to_key_in_ns(const std::string& oid, rgw_obj_key *key, const std::string& ns) {
     bool ret = parse_raw_oid(oid, key);
     if (!ret) {
       return ret;
@@ -1420,14 +1420,14 @@ struct rgw_obj_key {
   }
 
   /**
-   * Given a mangled object name and an empty namespace string, this
-   * function extracts the namespace into the string and sets the object
+   * Given a mangled object name and an empty namespace std::string, this
+   * function extracts the namespace into the std::string and sets the object
    * name to be the unmangled version.
    *
    * It returns true after successfully doing so, or
    * false if it fails.
    */
-  static bool strip_namespace_from_name(string& name, string& ns, string& instance) {
+  static bool strip_namespace_from_name(std::string& name, std::string& ns, std::string& instance) {
     ns.clear();
     instance.clear();
     if (name[0] != '_') {
@@ -1435,7 +1435,7 @@ struct rgw_obj_key {
     }
 
     size_t pos = name.find('_', 1);
-    if (pos == string::npos) {
+    if (pos == std::string::npos) {
       return false;
     }
 
@@ -1450,7 +1450,7 @@ struct rgw_obj_key {
     }
 
     ns = name.substr(1, pos-1);
-    name = name.substr(pos+1, string::npos);
+    name = name.substr(pos+1, std::string::npos);
 
     parse_ns_field(ns, instance);
     return true;
@@ -1475,7 +1475,7 @@ struct rgw_obj_key {
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
 
-  string to_str() const {
+  std::string to_str() const {
     if (instance.empty()) {
       return name;
     }
@@ -1486,11 +1486,11 @@ struct rgw_obj_key {
 };
 WRITE_CLASS_ENCODER(rgw_obj_key)
 
-inline ostream& operator<<(ostream& out, const rgw_obj_key &o) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_obj_key &o) {
   return out << o.to_str();
 }
 
-inline ostream& operator<<(ostream& out, const rgw_obj_index_key &o) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_obj_index_key &o) {
   if (o.instance.empty()) {
     return out << o.name;
   } else {
@@ -1500,8 +1500,8 @@ inline ostream& operator<<(ostream& out, const rgw_obj_index_key &o) {
 
 struct req_init_state {
   /* Keeps [[tenant]:]bucket until we parse the token. */
-  string url_bucket;
-  string src_bucket;
+  std::string url_bucket;
+  std::string src_bucket;
 };
 
 #include "rgw_auth.h"
@@ -1518,11 +1518,11 @@ struct req_state : DoutPrefixProvider {
   bool content_started{false};
   int format{0};
   ceph::Formatter *formatter{nullptr};
-  string decoded_uri;
-  string relative_uri;
+  std::string decoded_uri;
+  std::string relative_uri;
   const char *length{nullptr};
   int64_t content_length{0};
-  map<string, string> generic_attrs;
+  std::map<std::string, std::string> generic_attrs;
   rgw_err err;
   bool expect_cont{false};
   uint64_t obj_size{0};
@@ -1532,26 +1532,26 @@ struct req_state : DoutPrefixProvider {
   uint32_t perm_mask{0};
 
   /* Set once when url_bucket is parsed and not violated thereafter. */
-  string account_name;
+  std::string account_name;
 
-  string bucket_tenant;
-  string bucket_name;
+  std::string bucket_tenant;
+  std::string bucket_name;
 
   std::unique_ptr<rgw::sal::Bucket> bucket;
   std::unique_ptr<rgw::sal::Object> object;
-  string src_tenant_name;
-  string src_bucket_name;
+  std::string src_tenant_name;
+  std::string src_bucket_name;
   std::unique_ptr<rgw::sal::Object> src_object;
   ACLOwner bucket_owner;
   ACLOwner owner;
 
-  string zonegroup_name;
-  string zonegroup_endpoint;
-  string bucket_instance_id;
+  std::string zonegroup_name;
+  std::string zonegroup_endpoint;
+  std::string bucket_instance_id;
   int bucket_instance_shard_id{-1};
-  string redirect_zone_endpoint;
+  std::string redirect_zone_endpoint;
 
-  string redirect;
+  std::string redirect;
 
   real_time bucket_mtime;
   std::map<std::string, ceph::bufferlist> bucket_attrs;
@@ -1601,13 +1601,13 @@ struct req_state : DoutPrefixProvider {
   rgw::IAM::Environment env;
   boost::optional<rgw::IAM::Policy> iam_policy;
   boost::optional<PublicAccessBlockConfiguration> bucket_access_conf;
-  vector<rgw::IAM::Policy> iam_user_policies;
+  std::vector<rgw::IAM::Policy> iam_user_policies;
 
   /* Is the request made by an user marked as a system one?
    * Being system user means we also have the admin status. */
   bool system_request{false};
 
-  string canned_acl;
+  std::string canned_acl;
   bool has_acl_header{false};
   bool local_source{false}; /* source is local */
 
@@ -1615,11 +1615,11 @@ struct req_state : DoutPrefixProvider {
 
   /* Content-Disposition override for TempURL of Swift API. */
   struct {
-    string override;
-    string fallback;
+    std::string override;
+    std::string fallback;
   } content_disp;
 
-  string host_id;
+  std::string host_id;
 
   req_info info;
   req_init_state init_state;
@@ -1630,9 +1630,9 @@ struct req_state : DoutPrefixProvider {
   Clock::duration time_elapsed() const { return Clock::now() - time; }
 
   RGWObjectCtx *obj_ctx{nullptr};
-  string dialect;
-  string req_id;
-  string trans_id;
+  std::string dialect;
+  std::string req_id;
+  std::string trans_id;
   uint64_t id;
 
   RGWObjTags tagset;
@@ -1643,9 +1643,9 @@ struct req_state : DoutPrefixProvider {
   optional_yield yield{null_yield};
 
   //token claims from STS token for ops log (can be used for Keystone token also)
-  std::vector<string> token_claims;
+  std::vector<std::string> token_claims;
 
-  vector<rgw::IAM::Policy> session_policies;
+  std::vector<rgw::IAM::Policy> session_policies;
 
   req_state(CephContext* _cct, RGWEnv* e, uint64_t id);
   ~req_state();
@@ -1661,7 +1661,7 @@ struct req_state : DoutPrefixProvider {
 };
 
 void set_req_state_err(struct req_state*, int);
-void set_req_state_err(struct req_state*, int, const string&);
+void set_req_state_err(struct req_state*, int, const std::string&);
 void set_req_state_err(struct rgw_err&, int, const int);
 void dump(struct req_state*);
 
@@ -1707,7 +1707,7 @@ struct RGWBucketEnt {
     ENCODE_START(7, 5, bl);
     uint64_t s = size;
     __u32 mt = ceph::real_clock::to_time_t(creation_time);
-    string empty_str;  // originally had the bucket name here, but we encode bucket later
+    std::string empty_str;  // originally had the bucket name here, but we encode bucket later
     encode(empty_str, bl);
     encode(s, bl);
     encode(mt, bl);
@@ -1723,7 +1723,7 @@ struct RGWBucketEnt {
     DECODE_START_LEGACY_COMPAT_LEN(7, 5, 5, bl);
     __u32 mt;
     uint64_t s;
-    string empty_str;  // backward compatibility
+    std::string empty_str;  // backward compatibility
     decode(empty_str, bl);
     decode(s, bl);
     decode(mt, bl);
@@ -1745,7 +1745,7 @@ struct RGWBucketEnt {
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWBucketEnt*>& o);
+  static void generate_test_instances(std::list<RGWBucketEnt*>& o);
 };
 WRITE_CLASS_ENCODER(RGWBucketEnt)
 
@@ -1767,11 +1767,11 @@ struct rgw_obj {
     bucket = b;
     key.set(name);
   }
-  void init(const rgw_bucket& b, const std::string& name, const string& i, const string& n) {
+  void init(const rgw_bucket& b, const std::string& name, const std::string& i, const std::string& n) {
     bucket = b;
     key.set(name, i, n);
   }
-  void init_ns(const rgw_bucket& b, const std::string& name, const string& n) {
+  void init_ns(const rgw_bucket& b, const std::string& name, const std::string& n) {
     bucket = b;
     key.name = name;
     key.instance.clear();
@@ -1786,11 +1786,11 @@ struct rgw_obj {
     key = k;
   }
 
-  string get_oid() const {
+  std::string get_oid() const {
     return key.get_oid();
   }
 
-  const string& get_hash_object() const {
+  const std::string& get_hash_object() const {
     return index_hash_source.empty() ? key.name : index_hash_source;
   }
 
@@ -1814,7 +1814,7 @@ struct rgw_obj {
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START_LEGACY_COMPAT_LEN(6, 3, 3, bl);
     if (struct_v < 6) {
-      string s;
+      std::string s;
       decode(bucket.name, bl); /* bucket.name */
       decode(s, bl); /* loc */
       decode(key.ns, bl);
@@ -1848,7 +1848,7 @@ struct rgw_obj {
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<rgw_obj*>& o);
+  static void generate_test_instances(std::list<rgw_obj*>& o);
 
   bool operator==(const rgw_obj& o) const {
     return (key == o.key) &&
@@ -1879,13 +1879,13 @@ struct rgw_obj {
 WRITE_CLASS_ENCODER(rgw_obj)
 
 struct rgw_cache_entry_info {
-  string cache_locator;
+  std::string cache_locator;
   uint64_t gen;
 
   rgw_cache_entry_info() : gen(0) {}
 };
 
-inline ostream& operator<<(ostream& out, const rgw_obj &o) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_obj &o) {
   return out << o.bucket.name << ":" << o.get_oid();
 }
 
@@ -1955,7 +1955,7 @@ static inline int rgw_str_to_bool(const char *s, int def_val)
           strcasecmp(s, "1") == 0);
 }
 
-static inline void append_rand_alpha(CephContext *cct, const string& src, string& dest, int len)
+static inline void append_rand_alpha(CephContext *cct, const std::string& src, std::string& dest, int len)
 {
   dest = src;
   char buf[len + 1];
@@ -2002,15 +2002,15 @@ void rgw_add_amz_meta_header(
   const std::string& k,
   const std::string& v);
 
-extern string rgw_string_unquote(const string& s);
-extern void parse_csv_string(const string& ival, vector<string>& ovals);
-extern int parse_key_value(string& in_str, string& key, string& val);
-extern int parse_key_value(string& in_str, const char *delim, string& key, string& val);
+extern std::string rgw_string_unquote(const std::string& s);
+extern void parse_csv_string(const std::string& ival, std::vector<std::string>& ovals);
+extern int parse_key_value(std::string& in_str, std::string& key, std::string& val);
+extern int parse_key_value(std::string& in_str, const char *delim, std::string& key, std::string& val);
 
-extern boost::optional<std::pair<std::string_view, std::string_view>>
+extern boost::optional<std::pair<std::string_view,std::string_view>>
 parse_key_value(const std::string_view& in_str,
                 const std::string_view& delim);
-extern boost::optional<std::pair<std::string_view, std::string_view>>
+extern boost::optional<std::pair<std::string_view,std::string_view>>
 parse_key_value(const std::string_view& in_str);
 
 
@@ -2018,12 +2018,12 @@ parse_key_value(const std::string_view& in_str);
 extern int parse_time(const char *time_str, real_time *time);
 extern bool parse_rfc2616(const char *s, struct tm *t);
 extern bool parse_iso8601(const char *s, struct tm *t, uint32_t *pns = NULL, bool extended_format = true);
-extern string rgw_trim_whitespace(const string& src);
+extern std::string rgw_trim_whitespace(const std::string& src);
 extern std::string_view rgw_trim_whitespace(const std::string_view& src);
-extern string rgw_trim_quotes(const string& val);
+extern std::string rgw_trim_quotes(const std::string& val);
 
 extern void rgw_to_iso8601(const real_time& t, char *dest, int buf_size);
-extern void rgw_to_iso8601(const real_time& t, string *dest);
+extern void rgw_to_iso8601(const real_time& t, std::string *dest);
 extern std::string rgw_to_asctime(const utime_t& t);
 
 struct perm_state_base {
@@ -2112,7 +2112,7 @@ bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp,
 
 /** Check if the req_state's user has the necessary permissions
  * to do the requested action */
-rgw::IAM::Effect eval_identity_or_session_policies(const vector<rgw::IAM::Policy>& user_policies,
+rgw::IAM::Effect eval_identity_or_session_policies(const std::vector<rgw::IAM::Policy>& user_policies,
                           const rgw::IAM::Environment& env,
                           boost::optional<const rgw::auth::Identity&> id,
                           const uint64_t op,
@@ -2120,8 +2120,8 @@ rgw::IAM::Effect eval_identity_or_session_policies(const vector<rgw::IAM::Policy
 bool verify_user_permission(const DoutPrefixProvider* dpp,
                             struct req_state * const s,
                             RGWAccessControlPolicy * const user_acl,
-                            const vector<rgw::IAM::Policy>& user_policies,
-                            const vector<rgw::IAM::Policy>& session_policies,
+                            const std::vector<rgw::IAM::Policy>& user_policies,
+                            const std::vector<rgw::IAM::Policy>& session_policies,
                             const rgw::ARN& res,
                             const uint64_t op);
 bool verify_user_permission_no_policy(const DoutPrefixProvider* dpp,
@@ -2142,8 +2142,8 @@ bool verify_bucket_permission(
   RGWAccessControlPolicy * const user_acl,
   RGWAccessControlPolicy * const bucket_acl,
   const boost::optional<rgw::IAM::Policy>& bucket_policy,
-  const vector<rgw::IAM::Policy>& identity_policies,
-  const vector<rgw::IAM::Policy>& session_policies,
+  const std::vector<rgw::IAM::Policy>& identity_policies,
+  const std::vector<rgw::IAM::Policy>& session_policies,
   const uint64_t op);
 bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state * const s, const uint64_t op);
 bool verify_bucket_permission_no_policy(
@@ -2165,8 +2165,8 @@ extern bool verify_object_permission(
   RGWAccessControlPolicy * const bucket_acl,
   RGWAccessControlPolicy * const object_acl,
   const boost::optional<rgw::IAM::Policy>& bucket_policy,
-  const vector<rgw::IAM::Policy>& identity_policies,
-  const vector<rgw::IAM::Policy>& session_policies,
+  const std::vector<rgw::IAM::Policy>& identity_policies,
+  const std::vector<rgw::IAM::Policy>& session_policies,
   const uint64_t op);
 extern bool verify_object_permission(const DoutPrefixProvider* dpp, struct req_state *s, uint64_t op);
 extern bool verify_object_permission_no_policy(
@@ -2185,11 +2185,11 @@ extern int verify_object_lock(
   const bool bypass_governance_mode);
 
 /** Convert an input URL into a sane object name
- * by converting %-escaped strings into characters, etc*/
-extern void rgw_uri_escape_char(char c, string& dst);
+ * by converting %-escaped std::strings into characters, etc*/
+extern void rgw_uri_escape_char(char c, std::string& dst);
 extern std::string url_decode(const std::string_view& src_str,
                               bool in_query = false);
-extern void url_encode(const std::string& src, string& dst,
+extern void url_encode(const std::string& src, std::string& dst,
                        bool encode_slash = true);
 extern std::string url_encode(const std::string& src, bool encode_slash = true);
 extern std::string url_remove_prefix(const std::string& url); // Removes hhtp, https and www from url
@@ -2268,7 +2268,7 @@ extern void calc_hash_sha256_update_stream(ceph::crypto::SHA256* hash,
 extern std::string calc_hash_sha256_close_stream(ceph::crypto::SHA256** phash);
 extern std::string calc_hash_sha256_restart_stream(ceph::crypto::SHA256** phash);
 
-extern int rgw_parse_op_type_list(const string& str, uint32_t *perm);
+extern int rgw_parse_op_type_list(const std::string& str, uint32_t *perm);
 
 static constexpr uint32_t MATCH_POLICY_ACTION = 0x01;
 static constexpr uint32_t MATCH_POLICY_RESOURCE = 0x02;
@@ -2278,14 +2278,14 @@ static constexpr uint32_t MATCH_POLICY_STRING = 0x08;
 extern bool match_policy(std::string_view pattern, std::string_view input,
                          uint32_t flag);
 
-extern string camelcase_dash_http_attr(const string& orig);
-extern string lowercase_dash_http_attr(const string& orig);
+extern std::string camelcase_dash_http_attr(const std::string& orig);
+extern std::string lowercase_dash_http_attr(const std::string& orig);
 
 void rgw_setup_saved_curl_handles();
 void rgw_release_all_curl_handles();
 
-static inline void rgw_escape_str(const string& s, char esc_char,
-                                 char special_char, string *dest)
+static inline void rgw_escape_str(const std::string& s, char esc_char,
+                                 char special_char, std::string *dest)
 {
   const char *src = s.c_str();
   char dest_buf[s.size() * 2 + 1];
@@ -2302,9 +2302,9 @@ static inline void rgw_escape_str(const string& s, char esc_char,
   *dest = dest_buf;
 }
 
-static inline ssize_t rgw_unescape_str(const string& s, ssize_t ofs,
+static inline ssize_t rgw_unescape_str(const std::string& s, ssize_t ofs,
                                       char esc_char, char special_char,
-                                      string *dest)
+                                      std::string *dest)
 {
   const char *src = s.c_str();
   char dest_buf[s.size() + 1];
@@ -2329,13 +2329,13 @@ static inline ssize_t rgw_unescape_str(const string& s, ssize_t ofs,
   }
   *destp = '\0';
   *dest = dest_buf;
-  return string::npos;
+  return std::string::npos;
 }
 
-static inline string rgw_bl_str(ceph::buffer::list& raw)
+static inline std::string rgw_bl_str(ceph::buffer::list& raw)
 {
   size_t len = raw.length();
-  string s(raw.c_str(), len);
+  std::string s(raw.c_str(), len);
   while (len && !s[len - 1]) {
     --len;
     s.resize(len);
index 1255734b6d7aed808fc0e8615eaa373f5ce1cc68..e49502711714ce3173027c16bf383783b30e1fc9 100644 (file)
@@ -5,6 +5,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int rgw_compression_info_from_attr(const bufferlist& attr,
                                    bool& need_decompress,
                                    RGWCompressionInfo& cs_info)
index 6e5d17c2232abfaf4b95a46d6e9ef9679f781ece..8e8717b0df2c011e1bf1854b96b3b5aad985446e 100644 (file)
@@ -14,7 +14,7 @@
 int rgw_compression_info_from_attr(const bufferlist& attr,
                                    bool& need_decompress,
                                    RGWCompressionInfo& cs_info);
-int rgw_compression_info_from_attrset(const map<string, bufferlist>& attrs,
+int rgw_compression_info_from_attrset(const std::map<std::string, bufferlist>& attrs,
                                       bool& need_decompress,
                                       RGWCompressionInfo& cs_info);
 
@@ -24,7 +24,7 @@ class RGWGetObj_Decompress : public RGWGetObj_Filter
   CompressorRef compressor;
   RGWCompressionInfo* cs_info;
   bool partial_content;
-  vector<compression_block>::iterator first_block, last_block;
+  std::vector<compression_block>::iterator first_block, last_block;
   off_t q_ofs, q_len;
   uint64_t cur_ofs;
   bufferlist waiting;
@@ -55,7 +55,7 @@ public:
   int process(bufferlist&& data, uint64_t logical_offset) override;
 
   bool is_compressed() { return compressed; }
-  vector<compression_block>& get_compression_blocks() { return blocks; }
+  std::vector<compression_block>& get_compression_blocks() { return blocks; }
   boost::optional<int32_t> get_compressor_message() { return compressor_message; }
 
 }; /* RGWPutObj_Compress */
index e5d98a3d53e6bdac36d6ebcbe1e05571088c2c87..776f8e10b20548e60d8988c82e0d1598e24f1c6f 100644 (file)
@@ -42,10 +42,10 @@ struct compression_block {
 WRITE_CLASS_ENCODER(compression_block)
 
 struct RGWCompressionInfo {
-  string compression_type;
+  std::string compression_type;
   uint64_t orig_size;
   boost::optional<int32_t> compressor_message;
-  vector<compression_block> blocks;
+  std::vector<compression_block> blocks;
 
   RGWCompressionInfo() : compression_type("none"), orig_size(0) {}
   RGWCompressionInfo(const RGWCompressionInfo& cs_info) : compression_type(cs_info.compression_type),
index 1946ab1c0f43d6766a54335da913814fab0f3f7c..96f2ddabd07687a977f4555260f723ee62eecd80 100644 (file)
@@ -13,6 +13,7 @@
 #define dout_subsys ceph_subsys_rgw
 #define dout_context g_ceph_context
 
+using namespace std;
 
 class RGWCompletionManager::WaitContext : public Context {
   RGWCompletionManager *manager;
index f77efe143a176cd73b019a7e6abc4dca8e7d9523..1a9fa62cd32147469fba74bcbe224687e5770162 100644 (file)
@@ -44,10 +44,10 @@ class RGWCompletionManager : public RefCountedObject {
     rgw_io_id io_id;
     void *user_info;
   };
-  list<io_completion> complete_reqs;
-  set<rgw_io_id> complete_reqs_set;
+  std::list<io_completion> complete_reqs;
+  std::set<rgw_io_id> complete_reqs_set;
   using NotifierRef = boost::intrusive_ptr<RGWAioCompletionNotifier>;
-  set<NotifierRef> cns;
+  std::set<NotifierRef> cns;
 
   ceph::mutex lock = ceph::make_mutex("RGWCompletionManager::lock");
   ceph::condition_variable cond;
@@ -56,7 +56,7 @@ class RGWCompletionManager : public RefCountedObject {
 
   std::atomic<bool> going_down = { false };
 
-  map<void *, void *> waiters;
+  std::map<void *, void *> waiters;
 
   class WaitContext;
 
@@ -152,7 +152,7 @@ public:
 struct RGWCoroutinesEnv {
   uint64_t run_context;
   RGWCoroutinesManager *manager;
-  list<RGWCoroutinesStack *> *scheduled_stacks;
+  std::list<RGWCoroutinesStack *> *scheduled_stacks;
   RGWCoroutinesStack *stack;
 
   RGWCoroutinesEnv() : run_context(0), manager(NULL), scheduled_stacks(NULL), stack(NULL) {}
@@ -165,7 +165,7 @@ enum RGWCoroutineState {
 };
 
 struct rgw_spawned_stacks {
-  vector<RGWCoroutinesStack *> entries;
+  std::vector<RGWCoroutinesStack *> entries;
 
   rgw_spawned_stacks() {}
 
@@ -174,9 +174,8 @@ struct rgw_spawned_stacks {
   }
 
   void inherit(rgw_spawned_stacks *source) {
-    for (vector<RGWCoroutinesStack *>::iterator iter = source->entries.begin();
-         iter != source->entries.end(); ++iter) {
-      add_pending(*iter);
+    for (auto* entry : source->entries) {
+      add_pending(entry);
     }
     source->entries.clear();
   }
@@ -189,9 +188,9 @@ class RGWCoroutine : public RefCountedObject, public boost::asio::coroutine {
 
   struct StatusItem {
     utime_t timestamp;
-    string status;
+    std::string status;
 
-    StatusItem(utime_t& t, const string& s) : timestamp(t), status(s) {}
+    StatusItem(utime_t& t, const std::string& s) : timestamp(t), status(s) {}
 
     void dump(Formatter *f) const;
   };
@@ -205,16 +204,16 @@ class RGWCoroutine : public RefCountedObject, public boost::asio::coroutine {
     int max_history;
 
     utime_t timestamp;
-    stringstream status;
+    std::stringstream status;
 
     explicit Status(CephContext *_cct) : cct(_cct), max_history(MAX_COROUTINE_HISTORY) {}
 
-    deque<StatusItem> history;
+    std::deque<StatusItem> history;
 
-    stringstream& set_status();
+    std::stringstream& set_status();
   } status;
 
-  stringstream description;
+  std::stringstream description;
 
 protected:
   bool _yield_ret;
@@ -239,7 +238,7 @@ protected:
 
   rgw_spawned_stacks spawned;
 
-  stringstream error_stream;
+  std::stringstream error_stream;
 
   int set_state(int s, int ret = 0) {
     retcode = ret;
@@ -255,18 +254,18 @@ protected:
   void set_io_blocked(bool flag);
 
   void reset_description() {
-    description.str(string());
+    description.str(std::string());
   }
 
-  stringstream& set_description() {
+  std::stringstream& set_description() {
     return description;
   }
-  stringstream& set_status() {
+  std::stringstream& set_status() {
     return status.set_status();
   }
 
-  stringstream& set_status(const string& s) {
-    stringstream& status = set_status();
+  std::stringstream& set_status(const std::string& s) {
+    std::stringstream& status = set_status();
     status << s;
     return status;
   }
@@ -283,8 +282,8 @@ public:
   bool is_done() { return (state == RGWCoroutine_Done || state == RGWCoroutine_Error); }
   bool is_error() { return (state == RGWCoroutine_Error); }
 
-  stringstream& log_error() { return error_stream; }
-  string error_str() {
+  std::stringstream& log_error() { return error_stream; }
+  std::string error_str() {
     return error_stream.str();
   }
 
@@ -324,7 +323,7 @@ public:
 
   void wait_for_child();
 
-  virtual string to_str() const;
+  virtual std::string to_str() const;
 
   RGWCoroutinesStack *get_stack() const {
     return stack;
@@ -347,7 +346,7 @@ public:
   void io_complete(const rgw_io_id& io_id);
 };
 
-ostream& operator<<(ostream& out, const RGWCoroutine& cr);
+std::ostream& operator<<(std::ostream& out, const RGWCoroutine& cr);
 
 #define yield_until_true(x)     \
 do {                            \
@@ -393,7 +392,7 @@ do {                            \
 
 template <class T>
 class RGWConsumerCR : public RGWCoroutine {
-  list<T> product;
+  std::list<T> product;
 
 public:
   explicit RGWConsumerCR(CephContext *_cct) : RGWCoroutine(_cct) {}
@@ -418,7 +417,7 @@ public:
   }
 
   void receive(const T& p, bool wakeup = true);
-  void receive(list<T>& l, bool wakeup = true);
+  void receive(std::list<T>& l, bool wakeup = true);
 };
 
 class RGWCoroutinesStack : public RefCountedObject {
@@ -431,17 +430,17 @@ class RGWCoroutinesStack : public RefCountedObject {
 
   RGWCoroutinesManager *ops_mgr;
 
-  list<RGWCoroutine *> ops;
-  list<RGWCoroutine *>::iterator pos;
+  std::list<RGWCoroutine *> ops;
+  std::list<RGWCoroutine *>::iterator pos;
 
   rgw_spawned_stacks spawned;
 
   RGWCoroutinesStack *preallocated_stack{nullptr};
 
-  set<RGWCoroutinesStack *> blocked_by_stack;
-  set<RGWCoroutinesStack *> blocking_stacks;
+  std::set<RGWCoroutinesStack *> blocked_by_stack;
+  std::set<RGWCoroutinesStack *> blocking_stacks;
 
-  map<int64_t, rgw_io_id> io_finish_ids;
+  std::map<int64_t, rgw_io_id> io_finish_ids;
   rgw_io_id io_blocked_id;
 
   bool done_flag;
@@ -531,7 +530,7 @@ public:
     return retcode;
   }
 
-  string error_str();
+  std::string error_str();
 
   void call(RGWCoroutine *next_op);
   RGWCoroutinesStack *spawn(RGWCoroutine *next_op, bool wait);
@@ -577,7 +576,7 @@ public:
 };
 
 template <class T>
-void RGWConsumerCR<T>::receive(list<T>& l, bool wakeup)
+void RGWConsumerCR<T>::receive(std::list<T>& l, bool wakeup)
 {
   product.splice(product.end(), l);
   if (wakeup) {
@@ -598,11 +597,11 @@ void RGWConsumerCR<T>::receive(const T& p, bool wakeup)
 class RGWCoroutinesManagerRegistry : public RefCountedObject, public AdminSocketHook {
   CephContext *cct;
 
-  set<RGWCoroutinesManager *> managers;
+  std::set<RGWCoroutinesManager *> managers;
   ceph::shared_mutex lock =
     ceph::make_shared_mutex("RGWCoroutinesRegistry::lock");
 
-  string admin_command;
+  std::string admin_command;
 
 public:
   explicit RGWCoroutinesManagerRegistry(CephContext *_cct) : cct(_cct) {}
@@ -611,7 +610,7 @@ public:
   void add(RGWCoroutinesManager *mgr);
   void remove(RGWCoroutinesManager *mgr);
 
-  int hook_to_admin_command(const string& command);
+  int hook_to_admin_command(const std::string& command);
   int call(std::string_view command, const cmdmap_t& cmdmap,
           Formatter *f,
           std::ostream& ss,
@@ -625,7 +624,7 @@ class RGWCoroutinesManager {
   std::atomic<bool> going_down = { false };
 
   std::atomic<int64_t> run_context_count = { 0 };
-  map<uint64_t, set<RGWCoroutinesStack *> > run_contexts;
+  std::map<uint64_t, std::set<RGWCoroutinesStack *> > run_contexts;
 
   std::atomic<int64_t> max_io_id = { 0 };
   std::atomic<uint64_t> max_stack_id = { 0 };
@@ -635,7 +634,7 @@ class RGWCoroutinesManager {
 
   RGWIOIDProvider io_id_provider;
 
-  void handle_unblocked_stack(set<RGWCoroutinesStack *>& context_stacks, list<RGWCoroutinesStack *>& scheduled_stacks,
+  void handle_unblocked_stack(std::set<RGWCoroutinesStack *>& context_stacks, std::list<RGWCoroutinesStack *>& scheduled_stacks,
                               RGWCompletionManager::io_completion& io, int *waiting_count);
 protected:
   RGWCompletionManager *completion_mgr;
@@ -643,7 +642,7 @@ protected:
 
   int ops_window;
 
-  string id;
+  std::string id;
 
   void put_completion_notifier(RGWAioCompletionNotifier *cn);
 public:
@@ -656,7 +655,7 @@ public:
   }
   virtual ~RGWCoroutinesManager();
 
-  int run(const DoutPrefixProvider *dpp, list<RGWCoroutinesStack *>& ops);
+  int run(const DoutPrefixProvider *dpp, std::list<RGWCoroutinesStack *>& ops);
   int run(const DoutPrefixProvider *dpp, RGWCoroutine *op);
   void stop() {
     bool expected = false;
@@ -682,7 +681,7 @@ public:
   void set_sleeping(RGWCoroutine *cr, bool flag);
   void io_complete(RGWCoroutine *cr, const rgw_io_id& io_id);
 
-  virtual string get_id();
+  virtual std::string get_id();
   void dump(Formatter *f) const;
 
   RGWIOIDProvider& get_io_id_provider() {
index 94d08f7ae3b9c4d0c76dec39a25ab7256ed096f7..83ba079b2509de8ec50377f98de6cdce0efdff15 100644 (file)
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWCORSRule::dump_origins() {
   unsigned num_origins = allowed_origins.size();
   dout(10) << "Allowed origins : " << num_origins << dendl;
-  for(set<string>::iterator it = allowed_origins.begin();
-      it != allowed_origins.end(); 
-      ++it) {
-    dout(10) << *it << "," << dendl;
+  for(auto& origin : allowed_origins) {
+    dout(10) << origin << "," << dendl;
   }
 }
 
index 6679900953b6d9b376d829272fe32c2c88e0e572..1620795e8b4801e884724cf751af4aab5d0b0ce8 100644 (file)
@@ -41,15 +41,15 @@ protected:
   uint32_t       max_age;
   uint8_t        allowed_methods;
   std::string         id;
-  std::set<string> allowed_hdrs; /* If you change this, you need to discard lowercase_allowed_hdrs */
-  std::set<string> lowercase_allowed_hdrs; /* Not built until needed in RGWCORSRule::is_header_allowed */
-  std::set<string> allowed_origins;
-  std::list<string> exposable_hdrs;
+  std::set<std::string> allowed_hdrs; /* If you change this, you need to discard lowercase_allowed_hdrs */
+  std::set<std::string> lowercase_allowed_hdrs; /* Not built until needed in RGWCORSRule::is_header_allowed */
+  std::set<std::string> allowed_origins;
+  std::list<std::string> exposable_hdrs;
 
 public:
   RGWCORSRule() : max_age(CORS_MAX_AGE_INVALID),allowed_methods(0) {}
-  RGWCORSRule(std::set<string>& o, std::set<string>& h, 
-              std::list<string>& e, uint8_t f, uint32_t a)
+  RGWCORSRule(std::set<std::string>& o, std::set<std::string>& h,
+              std::list<std::string>& e, uint8_t f, uint32_t a)
       :max_age(a),
        allowed_methods(f),
        allowed_hdrs(h),
@@ -116,7 +116,7 @@ class RGWCORSConfiguration
   bool is_empty() {
     return rules.empty();
   }
-  void get_origins_list(const char *origin, std::list<string>& origins);
+  void get_origins_list(const char *origin, std::list<std::string>& origins);
   RGWCORSRule * host_name_rule(const char *origin);
   void erase_host_name_rule(std::string& origin);
   void dump();
index 0275156d2c90da14cc7517e828737d653f11084c..ba68487e2758311ee260558a8a317b2a4577f671 100644 (file)
@@ -27,6 +27,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 void RGWCORSRule_S3::to_xml(XMLFormatter& f) {
 
index bc69c513b6883f6786abdb606b042735a6f467d0..f4ec8a1f95bff5ad0bd3d9e71d48d5b384202145 100644 (file)
@@ -45,7 +45,7 @@ class RGWCORSConfiguration_S3 : public RGWCORSConfiguration, public XMLObj
     ~RGWCORSConfiguration_S3() override {}
 
     bool xml_end(const char *el) override;
-    void to_xml(ostream& out);
+    void to_xml(std::ostream& out);
 };
 
 class RGWCORSXMLParser_S3 : public RGWXMLParser
index 4bb103a467d8200f36463fd4498c8554972e41ad..3eff9bea32be5a1e15dad32ced58399d932a69f1 100644 (file)
@@ -31,8 +31,8 @@ class RGWCORSConfiguration_SWIFT : public RGWCORSConfiguration
     ~RGWCORSConfiguration_SWIFT() {}
     int create_update(const char *allow_origins, const char *allow_headers, 
                   const char *expose_headers, const char *max_age) {
-      set<string> o, h;
-      list<string> e;
+      std::set<std::string> o, h;
+      std::list<std::string> e;
       unsigned long a = CORS_MAX_AGE_INVALID;
       uint8_t flags = RGW_CORS_ALL;
 
index fd33e6889b5814e2bf373727d4b71b95f7bbc411..48bcee629184b9029912609d61f47d8ade93b282 100644 (file)
@@ -22,6 +22,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 bool RGWAsyncRadosProcessor::RGWWQ::_enqueue(RGWAsyncRadosRequest *req) {
   if (processor->is_going_down()) {
     return false;
index aa8d2d89aaa359deb3c162312bfac8d47ec1801c..cb9d0f09408f5744e598eccf5ecee493fac4fc47 100644 (file)
@@ -69,7 +69,7 @@ public:
 
 
 class RGWAsyncRadosProcessor {
-  deque<RGWAsyncRadosRequest *> m_req_queue;
+  std::deque<RGWAsyncRadosRequest *> m_req_queue;
   std::atomic<bool> going_down = { false };
 protected:
   CephContext *cct;
@@ -330,7 +330,7 @@ public:
                        bool want_attrs, bool raw_attrs);
 
   bufferlist bl;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
   RGWObjVersionTracker objv_tracker;
 };
 
@@ -356,14 +356,14 @@ class RGWAsyncPutSystemObjAttrs : public RGWAsyncRadosRequest {
   const DoutPrefixProvider *dpp;
   RGWSI_SysObj *svc;
   rgw_raw_obj obj;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 
 protected:
   int _send_request(const DoutPrefixProvider *dpp) override;
 public:
   RGWAsyncPutSystemObjAttrs(const DoutPrefixProvider *dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, RGWSI_SysObj *_svc,
                        RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
-                       map<string, bufferlist> _attrs);
+                       std::map<std::string, bufferlist> _attrs);
 
   RGWObjVersionTracker objv_tracker;
 };
@@ -371,8 +371,8 @@ public:
 class RGWAsyncLockSystemObj : public RGWAsyncRadosRequest {
   rgw::sal::RadosStore* store;
   rgw_raw_obj obj;
-  string lock_name;
-  string cookie;
+  std::string lock_name;
+  std::string cookie;
   uint32_t duration_secs;
 
 protected:
@@ -380,21 +380,21 @@ protected:
 public:
   RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store,
                         RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
-                       const string& _name, const string& _cookie, uint32_t _duration_secs);
+                       const std::string& _name, const std::string& _cookie, uint32_t _duration_secs);
 };
 
 class RGWAsyncUnlockSystemObj : public RGWAsyncRadosRequest {
   rgw::sal::RadosStore* store;
   rgw_raw_obj obj;
-  string lock_name;
-  string cookie;
+  std::string lock_name;
+  std::string cookie;
 
 protected:
   int _send_request(const DoutPrefixProvider *dpp) override;
 public:
   RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store,
                         RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj,
-                       const string& _name, const string& _cookie);
+                       const std::string& _name, const std::string& _cookie);
 };
 
 template <class T>
@@ -483,14 +483,14 @@ class RGWSimpleRadosReadAttrsCR : public RGWSimpleCoroutine {
   RGWSI_SysObj *svc;
 
   rgw_raw_obj obj;
-  map<string, bufferlist> *pattrs;
+  std::map<std::string, bufferlist> *pattrs;
   bool raw_attrs;
   RGWObjVersionTracker* objv_tracker;
   RGWAsyncGetSystemObj *req = nullptr;
 
 public:
   RGWSimpleRadosReadAttrsCR(const DoutPrefixProvider *_dpp, RGWAsyncRadosProcessor *_async_rados, RGWSI_SysObj *_svc,
-                            const rgw_raw_obj& _obj, map<string, bufferlist> *_pattrs,
+                            const rgw_raw_obj& _obj, std::map<std::string, bufferlist> *_pattrs,
                             bool _raw_attrs, RGWObjVersionTracker* objv_tracker = nullptr)
     : RGWSimpleCoroutine(_svc->ctx()),
       dpp(_dpp),
@@ -568,14 +568,14 @@ class RGWSimpleRadosWriteAttrsCR : public RGWSimpleCoroutine {
   RGWObjVersionTracker *objv_tracker;
 
   rgw_raw_obj obj;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
   RGWAsyncPutSystemObjAttrs *req = nullptr;
 
 public:
   RGWSimpleRadosWriteAttrsCR(const DoutPrefixProvider *_dpp, 
                              RGWAsyncRadosProcessor *_async_rados,
                              RGWSI_SysObj *_svc, const rgw_raw_obj& _obj,
-                             map<string, bufferlist> _attrs,
+                             std::map<std::string, bufferlist> _attrs,
                              RGWObjVersionTracker *objv_tracker = nullptr)
     : RGWSimpleCoroutine(_svc->ctx()), dpp(_dpp), async_rados(_async_rados),
       svc(_svc), objv_tracker(objv_tracker), obj(_obj),
@@ -609,7 +609,7 @@ public:
 
 class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine {
   rgw::sal::RadosStore* store;
-  map<string, bufferlist> entries;
+  std::map<std::string, bufferlist> entries;
 
   rgw_rados_ref ref;
 
@@ -620,7 +620,7 @@ class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine {
 public:
   RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store,
                      const rgw_raw_obj& _obj,
-                     map<string, bufferlist>& _entries);
+                     std::map<std::string, bufferlist>& _entries);
 
   int send_request(const DoutPrefixProvider *dpp) override;
   int request_complete() override;
@@ -636,7 +636,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine {
   using ResultPtr = std::shared_ptr<Result>;
 
   RGWRadosGetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj,
-                        const string& _marker, int _max_entries,
+                        const std::string& _marker, int _max_entries,
                         ResultPtr result);
 
   int send_request(const DoutPrefixProvider *dpp) override;
@@ -645,7 +645,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine {
  private:
   rgw::sal::RadosStore* store;
   rgw_raw_obj obj;
-  string marker;
+  std::string marker;
   int max_entries;
   ResultPtr result;
   boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
@@ -661,7 +661,7 @@ class RGWRadosGetOmapValsCR : public RGWSimpleCoroutine {
   using ResultPtr = std::shared_ptr<Result>;
 
   RGWRadosGetOmapValsCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj,
-                        const string& _marker, int _max_entries,
+                        const std::string& _marker, int _max_entries,
                         ResultPtr result);
 
   int send_request(const DoutPrefixProvider *dpp) override;
@@ -670,7 +670,7 @@ class RGWRadosGetOmapValsCR : public RGWSimpleCoroutine {
  private:
   rgw::sal::RadosStore* store;
   rgw_raw_obj obj;
-  string marker;
+  std::string marker;
   int max_entries;
   ResultPtr result;
   boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
@@ -681,7 +681,7 @@ class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine {
 
   rgw_rados_ref ref;
 
-  set<string> keys;
+  std::set<std::string> keys;
 
   rgw_raw_obj obj;
 
@@ -690,7 +690,7 @@ class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine {
 public:
   RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore* _store,
                      const rgw_raw_obj& _obj,
-                     const set<string>& _keys);
+                     const std::set<std::string>& _keys);
 
   int send_request(const DoutPrefixProvider *dpp) override;
 
@@ -715,8 +715,8 @@ public:
 class RGWSimpleRadosLockCR : public RGWSimpleCoroutine {
   RGWAsyncRadosProcessor *async_rados;
   rgw::sal::RadosStore* store;
-  string lock_name;
-  string cookie;
+  std::string lock_name;
+  std::string cookie;
   uint32_t duration;
 
   rgw_raw_obj obj;
@@ -726,8 +726,8 @@ class RGWSimpleRadosLockCR : public RGWSimpleCoroutine {
 public:
   RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store,
                      const rgw_raw_obj& _obj,
-                      const string& _lock_name,
-                     const string& _cookie,
+                      const std::string& _lock_name,
+                     const std::string& _cookie,
                      uint32_t _duration);
   ~RGWSimpleRadosLockCR() override {
     request_cleanup();
@@ -748,8 +748,8 @@ public:
 class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine {
   RGWAsyncRadosProcessor *async_rados;
   rgw::sal::RadosStore* store;
-  string lock_name;
-  string cookie;
+  std::string lock_name;
+  std::string cookie;
 
   rgw_raw_obj obj;
 
@@ -758,8 +758,8 @@ class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine {
 public:
   RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store,
                      const rgw_raw_obj& _obj, 
-                      const string& _lock_name,
-                     const string& _cookie);
+                      const std::string& _lock_name,
+                     const std::string& _cookie);
   ~RGWSimpleRadosUnlockCR() override {
     request_cleanup();
   }
@@ -771,7 +771,7 @@ public:
 
 #define OMAP_APPEND_MAX_ENTRIES_DEFAULT 100
 
-class RGWOmapAppend : public RGWConsumerCR<string> {
+class RGWOmapAppend : public RGWConsumerCR<std::string> {
   RGWAsyncRadosProcessor *async_rados;
   rgw::sal::RadosStore* store;
 
@@ -780,9 +780,9 @@ class RGWOmapAppend : public RGWConsumerCR<string> {
   bool going_down;
 
   int num_pending_entries;
-  list<string> pending_entries;
+  std::list<std::string> pending_entries;
 
-  map<string, bufferlist> entries;
+  std::map<std::string, bufferlist> entries;
 
   uint64_t window_size;
   uint64_t total_entries;
@@ -792,7 +792,7 @@ public:
                 uint64_t _window_size = OMAP_APPEND_MAX_ENTRIES_DEFAULT);
   int operate(const DoutPrefixProvider *dpp) override;
   void flush_pending();
-  bool append(const string& s);
+  bool append(const std::string& s);
   bool finish();
 
   uint64_t get_total_entries() {
@@ -811,9 +811,9 @@ class RGWShardedOmapCRManager {
 
   int num_shards;
 
-  vector<RGWOmapAppend *> shards;
+  std::vector<RGWOmapAppend *> shards;
 public:
-  RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const string& oid_prefix)
+  RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const std::string& oid_prefix)
                       : async_rados(_async_rados),
                        store(_store), op(_op), num_shards(_num_shards) {
     shards.reserve(num_shards);
@@ -833,13 +833,13 @@ public:
     }
   }
 
-  bool append(const string& entry, int shard_id) {
+  bool append(const std::string& entry, int shard_id) {
     return shards[shard_id]->append(entry);
   }
   bool finish() {
     bool success = true;
-    for (vector<RGWOmapAppend *>::iterator iter = shards.begin(); iter != shards.end(); ++iter) {
-      success &= ((*iter)->finish() && (!(*iter)->is_error()));
+    for (auto& append_op : shards) {
+      success &= (append_op->finish() && (!append_op->is_error()));
     }
     return success;
   }
@@ -863,7 +863,7 @@ public:
     : RGWAsyncRadosRequest(caller, cn), store(_store), bucket(bucket), dpp(dpp) {}
 
   RGWBucketInfo bucket_info;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 };
 
 class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine {
@@ -871,7 +871,7 @@ class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine {
   rgw::sal::RadosStore* store;
   rgw_bucket bucket;
   RGWBucketInfo *bucket_info;
-  map<string, bufferlist> *pattrs;
+  std::map<std::string, bufferlist> *pattrs;
   const DoutPrefixProvider *dpp;
 
   RGWAsyncGetBucketInstanceInfo *req{nullptr};
@@ -880,7 +880,7 @@ public:
   // rgw_bucket constructor
   RGWGetBucketInstanceInfoCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store,
                              const rgw_bucket& _bucket, RGWBucketInfo *_bucket_info,
-                             map<string, bufferlist> *_pattrs, const DoutPrefixProvider *dpp)
+                             std::map<std::string, bufferlist> *_pattrs, const DoutPrefixProvider *dpp)
     : RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), store(_store),
       bucket(_bucket), bucket_info(_bucket_info), pattrs(_pattrs), dpp(dpp) {}
   ~RGWGetBucketInstanceInfoCR() override {
@@ -1073,9 +1073,9 @@ class RGWAsyncStatRemoteObj : public RGWAsyncRadosRequest {
 
   ceph::real_time *pmtime;
   uint64_t *psize;
-  string *petag;
-  map<string, bufferlist> *pattrs;
-  map<string, string> *pheaders;
+  std::string *petag;
+  std::map<std::string, bufferlist> *pattrs;
+  std::map<std::string, std::string> *pheaders;
 
 protected:
   int _send_request(const DoutPrefixProvider *dpp) override;
@@ -1086,9 +1086,9 @@ public:
                          const rgw_obj_key& _key,
                          ceph::real_time *_pmtime,
                          uint64_t *_psize,
-                         string *_petag,
-                         map<string, bufferlist> *_pattrs,
-                         map<string, string> *_pheaders) : RGWAsyncRadosRequest(caller, cn), store(_store),
+                         std::string *_petag,
+                         std::map<std::string, bufferlist> *_pattrs,
+                         std::map<std::string, std::string> *_pheaders) : RGWAsyncRadosRequest(caller, cn), store(_store),
                                                       source_zone(_source_zone),
                                                       src_bucket(_src_bucket),
                                                       key(_key),
@@ -1110,9 +1110,9 @@ class RGWStatRemoteObjCR : public RGWSimpleCoroutine {
 
   ceph::real_time *pmtime;
   uint64_t *psize;
-  string *petag;
-  map<string, bufferlist> *pattrs;
-  map<string, string> *pheaders;
+  std::string *petag;
+  std::map<std::string, bufferlist> *pattrs;
+  std::map<std::string, std::string> *pheaders;
 
   RGWAsyncStatRemoteObj *req;
 
@@ -1123,9 +1123,9 @@ public:
                       const rgw_obj_key& _key,
                       ceph::real_time *_pmtime,
                       uint64_t *_psize,
-                      string *_petag,
-                      map<string, bufferlist> *_pattrs,
-                      map<string, string> *_pheaders) : RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
+                      std::string *_petag,
+                      std::map<std::string, bufferlist> *_pattrs,
+                      std::map<std::string, std::string> *_pheaders) : RGWSimpleCoroutine(_store->ctx()), cct(_store->ctx()),
                                        async_rados(_async_rados), store(_store),
                                        source_zone(_source_zone),
                                        src_bucket(_src_bucket),
@@ -1169,11 +1169,11 @@ class RGWAsyncRemoveObj : public RGWAsyncRadosRequest {
   RGWBucketInfo bucket_info;
 
   rgw_obj_key key;
-  string owner;
-  string owner_display_name;
+  std::string owner;
+  std::string owner_display_name;
   bool versioned;
   uint64_t versioned_epoch;
-  string marker_version_id;
+  std::string marker_version_id;
 
   bool del_if_older;
   ceph::real_time timestamp;
@@ -1187,8 +1187,8 @@ public:
                          const rgw_zone_id& _source_zone,
                          RGWBucketInfo& _bucket_info,
                          const rgw_obj_key& _key,
-                         const string& _owner,
-                         const string& _owner_display_name,
+                         const std::string& _owner,
+                         const std::string& _owner_display_name,
                          bool _versioned,
                          uint64_t _versioned_epoch,
                          bool _delete_marker,
@@ -1227,8 +1227,8 @@ class RGWRemoveObjCR : public RGWSimpleCoroutine {
   bool versioned;
   uint64_t versioned_epoch;
   bool delete_marker;
-  string owner;
-  string owner_display_name;
+  std::string owner;
+  std::string owner_display_name;
 
   bool del_if_older;
   real_time timestamp;
@@ -1244,8 +1244,8 @@ public:
                       const rgw_obj_key& _key,
                       bool _versioned,
                       uint64_t _versioned_epoch,
-                      string *_owner,
-                      string *_owner_display_name,
+                      std::string *_owner,
+                      std::string *_owner_display_name,
                       bool _delete_marker,
                       real_time *_timestamp,
                       rgw_zone_set *_zones_trace) : RGWSimpleCoroutine(_store->ctx()), dpp(_dpp), cct(_store->ctx()),
@@ -1299,8 +1299,8 @@ class RGWContinuousLeaseCR : public RGWCoroutine {
 
   const rgw_raw_obj obj;
 
-  const string lock_name;
-  const string cookie;
+  const std::string lock_name;
+  const std::string cookie;
 
   int interval;
   bool going_down{ false };
@@ -1313,7 +1313,7 @@ class RGWContinuousLeaseCR : public RGWCoroutine {
 public:
   RGWContinuousLeaseCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store,
                        const rgw_raw_obj& _obj,
-                       const string& _lock_name, int _interval, RGWCoroutine *_caller)
+                       const std::string& _lock_name, int _interval, RGWCoroutine *_caller)
     : RGWCoroutine(_store->ctx()), async_rados(_async_rados), store(_store),
     obj(_obj), lock_name(_lock_name),
     cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct)),
@@ -1345,14 +1345,14 @@ public:
 class RGWRadosTimelogAddCR : public RGWSimpleCoroutine {
   const DoutPrefixProvider *dpp;
   rgw::sal::RadosStore* store;
-  list<cls_log_entry> entries;
+  std::list<cls_log_entry> entries;
 
-  string oid;
+  std::string oid;
 
   boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
 
 public:
-  RGWRadosTimelogAddCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* _store, const string& _oid,
+  RGWRadosTimelogAddCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* _store, const std::string& _oid,
                        const cls_log_entry& entry);
 
   int send_request(const DoutPrefixProvider *dpp) override;
index f290d11929e31f45b1f59b6dc72f9f6e7ba1b07a..bc013b3c74835d11402110e6ac664f67c56a31ca 100644 (file)
@@ -13,6 +13,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWCRHTTPGetDataCB::RGWCRHTTPGetDataCB(RGWCoroutinesEnv *_env, RGWCoroutine *_cr, RGWHTTPStreamRWRequest *_req) : env(_env), cr(_cr), req(_req) {
   io_id = req->get_io_id(RGWHTTPClient::HTTPCLIENT_IO_READ |RGWHTTPClient::HTTPCLIENT_IO_CONTROL);
   req->set_in_cb(this);
index 914eebee02de2769a3ae4f35f59d900a6dc50d47..59045305edfa05937287e51206af30d4d64fe902 100644 (file)
@@ -14,8 +14,8 @@
 struct rgw_rest_obj {
   rgw_obj_key key;
   uint64_t content_len;
-  std::map<string, string> attrs;
-  std::map<string, string> custom_attrs;
+  std::map<std::string, std::string> attrs;
+  std::map<std::string, std::string> custom_attrs;
   RGWAccessControlPolicy acls;
 
   void init(const rgw_obj_key& _key) {
@@ -28,27 +28,27 @@ class RGWReadRawRESTResourceCR : public RGWSimpleCoroutine {
  protected:
   RGWRESTConn *conn;
   RGWHTTPManager *http_manager;
-  string path;
+  std::string path;
   param_vec_t params;
   param_vec_t extra_headers;
 public:
   boost::intrusive_ptr<RGWRESTReadResource> http_op;
   RGWReadRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                           RGWHTTPManager *_http_manager, const string& _path,
+                           RGWHTTPManager *_http_manager, const std::string& _path,
                            rgw_http_param_pair *params, bufferlist *_result)
     : RGWSimpleCoroutine(_cct), result(_result), conn(_conn), http_manager(_http_manager),
     path(_path), params(make_param_list(params))
   {}
 
  RGWReadRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                          RGWHTTPManager *_http_manager, const string& _path,
+                          RGWHTTPManager *_http_manager, const std::string& _path,
                           rgw_http_param_pair *params)
    : RGWSimpleCoroutine(_cct), conn(_conn), http_manager(_http_manager),
     path(_path), params(make_param_list(params))
   {}
 
   RGWReadRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                           RGWHTTPManager *_http_manager, const string& _path,
+                           RGWHTTPManager *_http_manager, const std::string& _path,
                            rgw_http_param_pair *params, param_vec_t &hdrs)
     : RGWSimpleCoroutine(_cct), conn(_conn), http_manager(_http_manager),
       path(_path), params(make_param_list(params)),
@@ -56,7 +56,7 @@ public:
   {}
 
  RGWReadRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                          RGWHTTPManager *_http_manager, const string& _path,
+                          RGWHTTPManager *_http_manager, const std::string& _path,
                           rgw_http_param_pair *params,
                           std::map <std::string, std::string> *hdrs)
    : RGWSimpleCoroutine(_cct), conn(_conn), http_manager(_http_manager),
@@ -123,13 +123,13 @@ class RGWReadRESTResourceCR : public RGWReadRawRESTResourceCR {
   T *result;
  public:
  RGWReadRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                       RGWHTTPManager *_http_manager, const string& _path,
+                       RGWHTTPManager *_http_manager, const std::string& _path,
                        rgw_http_param_pair *params, T *_result)
    : RGWReadRawRESTResourceCR(_cct, _conn, _http_manager, _path, params), result(_result)
   {}
 
   RGWReadRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
-                        RGWHTTPManager *_http_manager, const string& _path,
+                        RGWHTTPManager *_http_manager, const std::string& _path,
                         rgw_http_param_pair *params,
                         std::map <std::string, std::string> *hdrs,
                         T *_result)
@@ -147,11 +147,11 @@ class RGWSendRawRESTResourceCR: public RGWSimpleCoroutine {
  protected:
   RGWRESTConn *conn;
   RGWHTTPManager *http_manager;
-  string method;
-  string path;
+  std::string method;
+  std::string path;
   param_vec_t params;
   param_vec_t headers;
-  map<string, string> *attrs;
+  std::map<std::string, std::string> *attrs;
   T *result;
   E *err_result;
   bufferlist input_bl;
@@ -161,9 +161,9 @@ class RGWSendRawRESTResourceCR: public RGWSimpleCoroutine {
  public:
  RGWSendRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                           RGWHTTPManager *_http_manager,
-                          const string& _method, const string& _path,
+                          const std::string& _method, const std::string& _path,
                           rgw_http_param_pair *_params,
-                          map<string, string> *_attrs,
+                          std::map<std::string, std::string> *_attrs,
                           bufferlist& _input, T *_result,
                           bool _send_content_length,
                           E *_err_result = nullptr)
@@ -175,8 +175,8 @@ class RGWSendRawRESTResourceCR: public RGWSimpleCoroutine {
 
   RGWSendRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                           RGWHTTPManager *_http_manager,
-                          const string& _method, const string& _path,
-                          rgw_http_param_pair *_params, map<string, string> *_attrs,
+                          const std::string& _method, const std::string& _path,
+                          rgw_http_param_pair *_params, std::map<std::string, std::string> *_attrs,
                           T *_result, E *_err_result = nullptr)
    : RGWSimpleCoroutine(_cct), conn(_conn), http_manager(_http_manager),
     method(_method), path(_path), params(make_param_list(_params)), headers(make_param_list(_attrs)), attrs(_attrs), result(_result),
@@ -236,8 +236,8 @@ class RGWSendRESTResourceCR : public RGWSendRawRESTResourceCR<T, E> {
  public:
   RGWSendRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                            RGWHTTPManager *_http_manager,
-                           const string& _method, const string& _path,
-                        rgw_http_param_pair *_params, map<string, string> *_attrs,
+                           const std::string& _method, const std::string& _path,
+                        rgw_http_param_pair *_params, std::map<std::string, std::string> *_attrs,
                         S& _input, T *_result, E *_err_result = nullptr)
     : RGWSendRawRESTResourceCR<T, E>(_cct, _conn, _http_manager, _method, _path, _params, _attrs, _result, _err_result) {
 
@@ -256,7 +256,7 @@ class RGWPostRESTResourceCR : public RGWSendRESTResourceCR<S, T, E> {
 public:
   RGWPostRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                         RGWHTTPManager *_http_manager,
-                        const string& _path,
+                        const std::string& _path,
                         rgw_http_param_pair *_params, S& _input,
                         T *_result, E *_err_result = nullptr)
     : RGWSendRESTResourceCR<S, T, E>(_cct, _conn, _http_manager,
@@ -270,7 +270,7 @@ class RGWPutRawRESTResourceCR: public RGWSendRawRESTResourceCR <T, E> {
  public:
   RGWPutRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                           RGWHTTPManager *_http_manager,
-                          const string& _path,
+                          const std::string& _path,
                           rgw_http_param_pair *_params, bufferlist& _input,
                           T *_result, E *_err_result = nullptr)
     : RGWSendRawRESTResourceCR<T, E>(_cct, _conn, _http_manager, "PUT", _path,
@@ -283,9 +283,9 @@ class RGWPostRawRESTResourceCR: public RGWSendRawRESTResourceCR <T, E> {
  public:
   RGWPostRawRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                           RGWHTTPManager *_http_manager,
-                          const string& _path,
+                          const std::string& _path,
                           rgw_http_param_pair *_params,
-                          map<string, string> * _attrs,
+                          std::map<std::string, std::string> * _attrs,
                           bufferlist& _input,
                           T *_result, E *_err_result = nullptr)
     : RGWSendRawRESTResourceCR<T, E>(_cct, _conn, _http_manager, "POST", _path,
@@ -299,7 +299,7 @@ class RGWPutRESTResourceCR : public RGWSendRESTResourceCR<S, T, E> {
 public:
   RGWPutRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                         RGWHTTPManager *_http_manager,
-                        const string& _path,
+                        const std::string& _path,
                         rgw_http_param_pair *_params, S& _input,
                         T *_result, E *_err_result = nullptr)
     : RGWSendRESTResourceCR<S, T, E>(_cct, _conn, _http_manager,
@@ -309,9 +309,9 @@ public:
 
   RGWPutRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                        RGWHTTPManager *_http_manager,
-                       const string& _path,
+                       const std::string& _path,
                        rgw_http_param_pair *_params,
-                       map <string, string> *_attrs,
+                       std::map<std::string, std::string> *_attrs,
                        S& _input, T *_result, E *_err_result = nullptr)
     : RGWSendRESTResourceCR<S, T, E>(_cct, _conn, _http_manager,
                                   "PUT", _path,
@@ -323,7 +323,7 @@ public:
 class RGWDeleteRESTResourceCR : public RGWSimpleCoroutine {
   RGWRESTConn *conn;
   RGWHTTPManager *http_manager;
-  string path;
+  std::string path;
   param_vec_t params;
 
   boost::intrusive_ptr<RGWRESTDeleteResource> http_op;
@@ -331,7 +331,7 @@ class RGWDeleteRESTResourceCR : public RGWSimpleCoroutine {
 public:
   RGWDeleteRESTResourceCR(CephContext *_cct, RGWRESTConn *_conn,
                         RGWHTTPManager *_http_manager,
-                        const string& _path,
+                        const std::string& _path,
                         rgw_http_param_pair *_params)
     : RGWSimpleCoroutine(_cct), conn(_conn), http_manager(_http_manager),
       path(_path), params(make_param_list(_params))
@@ -423,9 +423,9 @@ protected:
 public:
   virtual int init(const DoutPrefixProvider *dpp) = 0;
   virtual int read(bufferlist *data, uint64_t max, bool *need_retry) = 0; /* reentrant */
-  virtual int decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) = 0;
+  virtual int decode_rest_obj(std::map<std::string, std::string>& headers, bufferlist& extra_data) = 0;
   virtual bool has_attrs() = 0;
-  virtual void get_attrs(std::map<string, string> *attrs) = 0;
+  virtual void get_attrs(std::map<std::string, std::string> *attrs) = 0;
   virtual ~RGWStreamReadResourceCRF() = default;
 };
 
@@ -471,7 +471,7 @@ protected:
   } range;
 
   ceph::real_time mtime;
-  string etag;
+  std::string etag;
 
 public:
   RGWStreamReadHTTPResourceCRF(CephContext *_cct,
@@ -488,9 +488,9 @@ public:
 
   int init(const DoutPrefixProvider *dpp) override;
   int read(bufferlist *data, uint64_t max, bool *need_retry) override; /* reentrant */
-  int decode_rest_obj(map<string, string>& headers, bufferlist& extra_data) override;
+  int decode_rest_obj(std::map<std::string, std::string>& headers, bufferlist& extra_data) override;
   bool has_attrs() override;
-  void get_attrs(std::map<string, string> *attrs) override;
+  void get_attrs(std::map<std::string, std::string> *attrs) override;
   bool is_done();
   virtual bool need_extra_data() { return false; }
 
@@ -524,7 +524,7 @@ protected:
 
   struct multipart_info {
     bool is_multipart{false};
-    string upload_id;
+    std::string upload_id;
     int part_num{0};
     uint64_t part_size;
   } multipart;
@@ -555,13 +555,13 @@ public:
   void write_drain_notify(uint64_t pending_size);
   int drain_writes(bool *need_retry) override; /* reentrant */
 
-  virtual void handle_headers(const std::map<string, string>& headers) {}
+  virtual void handle_headers(const std::map<std::string, std::string>& headers) {}
 
   void set_req(RGWHTTPStreamRWRequest *r) {
     req = r;
   }
 
-  void set_multipart(const string& upload_id, int part_num, uint64_t part_size) {
+  void set_multipart(const std::string& upload_id, int part_num, uint64_t part_size) {
     multipart.is_multipart = true;
     multipart.upload_id = upload_id;
     multipart.part_num = part_num;
@@ -572,7 +572,7 @@ public:
 class RGWStreamSpliceCR : public RGWCoroutine {
   CephContext *cct;
   RGWHTTPManager *http_manager;
-  string url;
+  std::string url;
   std::shared_ptr<RGWStreamReadHTTPResourceCRF> in_crf;
   std::shared_ptr<RGWStreamWriteHTTPResourceCRF> out_crf;
   bufferlist bl;
index 2d54386b5d370106f431137cea9d68471d7d11c9..27806e164934817cae7dec804c84f69c13fecace 100644 (file)
@@ -15,6 +15,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 template<>
 int RGWUserCreateCR::Request::_send_request(const DoutPrefixProvider *dpp)
 {
index 0e5038b86f949d0af14fabef4e7614a53972d285..ebdbfeb51b7f2b193f680c8e45377d9aeec75056 100644 (file)
@@ -36,8 +36,8 @@ struct rgw_get_user_info_params {
 using RGWGetUserInfoCR = RGWSimpleAsyncCR<rgw_get_user_info_params, RGWUserInfo>;
 
 struct rgw_get_bucket_info_params {
-  string tenant;
-  string bucket_name;
+  std::string tenant;
+  std::string bucket_name;
 };
 
 struct rgw_get_bucket_info_result {
@@ -47,7 +47,7 @@ struct rgw_get_bucket_info_result {
 using RGWGetBucketInfoCR = RGWSimpleAsyncCR<rgw_get_bucket_info_params, rgw_get_bucket_info_result>;
 
 struct rgw_bucket_create_local_params {
-  shared_ptr<RGWUserInfo> user_info;
+  std::shared_ptr<RGWUserInfo> user_info;
   std::string bucket_name;
   rgw_placement_rule placement_rule;
 };
@@ -58,8 +58,8 @@ struct rgw_object_simple_put_params {
   RGWDataAccess::BucketRef bucket;
   rgw_obj_key key;
   bufferlist data;
-  map<string, bufferlist> attrs;
-  std::optional<string> user_data;
+  std::map<std::string, bufferlist> attrs;
+  std::optional<std::string> user_data;
 };
 
 using RGWObjectSimplePutCR = RGWSimpleWriteOnlyAsyncCR<rgw_object_simple_put_params>;
index 319d06d0c8254e0f4dd4a321b0b8fb9ff279f942..fe82ecd40a6c1bede180248bc129d62249a67fd5 100644 (file)
@@ -27,9 +27,9 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace rgw;
 
-
 template<typename M>
 class canonical_char_sorter {
 private:
index 96e52afaa54b14051c6c02efe08984aaebfb44d3..f5f46522560e6a11f75f1211c3c3f7cf2b1ca888 100644 (file)
@@ -150,7 +150,7 @@ int rgw_s3_prepare_decrypt(struct req_state* s,
                            std::map<std::string,
                                     std::string>& crypt_http_responses);
 
-static inline void set_attr(map<string, bufferlist>& attrs,
+static inline void set_attr(std::map<std::string, bufferlist>& attrs,
                             const char* key,
                             std::string_view value)
 {
@@ -159,7 +159,7 @@ static inline void set_attr(map<string, bufferlist>& attrs,
   attrs[key] = std::move(bl);
 }
 
-static inline std::string get_str_attribute(map<string, bufferlist>& attrs,
+static inline std::string get_str_attribute(std::map<std::string, bufferlist>& attrs,
                                             const char *name)
 {
   auto iter = attrs.find(name);
index b3eefa40bf3273045cb7d97da280d92798224186..5cf98b0bcfc426140d15e4602c5d8b085e70f9e3 100644 (file)
@@ -20,7 +20,7 @@ namespace efs = std::experimental::filesystem;
 
 #define dout_subsys ceph_subsys_rgw
 
-
+using namespace std;
 
 int D3nCacheAioWriteRequest::d3n_prepare_libaio_write_op(bufferlist& bl, unsigned int len, string oid, string cache_location)
 {
index 2d62ae4dea2c3db7bef5498f0c1e27c944d4ddd8..5d3537f3b148479533835960867f193c2e3ab03e 100644 (file)
@@ -24,8 +24,8 @@ struct D3nChunkDataInfo : public LRUObject {
        CephContext *cct;
        uint64_t size;
        time_t access_time;
-       string address;
-       string oid;
+       std::string address;
+       std::string oid;
        bool complete;
        struct D3nChunkDataInfo* lru_prev;
        struct D3nChunkDataInfo* lru_next;
@@ -37,11 +37,11 @@ struct D3nChunkDataInfo : public LRUObject {
        }
 
        void dump(Formatter *f) const;
-       static void generate_test_instances(list<D3nChunkDataInfo*>& o);
+       static void generate_test_instances(std::list<D3nChunkDataInfo*>& o);
 };
 
 struct D3nCacheAioWriteRequest {
-       string oid;
+       std::string oid;
        void *data;
        int fd;
        struct aiocb *cb;
@@ -49,7 +49,7 @@ struct D3nCacheAioWriteRequest {
        CephContext *cct;
 
        D3nCacheAioWriteRequest(CephContext *_cct) : cct(_cct) {}
-       int d3n_prepare_libaio_write_op(bufferlist& bl, unsigned int len, string oid, string cache_location);
+       int d3n_prepare_libaio_write_op(bufferlist& bl, unsigned int len, std::string oid, std::string cache_location);
 
   ~D3nCacheAioWriteRequest() {
     ::close(fd);
@@ -63,8 +63,8 @@ struct D3nCacheAioWriteRequest {
 struct D3nDataCache {
 
 private:
-  std::unordered_map <string, D3nChunkDataInfo*> d3n_cache_map;
-  std::set<string> d3n_outstanding_write_list;
+  std::unordered_map<std::string, D3nChunkDataInfo*> d3n_cache_map;
+  std::set<std::string> d3n_outstanding_write_list;
   std::mutex d3n_cache_lock;
   std::mutex d3n_eviction_lock;
 
@@ -95,8 +95,8 @@ public:
 
   std::string cache_location;
 
-  bool get(const string& oid, const off_t len);
-  void put(bufferlist& bl, unsigned int len, string& obj_key);
+  bool get(const std::string& oid, const off_t len);
+  void put(bufferlist& bl, unsigned int len, std::string& obj_key);
   int d3n_io_write(bufferlist& bl, unsigned int len, std::string oid);
   int d3n_libaio_create_write_request(bufferlist& bl, unsigned int len, std::string oid);
   void d3n_libaio_write_completion_cb(D3nCacheAioWriteRequest* c);
@@ -171,7 +171,7 @@ int D3nRGWDataCache<T>::get_obj_iterate_cb(const DoutPrefixProvider *dpp, const
   lsubdout(g_ceph_context, rgw_datacache, 30) << "D3nDataCache::" << __func__ << "(): is head object : " << is_head_obj << dendl;
   librados::ObjectReadOperation op;
   struct get_obj_data* d = static_cast<struct get_obj_data*>(arg);
-  string oid, key;
+  std::string oid, key;
 
   if (is_head_obj) {
     // only when reading from the head object do we need to do the atomic test
index f43fdc96cf4eb176d44b4fa2832cd96923fec939..4f37e3603f37327a396367bd093365d0b3896ceb 100644 (file)
@@ -44,6 +44,8 @@
 #undef dout_prefix
 #define dout_prefix (*_dout << "data sync: ")
 
+using namespace std;
+
 static string datalog_sync_status_oid_prefix = "datalog.sync-status";
 static string datalog_sync_status_shard_prefix = "datalog.sync-status.shard";
 static string datalog_sync_full_sync_index_prefix = "data.full-sync.index";
index 5dadf04f290dbf16d7cc392d127d764d0420ef95..d307dce82f230fb51c818dfea63f2be88077e986 100644 (file)
@@ -50,7 +50,7 @@ struct rgw_bucket_sync_pair_info {
   rgw_bucket_shard dest_bs;
 };
 
-inline ostream& operator<<(ostream& out, const rgw_bucket_sync_pair_info& p) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pair_info& p) {
   if (p.source_bs.bucket == p.dest_bs.bucket) {
     return out << p.source_bs;
   }
@@ -65,16 +65,16 @@ inline ostream& operator<<(ostream& out, const rgw_bucket_sync_pair_info& p) {
 struct rgw_bucket_sync_pipe {
   rgw_bucket_sync_pair_info info;
   RGWBucketInfo source_bucket_info;
-  map<string, bufferlist> source_bucket_attrs;
+  std::map<std::string, bufferlist> source_bucket_attrs;
   RGWBucketInfo dest_bucket_info;
-  map<string, bufferlist> dest_bucket_attrs;
+  std::map<std::string, bufferlist> dest_bucket_attrs;
 
   RGWBucketSyncFlowManager::pipe_rules_ref& get_rules() {
     return info.handler.rules;
   }
 };
 
-inline ostream& operator<<(ostream& out, const rgw_bucket_sync_pipe& p) {
+inline std::ostream& operator<<(std::ostream& out, const rgw_bucket_sync_pipe& p) {
   return out << p.info;
 }
 
@@ -117,7 +117,7 @@ struct rgw_data_sync_info {
   }
 
   void dump(Formatter *f) const {
-    string s;
+    std::string s;
     switch ((SyncState)state) {
       case StateInit:
        s = "init";
@@ -161,8 +161,8 @@ struct rgw_data_sync_marker {
     IncrementalSync = 1,
   };
   uint16_t state;
-  string marker;
-  string next_step_marker;
+  std::string marker;
+  std::string next_step_marker;
   uint64_t total_entries;
   uint64_t pos;
   real_time timestamp;
@@ -233,7 +233,7 @@ WRITE_CLASS_ENCODER(rgw_data_sync_marker)
 
 struct rgw_data_sync_status {
   rgw_data_sync_info sync_info;
-  map<uint32_t, rgw_data_sync_marker> sync_markers;
+  std::map<uint32_t, rgw_data_sync_marker> sync_markers;
 
   rgw_data_sync_status() {}
 
@@ -264,16 +264,16 @@ struct rgw_data_sync_status {
 WRITE_CLASS_ENCODER(rgw_data_sync_status)
 
 struct rgw_datalog_entry {
-  string key;
+  std::string key;
   ceph::real_time timestamp;
 
   void decode_json(JSONObj *obj);
 };
 
 struct rgw_datalog_shard_data {
-  string marker;
+  std::string marker;
   bool truncated;
-  vector<rgw_datalog_entry> entries;
+  std::vector<rgw_datalog_entry> entries;
 
   void decode_json(JSONObj *obj);
 };
@@ -282,11 +282,11 @@ class RGWAsyncRadosProcessor;
 class RGWDataSyncControlCR;
 
 struct rgw_bucket_entry_owner {
-  string id;
-  string display_name;
+  std::string id;
+  std::string display_name;
 
   rgw_bucket_entry_owner() {}
-  rgw_bucket_entry_owner(const string& _id, const string& _display_name) : id(_id), display_name(_display_name) {}
+  rgw_bucket_entry_owner(const std::string& _id, const std::string& _display_name) : id(_id), display_name(_display_name) {}
 
   void decode_json(JSONObj *obj);
 };
@@ -326,8 +326,8 @@ struct RGWDataSyncEnv {
     counters = _counters;
   }
 
-  string shard_obj_name(int shard_id);
-  string status_oid();
+  std::string shard_obj_name(int shard_id);
+  std::string status_oid();
 };
 
 struct RGWDataSyncCtx {
@@ -377,15 +377,15 @@ public:
   void finish();
 
   int read_log_info(const DoutPrefixProvider *dpp, rgw_datalog_info *log_info);
-  int read_source_log_shards_info(const DoutPrefixProvider *dpp, map<int, RGWDataChangesLogInfo> *shards_info);
-  int read_source_log_shards_next(const DoutPrefixProvider *dpp, map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result);
+  int read_source_log_shards_info(const DoutPrefixProvider *dpp, std::map<int, RGWDataChangesLogInfo> *shards_info);
+  int read_source_log_shards_next(const DoutPrefixProvider *dpp, std::map<int, std::string> shard_markers, std::map<int, rgw_datalog_shard_data> *result);
   int read_sync_status(const DoutPrefixProvider *dpp, rgw_data_sync_status *sync_status);
-  int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, set<int>& recovering_shards);
-  int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, set<string>& lagging_buckets,set<string>& recovering_buckets, rgw_data_sync_marker* sync_marker, const int max_entries);
+  int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, std::set<int>& recovering_shards);
+  int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, std::set<std::string>& lagging_buckets,std::set<std::string>& recovering_buckets, rgw_data_sync_marker* sync_marker, const int max_entries);
   int init_sync_status(const DoutPrefixProvider *dpp, int num_shards);
   int run_sync(const DoutPrefixProvider *dpp, int num_shards);
 
-  void wakeup(int shard_id, set<string>& keys);
+  void wakeup(int shard_id, std::set<std::string>& keys);
 };
 
 class RGWDataSyncStatusManager : public DoutPrefixProvider {
@@ -399,10 +399,10 @@ class RGWDataSyncStatusManager : public DoutPrefixProvider {
 
   RGWRemoteDataLog source_log;
 
-  string source_status_oid;
-  string source_shard_status_oid_prefix;
+  std::string source_status_oid;
+  std::string source_shard_status_oid_prefix;
 
-  map<int, rgw_raw_obj> shard_objs;
+  std::map<int, rgw_raw_obj> shard_objs;
 
   int num_shards;
 
@@ -424,18 +424,18 @@ public:
   int init(const DoutPrefixProvider *dpp);
   void finalize();
 
-  static string shard_obj_name(const rgw_zone_id& source_zone, int shard_id);
-  static string sync_status_oid(const rgw_zone_id& source_zone);
+  static std::string shard_obj_name(const rgw_zone_id& source_zone, int shard_id);
+  static std::string sync_status_oid(const rgw_zone_id& source_zone);
 
   int read_sync_status(const DoutPrefixProvider *dpp, rgw_data_sync_status *sync_status) {
     return source_log.read_sync_status(dpp, sync_status);
   }
 
-  int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, set<int>& recovering_shards) {
+  int read_recovering_shards(const DoutPrefixProvider *dpp, const int num_shards, std::set<int>& recovering_shards) {
     return source_log.read_recovering_shards(dpp, num_shards, recovering_shards);
   }
 
-  int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, set<string>& lagging_buckets, set<string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries) {
+  int read_shard_status(const DoutPrefixProvider *dpp, int shard_id, std::set<std::string>& lagging_buckets, std::set<std::string>& recovering_buckets, rgw_data_sync_marker *sync_marker, const int max_entries) {
     return source_log.read_shard_status(dpp, shard_id, lagging_buckets, recovering_buckets,sync_marker, max_entries);
   }
   int init_sync_status(const DoutPrefixProvider *dpp) { return source_log.init_sync_status(dpp, num_shards); }
@@ -443,16 +443,16 @@ public:
   int read_log_info(const DoutPrefixProvider *dpp, rgw_datalog_info *log_info) {
     return source_log.read_log_info(dpp, log_info);
   }
-  int read_source_log_shards_info(const DoutPrefixProvider *dpp, map<int, RGWDataChangesLogInfo> *shards_info) {
+  int read_source_log_shards_info(const DoutPrefixProvider *dpp, std::map<int, RGWDataChangesLogInfo> *shards_info) {
     return source_log.read_source_log_shards_info(dpp, shards_info);
   }
-  int read_source_log_shards_next(const DoutPrefixProvider *dpp, map<int, string> shard_markers, map<int, rgw_datalog_shard_data> *result) {
+  int read_source_log_shards_next(const DoutPrefixProvider *dpp, std::map<int, std::string> shard_markers, std::map<int, rgw_datalog_shard_data> *result) {
     return source_log.read_source_log_shards_next(dpp, shard_markers, result);
   }
 
   int run(const DoutPrefixProvider *dpp) { return source_log.run_sync(dpp, num_shards); }
 
-  void wakeup(int shard_id, set<string>& keys) { return source_log.wakeup(shard_id, keys); }
+  void wakeup(int shard_id, std::set<std::string>& keys) { return source_log.wakeup(shard_id, keys); }
   void stop() {
     source_log.finish();
   }
@@ -472,7 +472,7 @@ struct rgw_bucket_shard_full_sync_marker {
 
   rgw_bucket_shard_full_sync_marker() : count(0) {}
 
-  void encode_attr(map<string, bufferlist>& attrs);
+  void encode_attr(std::map<std::string, bufferlist>& attrs);
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -494,10 +494,10 @@ struct rgw_bucket_shard_full_sync_marker {
 WRITE_CLASS_ENCODER(rgw_bucket_shard_full_sync_marker)
 
 struct rgw_bucket_shard_inc_sync_marker {
-  string position;
+  std::string position;
   ceph::real_time timestamp;
 
-  void encode_attr(map<string, bufferlist>& attrs);
+  void encode_attr(std::map<std::string, bufferlist>& attrs);
 
   void encode(bufferlist& bl) const {
     ENCODE_START(2, 1, bl);
@@ -532,9 +532,9 @@ struct rgw_bucket_shard_sync_info {
   rgw_bucket_shard_full_sync_marker full_marker;
   rgw_bucket_shard_inc_sync_marker inc_marker;
 
-  void decode_from_attrs(CephContext *cct, map<string, bufferlist>& attrs);
-  void encode_all_attrs(map<string, bufferlist>& attrs);
-  void encode_state_attr(map<string, bufferlist>& attrs);
+  void decode_from_attrs(CephContext *cct, std::map<std::string, bufferlist>& attrs);
+  void encode_all_attrs(std::map<std::string, bufferlist>& attrs);
+  void encode_state_attr(std::map<std::string, bufferlist>& attrs);
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -561,9 +561,9 @@ struct rgw_bucket_shard_sync_info {
 WRITE_CLASS_ENCODER(rgw_bucket_shard_sync_info)
 
 struct rgw_bucket_index_marker_info {
-  string bucket_ver;
-  string master_ver;
-  string max_marker;
+  std::string bucket_ver;
+  std::string master_ver;
+  std::string max_marker;
   bool syncstopped{false};
 
   void decode_json(JSONObj *obj) {
@@ -583,7 +583,7 @@ class RGWRemoteBucketManager {
   RGWRESTConn *conn{nullptr};
   rgw_zone_id source_zone;
 
-  vector<rgw_bucket_sync_pair_info> sync_pairs;
+  std::vector<rgw_bucket_sync_pair_info> sync_pairs;
 
   RGWDataSyncCtx sc;
   rgw_bucket_shard_sync_info init_status;
@@ -638,12 +638,12 @@ class RGWBucketPipeSyncStatusManager : public DoutPrefixProvider {
 
   rgw_bucket dest_bucket;
 
-  vector<RGWRemoteBucketManager *> source_mgrs;
+  std::vector<RGWRemoteBucketManager *> source_mgrs;
 
-  string source_status_oid;
-  string source_shard_status_oid_prefix;
+  std::string source_status_oid;
+  std::string source_shard_status_oid_prefix;
 
-  map<int, rgw_bucket_shard_sync_info> sync_status;
+  std::map<int, rgw_bucket_shard_sync_info> sync_status;
   rgw_raw_obj status_obj;
 
   int num_shards;
@@ -657,11 +657,11 @@ public:
 
   int init(const DoutPrefixProvider *dpp);
 
-  map<int, rgw_bucket_shard_sync_info>& get_sync_status() { return sync_status; }
+  std::map<int, rgw_bucket_shard_sync_info>& get_sync_status() { return sync_status; }
   int init_sync_status(const DoutPrefixProvider *dpp);
 
-  static string status_oid(const rgw_zone_id& source_zone, const rgw_bucket_sync_pair_info& bs);
-  static string obj_status_oid(const rgw_bucket_sync_pipe& sync_pipe,
+  static std::string status_oid(const rgw_zone_id& source_zone, const rgw_bucket_sync_pair_info& bs);
+  static std::string obj_status_oid(const rgw_bucket_sync_pipe& sync_pipe,
                                const rgw_zone_id& source_zone, const rgw::sal::Object* obj); /* specific source obj sync status,
                                                                                        can be used by sync modules */
 
index ce2f4134bab10afe4e5617c75f068888cef416b5..670dcacf76f65e819ad74ec53835d2e11784cf3a 100644 (file)
@@ -204,7 +204,7 @@ public:
     return r;
   }
   std::string_view max_marker() const override {
-    return "99999999"sv;
+    return "99999999";
   }
   int is_empty(const DoutPrefixProvider *dpp) override {
     for (auto shard = 0u; shard < oids.size(); ++shard) {
@@ -321,7 +321,7 @@ public:
     fifo.meta(dpp, m, null_yield);
     auto p = m.head_part_num;
     if (p < 0) {
-      info->marker = ""s;
+      info->marker = "";
       info->last_update = ceph::real_clock::zero();
       return 0;
     }
index cdf4102f16c710f1e21c58bd7661f6af44febac6..85ce61b8112bfa71619d69960e8c73c1b5f67d8a 100644 (file)
@@ -175,10 +175,10 @@ class RGWDataChangesLog {
   const int num_shards;
   std::string get_prefix() {
     auto prefix = cct->_conf->rgw_data_log_obj_prefix;
-    return prefix.empty() ? prefix : "data_log"s;
+    return prefix.empty() ? prefix : "data_log";
   }
   std::string metadata_log_oid() {
-    return get_prefix() + "generations_metadata"s;
+    return get_prefix() + "generations_metadata";
   }
   std::string prefix;
 
index 5a5865495d9705f75a558867dfa42c20f51e3b19..3ed328c9071cdc0ca0e1609e5151de61aab4b48f 100644 (file)
@@ -14,6 +14,8 @@
 
 #include "common/Formatter.h"
 
+using namespace std;
+
 static string shadow_ns = RGW_OBJ_NS_SHADOW;
 
 static void init_bucket(rgw_bucket *b, const char *t, const char *n, const char *dp, const char *ip, const char *m, const char *id)
index 4e714d097a2e33fa76da3bc02a16566103b76a3c..bb45ee8d36aa18d231f1d30a13db2d0c36421bf9 100644 (file)
@@ -12,6 +12,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWEnv::init(CephContext *cct)
 {
   conf.init(cct);
index c07a6602273912ba9d518caa4b1163cb672d60fd..e503d4a68574696e20e3652ddc51b1bbc7ed05d5 100644 (file)
@@ -12,6 +12,7 @@
 #include "common/ceph_json.h"
 #include "rgw_es_query.h"
 
+using namespace std;
 
 int main(int argc, char *argv[])
 {
index 57a51634d441469075c7a0279574177264c035b4..16105d599c513894381b3bc4a6c46b22d54c0f10 100644 (file)
@@ -15,6 +15,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 bool pop_front(list<string>& l, string *s)
 {
   if (l.empty()) {
index 1f9dc6928af48621623389b2955c8c65f30921dc..27cc36d75260e4297340e1e74f2763182682a7fd 100644 (file)
@@ -7,22 +7,22 @@
 #include "rgw_string.h"
 
 class ESQueryStack {
-  list<string> l;
-  list<string>::iterator iter;
+  std::list<std::string> l;
+  std::list<std::string>::iterator iter;
 
 public:
-  explicit ESQueryStack(list<string>& src) {
+  explicit ESQueryStack(std::list<std::string>& src) {
     assign(src);
   }
 
   ESQueryStack() {}
 
-  void assign(list<string>& src) {
+  void assign(std::list<std::string>& src) {
     l.swap(src);
     iter = l.begin();
   }
 
-  bool peek(string *dest) {
+  bool peek(std::string *dest) {
     if (done()) {
       return false;
     }
@@ -30,7 +30,7 @@ public:
     return true;
   }
 
-  bool pop(string *dest) {
+  bool pop(std::string *dest) {
     bool valid = peek(dest);
     if (!valid) {
       return false;
@@ -45,11 +45,11 @@ public:
 };
 
 class ESInfixQueryParser {
-  string query;
+  std::string query;
   int size;
   const char *str;
   int pos{0};
-  list<string> args;
+  std::list<std::string> args;
 
   void skip_whitespace(const char *str, int size, int& pos);
   bool get_next_token(bool (*filter)(char));
@@ -61,8 +61,8 @@ class ESInfixQueryParser {
   bool parse_close_bracket();
 
 public:
-  explicit ESInfixQueryParser(const string& _query) : query(_query), size(query.size()), str(query.c_str()) {}
-  bool parse(list<string> *result);
+  explicit ESInfixQueryParser(const std::string& _query) : query(_query), size(query.size()), str(query.c_str()) {}
+  bool parse(std::list<std::string> *result);
 };
 
 class ESQueryNode;
@@ -75,11 +75,11 @@ struct ESEntityTypeMap {
     ES_ENTITY_DATE = 3,
   };
 
-  map<string, EntityType> m;
+  std::map<std::string, EntityType> m;
 
-  explicit ESEntityTypeMap(map<string, EntityType>& _m) : m(_m) {}
+  explicit ESEntityTypeMap(std::map<std::string, EntityType>& _m) : m(_m) {}
 
-  bool find(const string& entity, EntityType *ptype) {
+  bool find(const std::string& entity, EntityType *ptype) {
     auto i = m.find(entity);
     if (i != m.end()) {
       *ptype = i->second;
@@ -96,27 +96,30 @@ class ESQueryCompiler {
   ESQueryStack stack;
   ESQueryNode *query_root{nullptr};
 
-  string custom_prefix;
+  std::string custom_prefix;
 
-  bool convert(list<string>& infix, string *perr);
+  bool convert(std::list<std::string>& infix, std::string *perr);
 
-  list<pair<string, string> > eq_conds;
+  std::list<std::pair<std::string, std::string> > eq_conds;
 
   ESEntityTypeMap *generic_type_map{nullptr};
   ESEntityTypeMap *custom_type_map{nullptr};
 
-  map<string, string, ltstr_nocase> *field_aliases = nullptr;
-  set<string> *restricted_fields = nullptr;
+  std::map<std::string, std::string, ltstr_nocase> *field_aliases = nullptr;
+  std::set<std::string> *restricted_fields = nullptr;
 
 public:
-  ESQueryCompiler(const string& query, list<pair<string, string> > *prepend_eq_conds, const string& _custom_prefix) : parser(query), custom_prefix(_custom_prefix) {
+    ESQueryCompiler(const std::string& query,
+                   std::list<std::pair<std::string, std::string> > *prepend_eq_conds,
+                   const std::string& _custom_prefix)
+      : parser(query), custom_prefix(_custom_prefix) {
     if (prepend_eq_conds) {
       eq_conds = std::move(*prepend_eq_conds);
     }
   }
   ~ESQueryCompiler();
 
-  bool compile(string *perr);
+  bool compile(std::string *perr);
   void dump(Formatter *f) const;
   
   void set_generic_type_map(ESEntityTypeMap *entity_map) {
@@ -126,7 +129,7 @@ public:
   ESEntityTypeMap *get_generic_type_map() {
     return generic_type_map;
   }
-  const string& get_custom_prefix() { return custom_prefix; }
+  const std::string& get_custom_prefix() { return custom_prefix; }
 
   void set_custom_type_map(ESEntityTypeMap *entity_map) {
     custom_type_map = entity_map;
@@ -136,11 +139,11 @@ public:
     return custom_type_map;
   }
 
-  void set_field_aliases(map<string, string, ltstr_nocase> *fa) {
+  void set_field_aliases(std::map<std::string, std::string, ltstr_nocase> *fa) {
     field_aliases = fa;
   }
 
-  string unalias_field(const string& field) {
+  std::string unalias_field(const std::string& field) {
     if (!field_aliases) {
       return field;
     }
@@ -152,11 +155,11 @@ public:
     return i->second;
   }
 
-  void set_restricted_fields(set<string> *rf) {
+  void set_restricted_fields(std::set<std::string> *rf) {
     restricted_fields = rf;
   }
 
-  bool is_restricted(const string& f) {
+  bool is_restricted(const std::string& f) {
     return (restricted_fields && restricted_fields->find(f) != restricted_fields->end());
   }
 };
index a94c6065feb8bee0888b10de51fb11068eeb90e9..75a0e3e4724da71551cee85e14cecea6c4f37c69 100644 (file)
@@ -26,14 +26,14 @@ class ETagVerifier : public rgw::putobj::Pipe
 protected:
   CephContext* cct;
   MD5 hash;
-  string calculated_etag;
+  std::string calculated_etag;
 
 public:
   ETagVerifier(CephContext* cct_, rgw::sal::DataProcessor *next)
     : Pipe(next), cct(cct_) {}
 
   virtual void calculate_etag() = 0;
-  string get_calculated_etag() { return calculated_etag;}
+  std::string get_calculated_etag() { return calculated_etag;}
 
 }; /* ETagVerifier */
 
index d56c6e599fe74c7b8828fdbfca23dfcf9d7e333f..48474c9fecc080078c715e741b206b39012476d3 100644 (file)
@@ -34,6 +34,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace rgw;
 
 namespace rgw {
index fc42887fe24d5c99f0cf0ad2b1113c017a1f08c6..0ccd2a5794189643588c4f085078878051aca7e8 100644 (file)
@@ -376,7 +376,7 @@ namespace rgw {
     }
 
     directory* get_directory() {
-      return get<directory>(&variant_type);
+      return boost::get<directory>(&variant_type);
     }
 
     size_t get_size() const { return state.size; }
@@ -1429,6 +1429,8 @@ public:
   }
 
   bool eof() {
+    using boost::get;
+
     if (unlikely(cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15))) {
       bool is_offset =
        unlikely(! get<const char*>(&offset)) ||
@@ -1573,11 +1575,11 @@ public:
 
     class DirIterator
     {
-      vector<rgw_bucket_dir_entry>& objs;
-      vector<rgw_bucket_dir_entry>::iterator obj_iter;
+      std::vector<rgw_bucket_dir_entry>& objs;
+      std::vector<rgw_bucket_dir_entry>::iterator obj_iter;
 
-      map<string, bool>& common_prefixes;
-      map<string, bool>::iterator cp_iter;
+      std::map<std::string, bool>& common_prefixes;
+      std::map<string, bool>::iterator cp_iter;
 
       boost::optional<std::string_view> obj_sref;
       boost::optional<std::string_view> cp_sref;
@@ -1585,8 +1587,8 @@ public:
 
     public:
 
-      DirIterator(vector<rgw_bucket_dir_entry>& objs,
-                 map<string, bool>& common_prefixes)
+      DirIterator(std::vector<rgw_bucket_dir_entry>& objs,
+                 std::map<string, bool>& common_prefixes)
        : objs(objs), common_prefixes(common_prefixes), _skip_cp(false)
        {
          obj_iter = objs.begin();
@@ -1668,11 +1670,11 @@ public:
        return cp_sref.get();
       }
 
-      vector<rgw_bucket_dir_entry>::iterator& get_obj_iter() {
+      std::vector<rgw_bucket_dir_entry>::iterator& get_obj_iter() {
        return obj_iter;
       }
 
-      map<string, bool>::iterator& get_cp_iter() {
+      std::map<string, bool>::iterator& get_cp_iter() {
        return cp_iter;
       }
 
@@ -1757,6 +1759,8 @@ public:
   }
 
   bool eof() {
+    using boost::get;
+
     if (unlikely(cct->_conf->subsys.should_gather(ceph_subsys_rgw, 15))) {
       bool is_offset =
        unlikely(! get<const char*>(&offset)) ||
index f9c0b98574300e581dbc731d4910cf52acdf7a88..3affb5f1414250c66771538eb3febe0396098aa0 100644 (file)
@@ -25,6 +25,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWFormatter_Plain::RGWFormatter_Plain(const bool ukv)
   : use_kv(ukv)
 {
index d9c833fc9843f2c74740719ea0e3461fc36e084d..d7e47259d5839af018af57afca8f166325814cb6 100644 (file)
@@ -30,7 +30,7 @@ public:
   void output_header() override {};
   void output_footer() override {};
   void enable_line_break() override {};
-  void flush(ostream& os) override;
+  void flush(std::ostream& os) override;
   void reset() override;
 
   void open_array_section(std::string_view name) override;
@@ -116,13 +116,13 @@ public:
 };
 
 class RGWStreamFlusher : public RGWFormatterFlusher {
-  ostream& os;
+  std::ostream& os;
 protected:
   void do_flush() override {
     formatter->flush(os);
   }
 public:
-  RGWStreamFlusher(Formatter *f, ostream& _os) : RGWFormatterFlusher(f), os(_os) {}
+  RGWStreamFlusher(Formatter *f, std::ostream& _os) : RGWFormatterFlusher(f), os(_os) {}
 };
 
 class RGWNullFlusher : public RGWFormatterFlusher {
index fbde27ae6cf25a0f81f0bcf25e0827f354faefe6..ea5cbbafefb196b2ec96e999207a1f515a847379 100644 (file)
@@ -12,6 +12,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWFrontendConfig::parse_config(const string& config,
                                    std::multimap<string, string>& config_map)
 {
index 1a1b5a7cfcf79f00cb9896d0ff6482b0934a87f6..a648489ac910dccd76c35ee499c38122ce36ee0c 100644 (file)
@@ -44,7 +44,7 @@ public:
 
   void set_default_config(RGWFrontendConfig& def_conf);
 
-  std::optional<string> get_val(const std::string& key);
+  std::optional<std::string> get_val(const std::string& key);
 
   bool get_val(const std::string& key,
                const std::string& def_val,
@@ -156,7 +156,7 @@ public:
 
     pprocess = pp;
 
-    string uid_str;
+    std::string uid_str;
     conf->get_val("uid", "", &uid_str);
     if (uid_str.empty()) {
       derr << "ERROR: uid param must be specified for loadgen frontend"
@@ -174,7 +174,7 @@ public:
       return ret;
     }
 
-    map<string, RGWAccessKey>::iterator aiter = user->get_info().access_keys.begin();
+    auto aiter = user->get_info().access_keys.begin();
     if (aiter == user->get_info().access_keys.end()) {
       derr << "ERROR: user has no S3 access keys set" << dendl;
       return -EINVAL;
index 6e907c5dbf9744e219ecceee9badc9b1972624dd..d59cc65b4b2b2117a29c42ad8cb0083a7d441d44 100644 (file)
@@ -22,6 +22,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace librados;
 
 static string gc_oid_prefix = "gc";
index 2345db85146edb23363c77b28d9211b42fcee4c9..f66b0be89c8482dd65e512f5cae5f0bba1e15479 100644 (file)
@@ -23,12 +23,12 @@ class RGWGC : public DoutPrefixProvider {
   CephContext *cct;
   RGWRados *store;
   int max_objs;
-  string *obj_names;
+  std::string *obj_names;
   std::atomic<bool> down_flag = { false };
 
   static constexpr uint64_t seed = 8675309;
 
-  int tag_index(const string& tag);
+  int tag_index(const std::string& tag);
 
   class GCWorker : public Thread {
     const DoutPrefixProvider *dpp;
@@ -50,22 +50,22 @@ public:
     stop_processor();
     finalize();
   }
-  vector<bool> transitioned_objects_cache;
-  int send_chain(cls_rgw_obj_chain& chain, const string& tag);
+  std::vector<bool> transitioned_objects_cache;
+  int send_chain(cls_rgw_obj_chain& chain, const std::string& tag);
 
   // asynchronously defer garbage collection on an object that's still being read
-  int async_defer_chain(const string& tag, const cls_rgw_obj_chain& info);
+  int async_defer_chain(const std::string& tag, const cls_rgw_obj_chain& info);
 
   // callback for when async_defer_chain() fails with ECANCELED
   void on_defer_canceled(const cls_rgw_gc_obj_info& info);
 
-  int remove(int index, const std::vector<string>& tags, librados::AioCompletion **pc);
+  int remove(int index, const std::vector<std::string>& tags, librados::AioCompletion **pc);
   int remove(int index, int num_entries);
 
   void initialize(CephContext *_cct, RGWRados *_store);
   void finalize();
 
-  int list(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
+  int list(int *index, std::string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
   void list_init(int *index) { *index = 0; }
   int process(int index, int process_max_secs, bool expired_only,
               RGWGCIOManager& io_manager);
index 059a2091bbde19578ca326e220e55bf8620138bd..0e3c79d8562c676f73f6686417f83e36d8ee244a 100644 (file)
@@ -24,6 +24,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWHTTPManager *rgw_http_manager;
 
 struct RGWCurlHandle;
index 355e4181df93bf0434083d8401cc7a0f82e0ecb6..d20b28cf4f9403e6d3907aec7e6c46cef577b805 100644 (file)
@@ -12,8 +12,8 @@
 
 #include <atomic>
 
-using param_pair_t = pair<string, string>;
-using param_vec_t = vector<param_pair_t>;
+using param_pair_t = std::pair<std::string, std::string>;
+using param_vec_t = std::vector<param_pair_t>;
 
 void rgw_http_client_init(CephContext *cct);
 void rgw_http_client_cleanup();
@@ -40,11 +40,11 @@ class RGWHTTPClient : public RGWIOProvider,
 
   bool verify_ssl; // Do not validate self signed certificates, default to false
 
-  string ca_path;
+  std::string ca_path;
 
-  string client_cert;
+  std::string client_cert;
 
-  string client_key;
+  std::string client_key;
 
   std::atomic<unsigned> stopped { 0 };
 
@@ -52,12 +52,12 @@ class RGWHTTPClient : public RGWIOProvider,
 protected:
   CephContext *cct;
 
-  string method;
-  string url;
+  std::string method;
+  std::string url;
 
-  string protocol;
-  string host;
-  string resource_prefix;
+  std::string protocol;
+  std::string host;
+  std::string resource_prefix;
 
   size_t send_len{0};
 
@@ -114,14 +114,14 @@ public:
 
   virtual ~RGWHTTPClient();
   explicit RGWHTTPClient(CephContext *cct,
-                         const string& _method,
-                         const string& _url);
+                         const std::string& _method,
+                         const std::string& _url);
 
   std::ostream& gen_prefix(std::ostream& out) const override;
 
 
-  void append_header(const string& name, const string& val) {
-    headers.push_back(pair<string, string>(name, val));
+  void append_header(const std::string& name, const std::string& val) {
+    headers.push_back(std::pair<std::string, std::string>(name, val));
   }
 
   void set_send_length(size_t len) {
@@ -159,15 +159,15 @@ public:
 
   rgw_http_req_data *get_req_data() { return req_data; }
 
-  string to_str();
+  std::string to_str();
 
   int get_req_retcode();
 
-  void set_url(const string& _url) {
+  void set_url(const std::string& _url) {
     url = _url;
   }
 
-  void set_method(const string& _method) {
+  void set_method(const std::string& _method) {
     method = _method;
   }
 
@@ -179,15 +179,15 @@ public:
     return user_info;
   }
 
-  void set_ca_path(const string& _ca_path) {
+  void set_ca_path(const std::string& _ca_path) {
     ca_path = _ca_path;
   }
 
-  void set_client_cert(const string& _client_cert) {
+  void set_client_cert(const std::string& _client_cert) {
     client_cert = _client_cert;
   }
 
-  void set_client_key(const string& _client_key) {
+  void set_client_key(const std::string& _client_key) {
     client_key = _client_key;
   }
 };
@@ -200,8 +200,8 @@ public:
   typedef std::set<header_name_t, ltstr_nocase> header_spec_t;
 
   RGWHTTPHeadersCollector(CephContext * const cct,
-                          const string& method,
-                          const string& url,
+                          const std::string& method,
+                          const std::string& url,
                           const header_spec_t &relevant_headers)
     : RGWHTTPClient(cct, method, url),
       relevant_headers(relevant_headers) {
@@ -232,8 +232,8 @@ class RGWHTTPTransceiver : public RGWHTTPHeadersCollector {
 
 public:
   RGWHTTPTransceiver(CephContext * const cct,
-                     const string& method,
-                     const string& url,
+                     const std::string& method,
+                     const std::string& url,
                      bufferlist * const read_bl,
                      const header_spec_t intercept_headers = {})
     : RGWHTTPHeadersCollector(cct, method, url, intercept_headers),
@@ -242,8 +242,8 @@ public:
   }
 
   RGWHTTPTransceiver(CephContext * const cct,
-                     const string& method,
-                     const string& url,
+                     const std::string& method,
+                     const std::string& url,
                      bufferlist * const read_bl,
                      const bool verify_ssl,
                      const header_spec_t intercept_headers = {})
@@ -294,10 +294,10 @@ class RGWHTTPManager {
   std::atomic<unsigned> is_stopped { 0 };
 
   ceph::shared_mutex reqs_lock = ceph::make_shared_mutex("RGWHTTPManager::reqs_lock");
-  map<uint64_t, rgw_http_req_data *> reqs;
-  list<rgw_http_req_data *> unregistered_reqs;
-  list<set_state> reqs_change_state;
-  map<uint64_t, rgw_http_req_data *> complete_reqs;
+  std::map<uint64_t, rgw_http_req_data *> reqs;
+  std::list<rgw_http_req_data *> unregistered_reqs;
+  std::list<set_state> reqs_change_state;
+  std::map<uint64_t, rgw_http_req_data *> complete_reqs;
   int64_t num_reqs = 0;
   int64_t max_threaded_req = 0;
   int thread_pipe[2];
index 686601d3ac7bbf1a78da3dbbaf4842a2b31faf19..b14ce57ab0799b450722dad5404f93cbbfe125a5 100644 (file)
@@ -22,7 +22,9 @@ constexpr int dout_subsys = ceph_subsys_rgw;
 }
 
 using std::bitset;
+using std::dec;
 using std::find;
+using std::hex;
 using std::int64_t;
 using std::move;
 using std::pair;
index d609716c43b8ebc665d49e047c95d765ff8af5b0..4e1adc5a1f15587ab88e1f8a06e7cb2f4f102b78 100644 (file)
@@ -457,7 +457,7 @@ struct Statement {
   Effect eval_conditions(const Environment& e) const;
 };
 
-std::ostream& operator <<(ostream& m, const Statement& s);
+std::ostream& operator <<(std::ostream& m, const Statement& s);
 
 struct PolicyParseException : public std::exception {
   rapidjson::ParseResult pr;
@@ -489,7 +489,7 @@ struct Policy {
   Effect eval_conditions(const Environment& e) const;
 
   template <typename F>
-  bool has_conditional(const string& conditional, F p) const {
+  bool has_conditional(const std::string& conditional, F p) const {
     for (const auto&s: statements){
       if (std::any_of(s.conditions.begin(), s.conditions.end(),
                      [&](const Condition& c) { return c.has_key_p(conditional, p);}))
@@ -498,16 +498,16 @@ struct Policy {
     return false;
   }
 
-  bool has_conditional(const string& c) const {
+  bool has_conditional(const std::string& c) const {
     return has_conditional(c, Condition::ci_equal_to());
   }
 
-  bool has_partial_conditional(const string& c) const {
+  bool has_partial_conditional(const std::string& c) const {
     return has_conditional(c, Condition::ci_starts_with());
   }
 };
 
-std::ostream& operator <<(ostream& m, const Policy& p);
+std::ostream& operator <<(std::ostream& m, const Policy& p);
 bool is_public(const Policy& p);
 
 }
index d8d14bb2f2cdf7ea6cf8abdc9d4f71ca70e70e76..45d5ee4506634699171a0701ae63131cbb35586f 100644 (file)
@@ -24,6 +24,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void encode_json(const char *name, const obj_version& v, Formatter *f)
 {
   f->open_object_section(name);
index 057572d980f871142024b3d8a435ab4e21a6c667..6541630b286d33372f22196b79e6e1b9648c663b 100644 (file)
@@ -16,6 +16,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 void dump_array(JSONObj *obj)
 {
index e9c14bd13a0a77ced5e7a177f3f1bc6d710b93da..32502bec06f0d8f13088737051a06fe43ec45c43 100644 (file)
@@ -23,6 +23,8 @@
 #define dout_subsys ceph_subsys_rgw
 #define PKI_ANS1_PREFIX "MII"
 
+using namespace std;
+
 bool rgw_is_pki_token(const string& token)
 {
   return token.compare(0, sizeof(PKI_ANS1_PREFIX) - 1, PKI_ANS1_PREFIX) == 0;
index 574cae19cd3b36945251951d504fcd8164633c3b..c5707b6a7f42d471af0abc02046e0d6a54b567a1 100644 (file)
@@ -16,9 +16,9 @@
 
 #include <atomic>
 
-bool rgw_is_pki_token(const string& token);
-void rgw_get_token_id(const string& token, string& token_id);
-static inline std::string rgw_get_token_id(const string& token)
+bool rgw_is_pki_token(const std::string& token);
+void rgw_get_token_id(const std::string& token, std::string& token_id);
+static inline std::string rgw_get_token_id(const std::string& token)
 {
   std::string token_id;
   rgw_get_token_id(token, token_id);
@@ -98,8 +98,8 @@ public:
   class RGWKeystoneHTTPTransceiver : public RGWHTTPTransceiver {
   public:
     RGWKeystoneHTTPTransceiver(CephContext * const cct,
-                               const string& method,
-                               const string& url,
+                               const std::string& method,
+                               const std::string& url,
                                bufferlist * const token_body_bl)
       : RGWHTTPTransceiver(cct, method, url, token_body_bl,
                            cct->_conf->rgw_keystone_verify_ssl,
@@ -135,22 +135,22 @@ class TokenEnvelope {
 public:
   class Domain {
   public:
-    string id;
-    string name;
+    std::string id;
+    std::string name;
     void decode_json(JSONObj *obj);
   };
   class Project {
   public:
     Domain domain;
-    string id;
-    string name;
+    std::string id;
+    std::string name;
     void decode_json(JSONObj *obj);
   };
 
   class Token {
   public:
     Token() : expires(0) { }
-    string id;
+    std::string id;
     time_t expires;
     Project tenant_v2;
     void decode_json(JSONObj *obj);
@@ -158,24 +158,24 @@ public:
 
   class Role {
   public:
-    string id;
-    string name;
+    std::string id;
+    std::string name;
     void decode_json(JSONObj *obj);
   };
 
   class User {
   public:
-    string id;
-    string name;
+    std::string id;
+    std::string name;
     Domain domain;
-    list<Role> roles_v2;
+    std::list<Role> roles_v2;
     void decode_json(JSONObj *obj);
   };
 
   Token token;
   Project project;
   User user;
-  list<Role> roles;
+  std::list<Role> roles;
 
   void decode_v3(JSONObj* obj);
   void decode_v2(JSONObj* obj);
@@ -191,7 +191,7 @@ public:
   const std::string& get_project_name() const {return project.name;};
   const std::string& get_user_id() const {return user.id;};
   const std::string& get_user_name() const {return user.name;};
-  bool has_role(const string& r) const;
+  bool has_role(const std::string& r) const;
   bool expired() const {
     const uint64_t now = ceph_clock_now().sec();
     return now >= static_cast<uint64_t>(get_expires());
@@ -206,7 +206,7 @@ public:
 class TokenCache {
   struct token_entry {
     TokenEnvelope token;
-    list<string>::iterator lru_iter;
+    std::list<std::string>::iterator lru_iter;
   };
 
   std::atomic<bool> down_flag = { false };
index dcdcf875115dbe5f042084cd8b631df2de045954..9b62c689795db48512124ee5da3379301225056a 100644 (file)
@@ -22,6 +22,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace rgw;
 
 #ifndef FORTEST_VIRTUAL
index e06b8038b173a10e8e5a5ece53210eede9dbf024..f4e750699120f07c5638a3695ae6bdc242bb6fe2 100644 (file)
@@ -32,10 +32,10 @@ static const std::string RGW_SSE_KMS_KMIP_SE_KV = "kv";
  * \return
  */
 int make_actual_key_from_kms(CephContext *cct,
-                            map<string, bufferlist>& attrs,
+                            std::map<std::string, bufferlist>& attrs,
                             std::string& actual_key);
 int reconstitute_actual_key_from_kms(CephContext *cct,
-                            map<string, bufferlist>& attrs,
+                            std::map<std::string, bufferlist>& attrs,
                             std::string& actual_key);
 
 /**
index 1931dd4d78ba33a22fe28ceedf5c9e0d2e9eee23..a495cdb6e498425a55c544059e6909d022ad9bc4 100644 (file)
@@ -42,6 +42,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 const char* LC_STATUS[] = {
       "UNINITIAL",
       "PROCESSING",
index e34e77d2d003393ee239f75d24dfc34d5932ada4..7c4f404a8819cdba92a81294a3a5bd75b33e71f1 100644 (file)
@@ -27,8 +27,8 @@
 
 #define HASH_PRIME 7877
 #define MAX_ID_LEN 255
-static string lc_oid_prefix = "lc";
-static string lc_index_lock_name = "lc_process";
+static std::string lc_oid_prefix = "lc";
+static std::string lc_index_lock_name = "lc_process";
 
 extern const char* LC_STATUS[];
 
@@ -42,12 +42,12 @@ typedef enum {
 class LCExpiration
 {
 protected:
-  string days;
+  std::string days;
   //At present only current object has expiration date
-  string date;
+  std::string date;
 public:
   LCExpiration() {}
-  LCExpiration(const string& _days, const string& _date) : days(_days), date(_date) {}
+  LCExpiration(const std::string& _days, const std::string& _date) : days(_days), date(_date) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(3, 2, bl);
@@ -65,16 +65,16 @@ public:
   }
   void dump(Formatter *f) const;
 //  static void generate_test_instances(list<ACLOwner*>& o);
-  void set_days(const string& _days) { days = _days; }
-  string get_days_str() const {
+  void set_days(const std::string& _days) { days = _days; }
+  std::string get_days_str() const {
     return days;
   }
   int get_days() const {return atoi(days.c_str()); }
   bool has_days() const {
     return !days.empty();
   }
-  void set_date(const string& _date) { date = _date; }
-  string get_date() const {
+  void set_date(const std::string& _date) { date = _date; }
+  std::string get_date() const {
     return date;
   }
   bool has_date() const {
@@ -98,20 +98,20 @@ WRITE_CLASS_ENCODER(LCExpiration)
 class LCTransition
 {
 protected:
-  string days;
-  string date;
-  string storage_class;
+  std::string days;
+  std::string date;
+  std::string storage_class;
 
 public:
   int get_days() const {
     return atoi(days.c_str());
   }
 
-  string get_date() const {
+  std::string get_date() const {
     return date;
   }
 
-  string get_storage_class() const {
+  std::string get_storage_class() const {
     return storage_class;
   }
 
@@ -216,15 +216,15 @@ WRITE_CLASS_ENCODER(LCFilter)
 class LCRule
 {
 protected:
-  string id;
-  string prefix;
-  string status;
+  std::string id;
+  std::string prefix;
+  std::string status;
   LCExpiration expiration;
   LCExpiration noncur_expiration;
   LCExpiration mp_expiration;
   LCFilter filter;
-  map<string, LCTransition> transitions;
-  map<string, LCTransition> noncur_transitions;
+  std::map<std::string, LCTransition> transitions;
+  std::map<std::string, LCTransition> noncur_transitions;
   bool dm_expiration = false;
 
 public:
@@ -232,11 +232,11 @@ public:
   LCRule(){};
   ~LCRule(){};
 
-  const string& get_id() const {
+  const std::string& get_id() const {
       return id;
   }
 
-  const string& get_status() const {
+  const std::string& get_status() const {
       return status;
   }
 
@@ -248,7 +248,7 @@ public:
     status = (flag ? "Enabled" : "Disabled");
   }
 
-  const string& get_prefix() const {
+  const std::string& get_prefix() const {
       return prefix;
   }
 
@@ -272,23 +272,23 @@ public:
     return dm_expiration;
   }
 
-  const map<string, LCTransition>& get_transitions() const {
+  const std::map<std::string, LCTransition>& get_transitions() const {
     return transitions;
   }
 
-  const map<string, LCTransition>& get_noncur_transitions() const {
+  const std::map<std::string, LCTransition>& get_noncur_transitions() const {
     return noncur_transitions;
   }
 
-  void set_id(const string& _id) {
+  void set_id(const std::string& _id) {
     id = _id;
   }
 
-  void set_prefix(const string& _prefix) {
+  void set_prefix(const std::string& _prefix) {
     prefix = _prefix;
   }
 
-  void set_status(const string& _status) {
+  void set_status(const std::string& _status) {
     status = _status;
   }
 
@@ -368,7 +368,7 @@ struct transition_action
 {
   int days;
   boost::optional<ceph::real_time> date;
-  string storage_class;
+  std::string storage_class;
   transition_action() : days(0) {}
   void dump(Formatter *f) const {
     if (!date) {
@@ -383,7 +383,7 @@ struct transition_action
 /* XXX why not LCRule? */
 struct lc_op
 {
-  string id;
+  std::string id;
   bool status{false};
   bool dm_expiration{false};
   int expiration{0};
@@ -391,8 +391,8 @@ struct lc_op
   int mp_expiration{0};
   boost::optional<ceph::real_time> expiration_date;
   boost::optional<RGWObjTags> obj_tags;
-  map<string, transition_action> transitions;
-  map<string, transition_action> noncur_transitions;
+  std::map<std::string, transition_action> transitions;
+  std::map<std::string, transition_action> noncur_transitions;
 
   /* ctors are nice */
   lc_op() = delete;
@@ -407,8 +407,8 @@ class RGWLifecycleConfiguration
 {
 protected:
   CephContext *cct;
-  multimap<string, lc_op> prefix_map;
-  multimap<string, LCRule> rule_map;
+  std::multimap<std::string, lc_op> prefix_map;
+  std::multimap<std::string, LCRule> rule_map;
   bool _add_rule(const LCRule& rule);
   bool has_same_action(const lc_op& first, const lc_op& second);
 public:
@@ -421,7 +421,7 @@ public:
 
   virtual ~RGWLifecycleConfiguration() {}
 
-//  int get_perm(string& id, int perm_mask);
+//  int get_perm(std::string& id, int perm_mask);
 //  int get_group_perm(ACLGroupTypeEnum group, int perm_mask);
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -431,7 +431,7 @@ public:
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START_LEGACY_COMPAT_LEN(1, 1, 1, bl);
     decode(rule_map, bl);
-    multimap<string, LCRule>::iterator iter;
+    std::multimap<std::string, LCRule>::iterator iter;
     for (iter = rule_map.begin(); iter != rule_map.end(); ++iter) {
       LCRule& rule = iter->second;
       _add_rule(rule);
@@ -439,7 +439,7 @@ public:
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWLifecycleConfiguration*>& o);
+  static void generate_test_instances(std::list<RGWLifecycleConfiguration*>& o);
 
   void add_rule(const LCRule& rule);
 
@@ -447,10 +447,10 @@ public:
 
   bool valid();
 
-  multimap<string, LCRule>& get_rule_map() { return rule_map; }
-  multimap<string, lc_op>& get_prefix_map() { return prefix_map; }
+  std::multimap<std::string, LCRule>& get_rule_map() { return rule_map; }
+  std::multimap<std::string, lc_op>& get_prefix_map() { return prefix_map; }
 /*
-  void create_default(string id, string name) {
+  void create_default(std::string id, std::string name) {
     ACLGrant grant;
     grant.set_canon(id, name, RGW_PERM_FULL_CONTROL);
     add_grant(&grant);
@@ -464,9 +464,9 @@ class RGWLC : public DoutPrefixProvider {
   rgw::sal::Store* store;
   std::unique_ptr<rgw::sal::Lifecycle> sal_lc;
   int max_objs{0};
-  string *obj_names{nullptr};
+  std::string *obj_names{nullptr};
   std::atomic<bool> down_flag = { false };
-  string cookie;
+  std::string cookie;
 
 public:
 
@@ -516,10 +516,10 @@ public:
   bool if_already_run_today(time_t start_date);
   bool expired_session(time_t started);
   time_t thread_stop_at();
-  int list_lc_progress(string& marker, uint32_t max_entries,
-                      vector<rgw::sal::Lifecycle::LCEntry>&, int& index);
+  int list_lc_progress(std::string& marker, uint32_t max_entries,
+                      std::vector<rgw::sal::Lifecycle::LCEntry>&, int& index);
   int bucket_lc_prepare(int index, LCWorker* worker);
-  int bucket_lc_process(string& shard_id, LCWorker* worker, time_t stop_at,
+  int bucket_lc_process(std::string& shard_id, LCWorker* worker, time_t stop_at,
                        bool once);
   int bucket_lc_post(int index, int max_lock_sec,
                     rgw::sal::Lifecycle::LCEntry& entry, int& result, LCWorker* worker);
@@ -540,7 +540,7 @@ public:
   private:
 
   int handle_multipart_expiration(rgw::sal::Bucket* target,
-                                 const multimap<string, lc_op>& prefix_map,
+                                 const std::multimap<std::string, lc_op>& prefix_map,
                                  LCWorker* worker, time_t stop_at, bool once);
 };
 
index 57a996f0cf8215259dd2574bb81a2517b9789845..536323d74821cc21833f6f0a3a34998cc9d7dab3 100644 (file)
@@ -14,6 +14,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static bool check_date(const string& _date)
 {
   boost::optional<ceph::real_time> date = ceph::from_iso_8601(_date);
index 5aa9c8e8c4961ea5a2b67758cc6c7c6d5a9fcc09..0fe093df9ea0fbb6b654c7ed3e16c06f309891a6 100644 (file)
@@ -27,7 +27,7 @@ private:
   bool dm_expiration{false};
 public:
   LCExpiration_S3() {}
-  LCExpiration_S3(string _days, string _date, bool _dm_expiration) : LCExpiration(_days, _date), dm_expiration(_dm_expiration) {}
+  LCExpiration_S3(std::string _days, std::string _date, bool _dm_expiration) : LCExpiration(_days, _date), dm_expiration(_dm_expiration) {}
 
   void dump_xml(Formatter *f) const;
   void decode_xml(XMLObj *obj);
index 27b2c24af4d298671255f2bfa2844f14a9b08bc8..7ad6b74b139889a67e3542e892ed672e0ba8ae42 100644 (file)
@@ -14,6 +14,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 std::string parse_rgw_ldap_bindpw(CephContext* ctx)
 {
   string ldap_bindpw;
index 836e4f0f6acc220c56e47526f896721a378b7182..710c76c803158f040aca5b05e1aef95d215ff235 100644 (file)
@@ -51,7 +51,7 @@ namespace rgw {
     std::ostream& gen_prefix(std::ostream& out) const { return out << "lib rgw: "; }
 
     int init();
-    int init(vector<const char *>& args);
+    int init(std::vector<const char *>& args);
     int stop();
   };
 
index 461befd6bad71617b6883da96992460e7d0616d1..625952d335df0d9ca82efa222ac24b8d9904d698 100644 (file)
@@ -59,7 +59,7 @@ namespace rgw {
 
       lsubdout(g_ceph_context, rgw, 10)
        << __func__ << " enqueue request req="
-       << hex << req << dec << dendl;
+       << std::hex << req << std::dec << dendl;
 
       req_throttle.get(1);
       req_wq.queue(req);
index 22c133864b721a874c1978a1c51cabebb40a812c..015057e9c79bc11a7b5156bf93b66174241ec3b1 100644 (file)
@@ -11,6 +11,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWLoadGenRequestEnv::set_date(utime_t& tm)
 {
   date_str = rgw_to_asctime(tm);
index a83ae89f0bc3930c7bbf3075126b9dace970aafa..547e74ef4b9844f0c87e6844ef509670762940c8 100644 (file)
@@ -16,6 +16,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 extern void signal_shutdown();
 
 void RGWLoadGenProcess::checkpoint()
index b35baf76756eaecced95bdc0fb24ed880fcc47a9..b2c4e8093264c647131388db82c8ad7c49ae42c3 100644 (file)
@@ -18,6 +18,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static void set_param_str(struct req_state *s, const char *name, string& str)
 {
   const char *p = s->info.env->get(name);
index dd2454fd2cc970ed3474d107b49c75f3a1a5a674..2469282b33012603c4db659c384c4bfbe2acf583 100644 (file)
@@ -19,25 +19,25 @@ struct rgw_log_entry {
 
   rgw_user object_owner;
   rgw_user bucket_owner;
-  string bucket;
+  std::string bucket;
   Clock::time_point time;
-  string remote_addr;
-  string user;
+  std::string remote_addr;
+  std::string user;
   rgw_obj_key obj;
-  string op;
-  string uri;
-  string http_status;
-  string error_code;
+  std::string op;
+  std::string uri;
+  std::string http_status;
+  std::string error_code;
   uint64_t bytes_sent = 0;
   uint64_t bytes_received = 0;
   uint64_t obj_size = 0;
   Clock::duration total_time{};
-  string user_agent;
-  string referrer;
-  string bucket_id;
+  std::string user_agent;
+  std::string referrer;
+  std::string bucket_id;
   headers_map x_headers;
-  string trans_id;
-  std::vector<string> token_claims;
+  std::string trans_id;
+  std::vector<std::string> token_claims;
   uint32_t identity_type;
 
   void encode(bufferlist &bl) const {
@@ -128,7 +128,7 @@ struct rgw_log_entry {
     DECODE_FINISH(p);
   }
   void dump(ceph::Formatter *f) const;
-  static void generate_test_instances(list<rgw_log_entry*>& o);
+  static void generate_test_instances(std::list<rgw_log_entry*>& o);
 };
 WRITE_CLASS_ENCODER(rgw_log_entry)
 
@@ -151,7 +151,7 @@ public:
 class RGWREST;
 
 int rgw_log_op(rgw::sal::Store* store, RGWREST* const rest, struct req_state* s,
-              const string& op_name, OpsLogSocket* olog);
+              const std::string& op_name, OpsLogSocket* olog);
 void rgw_log_usage_init(CephContext* cct, rgw::sal::Store* store);
 void rgw_log_usage_finalize();
 void rgw_format_ops_log_entry(struct rgw_log_entry& entry,
index 415ad1363d5281a53f6533b380afa06b36e50888..7c9dafe7e449435c190a10b23545e04db662142f 100644 (file)
@@ -8,6 +8,7 @@
 #include "rgw_tools.h"
 #include "cls_fifo_legacy.h"
 
+using namespace std::chrono_literals;
 namespace cb = ceph::buffer;
 
 static constexpr auto dout_subsys = ceph_subsys_rgw;
@@ -165,7 +166,7 @@ bs::error_code log_remove(const DoutPrefixProvider *dpp,
     rados::cls::fifo::info info;
     uint32_t part_header_size = 0, part_entry_overhead = 0;
 
-    auto r = rgw::cls::fifo::get_meta(dpp, ioctx, oid, nullopt, &info,
+    auto r = rgw::cls::fifo::get_meta(dpp, ioctx, oid, std::nullopt, &info,
                                      &part_header_size, &part_entry_overhead,
                                      0, y, true);
     if (r == -ENOENT) continue;
index 599ea4bd1030b4d34e38ee75aa5df6fc86169378..3fa67d7418bb796d01b2d15a2d1e60a66ec42ec6 100644 (file)
@@ -242,7 +242,7 @@ inline std::string gencursor(uint64_t gen_id, std::string_view cursor) {
 inline std::pair<uint64_t, std::string_view>
 cursorgen(std::string_view cursor_) {
   if (cursor_.empty()) {
-    return { 0, ""sv };
+    return { 0, "" };
   }
   std::string_view cursor = cursor_;
   if (cursor[0] != 'G') {
index bd08f06bcd99b5affa11586a04ed57bddd3fa8ef..9c74d84649029050c1268bbba7f84a937c563a09 100644 (file)
@@ -142,7 +142,7 @@ int add_package(const DoutPrefixProvider *dpp, rgw::sal::Store* store, optional_
 int remove_package(const DoutPrefixProvider *dpp, rgw::sal::Store* store, optional_yield y, const std::string& package_name) {
   librados::ObjectWriteOperation op;
   size_t pos = package_name.find(" ");
-  if (pos != string::npos) {
+  if (pos != package_name.npos) {
     // remove specfic version of the the package
     op.omap_rm_keys(std::set<std::string>({package_name}));
     auto ret = rgw_rados_operate(dpp, *(static_cast<rgw::sal::RadosStore*>(store)->getRados()->get_lc_pool_ctx()),
index cf9295a88899b24ecedd852754d59dbac1dea246..aa3fdd4fc9b0d0d7b424c9796654d0032fd3ef61 100644 (file)
@@ -62,6 +62,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace {
 TracepointProvider::Traits rgw_op_tracepoint_traits("librgw_op_tp.so",
                                                  "rgw_op_tracing");
index ae16cc5e673d3bcc7d62abe1a588e092ebb61b4a..abc590a3e4635b67d07c994b9c95d9eea58b648e 100644 (file)
@@ -26,7 +26,7 @@
 #define META_LOG_OBJ_PREFIX "meta.log."
 
 struct RGWMetadataLogInfo {
-  string marker;
+  std::string marker;
   real_time last_update;
 
   void dump(Formatter *f) const;
@@ -66,7 +66,7 @@ class RGWMetadataLogInfoCompletion : public RefCountedObject {
 
 class RGWMetadataLog {
   CephContext *cct;
-  const string prefix;
+  const std::string prefix;
 
   struct Svc {
     RGWSI_Zone *zone{nullptr};
@@ -80,7 +80,7 @@ class RGWMetadataLog {
   }
 
   RWLock lock;
-  set<int> modified_shards;
+  std::set<int> modified_shards;
 
   void mark_modified(int shard_id);
 public:
@@ -96,23 +96,23 @@ public:
   }
 
 
-  void get_shard_oid(int id, string& oid) const {
+  void get_shard_oid(int id, std::string& oid) const {
     char buf[16];
     snprintf(buf, sizeof(buf), "%d", id);
     oid = prefix + buf;
   }
 
-  int add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl);
-  int get_shard_id(const string& hash_key, int *shard_id);
-  int store_entries_in_shard(const DoutPrefixProvider *dpp, list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
+  int add_entry(const DoutPrefixProvider *dpp, const std::string& hash_key, const std::string& section, const std::string& key, bufferlist& bl);
+  int get_shard_id(const std::string& hash_key, int *shard_id);
+  int store_entries_in_shard(const DoutPrefixProvider *dpp, std::list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
 
   struct LogListCtx {
     int cur_shard;
-    string marker;
+    std::string marker;
     real_time from_time;
     real_time end_time;
 
-    string cur_oid;
+    std::string cur_oid;
 
     bool done;
 
@@ -120,25 +120,25 @@ public:
   };
 
   void init_list_entries(int shard_id, const real_time& from_time,
-                        const real_time& end_time, const string& marker,
+                        const real_time& end_time, const std::string& marker,
                         void **handle);
   void complete_list_entries(void *handle);
   int list_entries(const DoutPrefixProvider *dpp, 
                    void *handle,
                    int max_entries,
-                   list<cls_log_entry>& entries,
-                  string *out_marker,
+                   std::list<cls_log_entry>& entries,
+                  std::string *out_marker,
                   bool *truncated);
 
-  int trim(const DoutPrefixProvider *dpp, int shard_id, const real_time& from_time, const real_time& end_time, const string& start_marker, const string& end_marker);
+  int trim(const DoutPrefixProvider *dpp, int shard_id, const real_time& from_time, const real_time& end_time, const std::string& start_marker, const std::string& end_marker);
   int get_info(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfo *info);
   int get_info_async(const DoutPrefixProvider *dpp, int shard_id, RGWMetadataLogInfoCompletion *completion);
-  int lock_exclusive(const DoutPrefixProvider *dpp, int shard_id, timespan duration, string&zone_id, string& owner_id);
-  int unlock(const DoutPrefixProvider *dpp, int shard_id, string& zone_id, string& owner_id);
+  int lock_exclusive(const DoutPrefixProvider *dpp, int shard_id, timespan duration, std::string&zone_id, std::string& owner_id);
+  int unlock(const DoutPrefixProvider *dpp, int shard_id, std::string& zone_id, std::string& owner_id);
 
-  int update_shards(list<int>& shards);
+  int update_shards(std::list<int>& shards);
 
-  void read_clear_modified(set<int> &modified);
+  void read_clear_modified(std::set<int> &modified);
 };
 
 struct LogStatusDump {
index 22dbe6479bb86d68ca03e6a6955cd8eed24169d4..6272b471db01b7d984b52a87f7e8a359fc4805ce 100644 (file)
@@ -54,8 +54,8 @@ struct rgw_meta_sync_marker {
     IncrementalSync = 1,
   };
   uint16_t state;
-  string marker;
-  string next_step_marker;
+  std::string marker;
+  std::string next_step_marker;
   uint64_t total_entries;
   uint64_t pos;
   real_time timestamp;
@@ -97,7 +97,7 @@ WRITE_CLASS_ENCODER(rgw_meta_sync_marker)
 
 struct rgw_meta_sync_status {
   rgw_meta_sync_info sync_info;
-  map<uint32_t, rgw_meta_sync_marker> sync_markers;
+  std::map<uint32_t, rgw_meta_sync_marker> sync_markers;
 
   rgw_meta_sync_status() {}
 
index c6cf81ef2fc66165e7e2f992a01712d735c0cff0..f036bf5485d3ea739f566f21c397f36834a39a0b 100644 (file)
@@ -27,6 +27,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 const std::string RGWMetadataLogHistory::oid = "meta.history";
 
 void LogStatusDump::dump(Formatter *f) const {
index 299bf391b35477122e3b86f122d7936f11dafe0e..e27fe27af233eb63f377d07fc3d0c72531aa1590 100644 (file)
@@ -33,17 +33,17 @@ class RGWMetadataObject {
 protected:
   obj_version objv;
   ceph::real_time mtime;
-  std::map<string, bufferlist> *pattrs{nullptr};
+  std::map<std::string, bufferlist> *pattrs{nullptr};
   
 public:
   RGWMetadataObject() {}
   virtual ~RGWMetadataObject() {}
   obj_version& get_version();
   real_time& get_mtime() { return mtime; }
-  void set_pattrs(std::map<string, bufferlist> *_pattrs) {
+  void set_pattrs(std::map<std::string, bufferlist> *_pattrs) {
     pattrs = _pattrs;
   }
-  std::map<string, bufferlist> *get_pattrs() {
+  std::map<std::string, bufferlist> *get_pattrs() {
     return pattrs;
   }
 
@@ -61,7 +61,7 @@ protected:
 public:
   RGWMetadataHandler() {}
   virtual ~RGWMetadataHandler() {}
-  virtual string get_type() = 0;
+  virtual std::string get_type() = 0;
 
   void base_init(CephContext *_cct) {
     cct = _cct;
@@ -69,17 +69,17 @@ public:
 
   virtual RGWMetadataObject *get_meta_obj(JSONObj *jo, const obj_version& objv, const ceph::real_time& mtime) = 0;
 
-  virtual int get(string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) = 0;
-  virtual int put(string& entry,
+  virtual int get(std::string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) = 0;
+  virtual int put(std::string& entry,
                   RGWMetadataObject *obj,
                   RGWObjVersionTracker& objv_tracker,
                   optional_yield, 
                   const DoutPrefixProvider *dpp,
                   RGWMDLogSyncType type,
                   bool from_remote_zone) = 0;
-  virtual int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) = 0;
+  virtual int remove(std::string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) = 0;
 
-  virtual int mutate(const string& entry,
+  virtual int mutate(const std::string& entry,
                     const ceph::real_time& mtime,
                     RGWObjVersionTracker *objv_tracker,
                      optional_yield y,
@@ -87,13 +87,13 @@ public:
                     RGWMDLogStatus op_type,
                     std::function<int()> f) = 0;
 
-  virtual int list_keys_init(const DoutPrefixProvider *dpp, const string& marker, void **phandle) = 0;
-  virtual int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, list<string>& keys, bool *truncated) = 0;
+  virtual int list_keys_init(const DoutPrefixProvider *dpp, const std::string& marker, void **phandle) = 0;
+  virtual int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, std::list<std::string>& keys, bool *truncated) = 0;
   virtual void list_keys_complete(void *handle) = 0;
 
-  virtual string get_marker(void *handle) = 0;
+  virtual std::string get_marker(void *handle) = 0;
 
-  virtual int get_shard_id(const string& entry, int *shard_id) {
+  virtual int get_shard_id(const std::string& entry, int *shard_id) {
     *shard_id = 0;
     return 0;
   }
@@ -111,13 +111,13 @@ public:
 protected:
   RGWSI_MetaBackend_Handler *be_handler;
 
-  virtual int do_get(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) = 0;
-  virtual int do_put(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWMetadataObject *obj,
+  virtual int do_get(RGWSI_MetaBackend_Handler::Op *op, std::string& entry, RGWMetadataObject **obj, optional_yield y, const DoutPrefixProvider *dpp) = 0;
+  virtual int do_put(RGWSI_MetaBackend_Handler::Op *op, std::string& entry, RGWMetadataObject *obj,
                      RGWObjVersionTracker& objv_tracker, optional_yield y,
                      const DoutPrefixProvider *dpp, RGWMDLogSyncType type, 
                      bool from_remote_zone) = 0;
   virtual int do_put_operate(Put *put_op, const DoutPrefixProvider *dpp);
-  virtual int do_remove(RGWSI_MetaBackend_Handler::Op *op, string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp) = 0;
+  virtual int do_remove(RGWSI_MetaBackend_Handler::Op *op, std::string& entry, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp) = 0;
 
 public:
   RGWMetadataHandler_GenericMetaBE() {}
@@ -136,7 +136,7 @@ public:
   protected:
     RGWMetadataHandler_GenericMetaBE *handler;
     RGWSI_MetaBackend_Handler::Op *op;
-    string& entry;
+    std::string& entry;
     RGWMetadataObject *obj;
     RGWObjVersionTracker& objv_tracker;
     RGWMDLogSyncType apply_type;
@@ -148,7 +148,7 @@ public:
     }
   public:
     Put(RGWMetadataHandler_GenericMetaBE *_handler, RGWSI_MetaBackend_Handler::Op *_op,
-        string& _entry, RGWMetadataObject *_obj,
+        std::string& _entry, RGWMetadataObject *_obj,
         RGWObjVersionTracker& _objv_tracker, optional_yield _y,
         RGWMDLogSyncType _type, bool from_remote_zone);
 
@@ -168,11 +168,11 @@ public:
     }
   };
 
-  int get(string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) override;
-  int put(string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp, RGWMDLogSyncType type, bool from_remote_zone) override;
-  int remove(string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) override;
+  int get(std::string& entry, RGWMetadataObject **obj, optional_yield, const DoutPrefixProvider *dpp) override;
+  int put(std::string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp, RGWMDLogSyncType type, bool from_remote_zone) override;
+  int remove(std::string& entry, RGWObjVersionTracker& objv_tracker, optional_yield, const DoutPrefixProvider *dpp) override;
 
-  int mutate(const string& entry,
+  int mutate(const std::string& entry,
             const ceph::real_time& mtime,
             RGWObjVersionTracker *objv_tracker,
              optional_yield y,
@@ -180,10 +180,10 @@ public:
             RGWMDLogStatus op_type,
             std::function<int()> f) override;
 
-  int get_shard_id(const string& entry, int *shard_id) override;
+  int get_shard_id(const std::string& entry, int *shard_id) override;
 
   int list_keys_init(const DoutPrefixProvider *dpp, const std::string& marker, void **phandle) override;
-  int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, std::list<string>& keys, bool *truncated) override;
+  int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, std::list<std::string>& keys, bool *truncated) override;
   void list_keys_complete(void *handle) override;
 
   std::string get_marker(void *handle) override;
@@ -226,27 +226,27 @@ class RGWMetadataManager {
 
   CephContext *cct;
   RGWSI_Meta *meta_svc;
-  map<string, RGWMetadataHandler *> handlers;
+  std::map<std::string, RGWMetadataHandler *> handlers;
   std::unique_ptr<RGWMetadataTopHandler> md_top_handler;
 
-  int find_handler(const string& metadata_key, RGWMetadataHandler **handler, string& entry);
+  int find_handler(const std::string& metadata_key, RGWMetadataHandler **handler, std::string& entry);
   int register_handler(RGWMetadataHandler *handler);
 
 public:
   RGWMetadataManager(RGWSI_Meta *_meta_svc);
   ~RGWMetadataManager();
 
-  RGWMetadataHandler *get_handler(const string& type);
+  RGWMetadataHandler *get_handler(const std::string& type);
 
-  int get(string& metadata_key, Formatter *f, optional_yield y, const DoutPrefixProvider *dpp);
-  int put(string& metadata_key, bufferlist& bl, optional_yield y,
+  int get(std::string& metadata_key, Formatter *f, optional_yield y, const DoutPrefixProvider *dpp);
+  int put(std::string& metadata_key, bufferlist& bl, optional_yield y,
           const DoutPrefixProvider *dpp,
           RGWMDLogSyncType sync_mode,
           bool from_remote_zone,
           obj_version *existing_version = NULL);
-  int remove(string& metadata_key, optional_yield y, const DoutPrefixProvider *dpp);
+  int remove(std::string& metadata_key, optional_yield y, const DoutPrefixProvider *dpp);
 
-  int mutate(const string& metadata_key,
+  int mutate(const std::string& metadata_key,
             const ceph::real_time& mtime,
             RGWObjVersionTracker *objv_tracker,
              optional_yield y,
@@ -254,20 +254,20 @@ public:
             RGWMDLogStatus op_type,
             std::function<int()> f);
 
-  int list_keys_init(const DoutPrefixProvider *dpp, const string& section, void **phandle);
-  int list_keys_init(const DoutPrefixProvider *dpp, const string& section, const string& marker, void **phandle);
-  int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, list<string>& keys, bool *truncated);
+  int list_keys_init(const DoutPrefixProvider *dpp, const std::string& section, void **phandle);
+  int list_keys_init(const DoutPrefixProvider *dpp, const std::string& section, const std::string& marker, void **phandle);
+  int list_keys_next(const DoutPrefixProvider *dpp, void *handle, int max, std::list<std::string>& keys, bool *truncated);
   void list_keys_complete(void *handle);
 
-  string get_marker(void *handle);
+  std::string get_marker(void *handle);
 
   void dump_log_entry(cls_log_entry& entry, Formatter *f);
 
-  void get_sections(list<string>& sections);
+  void get_sections(std::list<std::string>& sections);
 
-  void parse_metadata_key(const string& metadata_key, string& type, string& entry);
+  void parse_metadata_key(const std::string& metadata_key, std::string& type, std::string& entry);
 
-  int get_shard_id(const string& section, const string& key, int *shard_id);
+  int get_shard_id(const std::string& section, const std::string& key, int *shard_id);
 };
 
 class RGWMetadataHandlerPut_SObj : public RGWMetadataHandler_GenericMetaBE::Put
@@ -279,7 +279,7 @@ protected:
 
 public:
   RGWMetadataHandlerPut_SObj(RGWMetadataHandler_GenericMetaBE *handler, RGWSI_MetaBackend_Handler::Op *op,
-                             string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker,
+                             std::string& entry, RGWMetadataObject *obj, RGWObjVersionTracker& objv_tracker,
                             optional_yield y,
                              RGWMDLogSyncType type, bool from_remote_zone);
   ~RGWMetadataHandlerPut_SObj();
index b6edef13e72e9adbc99a70d0021e11cb6f5e0820..ecb0979e379abfdd435661a1b1d9de20e5f7142d 100644 (file)
@@ -19,7 +19,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
-
+using namespace std;
 
 bool RGWMultiPart::xml_end(const char *el)
 {
index 7174dfbb80c7f775deabfac0ab1c1bf0bccdd6a3..668b12080194b46e945bf49318027e0991643dac 100644 (file)
@@ -23,7 +23,7 @@ struct RGWUploadPartInfo {
   uint32_t num;
   uint64_t size;
   uint64_t accounted_size{0};
-  string etag;
+  std::string etag;
   ceph::real_time modified;
   RGWObjManifest manifest;
   RGWCompressionInfo cs_info;
@@ -58,7 +58,7 @@ struct RGWUploadPartInfo {
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWUploadPartInfo*>& o);
+  static void generate_test_instances(std::list<RGWUploadPartInfo*>& o);
 };
 WRITE_CLASS_ENCODER(RGWUploadPartInfo)
 
@@ -69,19 +69,19 @@ public:
   ~RGWMultiCompleteUpload() override {}
   bool xml_end(const char *el) override;
 
-  std::map<int, string> parts;
+  std::map<int, std::string> parts;
 };
 
 class RGWMultiPart : public XMLObj
 {
-  string etag;
+  std::string etag;
   int num;
 public:
   RGWMultiPart() : num(0) {}
   ~RGWMultiPart() override {}
   bool xml_end(const char *el) override;
 
-  string& get_etag() { return etag; }
+  std::string& get_etag() { return etag; }
   int get_num() { return num; }
 };
 
@@ -107,6 +107,6 @@ public:
   virtual ~RGWMultiXMLParser() override;
 };
 
-extern bool is_v2_upload_id(const string& upload_id);
+extern bool is_v2_upload_id(const std::string& upload_id);
 
 #endif
index 03485e62213033ea5dc0739c264f67974f0e43fc..443ffd60a8a1b2833ea8f56a0de7fb32db92c29f 100644 (file)
@@ -12,7 +12,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
-
+using namespace std;
 
 bool RGWMultiDelObject::xml_end(const char *el)
 {
index 976caec633ef1aedf427fc17bebfca45fd7217ab..6187aae37e8d33889732c518a1fa899fbb5aa260 100644 (file)
@@ -29,15 +29,15 @@ public:
 
 class RGWMultiDelObject : public XMLObj
 {
-  string key;
-  string version_id;
+  std::string key;
+  std::string version_id;
 public:
   RGWMultiDelObject() {}
   ~RGWMultiDelObject() override {}
   bool xml_end(const char *el) override;
 
-  const string& get_key() { return key; }
-  const string& get_version_id() { return version_id; }
+  const std::string& get_key() { return key; }
+  const std::string& get_version_id() { return version_id; }
 };
 
 class RGWMultiDelKey : public XMLObj
index 46cedee52510da961a34a7f3a81a37c6a37d2112..a8778abd9a08b04c7e40de90e44f90ffab685229 100644 (file)
@@ -12,7 +12,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
-                                  
+using namespace std;
+
 int main(int argc, char **argv) {
   RGWMultiXMLParser parser;
 
index ca5aa7e7505e9e23a6486e6c0fed59d5f400336e..227e1dda759adc12c4356f11307631a8aba73665 100644 (file)
@@ -10,6 +10,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWObjManifest::generator::create_next(uint64_t ofs)
 {
   if (ofs < last_ofs) /* only going forward */
index f2567fddf66a676d57a964448b8a69beddd79c6b..45b9aaea0ef344c6d913a2c86349b837e15efebb 100644 (file)
@@ -114,7 +114,7 @@ struct RGWObjManifestRule {
   uint64_t start_ofs;
   uint64_t part_size; /* each part size, 0 if there's no part size, meaning it's unlimited */
   uint64_t stripe_max_size; /* underlying obj max size */
-  string override_prefix;
+  std::string override_prefix;
 
   RGWObjManifestRule() : start_part_num(0), start_ofs(0), part_size(0), stripe_max_size(0) {}
   RGWObjManifestRule(uint32_t _start_part_num, uint64_t _start_ofs, uint64_t _part_size, uint64_t _stripe_max_size) :
@@ -147,7 +147,7 @@ WRITE_CLASS_ENCODER(RGWObjManifestRule)
 class RGWObjManifest {
 protected:
   bool explicit_objs{false}; /* really old manifest? */
-  map<uint64_t, RGWObjManifestPart> objs;
+  std::map<uint64_t, RGWObjManifestPart> objs;
 
   uint64_t obj_size{0};
 
@@ -156,16 +156,16 @@ protected:
   rgw_placement_rule head_placement_rule;
 
   uint64_t max_head_size{0};
-  string prefix;
+  std::string prefix;
   rgw_bucket_placement tail_placement; /* might be different than the original bucket,
                                        as object might have been copied across pools */
-  map<uint64_t, RGWObjManifestRule> rules;
+  std::map<uint64_t, RGWObjManifestRule> rules;
 
-  string tail_instance; /* tail object's instance */
+  std::string tail_instance; /* tail object's instance */
 
   void convert_to_explicit(const DoutPrefixProvider *dpp, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
   int append_explicit(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup, const RGWZoneParams& zone_params);
-  void append_rules(RGWObjManifest& m, map<uint64_t, RGWObjManifestRule>::iterator& iter, string *override_prefix);
+  void append_rules(RGWObjManifest& m, std::map<uint64_t, RGWObjManifestRule>::iterator& iter, std::string *override_prefix);
 
 public:
 
@@ -187,19 +187,19 @@ public:
     return *this;
   }
 
-  map<uint64_t, RGWObjManifestPart>& get_explicit_objs() {
+  std::map<uint64_t, RGWObjManifestPart>& get_explicit_objs() {
     return objs;
   }
 
 
-  void set_explicit(uint64_t _size, map<uint64_t, RGWObjManifestPart>& _objs) {
+  void set_explicit(uint64_t _size, std::map<uint64_t, RGWObjManifestPart>& _objs) {
     explicit_objs = true;
     objs.swap(_objs);
     set_obj_size(_size);
   }
 
   void get_implicit_location(uint64_t cur_part_id, uint64_t cur_stripe, uint64_t ofs,
-                             string *override_prefix, rgw_obj_select *location) const;
+                             std::string *override_prefix, rgw_obj_select *location) const;
 
   void set_trivial_rule(uint64_t tail_ofs, uint64_t stripe_max_size) {
     RGWObjManifestRule rule(0, tail_ofs, 0, stripe_max_size);
@@ -253,7 +253,7 @@ public:
     } else {
       explicit_objs = true;
       if (!objs.empty()) {
-        map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
+        std::map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
         obj = iter->second.loc;
         head_size = iter->second.size;
         max_head_size = head_size;
@@ -312,7 +312,7 @@ public:
   }
 
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<RGWObjManifest*>& o);
+  static void generate_test_instances(std::list<RGWObjManifest*>& o);
 
   int append(const DoutPrefixProvider *dpp, RGWObjManifest& m, const RGWZoneGroup& zonegroup,
              const RGWZoneParams& zone_params);
@@ -370,19 +370,19 @@ public:
     return head_placement_rule;
   }
 
-  void set_prefix(const string& _p) {
+  void set_prefix(const std::string& _p) {
     prefix = _p;
   }
 
-  const string& get_prefix() const {
+  const std::string& get_prefix() const {
     return prefix;
   }
 
-  void set_tail_instance(const string& _ti) {
+  void set_tail_instance(const std::string& _ti) {
     tail_instance = _ti;
   }
 
-  const string& get_tail_instance() const {
+  const std::string& get_tail_instance() const {
     return tail_instance;
   }
 
@@ -416,13 +416,13 @@ public:
 
     int cur_part_id = 0;
     int cur_stripe = 0;
-    string cur_override_prefix;
+    std::string cur_override_prefix;
 
     rgw_obj_select location;
 
-    map<uint64_t, RGWObjManifestRule>::const_iterator rule_iter;
-    map<uint64_t, RGWObjManifestRule>::const_iterator next_rule_iter;
-    map<uint64_t, RGWObjManifestPart>::const_iterator explicit_iter;
+    std::map<uint64_t, RGWObjManifestRule>::const_iterator rule_iter;
+    std::map<uint64_t, RGWObjManifestRule>::const_iterator next_rule_iter;
+    std::map<uint64_t, RGWObjManifestPart>::const_iterator explicit_iter;
 
     void update_explicit_pos();
 
@@ -507,9 +507,9 @@ public:
     int cur_part_id;
     int cur_stripe;
     uint64_t cur_stripe_size;
-    string cur_oid;
+    std::string cur_oid;
     
-    string oid_prefix;
+    std::string oid_prefix;
 
     rgw_obj_select cur_obj;
 
index 0b9b60f888add11c9bb9ac30f40d62a4ba7b3ced..370001bff993999c816a2081a8feb9d53f5c8a8d 100644 (file)
@@ -43,6 +43,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string objexp_lock_name = "gc_process";
 
 static string objexp_hint_get_shardname(int shard_num)
index db73f5e5fb0da5f8cec4460fb7363d1d8f5c0d79..68b65653ba47b0dbaa4042f935af4a43732f3e10 100644 (file)
@@ -32,6 +32,8 @@
 #include "rgw_sal.h"
 #include "rgw_sal_rados.h"
 
+using namespace std;
+
 class RGWSI_RADOS;
 class RGWSI_Zone;
 class RGWBucketInfo;
index 5c0119befaa10c2b17acc6abfb75bfea5f78bdce..0c57793fec952fc3b07ef7bfef8f0182445d27fe 100644 (file)
@@ -3,6 +3,8 @@
 //
 #include "rgw_object_lock.h"
 
+using namespace std;
+
 void DefaultRetention::decode_xml(XMLObj *obj) {
   RGWXMLDecoder::decode_xml("Mode", mode, obj, true);
   if (mode.compare("GOVERNANCE") != 0 && mode.compare("COMPLIANCE") != 0) {
index cabb1c766d0f51db6d6516b7d45e46b9cda7d00c..997c660e4cd11a3e0c29676a5fbe586a2fce0b27 100644 (file)
@@ -12,7 +12,7 @@
 class DefaultRetention
 {
 protected:
-  string mode;
+  std::string mode;
   int days;
   int years;
 
@@ -27,7 +27,7 @@ public:
     return years;
   }
 
-  string get_mode() const {
+  std::string get_mode() const {
     return mode;
   }
 
@@ -65,7 +65,7 @@ public:
     return defaultRetention.get_years();
   }
 
-  string get_mode() const {
+  std::string get_mode() const {
     return defaultRetention.get_mode();
   }
 
@@ -104,7 +104,7 @@ public:
     return rule.get_years();
   }
 
-  string get_mode() const {
+  std::string get_mode() const {
     return rule.get_mode();
   }
 
@@ -148,17 +148,17 @@ WRITE_CLASS_ENCODER(RGWObjectLock)
 class RGWObjectRetention
 {
 protected:
-  string mode;
+  std::string mode;
   ceph::real_time retain_until_date;
 public:
   RGWObjectRetention() {}
-  RGWObjectRetention(string _mode, ceph::real_time _date): mode(_mode), retain_until_date(_date) {}
+  RGWObjectRetention(std::string _mode, ceph::real_time _date): mode(_mode), retain_until_date(_date) {}
 
-  void set_mode(string _mode) {
+  void set_mode(std::string _mode) {
     mode = _mode;
   }
 
-  string get_mode() const {
+  std::string get_mode() const {
     return mode;
   }
 
@@ -192,15 +192,15 @@ WRITE_CLASS_ENCODER(RGWObjectRetention)
 class RGWObjectLegalHold
 {
 protected:
-  string status;
+  std::string status;
 public:
   RGWObjectLegalHold() {}
-  RGWObjectLegalHold(string _status): status(_status) {}
-  void set_status(string _status) {
+  RGWObjectLegalHold(std::string _status): status(_status) {}
+  void set_status(std::string _status) {
     status = _status;
   }
 
-  string get_status() const {
+  std::string get_status() const {
     return status;
   }
 
index 3e86a12173a9d3b9b700a2c849e1cbf793ff6540..da6d73e23f7b63f039e94410ae9c7f9dd1cb19e5 100644 (file)
@@ -24,6 +24,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace rgw { namespace sal {
 
 const string RGWOIDCProvider::oidc_url_oid_prefix = "oidc_url.";
index a25920add7b7801383a579f72d7f4a9aded3568b..c3b794df0d62a2e444bb329a0f377d67b8b5d548 100644 (file)
@@ -30,8 +30,8 @@ protected:
   std::string arn;
   std::string creation_date;
   std::string tenant;
-  vector<std::string> client_ids;
-  vector<std::string> thumbprints;
+  std::vector<std::string> client_ids;
+  std::vector<std::string> thumbprints;
 
   int get_tenant_url_from_arn(std::string& tenant, std::string& url);
   virtual int store_url(const DoutPrefixProvider *dpp, const std::string& url, bool exclusive, optional_yield y) = 0;
@@ -57,8 +57,8 @@ public:
 
   RGWOIDCProvider(std::string provider_url,
                     std::string tenant,
-                    vector<std::string> client_ids,
-                    vector<std::string> thumbprints)
+                    std::vector<std::string> client_ids,
+                    std::vector<std::string> thumbprints)
   : provider_url(std::move(provider_url)),
     tenant(std::move(tenant)),
     client_ids(std::move(client_ids)),
@@ -105,8 +105,8 @@ public:
   const std::string& get_provider_url() const { return provider_url; }
   const std::string& get_arn() const { return arn; }
   const std::string& get_create_date() const { return creation_date; }
-  const vector<std::string>& get_client_ids() const { return client_ids;}
-  const vector<std::string>& get_thumbprints() const { return thumbprints; }
+  const std::vector<std::string>& get_client_ids() const { return client_ids;}
+  const std::vector<std::string>& get_thumbprints() const { return thumbprints; }
 
   int create(const DoutPrefixProvider *dpp, bool exclusive, optional_yield y);
   virtual int delete_obj(const DoutPrefixProvider *dpp, optional_yield y) = 0;
index 0dd50daed30df15f63347d78f30a10bf2c8dfd4d..4cb9bed0197c19ff25801871787f78bc3cc8283c 100644 (file)
@@ -77,6 +77,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace librados;
 using ceph::crypto::MD5;
 using boost::optional;
index ceae60a0f932f35d61a28ca1fa43151a9ff393a7..20bddbed1dc55ac7e38daa7414e431ce1f08f6b4 100644 (file)
@@ -79,7 +79,7 @@ int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
                                        CephContext *cct,
                                       rgw::sal::Store* store,
                                        RGWBucketInfo& bucket_info,
-                                       map<string, bufferlist>& bucket_attrs,
+                                       std::map<std::string, bufferlist>& bucket_attrs,
                                        RGWAccessControlPolicy *policy,
                                       optional_yield y);
 
@@ -112,7 +112,7 @@ public:
   virtual int authorize(const DoutPrefixProvider* dpp, optional_yield y) = 0;
   virtual int postauth_init(optional_yield y) = 0;
   virtual int error_handler(int err_no, std::string* error_content, optional_yield y);
-  virtual void dump(const string& code, const string& message) const {}
+  virtual void dump(const std::string& code, const std::string& message) const {}
 
   virtual bool supports_quota() {
     return true;
@@ -236,7 +236,7 @@ public:
     this->dialect_handler = dialect_handler;
   }
   int read_bucket_cors();
-  bool generate_cors_headers(string& origin, string& method, string& headers, string& exp_headers, unsigned *max_age);
+  bool generate_cors_headers(std::string& origin, std::string& method, std::string& headers, std::string& exp_headers, unsigned *max_age);
 
   virtual int verify_params() { return 0; }
   virtual bool prefetch_data() { return false; }
@@ -267,7 +267,7 @@ public:
 
   virtual uint32_t op_mask() { return 0; }
 
-  virtual int error_handler(int err_no, string *error_content, optional_yield y);
+  virtual int error_handler(int err_no, std::string *error_content, optional_yield y);
 
   // implements DoutPrefixProvider
   std::ostream& gen_prefix(std::ostream& out) const override;
@@ -351,9 +351,9 @@ protected:
   bool skip_decrypt{false};
   utime_t gc_invalidate_time;
   bool is_slo;
-  string lo_etag;
+  std::string lo_etag;
   bool rgwx_stat; /* extended rgw stat operation */
-  string version_id;
+  std::string version_id;
 
   // compression attrs
   RGWCompressionInfo cs_info;
@@ -620,7 +620,7 @@ public:
     }
 
     bool verify_permission(RGWBucketInfo& binfo,
-                           map<string, bufferlist>& battrs,
+                           std::map<std::string, bufferlist>& battrs,
                            ACLOwner& bucket_owner /* out */,
                           optional_yield y);
     bool delete_single(const acct_path_t& path, optional_yield y);
@@ -652,7 +652,7 @@ public:
   dmc::client_id dmclock_client() override { return dmc::client_id::data; }
 };
 
-inline ostream& operator<<(ostream& out, const RGWBulkDelete::acct_path_t &o) {
+inline std::ostream& operator<<(std::ostream& out, const RGWBulkDelete::acct_path_t &o) {
   return out << o.bucket_name << "/" << o.obj_key;
 }
 
@@ -847,14 +847,14 @@ public:
 class RGWGetUsage : public RGWOp {
 protected:
   bool sent_data;
-  string start_date;
-  string end_date;
+  std::string start_date;
+  std::string end_date;
   int show_log_entries;
   int show_log_sum;
-  map<string, bool> categories;
-  map<rgw_user_bucket, rgw_usage_log_entry> usage;
-  map<string, rgw_usage_log_entry> summary_map;
-  map<string, cls_user_bucket_entry> buckets_usage;
+  std::map<std::string, bool> categories;
+  std::map<rgw_user_bucket, rgw_usage_log_entry> usage;
+  std::map<std::string, rgw_usage_log_entry> summary_map;
+  std::map<std::string, cls_user_bucket_entry> buckets_usage;
   cls_user_header header;
   RGWStorageStats stats;
 public:
@@ -892,17 +892,17 @@ public:
 
 class RGWListBucket : public RGWOp {
 protected:
-  string prefix;
+  std::string prefix;
   rgw_obj_key marker; 
   rgw_obj_key next_marker; 
   rgw_obj_key end_marker;
-  string max_keys;
-  string delimiter;
-  string encoding_type;
+  std::string max_keys;
+  std::string delimiter;
+  std::string encoding_type;
   bool list_versions;
   int max;
-  vector<rgw_bucket_dir_entry> objs;
-  map<string, bool> common_prefixes;
+  std::vector<rgw_bucket_dir_entry> objs;
+  std::map<std::string, bool> common_prefixes;
 
   int default_max;
   bool is_truncated;
@@ -1067,7 +1067,7 @@ public:
 class RGWCreateBucket : public RGWOp {
 protected:
   RGWAccessControlPolicy policy;
-  string location_constraint;
+  std::string location_constraint;
   rgw_placement_rule placement_rule;
   RGWBucketInfo info;
   obj_version ep_objv;
@@ -1076,8 +1076,8 @@ protected:
   bool obj_lock_enabled;
   RGWCORSConfiguration cors_config;
   boost::optional<std::string> swift_ver_location;
-  map<string, buffer::list> attrs;
-  set<string> rmattr_names;
+  std::map<std::string, buffer::list> attrs;
+  std::set<std::string> rmattr_names;
 
   bufferlist in_data;
 
@@ -1124,8 +1124,8 @@ public:
 };
 
 struct rgw_slo_entry {
-  string path;
-  string etag;
+  std::string path;
+  std::string etag;
   uint64_t size_bytes;
 
   rgw_slo_entry() : size_bytes(0) {}
@@ -1151,7 +1151,7 @@ struct rgw_slo_entry {
 WRITE_CLASS_ENCODER(rgw_slo_entry)
 
 struct RGWSLOInfo {
-  vector<rgw_slo_entry> entries;
+  std::vector<rgw_slo_entry> entries;
   uint64_t total_size;
 
   /* in memory only */
@@ -1187,13 +1187,13 @@ protected:
   std::string copy_source;
   const char *copy_source_range;
   RGWBucketInfo copy_source_bucket_info;
-  string copy_source_tenant_name;
-  string copy_source_bucket_name;
-  string copy_source_object_name;
-  string copy_source_version_id;
+  std::string copy_source_tenant_name;
+  std::string copy_source_bucket_name;
+  std::string copy_source_object_name;
+  std::string copy_source_version_id;
   off_t copy_source_range_fst;
   off_t copy_source_range_lst;
-  string etag;
+  std::string etag;
   bool chunked_upload;
   RGWAccessControlPolicy policy;
   std::unique_ptr <RGWObjTags> obj_tags;
@@ -1202,10 +1202,10 @@ protected:
   rgw::sal::Attrs attrs;
   ceph::real_time mtime;
   uint64_t olh_epoch;
-  string version_id;
+  std::string version_id;
   bufferlist bl_aux;
-  map<string, string> crypt_http_responses;
-  string user_data;
+  std::map<std::string, std::string> crypt_http_responses;
+  std::string user_data;
 
   std::string multipart_upload_id;
   std::string multipart_part_str;
@@ -1264,7 +1264,7 @@ public:
   /* this is for cases when copying data from other object */
   virtual int get_decrypt_filter(std::unique_ptr<RGWGetObj_Filter>* filter,
                                  RGWGetObj_Filter* cb,
-                                 map<string, bufferlist>& attrs,
+                                 std::map<std::string, bufferlist>& attrs,
                                  bufferlist* manifest_bl) {
     *filter = nullptr;
     return 0;
@@ -1294,9 +1294,9 @@ protected:
   off_t ofs;
   const char *supplied_md5_b64;
   const char *supplied_etag;
-  string etag;
+  std::string etag;
   RGWAccessControlPolicy policy;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
   boost::optional<ceph::real_time> delete_at;
 
   /* Must be called after get_data() or the result is undefined. */
@@ -1368,9 +1368,9 @@ public:
 
   virtual int get_params(optional_yield y) = 0;
   void send_response() override = 0;
-  virtual void filter_out_temp_url(map<string, bufferlist>& add_attrs,
-                                   const set<string>& rmattr_names,
-                                   map<int, string>& temp_url_keys);
+  virtual void filter_out_temp_url(std::map<std::string, bufferlist>& add_attrs,
+                                   const std::set<std::string>& rmattr_names,
+                                   std::map<int, std::string>& temp_url_keys);
   const char* name() const override { return "put_account_metadata"; }
   RGWOpType get_type() override { return RGW_OP_PUT_METADATA_ACCOUNT; }
   uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
@@ -1379,7 +1379,7 @@ public:
 class RGWPutMetadataBucket : public RGWOp {
 protected:
   rgw::sal::Attrs attrs;
-  set<string> rmattr_names;
+  std::set<std::string> rmattr_names;
   bool has_policy, has_cors;
   uint32_t policy_rw_mask;
   RGWAccessControlPolicy policy;
@@ -1443,7 +1443,7 @@ class RGWDeleteObj : public RGWOp {
 protected:
   bool delete_marker;
   bool multipart_delete;
-  string version_id;
+  std::string version_id;
   ceph::real_time unmod_since; /* if unmodified since */
   bool no_precondition_error;
   std::unique_ptr<RGWBulkDelete::Deleter> deleter;
@@ -1494,21 +1494,21 @@ protected:
   ceph::real_time *mod_ptr;
   ceph::real_time *unmod_ptr;
   rgw::sal::Attrs attrs;
-  string src_tenant_name, src_bucket_name, src_obj_name;
+  std::string src_tenant_name, src_bucket_name, src_obj_name;
   std::unique_ptr<rgw::sal::Bucket> src_bucket;
   std::unique_ptr<rgw::sal::Object> src_object;
-  string dest_tenant_name, dest_bucket_name, dest_obj_name;
+  std::string dest_tenant_name, dest_bucket_name, dest_obj_name;
   std::unique_ptr<rgw::sal::Bucket> dest_bucket;
   std::unique_ptr<rgw::sal::Object> dest_object;
   ceph::real_time src_mtime;
   ceph::real_time mtime;
   rgw::sal::AttrsMod attrs_mod;
-  string source_zone;
-  string etag;
+  std::string source_zone;
+  std::string etag;
 
   off_t last_ofs;
 
-  string version_id;
+  std::string version_id;
   uint64_t olh_epoch;
 
   boost::optional<ceph::real_time> delete_at;
@@ -1547,7 +1547,7 @@ public:
   }
 
   static bool parse_copy_location(const std::string_view& src,
-                                  string& bucket_name,
+                                  std::string& bucket_name,
                                   rgw_obj_key& object,
                                   struct req_state *s);
 
@@ -1580,7 +1580,7 @@ public:
 
 class RGWGetACLs : public RGWOp {
 protected:
-  string acls;
+  std::string acls;
 
 public:
   RGWGetACLs() {}
@@ -1608,7 +1608,7 @@ public:
   void pre_exec() override;
   void execute(optional_yield y) override;
 
-  virtual int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, stringstream& ss) { return 0; }
+  virtual int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, std::stringstream& ss) { return 0; }
   virtual int get_params(optional_yield y) = 0;
   void send_response() override = 0;
   const char* name() const override { return "put_acls"; }
@@ -1637,7 +1637,7 @@ class RGWPutLC : public RGWOp {
 protected:
   bufferlist data;
   const char *content_md5;
-  string cookie;
+  std::string cookie;
 
 public:
   RGWPutLC() {
@@ -1658,7 +1658,7 @@ public:
   void pre_exec() override;
   void execute(optional_yield y) override;
 
-//  virtual int get_policy_from_state(RGWRados* store, struct req_state *s, stringstream& ss) { return 0; }
+//  virtual int get_policy_from_state(RGWRados* store, struct req_state *s, std::stringstream& ss) { return 0; }
   virtual int get_params(optional_yield y) = 0;
   void send_response() override = 0;
   const char* name() const override { return "put_lifecycle"; }
@@ -1741,7 +1741,7 @@ public:
   int verify_permission(optional_yield y) override {return 0;}
   int validate_cors_request(RGWCORSConfiguration *cc);
   void execute(optional_yield y) override;
-  void get_response_params(string& allowed_hdrs, string& exp_hdrs, unsigned *max_age);
+  void get_response_params(std::string& allowed_hdrs, std::string& exp_hdrs, unsigned *max_age);
   void send_response() override = 0;
   const char* name() const override { return "options_cors"; }
   RGWOpType get_type() override { return RGW_OP_OPTIONS_CORS; }
@@ -1830,7 +1830,7 @@ public:
 
 class RGWInitMultipart : public RGWOp {
 protected:
-  string upload_id;
+  std::string upload_id;
   RGWAccessControlPolicy policy;
   ceph::real_time mtime;
 
@@ -1850,14 +1850,14 @@ public:
   const char* name() const override { return "init_multipart"; }
   RGWOpType get_type() override { return RGW_OP_INIT_MULTIPART; }
   uint32_t op_mask() override { return RGW_OP_TYPE_WRITE; }
-  virtual int prepare_encryption(map<string, bufferlist>& attrs) { return 0; }
+  virtual int prepare_encryption(std::map<std::string, bufferlist>& attrs) { return 0; }
 };
 
 class RGWCompleteMultipart : public RGWOp {
 protected:
-  string upload_id;
-  string etag;
-  string version_id;
+  std::string upload_id;
+  std::string etag;
+  std::string version_id;
   bufferlist data;
   rgw::sal::MPSerializer* serializer;
 
@@ -1894,7 +1894,7 @@ public:
 
 class RGWListMultipart : public RGWOp {
 protected:
-  string upload_id;
+  std::string upload_id;
   std::unique_ptr<rgw::sal::MultipartUpload> upload;
   int max_parts;
   int marker;
@@ -1925,16 +1925,16 @@ public:
 
 class RGWListBucketMultiparts : public RGWOp {
 protected:
-  string prefix;
-  string marker_meta;
-  string marker_key;
-  string marker_upload_id;
-  string next_marker_key;
-  string next_marker_upload_id;
+  std::string prefix;
+  std::string marker_meta;
+  std::string marker_key;
+  std::string marker_upload_id;
+  std::string next_marker_key;
+  std::string next_marker_upload_id;
   int max_uploads;
-  string delimiter;
-  vector<std::unique_ptr<rgw::sal::MultipartUpload>> uploads;
-  map<string, bool> common_prefixes;
+  std::string delimiter;
+  std::vector<std::unique_ptr<rgw::sal::MultipartUpload>> uploads;
+  std::map<std::string, bool> common_prefixes;
   bool is_truncated;
   int default_max;
   bool encode_url {false};
@@ -2037,7 +2037,7 @@ public:
   virtual void send_status() = 0;
   virtual void begin_response() = 0;
   virtual void send_partial_response(rgw_obj_key& key, bool delete_marker,
-                                     const string& marker_version_id, int ret) = 0;
+                                     const std::string& marker_version_id, int ret) = 0;
   virtual void end_response() = 0;
   const char* name() const override { return "multi_object_delete"; }
   RGWOpType get_type() override { return RGW_OP_DELETE_MULTI_OBJ; }
@@ -2061,22 +2061,22 @@ extern int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::St
                                     struct req_state *s, bool prefetch_data, optional_yield y);
 extern void rgw_build_iam_environment(rgw::sal::Store* store,
                                      struct req_state* s);
-extern vector<rgw::IAM::Policy> get_iam_user_policy_from_attr(CephContext* cct,
-                        map<string, bufferlist>& attrs,
-                        const string& tenant);
+extern std::vector<rgw::IAM::Policy> get_iam_user_policy_from_attr(CephContext* cct,
+                        std::map<std::string, bufferlist>& attrs,
+                        const std::string& tenant);
 
 inline int get_system_versioning_params(req_state *s,
                                        uint64_t *olh_epoch,
-                                       string *version_id)
+                                       std::string *version_id)
 {
   if (!s->system_request) {
     return 0;
   }
 
   if (olh_epoch) {
-    string epoch_str = s->info.args.get(RGW_SYS_PARAM_PREFIX "versioned-epoch");
+    std::string epoch_str = s->info.args.get(RGW_SYS_PARAM_PREFIX "versioned-epoch");
     if (!epoch_str.empty()) {
-      string err;
+      std::string err;
       *olh_epoch = strict_strtol(epoch_str.c_str(), 10, &err);
       if (!err.empty()) {
         ldpp_subdout(s, rgw, 0) << "failed to parse versioned-epoch param"
@@ -2188,7 +2188,7 @@ inline int rgw_get_request_metadata(const DoutPrefixProvider *dpp,
 } /* rgw_get_request_metadata */
 
 inline void encode_delete_at_attr(boost::optional<ceph::real_time> delete_at,
-                                 map<string, bufferlist>& attrs)
+                                 std::map<std::string, bufferlist>& attrs)
 {
   if (delete_at == boost::none) {
     return;
@@ -2199,7 +2199,7 @@ inline void encode_delete_at_attr(boost::optional<ceph::real_time> delete_at,
   attrs[RGW_ATTR_DELETE_AT] = delatbl;
 } /* encode_delete_at_attr */
 
-inline void encode_obj_tags_attr(RGWObjTags* obj_tags, map<string, bufferlist>& attrs)
+inline void encode_obj_tags_attr(RGWObjTags* obj_tags, std::map<std::string, bufferlist>& attrs)
 {
   if (obj_tags == nullptr){
     // we assume the user submitted a tag format which we couldn't parse since
@@ -2214,11 +2214,11 @@ inline void encode_obj_tags_attr(RGWObjTags* obj_tags, map<string, bufferlist>&
 }
 
 inline int encode_dlo_manifest_attr(const char * const dlo_manifest,
-                                   map<string, bufferlist>& attrs)
+                                   std::map<std::string, bufferlist>& attrs)
 {
-  string dm = dlo_manifest;
+  std::string dm = dlo_manifest;
 
-  if (dm.find('/') == string::npos) {
+  if (dm.find('/') == std::string::npos) {
     return -EINVAL;
   }
 
@@ -2229,7 +2229,7 @@ inline int encode_dlo_manifest_attr(const char * const dlo_manifest,
   return 0;
 } /* encode_dlo_manifest_attr */
 
-inline void complete_etag(MD5& hash, string *etag)
+inline void complete_etag(MD5& hash, std::string *etag)
 {
   char etag_buf[CEPH_CRYPTO_MD5_DIGESTSIZE];
   char etag_buf_str[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 16];
@@ -2272,7 +2272,7 @@ public:
 
 class RGWSetAttrs : public RGWOp {
 protected:
-  map<std::string, buffer::list> attrs;
+  std::map<std::string, buffer::list> attrs;
 
 public:
   RGWSetAttrs() {}
@@ -2594,7 +2594,7 @@ public:
 };
 
 inline int parse_value_and_bound(
-    const string &input,
+    const std::string &input,
     int &output,
     const long lower_bound,
     const long upper_bound,
index 14f67676104f46a167b94b655c5063ff5834f4aa..68f874a5d724e50f6c93aa817578d71f3fb13024 100644 (file)
@@ -7,6 +7,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int rgw_opa_authorize(RGWOp *& op,
                       req_state * const s)
 {
index 921b226738948bb975b069da52e4131fd2351759..711164dc8e2119080e9d536b2cab22a1d317a053 100644 (file)
@@ -22,6 +22,8 @@
 
 #define DEFAULT_NUM_SHARDS 64
 
+using namespace std;
+
 static string obj_fingerprint(const string& oid, const char *force_ns = NULL)
 {
   ssize_t pos = oid.find('_');
index 8dd03a47c1da741efd6ead8497ecdd3229daf0b8..e51dfe6d3f64fe3fe924205b9b80ebc5b07dfc56 100644 (file)
@@ -40,11 +40,11 @@ enum RGWOrphanSearchStageId {
 struct RGWOrphanSearchStage {
   RGWOrphanSearchStageId stage;
   int shard;
-  string marker;
+  std::string marker;
 
   RGWOrphanSearchStage() : stage(ORPHAN_SEARCH_STAGE_UNKNOWN), shard(0) {}
   explicit RGWOrphanSearchStage(RGWOrphanSearchStageId _stage) : stage(_stage), shard(0) {}
-  RGWOrphanSearchStage(RGWOrphanSearchStageId _stage, int _shard, const string& _marker) : stage(_stage), shard(_shard), marker(_marker) {}
+  RGWOrphanSearchStage(RGWOrphanSearchStageId _stage, int _shard, const std::string& _marker) : stage(_stage), shard(_shard), marker(_marker) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -69,7 +69,7 @@ struct RGWOrphanSearchStage {
 WRITE_CLASS_ENCODER(RGWOrphanSearchStage)
   
 struct RGWOrphanSearchInfo {
-  string job_name;
+  std::string job_name;
   rgw_pool pool;
   uint16_t num_shards;
   utime_t start_time;
@@ -86,7 +86,7 @@ struct RGWOrphanSearchInfo {
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(2, bl);
     decode(job_name, bl);
-    string s;
+    std::string s;
     decode(s, bl);
     pool.from_str(s);
     decode(num_shards, bl);
@@ -126,7 +126,7 @@ class RGWOrphanStore {
   rgw::sal::Store* store;
   librados::IoCtx ioctx;
 
-  string oid;
+  std::string oid;
 
 public:
   explicit RGWOrphanStore(rgw::sal::Store* _store) : store(_store), oid(RGW_ORPHAN_INDEX_OID) {}
@@ -135,14 +135,14 @@ public:
 
   int init(const DoutPrefixProvider *dpp);
 
-  int read_job(const string& job_name, RGWOrphanSearchState& state);
-  int write_job(const string& job_name, const RGWOrphanSearchState& state);
-  int remove_job(const string& job_name);
-  int list_jobs(map<string,RGWOrphanSearchState> &job_list);
+  int read_job(const std::string& job_name, RGWOrphanSearchState& state);
+  int write_job(const std::string& job_name, const RGWOrphanSearchState& state);
+  int remove_job(const std::string& job_name);
+  int list_jobs(std::map<std::string,RGWOrphanSearchState> &job_list);
 
 
-  int store_entries(const DoutPrefixProvider *dpp, const string& oid, const map<string, bufferlist>& entries);
-  int read_entries(const string& oid, const string& marker, map<string, bufferlist> *entries, bool *truncated);
+  int store_entries(const DoutPrefixProvider *dpp, const std::string& oid, const std::map<std::string, bufferlist>& entries);
+  int read_entries(const std::string& oid, const std::string& marker, std::map<std::string, bufferlist> *entries, bool *truncated);
 };
 
 
@@ -154,11 +154,11 @@ class RGWOrphanSearch {
   RGWOrphanSearchInfo search_info;
   RGWOrphanSearchStage search_stage;
 
-  map<int, string> all_objs_index;
-  map<int, string> buckets_instance_index;
-  map<int, string> linked_objs_index;
+  std::map<int, std::string> all_objs_index;
+  std::map<int, std::string> buckets_instance_index;
+  std::map<int, std::string> linked_objs_index;
 
-  string index_objs_prefix;
+  std::string index_objs_prefix;
 
   uint16_t max_concurrent_ios;
   uint64_t stale_secs;
@@ -167,22 +167,22 @@ class RGWOrphanSearch {
   bool detailed_mode;
 
   struct log_iter_info {
-    string oid;
-    list<string>::iterator cur;
-    list<string>::iterator end;
+    std::string oid;
+    std::list<std::string>::iterator cur;
+    std::list<std::string>::iterator end;
   };
 
-  int log_oids(const DoutPrefixProvider *dpp, map<int, string>& log_shards, map<int, list<string> >& oids);
+  int log_oids(const DoutPrefixProvider *dpp, std::map<int, std::string>& log_shards, std::map<int, std::list<std::string> >& oids);
 
 #define RGW_ORPHANSEARCH_HASH_PRIME 7877
-  int orphan_shard(const string& str) {
+  int orphan_shard(const std::string& str) {
     return ceph_str_hash_linux(str.c_str(), str.size()) % RGW_ORPHANSEARCH_HASH_PRIME % search_info.num_shards;
   }
 
-  int handle_stat_result(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, rgw::sal::Object::StatOp::Result& result);
-  int pop_and_handle_stat_op(const DoutPrefixProvider *dpp, map<int, list<string> >& oids, std::deque<std::unique_ptr<rgw::sal::Object::StatOp>>& ops);
+  int handle_stat_result(const DoutPrefixProvider *dpp, std::map<int, std::list<std::string> >& oids, rgw::sal::Object::StatOp::Result& result);
+  int pop_and_handle_stat_op(const DoutPrefixProvider *dpp, std::map<int, std::list<std::string> >& oids, std::deque<std::unique_ptr<rgw::sal::Object::StatOp>>& ops);
 
-  int remove_index(map<int, string>& index);
+  int remove_index(std::map<int, std::string>& index);
 public:
   RGWOrphanSearch(rgw::sal::Store* _store, int _max_ios, uint64_t _stale_secs) : store(_store), orphan_store(store), max_concurrent_ios(_max_ios), stale_secs(_stale_secs) {}
 
@@ -193,13 +193,13 @@ public:
     return orphan_store.write_job(search_info.job_name, state);
   }
 
-  int init(const DoutPrefixProvider *dpp, const string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode=false);
+  int init(const DoutPrefixProvider *dpp, const std::string& job_name, RGWOrphanSearchInfo *info, bool _detailed_mode=false);
 
-  int create(const string& job_name, int num_shards);
+  int create(const std::string& job_name, int num_shards);
 
   int build_all_oids_index(const DoutPrefixProvider *dpp);
   int build_buckets_instance_index(const DoutPrefixProvider *dpp);
-  int build_linked_oids_for_bucket(const DoutPrefixProvider *dpp, const string& bucket_instance_id, map<int, list<string> >& oids);
+  int build_linked_oids_for_bucket(const DoutPrefixProvider *dpp, const std::string& bucket_instance_id, std::map<int, std::list<std::string> >& oids);
   int build_linked_oids_index(const DoutPrefixProvider *dpp);
   int compare_oid_indexes(const DoutPrefixProvider *dpp);
 
@@ -263,7 +263,7 @@ class RGWRadosList {
                          rgw::sal::Object::StatOp::Result& result,
                         std::string& bucket_name,
                         rgw_obj_key& obj_key,
-                        std::set<string>& obj_oids);
+                        std::set<std::string>& obj_oids);
   int pop_and_handle_stat_op(const DoutPrefixProvider *dpp, 
                              RGWObjectCtx& obj_ctx,
                             std::deque<std::unique_ptr<rgw::sal::Object::StatOp>>& ops);
index a697365f2a552c6d57f23d5d2463226d39eef06a..e017cc8871d91db54f97d7350261f6f99faf0a8b 100644 (file)
@@ -11,6 +11,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGWPolicyCondition {
 protected:
   string v1;
index b88d539370d731d15f12d695e7f15d2e192bf0cb..14ad6c4e3af19018a5bf4f4be8b25ed78336272b 100644 (file)
@@ -19,10 +19,10 @@ class RGWPolicyEnv {
   std::map<std::string, std::string, ltstr_nocase> vars;
 
 public:
-  void add_var(const string& name, const string& value);
-  bool get_var(const string& name, string& val);
-  bool get_value(const string& s, string& val, std::map<std::string, bool, ltstr_nocase>& checked_vars);
-  bool match_policy_vars(map<string, bool, ltstr_nocase>& policy_vars, string& err_msg);
+  void add_var(const std::string& name, const std::string& value);
+  bool get_var(const std::string& name, std::string& val);
+  bool get_value(const std::string& s, std::string& val, std::map<std::string, bool, ltstr_nocase>& checked_vars);
+  bool match_policy_vars(std::map<std::string, bool, ltstr_nocase>& policy_vars, std::string& err_msg);
 };
 
 class RGWPolicyCondition;
@@ -30,9 +30,9 @@ class RGWPolicyCondition;
 
 class RGWPolicy {
   uint64_t expires;
-  string expiration_str;
+  std::string expiration_str;
   std::list<RGWPolicyCondition *> conditions;
-  std::list<pair<std::string, std::string> > var_checks;
+  std::list<std::pair<std::string, std::string> > var_checks;
   std::map<std::string, bool, ltstr_nocase> checked_vars;
 
 public:
@@ -42,18 +42,18 @@ public:
   RGWPolicy() : expires(0), min_length(0), max_length(LLONG_MAX) {}
   ~RGWPolicy();
 
-  int set_expires(const string& e);
+  int set_expires(const std::string& e);
 
   void set_var_checked(const std::string& var) {
     checked_vars[var] = true;
   }
 
-  int add_condition(const std::string& op, const std::string& first, const std::string& second, string& err_msg);
+  int add_condition(const std::string& op, const std::string& first, const std::string& second, std::string& err_msg);
   void add_simple_check(const std::string& var, const std::string& value) {
-    var_checks.push_back(pair<string, string>(var, value));
+    var_checks.emplace_back(var, value);
   }
 
-  int check(RGWPolicyEnv *env, string& err_msg);
-  int from_json(bufferlist& bl, string& err_msg);
+  int check(RGWPolicyEnv *env, std::string& err_msg);
+  int from_json(bufferlist& bl, std::string& err_msg);
 };
 #endif
index f7fc8dbbe65c8ab4295d13e345606302ab1b9a1c..b5e886b6915b052972fb09939a0a8dae49933426 100644 (file)
@@ -22,6 +22,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using rgw::dmclock::Scheduler;
 
 void RGWProcess::RGWWQ::_dump_queue()
index e3d2330fb80b9dca8ead6a7146fe500bca719bba..f8a97d16c29d4498b5dfde11ce1efe8d62bc34b2 100644 (file)
@@ -44,7 +44,7 @@ class RGWFrontendConfig;
 class RGWRequest;
 
 class RGWProcess {
-  deque<RGWRequest*> m_req_queue;
+  std::deque<RGWRequest*> m_req_queue;
 protected:
   CephContext *cct;
   rgw::sal::Store* store;
@@ -157,7 +157,7 @@ public:
   void run() override;
   void checkpoint();
   void handle_request(const DoutPrefixProvider *dpp, RGWRequest* req) override;
-  void gen_request(const string& method, const string& resource,
+  void gen_request(const std::string& method, const std::string& resource,
                  int content_length, std::atomic<bool>* fail_flag);
 
   void set_access_key(RGWAccessKey& key) { access_key = key; }
index 2e1315a26d42d819868cc30f234f059f5e427582..6298bb306d87feae18821ab806572844406d2711 100644 (file)
@@ -20,7 +20,7 @@ void PublicAccessBlockConfiguration::dump_xml(Formatter *f) const {
 }
 
 
-ostream& operator<< (ostream& os, const PublicAccessBlockConfiguration& access_conf)
+std::ostream& operator<< (std::ostream& os, const PublicAccessBlockConfiguration& access_conf)
 {
     os << std::boolalpha
        << "BlockPublicAcls: " << access_conf.block_public_acls() << std::endl
index c7d68c8c30cd4c97cca29b79baa3a9536d352594..87d2a16a32b7f723bf1d221eff050fdec021daa2 100644 (file)
@@ -64,4 +64,4 @@ class PublicAccessBlockConfiguration {
   void dump_xml(Formatter *f) const;
 };
 WRITE_CLASS_ENCODER(PublicAccessBlockConfiguration)
-ostream& operator<< (ostream& os, const PublicAccessBlockConfiguration& access_conf);
+std::ostream& operator<< (std::ostream& os, const PublicAccessBlockConfiguration& access_conf);
index 8cc89e9efe812db16dab3869cc15ae3b12e4ba60..1d9778aa51d17c56a7902810dfe9e83ffff2134d 100644 (file)
@@ -15,6 +15,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 void set_event_id(std::string& id, const std::string& hash, const utime_t& ts) {
   char buf[64];
   const auto len = snprintf(buf, sizeof(buf), "%010ld.%06ld.%s", (long)ts.sec(), (long)ts.usec(), hash.c_str());
index ba86bbe845ee2a3b27ad7a7ce64fe5ff9cce4b75..56c6f2ed4691a22d73fae79fcb7bf029863289e9 100644 (file)
@@ -472,7 +472,7 @@ struct rgw_pubsub_topic {
     DECODE_FINISH(bl);
   }
 
-  string to_str() const {
+  std::string to_str() const {
     return user.tenant + "/" + name;
   }
 
@@ -517,7 +517,7 @@ struct rgw_pubsub_topic_filter {
   void encode(bufferlist& bl) const {
     ENCODE_START(3, 1, bl);
     encode(topic, bl);
-    // events are stored as a vector of strings
+    // events are stored as a vector of std::strings
     std::vector<std::string> tmp_events;
     const auto converter = s3_id.empty() ? rgw::notify::to_ceph_string : rgw::notify::to_string;
     std::transform(events.begin(), events.end(), std::back_inserter(tmp_events), converter);
@@ -530,7 +530,7 @@ struct rgw_pubsub_topic_filter {
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(3, bl);
     decode(topic, bl);
-    // events are stored as a vector of strings
+    // events are stored as a vector of std::strings
     events.clear();
     std::vector<std::string> tmp_events;
     decode(tmp_events, bl);
@@ -607,7 +607,7 @@ class RGWPubSub
     return pubsub_oid_prefix + tenant + ".bucket." + bucket.name + "/" + bucket.marker;
   }
 
-  std::string sub_meta_oid(const string& name) const {
+  std::string sub_meta_oid(const std::string& name) const {
     return pubsub_oid_prefix + tenant + ".sub." + name;
   }
 
@@ -657,13 +657,13 @@ public:
     // for S3 compliant notifications the version with: s3_filter and notif_name should be used
     // return -ENOENT if the topic does not exists
     // return 0 on success, error code otherwise
-    int create_notification(const DoutPrefixProvider *dpp, const string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y);
-    int create_notification(const DoutPrefixProvider *dpp, const string& topic_name, const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y);
+    int create_notification(const DoutPrefixProvider *dpp, const std::string& topic_name, const rgw::notify::EventTypeList& events, optional_yield y);
+    int create_notification(const DoutPrefixProvider *dpp, const std::string& topic_name, const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y);
     // remove a topic and filter from bucket
     // if the topic does not exists on the bucket it is a no-op (considered success)
     // return -ENOENT if the topic does not exists
     // return 0 on success, error code otherwise
-    int remove_notification(const DoutPrefixProvider *dpp, const string& topic_name, optional_yield y);
+    int remove_notification(const DoutPrefixProvider *dpp, const std::string& topic_name, optional_yield y);
     // remove all notifications (and autogenerated topics) associated with the bucket
     // return 0 on success or if no topic was associated with the bucket, error code otherwise
     int remove_notifications(const DoutPrefixProvider *dpp, optional_yield y);
@@ -688,15 +688,15 @@ public:
 
     virtual ~Sub() = default;
 
-    int subscribe(const DoutPrefixProvider *dpp, const string& topic_name, const rgw_pubsub_sub_dest& dest, optional_yield y,
+    int subscribe(const DoutPrefixProvider *dpp, const std::string& topic_name, const rgw_pubsub_sub_dest& dest, optional_yield y,
                  const std::string& s3_id="");
-    int unsubscribe(const DoutPrefixProvider *dpp, const string& topic_name, optional_yield y);
+    int unsubscribe(const DoutPrefixProvider *dpp, const std::string& topic_name, optional_yield y);
     int get_conf(rgw_pubsub_sub_config* result);
     
     static const int DEFAULT_MAX_EVENTS = 100;
     // followint virtual methods should only be called in derived
-    virtual int list_events(const DoutPrefixProvider *dpp, const string& marker, int max_events) {ceph_assert(false);}
-    virtual int remove_event(const DoutPrefixProvider *dpp, const string& event_id) {ceph_assert(false);}
+    virtual int list_events(const DoutPrefixProvider *dpp, const std::string& marker, int max_events) {ceph_assert(false);}
+    virtual int remove_event(const DoutPrefixProvider *dpp, const std::string& event_id) {ceph_assert(false);}
     virtual void dump(Formatter* f) const {ceph_assert(false);}
   };
 
@@ -712,12 +712,12 @@ public:
     } list;
 
   public:
-    SubWithEvents(RGWPubSub *_ps, const string& _sub) : Sub(_ps, _sub) {}
+    SubWithEvents(RGWPubSub *_ps, const std::string& _sub) : Sub(_ps, _sub) {}
 
     virtual ~SubWithEvents() = default;
     
-    int list_events(const DoutPrefixProvider *dpp, const string& marker, int max_events) override;
-    int remove_event(const DoutPrefixProvider *dpp, const string& event_id) override;
+    int list_events(const DoutPrefixProvider *dpp, const std::string& marker, int max_events) override;
+    int remove_event(const DoutPrefixProvider *dpp, const std::string& event_id) override;
     void dump(Formatter* f) const override;
   };
 
@@ -728,11 +728,11 @@ public:
     return std::make_shared<Bucket>(this, bucket);
   }
 
-  SubRef get_sub(const string& sub) {
+  SubRef get_sub(const std::string& sub) {
     return std::make_shared<Sub>(this, sub);
   }
   
-  SubRef get_sub_with_events(const string& sub) {
+  SubRef get_sub_with_events(const std::string& sub) {
     auto tmpsub = Sub(this, sub);
     rgw_pubsub_sub_config conf;
     if (tmpsub.get_conf(&conf) < 0) {
@@ -747,7 +747,7 @@ public:
   void get_meta_obj(rgw_raw_obj *obj) const;
   void get_bucket_meta_obj(const rgw_bucket& bucket, rgw_raw_obj *obj) const;
 
-  void get_sub_meta_obj(const string& name, rgw_raw_obj *obj) const;
+  void get_sub_meta_obj(const std::string& name, rgw_raw_obj *obj) const;
 
   // get all topics (per tenant, if used)) and populate them into "result"
   // return 0 on success or if no topics exist, error code otherwise
@@ -755,23 +755,23 @@ public:
   // get a topic with its subscriptions by its name and populate it into "result"
   // return -ENOENT if the topic does not exists 
   // return 0 on success, error code otherwise
-  int get_topic(const string& name, rgw_pubsub_topic_subs *result);
+  int get_topic(const std::string& name, rgw_pubsub_topic_subs *result);
   // get a topic with by its name and populate it into "result"
   // return -ENOENT if the topic does not exists 
   // return 0 on success, error code otherwise
-  int get_topic(const string& name, rgw_pubsub_topic *result);
+  int get_topic(const std::string& name, rgw_pubsub_topic *result);
   // create a topic with a name only
   // if the topic already exists it is a no-op (considered success)
   // return 0 on success, error code otherwise
-  int create_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y);
+  int create_topic(const DoutPrefixProvider *dpp, const std::string& name, optional_yield y);
   // create a topic with push destination information and ARN
   // if the topic already exists the destination and ARN values may be updated (considered succsess)
   // return 0 on success, error code otherwise
-  int create_topic(const DoutPrefixProvider *dpp, const string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y);
+  int create_topic(const DoutPrefixProvider *dpp, const std::string& name, const rgw_pubsub_sub_dest& dest, const std::string& arn, const std::string& opaque_data, optional_yield y);
   // remove a topic according to its name
   // if the topic does not exists it is a no-op (considered success)
   // return 0 on success, error code otherwise
-  int remove_topic(const DoutPrefixProvider *dpp, const string& name, optional_yield y);
+  int remove_topic(const DoutPrefixProvider *dpp, const std::string& name, optional_yield y);
 };
 
 
index d6bb52b71285756d1b8df2e32f815be6d7d0693b..afe33b7026c346c347d4637b9cb831216d388f88 100644 (file)
@@ -22,6 +22,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace rgw::putobj {
 
 int HeadObjectProcessor::process(bufferlist&& data, uint64_t logical_offset)
index 77cb4f7c2f88a4fee77b7ee096d2aa1288dcd75f..b376b26ce16b6f0cfc7cf3c6dbc85c203c34b986 100644 (file)
@@ -244,7 +244,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
     uint64_t position;
     uint64_t cur_size;
     uint64_t *cur_accounted_size;
-    string cur_etag;
+    std::string cur_etag;
     const std::string unique_tag;
 
     RGWObjManifest *cur_manifest;
@@ -265,10 +265,10 @@ class MultipartObjectProcessor : public ManifestObjectProcessor {
               unique_tag(unique_tag), cur_manifest(nullptr)
     {}
     int prepare(optional_yield y) override;
-    int complete(size_t accounted_size, const string& etag,
+    int complete(size_t accounted_size, const std::string& etag,
                  ceph::real_time *mtime, ceph::real_time set_mtime,
-                 map<string, bufferlist>& attrs, ceph::real_time delete_at,
-                 const char *if_match, const char *if_nomatch, const string *user_data,
+                 std::map<std::string, bufferlist>& attrs, ceph::real_time delete_at,
+                 const char *if_match, const char *if_nomatch, const std::string *user_data,
                  rgw_zone_set *zones_trace, bool *canceled,
                  optional_yield y) override;
   };
index ba5b79e5f90a6d246abbd0af296c5398da5e2ed8..bc74b485ad936f2ca6035ea5efa52e0706c94571 100644 (file)
@@ -35,6 +35,7 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 struct RGWQuotaCacheStats {
   RGWStorageStats stats;
index 6df125049d9062c497659f7af8f39b93a2c1e8f3..9d3870b0e2d2712cfa4677cfcf9dcd646f16035b 100644 (file)
@@ -65,7 +65,7 @@ struct get_obj_data;
 #define RGW_OBJ_NS_MULTIPART "multipart"
 #define RGW_OBJ_NS_SHADOW    "shadow"
 
-static inline void prepend_bucket_marker(const rgw_bucket& bucket, const string& orig_oid, string& oid)
+static inline void prepend_bucket_marker(const rgw_bucket& bucket, const std::string& orig_oid, std::string& oid)
 {
   if (bucket.marker.empty() || orig_oid.empty()) {
     oid = orig_oid;
@@ -76,11 +76,11 @@ static inline void prepend_bucket_marker(const rgw_bucket& bucket, const string&
   }
 }
 
-static inline void get_obj_bucket_and_oid_loc(const rgw_obj& obj, string& oid, string& locator)
+static inline void get_obj_bucket_and_oid_loc(const rgw_obj& obj, std::string& oid, std::string& locator)
 {
   const rgw_bucket& bucket = obj.bucket;
   prepend_bucket_marker(bucket, obj.get_oid(), oid);
-  const string& loc = obj.key.get_loc();
+  const std::string& loc = obj.key.get_loc();
   if (!loc.empty()) {
     prepend_bucket_marker(bucket, loc, locator);
   } else {
@@ -88,7 +88,10 @@ static inline void get_obj_bucket_and_oid_loc(const rgw_obj& obj, string& oid, s
   }
 }
 
-int rgw_policy_from_attrset(const DoutPrefixProvider *dpp, CephContext *cct, map<string, bufferlist>& attrset, RGWAccessControlPolicy *policy);
+int rgw_policy_from_attrset(const DoutPrefixProvider *dpp,
+                           CephContext *cct,
+                           std::map<std::string, bufferlist>& attrset,
+                           RGWAccessControlPolicy *policy);
 
 struct RGWOLHInfo {
   rgw_obj target;
@@ -109,7 +112,7 @@ struct RGWOLHInfo {
      decode(removed, bl);
      DECODE_FINISH(bl);
   }
-  static void generate_test_instances(list<RGWOLHInfo*>& o);
+  static void generate_test_instances(std::list<RGWOLHInfo*>& o);
   void dump(Formatter *f) const;
 };
 WRITE_CLASS_ENCODER(RGWOLHInfo)
@@ -136,7 +139,7 @@ struct RGWOLHPendingInfo {
 WRITE_CLASS_ENCODER(RGWOLHPendingInfo)
 
 struct RGWUsageBatch {
-  map<ceph::real_time, rgw_usage_log_entry> m;
+  std::map<ceph::real_time, rgw_usage_log_entry> m;
 
   void insert(ceph::real_time& t, rgw_usage_log_entry& entry, bool *account) {
     bool exists = m.find(t) != m.end();
@@ -170,11 +173,11 @@ struct RGWObjState {
   uint64_t epoch{0};
   bufferlist obj_tag;
   bufferlist tail_tag;
-  string write_tag;
+  std::string write_tag;
   bool fake_tag{false};
   std::optional<RGWObjManifest> manifest;
 
-  string shadow_obj;
+  std::string shadow_obj;
   bool has_data{false};
   bufferlist data;
   bool prefetch_data{false};
@@ -188,14 +191,14 @@ struct RGWObjState {
 
   RGWObjVersionTracker objv_tracker;
 
-  map<string, bufferlist> attrset;
+  std::map<std::string, bufferlist> attrset;
 
   RGWObjState();
   RGWObjState(const RGWObjState& rhs);
   ~RGWObjState();
 
-  bool get_attr(string name, bufferlist& dest) {
-    map<string, bufferlist>::iterator iter = attrset.find(name);
+  bool get_attr(std::string name, bufferlist& dest) {
+    auto iter = attrset.find(name);
     if (iter != attrset.end()) {
       dest = iter->second;
       return true;
@@ -212,7 +215,7 @@ public:
                      const rgw_obj_key& source_key,
                      const RGWBucketInfo& dest_bucket_info,
                      std::optional<rgw_placement_rule> dest_placement_rule,
-                     const map<string, bufferlist>& obj_attrs,
+                     const std::map<std::string, bufferlist>& obj_attrs,
                      std::optional<rgw_user> *poverride_owner,
                      const rgw_placement_rule **prule) = 0;
 };
@@ -227,7 +230,7 @@ public:
              const rgw_obj_key& source_key,
              const RGWBucketInfo& dest_bucket_info,
              std::optional<rgw_placement_rule> dest_placement_rule,
-             const map<string, bufferlist>& obj_attrs,
+             const std::map<std::string, bufferlist>& obj_attrs,
              std::optional<rgw_user> *poverride_owner,
              const rgw_placement_rule **prule) override;
 };
@@ -275,7 +278,7 @@ struct RGWRawObjState {
 
   RGWObjVersionTracker objv_tracker;
 
-  map<string, bufferlist> attrset;
+  std::map<std::string, bufferlist> attrset;
   RGWRawObjState() {}
   RGWRawObjState(const RGWRawObjState& rhs) : obj (rhs.obj) {
     has_attrs = rhs.has_attrs;
@@ -309,9 +312,9 @@ struct RGWListRawObjsCtx {
 };
 
 struct objexp_hint_entry {
-  string tenant;
-  string bucket_name;
-  string bucket_id;
+  std::string tenant;
+  std::string bucket_name;
+  std::string bucket_id;
   rgw_obj_key obj_key;
   ceph::real_time exp_time;
 
@@ -341,7 +344,7 @@ struct objexp_hint_entry {
   }
 
   void dump(Formatter *f) const;
-  static void generate_test_instances(list<objexp_hint_entry*>& o);
+  static void generate_test_instances(std::list<objexp_hint_entry*>& o);
 };
 WRITE_CLASS_ENCODER(objexp_hint_entry)
 
@@ -366,7 +369,7 @@ class RGWChainedCacheImpl;
 struct bucket_info_entry {
   RGWBucketInfo info;
   real_time mtime;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 };
 
 struct tombstone_entry;
@@ -422,7 +425,7 @@ class RGWRados
   RGWDataNotifier *data_notifier;
   RGWMetaSyncProcessorThread *meta_sync_processor_thread;
   RGWSyncTraceManager *sync_tracer = nullptr;
-  map<rgw_zone_id, RGWDataSyncProcessorThread *> data_sync_processor_threads;
+  std::map<rgw_zone_id, RGWDataSyncProcessorThread *> data_sync_processor_threads;
 
   boost::optional<rgw::BucketTrimManager> bucket_trim;
   RGWSyncLogTrimThread *sync_log_trimmer{nullptr};
@@ -455,10 +458,10 @@ class RGWRados
                          librados::ObjectOperation& op, RGWObjState **state, optional_yield y);
   
   int update_placement_map();
-  int store_bucket_info(RGWBucketInfo& info, map<string, bufferlist> *pattrs, RGWObjVersionTracker *objv_tracker, bool exclusive);
+  int store_bucket_info(RGWBucketInfo& info, std::map<std::string, bufferlist> *pattrs, RGWObjVersionTracker *objv_tracker, bool exclusive);
 
   void remove_rgw_head_obj(librados::ObjectWriteOperation& op);
-  void cls_obj_check_prefix_exist(librados::ObjectOperation& op, const string& prefix, bool fail_if_exist);
+  void cls_obj_check_prefix_exist(librados::ObjectOperation& op, const std::string& prefix, bool fail_if_exist);
   void cls_obj_check_mtime(librados::ObjectOperation& op, const real_time& mtime, bool high_precision_time, RGWCheckMTimeType type);
 protected:
   CephContext *cct;
@@ -582,7 +585,7 @@ public:
    * AmazonS3 errors contain a HostId string, but is an opaque base64 blob; we
    * try to be more transparent. This has a wrapper so we can update it when zonegroup/zone are changed.
    */
-  string host_id;
+  std::string host_id;
 
   RGWReshard *reshard;
   std::shared_ptr<RGWReshardWait> reshard_wait;
@@ -611,14 +614,14 @@ public:
 
   int get_raw_obj_ref(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, rgw_rados_ref *ref);
 
-  int list_raw_objects_init(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& marker, RGWListRawObjsCtx *ctx);
-  int list_raw_objects_next(const DoutPrefixProvider *dpp, const string& prefix_filter, int max,
-                            RGWListRawObjsCtx& ctx, list<string>& oids,
+  int list_raw_objects_init(const DoutPrefixProvider *dpp, const rgw_pool& pool, const std::string& marker, RGWListRawObjsCtx *ctx);
+  int list_raw_objects_next(const DoutPrefixProvider *dpp, const std::string& prefix_filter, int max,
+                            RGWListRawObjsCtx& ctx, std::list<std::string>& oids,
                             bool *is_truncated);
-  int list_raw_objects(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& prefix_filter, int max,
-                       RGWListRawObjsCtx& ctx, list<string>& oids,
+  int list_raw_objects(const DoutPrefixProvider *dpp, const rgw_pool& pool, const std::string& prefix_filter, int max,
+                       RGWListRawObjsCtx& ctx, std::list<std::string>& oids,
                        bool *is_truncated);
-  string list_raw_objs_get_cursor(RGWListRawObjsCtx& ctx);
+  std::string list_raw_objs_get_cursor(RGWListRawObjsCtx& ctx);
 
   CephContext *ctx() { return cct; }
   /** do all necessary setup of the storage device */
@@ -634,41 +637,41 @@ public:
   int initialize(const DoutPrefixProvider *dpp);
   void finalize();
 
-  int register_to_service_map(const DoutPrefixProvider *dpp, const string& daemon_type, const map<string, string>& meta);
+  int register_to_service_map(const DoutPrefixProvider *dpp, const std::string& daemon_type, const std::map<std::string, std::string>& meta);
   int update_service_map(const DoutPrefixProvider *dpp, std::map<std::string, std::string>&& status);
 
   /// list logs
-  int log_list_init(const DoutPrefixProvider *dpp, const string& prefix, RGWAccessHandle *handle);
-  int log_list_next(RGWAccessHandle handle, string *name);
+  int log_list_init(const DoutPrefixProvider *dpp, const std::string& prefix, RGWAccessHandle *handle);
+  int log_list_next(RGWAccessHandle handle, std::string *name);
 
   /// remove log
-  int log_remove(const DoutPrefixProvider *dpp, const string& name);
+  int log_remove(const DoutPrefixProvider *dpp, const std::string& name);
 
   /// show log
-  int log_show_init(const DoutPrefixProvider *dpp, const string& name, RGWAccessHandle *handle);
+  int log_show_init(const DoutPrefixProvider *dpp, const std::string& name, RGWAccessHandle *handle);
   int log_show_next(const DoutPrefixProvider *dpp, RGWAccessHandle handle, rgw_log_entry *entry);
 
   // log bandwidth info
-  int log_usage(const DoutPrefixProvider *dpp, map<rgw_user_bucket, RGWUsageBatch>& usage_info);
-  int read_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
-                 uint32_t max_entries, bool *is_truncated, RGWUsageIter& read_iter, map<rgw_user_bucket,
+  int log_usage(const DoutPrefixProvider *dpp, std::map<rgw_user_bucket, RGWUsageBatch>& usage_info);
+  int read_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const std::string& bucket_name, uint64_t start_epoch, uint64_t end_epoch,
+                 uint32_t max_entries, bool *is_truncated, RGWUsageIter& read_iter, std::map<rgw_user_bucket,
                 rgw_usage_log_entry>& usage);
-  int trim_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const string& bucket_name, uint64_t start_epoch, uint64_t end_epoch);
+  int trim_usage(const DoutPrefixProvider *dpp, const rgw_user& user, const std::string& bucket_name, uint64_t start_epoch, uint64_t end_epoch);
   int clear_usage(const DoutPrefixProvider *dpp);
 
   int create_pool(const DoutPrefixProvider *dpp, const rgw_pool& pool);
 
-  void create_bucket_id(string *bucket_id);
+  void create_bucket_id(std::string *bucket_id);
 
   bool get_obj_data_pool(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_pool *pool);
   bool obj_to_raw(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj *raw_obj);
 
   int create_bucket(const RGWUserInfo& owner, rgw_bucket& bucket,
-                   const string& zonegroup_id,
+                   const std::string& zonegroup_id,
                    const rgw_placement_rule& placement_rule,
-                   const string& swift_ver_location,
+                   const std::string& swift_ver_location,
                    const RGWQuotaInfo * pquota_info,
-                   map<std::string,bufferlist>& attrs,
+                   std::map<std::string,bufferlist>& attrs,
                    RGWBucketInfo& bucket_info,
                    obj_version *pobjv,
                    obj_version *pep_objv,
@@ -714,7 +717,7 @@ public:
     int get_state(const DoutPrefixProvider *dpp, RGWObjState **pstate, bool follow_olh, optional_yield y, bool assume_noent = false);
     void invalidate_state();
 
-    int prepare_atomic_modification(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation& op, bool reset_obj, const string *ptag,
+    int prepare_atomic_modification(const DoutPrefixProvider *dpp, librados::ObjectWriteOperation& op, bool reset_obj, const std::string *ptag,
                                     const char *ifmatch, const char *ifnomatch, bool removal_op, bool modify_tail, optional_yield y);
     int complete_atomic_modification(const DoutPrefixProvider *dpp);
 
@@ -764,7 +767,7 @@ public:
       RGWRados::Object *source;
 
       struct GetObjState {
-        map<rgw_pool, librados::IoCtx> io_ctxs;
+        std::map<rgw_pool, librados::IoCtx> io_ctxs;
         rgw_pool cur_pool;
         librados::IoCtx *cur_ioctx{nullptr};
         rgw_obj obj;
@@ -788,7 +791,7 @@ public:
       struct Params {
         ceph::real_time *lastmod;
         uint64_t *obj_size;
-        map<string, bufferlist> *attrs;
+        std::map<std::string, bufferlist> *attrs;
         rgw_obj *target_obj;
 
         Params() : lastmod(nullptr), obj_size(nullptr), attrs(nullptr),
@@ -809,11 +812,11 @@ public:
       
       struct MetaParams {
         ceph::real_time *mtime;
-        map<std::string, bufferlist>* rmattrs;
+        std::map<std::string, bufferlist>* rmattrs;
         const bufferlist *data;
         RGWObjManifest *manifest;
-        const string *ptag;
-        list<rgw_obj_index_key> *remove_objs;
+        const std::string *ptag;
+        std::list<rgw_obj_index_key> *remove_objs;
         ceph::real_time set_mtime;
         rgw_user owner;
         RGWObjCategory category;
@@ -823,7 +826,7 @@ public:
         std::optional<uint64_t> olh_epoch;
         ceph::real_time delete_at;
         bool canceled;
-        const string *user_data;
+        const std::string *user_data;
         rgw_zone_set *zones_trace;
         bool modify_tail;
         bool completeMultipart;
@@ -839,11 +842,11 @@ public:
 
       int _do_write_meta(const DoutPrefixProvider *dpp,
                      uint64_t size, uint64_t accounted_size,
-                     map<std::string, bufferlist>& attrs,
+                     std::map<std::string, bufferlist>& attrs,
                      bool modify_tail, bool assume_noent,
                      void *index_op, optional_yield y);
       int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size,
-                     map<std::string, bufferlist>& attrs, optional_yield y);
+                     std::map<std::string, bufferlist>& attrs, optional_yield y);
       int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive);
       const req_state* get_req_state() {
         return (req_state *)target->get_ctx().get_private();
@@ -858,9 +861,9 @@ public:
         int versioning_status; // versioning flags defined in enum RGWBucketFlags
         ACLOwner obj_owner;    // needed for creation of deletion marker
         uint64_t olh_epoch;
-        string marker_version_id;
+        std::string marker_version_id;
         uint32_t bilog_flags;
-        list<rgw_obj_index_key> *remove_objs;
+        std::list<rgw_obj_index_key> *remove_objs;
         ceph::real_time expiration_time;
         ceph::real_time unmod_since;
         ceph::real_time mtime; /* for setting delete marker mtime */
@@ -874,7 +877,7 @@ public:
 
       struct DeleteResult {
         bool delete_marker;
-        string version_id;
+        std::string version_id;
 
         DeleteResult() : delete_marker(false) {}
       } result;
@@ -892,7 +895,7 @@ public:
         std::optional<RGWObjManifest> manifest;
         uint64_t size{0};
        struct timespec mtime {};
-        map<string, bufferlist> attrs;
+        std::map<std::string, bufferlist> attrs;
       } result;
 
       struct State {
@@ -927,7 +930,7 @@ public:
     rgw_bucket& get_bucket() { return bucket; }
     RGWBucketInfo& get_bucket_info() { return bucket_info; }
 
-    int update_bucket_id(const string& new_bucket_id, const DoutPrefixProvider *dpp);
+    int update_bucket_id(const std::string& new_bucket_id, const DoutPrefixProvider *dpp);
 
     int get_shard_id() { return shard_id; }
     void set_shard_id(int id) {
@@ -936,7 +939,7 @@ public:
 
     class UpdateIndex {
       RGWRados::Bucket *target;
-      string optag;
+      std::string optag;
       rgw_obj obj;
       uint16_t bilog_flags{0};
       BucketShard bs;
@@ -986,20 +989,20 @@ public:
         zones_trace = _zones_trace;
       }
 
-      int prepare(const DoutPrefixProvider *dpp, RGWModifyOp, const string *write_tag, optional_yield y);
+      int prepare(const DoutPrefixProvider *dpp, RGWModifyOp, const std::string *write_tag, optional_yield y);
       int complete(const DoutPrefixProvider *dpp, int64_t poolid, uint64_t epoch, uint64_t size,
                    uint64_t accounted_size, ceph::real_time& ut,
-                   const string& etag, const string& content_type,
-                   const string& storage_class,
+                   const std::string& etag, const std::string& content_type,
+                   const std::string& storage_class,
                    bufferlist *acl_bl, RGWObjCategory category,
-                  list<rgw_obj_index_key> *remove_objs, const string *user_data = nullptr, bool appendable = false);
+                  std::list<rgw_obj_index_key> *remove_objs, const std::string *user_data = nullptr, bool appendable = false);
       int complete_del(const DoutPrefixProvider *dpp,
                        int64_t poolid, uint64_t epoch,
                        ceph::real_time& removed_mtime, /* mtime of removed object */
-                       list<rgw_obj_index_key> *remove_objs);
+                       std::list<rgw_obj_index_key> *remove_objs);
       int cancel(const DoutPrefixProvider *dpp);
 
-      const string *get_optag() { return &optag; }
+      const std::string *get_optag() { return &optag; }
 
       bool is_prepared() { return prepared; }
     }; // class UpdateIndex
@@ -1015,25 +1018,25 @@ public:
 
       int list_objects_ordered(const DoutPrefixProvider *dpp,
                                int64_t max,
-                              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);
       int list_objects_unordered(const DoutPrefixProvider *dpp,
                                  int64_t max,
-                                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);
 
     public:
 
       struct Params {
-        string prefix;
-        string delim;
+        std::string prefix;
+        std::string delim;
         rgw_obj_key marker;
         rgw_obj_key end_marker;
-        string ns;
+        std::string ns;
         bool enforce_ns;
         RGWAccessListFilter *filter;
         bool list_versions;
@@ -1050,8 +1053,8 @@ public:
       explicit List(RGWRados::Bucket *_target) : target(_target) {}
 
       int list_objects(const DoutPrefixProvider *dpp, int64_t max,
-                      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) {
        if (params.allow_unordered) {
@@ -1090,7 +1093,7 @@ public:
                                const DoutPrefixProvider *dpp);     /* in/out */                
   int copy_obj_to_remote_dest(const DoutPrefixProvider *dpp,
                               RGWObjState *astate,
-                              map<string, bufferlist>& src_attrs,
+                              std::map<std::string, bufferlist>& src_attrs,
                               RGWRados::Object::Read& read_op,
                               const rgw_user& user_id,
                               rgw::sal::Object* dest_obj,
@@ -1120,11 +1123,11 @@ public:
                bool high_precision_time,
                const char *if_match,
                const char *if_nomatch,
-               map<string, bufferlist> *pattrs,
-               map<string, string> *pheaders,
-               string *version_id,
-               string *ptag,
-               string *petag);
+               std::map<std::string, bufferlist> *pattrs,
+               std::map<std::string, std::string> *pheaders,
+               std::string *version_id,
+               std::string *ptag,
+               std::string *petag);
 
   int fetch_remote_obj(RGWObjectCtx& obj_ctx,
                        const rgw_user& user_id,
@@ -1148,8 +1151,8 @@ public:
                        RGWObjCategory category,
                        std::optional<uint64_t> olh_epoch,
                       ceph::real_time delete_at,
-                       string *ptag,
-                       string *petag,
+                       std::string *ptag,
+                       std::string *petag,
                        void (*progress_cb)(off_t, void *),
                        void *progress_data,
                        const DoutPrefixProvider *dpp,
@@ -1188,13 +1191,13 @@ public:
                const char *if_nomatch,
                AttrsMod attrs_mod,
                bool copy_if_newer,
-               map<std::string, bufferlist>& attrs,
+               std::map<std::string, bufferlist>& attrs,
                RGWObjCategory category,
                uint64_t olh_epoch,
               ceph::real_time delete_at,
-               string *version_id,
-               string *ptag,
-               string *petag,
+               std::string *version_id,
+               std::string *ptag,
+               std::string *petag,
                void (*progress_cb)(off_t, void *),
                void *progress_data,
                const DoutPrefixProvider *dpp,
@@ -1207,10 +1210,10 @@ public:
                rgw::sal::Object* dest_obj,
               ceph::real_time *mtime,
               ceph::real_time set_mtime,
-               map<string, bufferlist>& attrs,
+               std::map<std::string, bufferlist>& attrs,
                uint64_t olh_epoch,
               ceph::real_time delete_at,
-               string *petag,
+               std::string *petag,
                const DoutPrefixProvider *dpp,
                optional_yield y);
   
@@ -1232,8 +1235,10 @@ public:
    */
   int delete_bucket(RGWBucketInfo& bucket_info, RGWObjVersionTracker& objv_tracker, optional_yield y, const DoutPrefixProvider *dpp, bool check_empty = true);
 
-  void wakeup_meta_sync_shards(set<int>& shard_ids);
-  void wakeup_data_sync_shards(const DoutPrefixProvider *dpp, const rgw_zone_id& source_zone, map<int, set<string> >& shard_ids);
+  void wakeup_meta_sync_shards(std::set<int>& shard_ids);
+  void wakeup_data_sync_shards(const DoutPrefixProvider *dpp,
+                              const rgw_zone_id& source_zone,
+                              std::map<int, std::set<std::string> >& shard_ids);
 
   RGWMetaSyncStatusManager* get_meta_sync_manager();
   RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone);
@@ -1268,8 +1273,8 @@ public:
   int set_attr(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj, const char *name, bufferlist& bl);
 
   int set_attrs(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, rgw_obj& obj,
-                        map<string, bufferlist>& attrs,
-                        map<string, bufferlist>* rmattrs,
+                        std::map<std::string, bufferlist>& attrs,
+                        std::map<std::string, bufferlist>* rmattrs,
                         optional_yield y);
 
   int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state,
@@ -1299,7 +1304,7 @@ public:
 
   int raw_obj_stat(const DoutPrefixProvider *dpp,
                    rgw_raw_obj& obj, uint64_t *psize, ceph::real_time *pmtime, uint64_t *epoch,
-                   map<string, bufferlist> *attrs, bufferlist *first_chunk,
+                   std::map<std::string, bufferlist> *attrs, bufferlist *first_chunk,
                    RGWObjVersionTracker *objv_tracker, optional_yield y);
 
   int obj_operate(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::ObjectWriteOperation *op);
@@ -1311,29 +1316,29 @@ public:
                    const RGWBucketInfo& bucket_info,
                    std::function<int(BucketShard *)> call);
   int block_while_resharding(RGWRados::BucketShard *bs,
-                            string *new_bucket_id,
+                            std::string *new_bucket_id,
                             const RGWBucketInfo& bucket_info,
                              optional_yield y,
                              const DoutPrefixProvider *dpp);
 
   void bucket_index_guard_olh_op(const DoutPrefixProvider *dpp, RGWObjState& olh_state, librados::ObjectOperation& op);
-  int olh_init_modification(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
-  int olh_init_modification_impl(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, string *op_tag);
+  int olh_init_modification(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, std::string *op_tag);
+  int olh_init_modification_impl(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, std::string *op_tag);
   int bucket_index_link_olh(const DoutPrefixProvider *dpp,
                             const RGWBucketInfo& bucket_info, RGWObjState& olh_state,
                             const rgw_obj& obj_instance, bool delete_marker,
-                            const string& op_tag, struct rgw_bucket_dir_entry_meta *meta,
+                            const std::string& op_tag, struct rgw_bucket_dir_entry_meta *meta,
                             uint64_t olh_epoch,
                             ceph::real_time unmod_since, bool high_precision_time,
                             rgw_zone_set *zones_trace = nullptr,
                             bool log_data_change = false);
-  int bucket_index_unlink_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance, const string& op_tag, const string& olh_tag, uint64_t olh_epoch, rgw_zone_set *zones_trace = nullptr);
+  int bucket_index_unlink_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj_instance, const std::string& op_tag, const std::string& olh_tag, uint64_t olh_epoch, rgw_zone_set *zones_trace = nullptr);
   int bucket_index_read_olh_log(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance, uint64_t ver_marker,
-                                map<uint64_t, vector<rgw_bucket_olh_log_entry> > *log, bool *is_truncated);
+                                std::map<uint64_t, std::vector<rgw_bucket_olh_log_entry> > *log, bool *is_truncated);
   int bucket_index_trim_olh_log(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& obj_state, const rgw_obj& obj_instance, uint64_t ver);
   int bucket_index_clear_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& obj_instance);
   int apply_olh_log(const DoutPrefixProvider *dpp, RGWObjectCtx& ctx, RGWObjState& obj_state, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
-                    bufferlist& obj_tag, map<uint64_t, vector<rgw_bucket_olh_log_entry> >& log,
+                    bufferlist& obj_tag, std::map<uint64_t, std::vector<rgw_bucket_olh_log_entry> >& log,
                     uint64_t *plast_ver, rgw_zone_set *zones_trace = nullptr);
   int update_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWObjState *state, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_zone_set *zones_trace = nullptr);
   int set_olh(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, const RGWBucketInfo& bucket_info, const rgw_obj& target_obj, bool delete_marker, rgw_bucket_dir_entry_meta *meta,
@@ -1344,15 +1349,15 @@ public:
   int unlink_obj_instance(const DoutPrefixProvider *dpp, RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, const rgw_obj& target_obj,
                           uint64_t olh_epoch, optional_yield y, rgw_zone_set *zones_trace = nullptr);
 
-  void check_pending_olh_entries(const DoutPrefixProvider *dpp, map<string, bufferlist>& pending_entries, map<string, bufferlist> *rm_pending_entries);
-  int remove_olh_pending_entries(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, map<string, bufferlist>& pending_attrs);
+  void check_pending_olh_entries(const DoutPrefixProvider *dpp, std::map<std::string, bufferlist>& pending_entries, std::map<std::string, bufferlist> *rm_pending_entries);
+  int remove_olh_pending_entries(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjState& state, const rgw_obj& olh_obj, std::map<std::string, bufferlist>& pending_attrs);
   int follow_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, RGWObjectCtx& ctx, RGWObjState *state, const rgw_obj& olh_obj, rgw_obj *target);
   int get_olh(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWOLHInfo *olh);
 
   void gen_rand_obj_instance_name(rgw_obj_key *target_key);
   void gen_rand_obj_instance_name(rgw_obj *target);
 
-  int update_containers_stats(map<string, RGWBucketEnt>& m, const DoutPrefixProvider *dpp);
+  int update_containers_stats(std::map<std::string, RGWBucketEnt>& m, const DoutPrefixProvider *dpp);
   int append_async(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, size_t size, bufferlist& bl);
 
 public:
@@ -1365,22 +1370,22 @@ public:
     rctx->set_prefetch_data(obj);
   }
   int decode_policy(const DoutPrefixProvider *dpp, bufferlist& bl, ACLOwner *owner);
-  int get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, string *bucket_ver, string *master_ver,
-      map<RGWObjCategory, RGWStorageStats>& stats, string *max_marker, bool* syncstopped = NULL);
+  int get_bucket_stats(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, std::string *bucket_ver, std::string *master_ver,
+      std::map<RGWObjCategory, RGWStorageStats>& stats, std::string *max_marker, bool* syncstopped = NULL);
   int get_bucket_stats_async(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, int shard_id, RGWGetBucketStats_CB *cb);
 
-  int put_bucket_instance_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, map<string, bufferlist> *pattrs, const DoutPrefixProvider *dpp);
+  int put_bucket_instance_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, std::map<std::string, bufferlist> *pattrs, const DoutPrefixProvider *dpp);
   /* xxx dang obj_ctx -> svc */
-  int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const string& meta_key, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
-  int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const rgw_bucket& bucket, RGWBucketInfo& info, ceph::real_time *pmtime, map<string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
+  int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const std::string& meta_key, RGWBucketInfo& info, ceph::real_time *pmtime, std::map<std::string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
+  int get_bucket_instance_info(RGWSysObjectCtx& obj_ctx, const rgw_bucket& bucket, RGWBucketInfo& info, ceph::real_time *pmtime, std::map<std::string, bufferlist> *pattrs, optional_yield y, const DoutPrefixProvider *dpp);
 
-  static void make_bucket_entry_name(const string& tenant_name, const string& bucket_name, string& bucket_entry);
+  static void make_bucket_entry_name(const std::string& tenant_name, const std::string& bucket_name, std::string& bucket_entry);
 
   int get_bucket_info(RGWServices *svc,
-                     const string& tenant_name, const string& bucket_name,
+                     const std::string& tenant_name, const std::string& bucket_name,
                      RGWBucketInfo& info,
                      ceph::real_time *pmtime, optional_yield y,
-                      const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs = NULL);
+                      const DoutPrefixProvider *dpp, std::map<std::string, bufferlist> *pattrs = NULL);
 
   // Returns 0 on successful refresh. Returns error code if there was
   // an error or the version stored on the OSD is the same as that
@@ -1389,20 +1394,20 @@ public:
   int try_refresh_bucket_info(RGWBucketInfo& info,
                              ceph::real_time *pmtime,
                               const DoutPrefixProvider *dpp,
-                             map<string, bufferlist> *pattrs = nullptr);
+                             std::map<std::string, bufferlist> *pattrs = nullptr);
 
   int put_linked_bucket_info(RGWBucketInfo& info, bool exclusive, ceph::real_time mtime, obj_version *pep_objv,
-                            map<string, bufferlist> *pattrs, bool create_entry_point,
+                            std::map<std::string, bufferlist> *pattrs, bool create_entry_point,
                              const DoutPrefixProvider *dpp);
 
-  int cls_obj_prepare_op(const DoutPrefixProvider *dpp, BucketShard& bs, RGWModifyOp op, string& tag, rgw_obj& obj, uint16_t bilog_flags, optional_yield y, rgw_zone_set *zones_trace = nullptr);
-  int cls_obj_complete_op(BucketShard& bs, const rgw_obj& obj, RGWModifyOp op, string& tag, int64_t pool, uint64_t epoch,
-                          rgw_bucket_dir_entry& ent, RGWObjCategory category, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
-  int cls_obj_complete_add(BucketShard& bs, const rgw_obj& obj, string& tag, int64_t pool, uint64_t epoch, rgw_bucket_dir_entry& ent,
-                           RGWObjCategory category, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
-  int cls_obj_complete_del(BucketShard& bs, string& tag, int64_t pool, uint64_t epoch, rgw_obj& obj,
-                           ceph::real_time& removed_mtime, list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
-  int cls_obj_complete_cancel(BucketShard& bs, string& tag, rgw_obj& obj, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
+  int cls_obj_prepare_op(const DoutPrefixProvider *dpp, BucketShard& bs, RGWModifyOp op, std::string& tag, rgw_obj& obj, uint16_t bilog_flags, optional_yield y, rgw_zone_set *zones_trace = nullptr);
+  int cls_obj_complete_op(BucketShard& bs, const rgw_obj& obj, RGWModifyOp op, std::string& tag, int64_t pool, uint64_t epoch,
+                          rgw_bucket_dir_entry& ent, RGWObjCategory category, std::list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
+  int cls_obj_complete_add(BucketShard& bs, const rgw_obj& obj, std::string& tag, int64_t pool, uint64_t epoch, rgw_bucket_dir_entry& ent,
+                           RGWObjCategory category, std::list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
+  int cls_obj_complete_del(BucketShard& bs, std::string& tag, int64_t pool, uint64_t epoch, rgw_obj& obj,
+                           ceph::real_time& removed_mtime, std::list<rgw_obj_index_key> *remove_objs, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
+  int cls_obj_complete_cancel(BucketShard& bs, std::string& tag, rgw_obj& obj, uint16_t bilog_flags, rgw_zone_set *zones_trace = nullptr);
   int cls_obj_set_bucket_tag_timeout(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, uint64_t timeout);
 
   using ent_map_t =
@@ -1414,8 +1419,8 @@ public:
                               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 exp_factor, // 0 means ignore
@@ -1429,15 +1434,19 @@ public:
                                 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,
-                               vector<rgw_bucket_dir_entry>& ent_list,
+                               std::vector<rgw_bucket_dir_entry>& ent_list,
                                bool *is_truncated,
                                rgw_obj_index_key *last_entry,
                                 optional_yield y,
                                check_filter_t = nullptr);
-  int cls_bucket_head(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, vector<rgw_bucket_dir_header>& headers, map<int, string> *bucket_instance_ids = NULL);
+  int cls_bucket_head(const DoutPrefixProvider *dpp,
+                     const RGWBucketInfo& bucket_info,
+                     int shard_id,
+                     std::vector<rgw_bucket_dir_header>& headers,
+                     std::map<int, std::string> *bucket_instance_ids = NULL);
   int cls_bucket_head_async(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, RGWGetDirHeader_CB *ctx, int *num_aio);
 
   int bi_get_instance(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj, rgw_bucket_dir_entry *dirent);
@@ -1446,53 +1455,60 @@ public:
   void bi_put(librados::ObjectWriteOperation& op, BucketShard& bs, rgw_cls_bi_entry& entry);
   int bi_put(BucketShard& bs, rgw_cls_bi_entry& entry);
   int bi_put(const DoutPrefixProvider *dpp, rgw_bucket& bucket, rgw_obj& obj, rgw_cls_bi_entry& entry);
-  int bi_list(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, int shard_id, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated);
-  int bi_list(BucketShard& bs, const string& filter_obj, const string& marker, uint32_t max, list<rgw_cls_bi_entry> *entries, bool *is_truncated);
-  int bi_list(const DoutPrefixProvider *dpp, rgw_bucket& bucket, const string& obj_name, const string& marker, uint32_t max,
-              list<rgw_cls_bi_entry> *entries, bool *is_truncated);
+  int bi_list(const DoutPrefixProvider *dpp,
+             const RGWBucketInfo& bucket_info,
+             int shard_id,
+             const std::string& filter_obj,
+             const std::string& marker,
+             uint32_t max,
+             std::list<rgw_cls_bi_entry> *entries,
+             bool *is_truncated);
+  int bi_list(BucketShard& bs, const std::string& filter_obj, const std::string& marker, uint32_t max, std::list<rgw_cls_bi_entry> *entries, bool *is_truncated);
+  int bi_list(const DoutPrefixProvider *dpp, rgw_bucket& bucket, const std::string& obj_name, const std::string& marker, uint32_t max,
+              std::list<rgw_cls_bi_entry> *entries, bool *is_truncated);
   int bi_remove(const DoutPrefixProvider *dpp, BucketShard& bs);
 
-  int cls_obj_usage_log_add(const DoutPrefixProvider *dpp, const string& oid, rgw_usage_log_info& info);
-  int cls_obj_usage_log_read(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
-                             uint64_t end_epoch, uint32_t max_entries, string& read_iter, map<rgw_user_bucket,
-                            rgw_usage_log_entry>& usage, bool *is_truncated);
-  int cls_obj_usage_log_trim(const DoutPrefixProvider *dpp, const string& oid, const string& user, const string& bucket, uint64_t start_epoch,
+  int cls_obj_usage_log_add(const DoutPrefixProvider *dpp, const std::string& oid, rgw_usage_log_info& info);
+  int cls_obj_usage_log_read(const DoutPrefixProvider *dpp, const std::string& oid, const std::string& user, const std::string& bucket, uint64_t start_epoch,
+                             uint64_t end_epoch, uint32_t max_entries, std::string& read_iter,
+                            std::map<rgw_user_bucket, rgw_usage_log_entry>& usage, bool *is_truncated);
+  int cls_obj_usage_log_trim(const DoutPrefixProvider *dpp, const std::string& oid, const std::string& user, const std::string& bucket, uint64_t start_epoch,
                              uint64_t end_epoch);
-  int cls_obj_usage_log_clear(const DoutPrefixProvider *dpp, string& oid);
+  int cls_obj_usage_log_clear(const DoutPrefixProvider *dpp, std::string& oid);
 
-  int get_target_shard_id(const rgw::bucket_index_normal_layout& layout, const string& obj_key, int *shard_id);
+  int get_target_shard_id(const rgw::bucket_index_normal_layout& layout, const std::string& obj_key, int *shard_id);
 
-  int lock_exclusive(const rgw_pool& pool, const string& oid, ceph::timespan& duration, rgw_zone_id& zone_id, string& owner_id);
-  int unlock(const rgw_pool& pool, const string& oid, rgw_zone_id& zone_id, string& owner_id);
+  int lock_exclusive(const rgw_pool& pool, const std::string& oid, ceph::timespan& duration, rgw_zone_id& zone_id, std::string& owner_id);
+  int unlock(const rgw_pool& pool, const std::string& oid, rgw_zone_id& zone_id, std::string& owner_id);
 
   void update_gc_chain(const DoutPrefixProvider *dpp, rgw_obj& head_obj, RGWObjManifest& manifest, cls_rgw_obj_chain *chain);
-  int send_chain_to_gc(cls_rgw_obj_chain& chain, const string& tag);
-  void delete_objs_inline(const DoutPrefixProvider *dpp, cls_rgw_obj_chain& chain, const string& tag);
-  int gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectWriteOperation *op);
+  int send_chain_to_gc(cls_rgw_obj_chain& chain, const std::string& tag);
+  void delete_objs_inline(const DoutPrefixProvider *dpp, cls_rgw_obj_chain& chain, const std::string& tag);
+  int gc_operate(const DoutPrefixProvider *dpp, std::string& oid, librados::ObjectWriteOperation *op);
   int gc_aio_operate(const std::string& oid, librados::AioCompletion *c,
                      librados::ObjectWriteOperation *op);
-  int gc_operate(const DoutPrefixProvider *dpp, string& oid, librados::ObjectReadOperation *op, bufferlist *pbl);
+  int gc_operate(const DoutPrefixProvider *dpp, std::string& oid, librados::ObjectReadOperation *op, bufferlist *pbl);
 
-  int list_gc_objs(int *index, string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
+  int list_gc_objs(int *index, std::string& marker, uint32_t max, bool expired_only, std::list<cls_rgw_gc_obj_info>& result, bool *truncated, bool& processing_queue);
   int process_gc(bool expired_only);
   bool process_expire_objects(const DoutPrefixProvider *dpp);
   int defer_gc(const DoutPrefixProvider *dpp, void *ctx, const RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y);
 
   int process_lc();
-  int list_lc_progress(string& marker, uint32_t max_entries,
-                      vector<rgw::sal::Lifecycle::LCEntry>& progress_map, int& index);
+  int list_lc_progress(std::string& marker, uint32_t max_entries,
+                      std::vector<rgw::sal::Lifecycle::LCEntry>& progress_map, int& index);
 
   int bucket_check_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info,
-                         map<RGWObjCategory, RGWStorageStats> *existing_stats,
-                         map<RGWObjCategory, RGWStorageStats> *calculated_stats);
+                         std::map<RGWObjCategory, RGWStorageStats> *existing_stats,
+                         std::map<RGWObjCategory, RGWStorageStats> *calculated_stats);
   int bucket_rebuild_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info);
   int bucket_set_reshard(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const cls_rgw_bucket_instance_entry& entry);
-  int remove_objs_from_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, list<rgw_obj_index_key>& oid_list);
+  int remove_objs_from_index(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, std::list<rgw_obj_index_key>& oid_list);
   int move_rados_obj(const DoutPrefixProvider *dpp,
                      librados::IoCtx& src_ioctx,
-                    const string& src_oid, const string& src_locator,
+                    const std::string& src_oid, const std::string& src_locator,
                     librados::IoCtx& dst_ioctx,
-                    const string& dst_oid, const string& dst_locator);
+                    const std::string& dst_oid, const std::string& dst_locator);
   int fix_head_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, bool copy_obj, bool remove_bad, rgw_obj_key& key);
   int fix_tail_obj_locator(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, rgw_obj_key& key, bool fix, bool *need_fix, optional_yield y);
 
@@ -1509,9 +1525,9 @@ public:
 
   librados::Rados* get_rados_handle();
 
-  int delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, list<librados::AioCompletion *>& handles);
+  int delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, std::list<librados::AioCompletion *>& handles);
   int delete_obj_aio(const DoutPrefixProvider *dpp, const rgw_obj& obj, RGWBucketInfo& info, RGWObjState *astate,
-                     list<librados::AioCompletion *>& handles, bool keep_index_consistent,
+                     std::list<librados::AioCompletion *>& handles, bool keep_index_consistent,
                      optional_yield y);
 
  private:
@@ -1552,14 +1568,14 @@ public:
    * ctx: context object to use for the iteration
    * Returns: 0 on success, -ERR# otherwise.
    */
-  int pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, const string& cursor, RGWPoolIterCtx& ctx);
+  int pool_iterate_begin(const DoutPrefixProvider *dpp, const rgw_pool& pool, const std::string& cursor, RGWPoolIterCtx& ctx);
 
   /**
    * Get pool iteration position
    * ctx: context object to use for the iteration
-   * Returns: string representation of position
+   * Returns: std::string representation of position
    */
-  string pool_iterate_get_cursor(RGWPoolIterCtx& ctx);
+  std::string pool_iterate_get_cursor(RGWPoolIterCtx& ctx);
 
   /**
    * Iterate over pool return object names, use optional filter
@@ -1570,7 +1586,8 @@ public:
    * filter: if not NULL, will be used to filter returned objects
    * Returns: 0 on success, -ERR# otherwise.
    */
-  int pool_iterate(const DoutPrefixProvider *dpp, RGWPoolIterCtx& ctx, uint32_t num, vector<rgw_bucket_dir_entry>& objs,
+  int pool_iterate(const DoutPrefixProvider *dpp, RGWPoolIterCtx& ctx, uint32_t num,
+                  std::vector<rgw_bucket_dir_entry>& objs,
                    bool *is_truncated, RGWAccessListFilter *filter);
 
   uint64_t next_bucket_id();
@@ -1601,7 +1618,7 @@ struct get_obj_data {
   }
 
   D3nGetObjData d3n_get_data;
-  atomic_bool d3n_bypass_cache_write{false};
+  std::atomic_bool d3n_bypass_cache_write{false};
 
   int flush(rgw::AioResultList&& results);
 
index 23d791008eeadd91de66c457a91d7fc12a122ba5..8a9005047e8ac7e0755a0ff75842f0225dd7715e 100644 (file)
@@ -29,12 +29,12 @@ struct RGWRequest
 }; /* RGWRequest */
 
 struct RGWLoadGenRequest : public RGWRequest {
-       string method;
-       string resource;
+       std::string method;
+       std::string resource;
        int content_length;
        std::atomic<bool>* fail_flag = nullptr;
 
-RGWLoadGenRequest(uint64_t req_id, const string& _m, const  string& _r, int _cl,
+RGWLoadGenRequest(uint64_t req_id, const std::string& _m, const std::string& _r, int _cl,
                std::atomic<bool> *ff)
        : RGWRequest(req_id), method(_m), resource(_r), content_length(_cl),
                fail_flag(ff) {}
index 7e1a0396c47b50a846d889d81a4b88485f0ec824..78c96d14c3932183fc3c42b5a6d994786406b304 100644 (file)
@@ -23,6 +23,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 const string reshard_oid_prefix = "reshard.";
 const string reshard_lock_name = "reshard_process";
 const string bucket_instance_lock_name = "bucket_instance_lock";
index 67205bb71c33beb369a44fb5ed133b02c38c21d6..0cfca38bfb7b421b3604d1523420e40cd66e1cb5 100644 (file)
@@ -75,7 +75,7 @@ private:
 
   rgw::sal::RadosStore* store;
   RGWBucketInfo bucket_info;
-  std::map<string, bufferlist> bucket_attrs;
+  std::map<std::string, bufferlist> bucket_attrs;
 
   RGWBucketReshardLock reshard_lock;
   RGWBucketReshardLock* outer_reshard_lock;
@@ -91,7 +91,7 @@ private:
                 RGWBucketInfo& new_bucket_info,
                 int max_entries,
                  bool verbose,
-                 ostream *os,
+                 std::ostream *os,
                 Formatter *formatter,
                  const DoutPrefixProvider *dpp);
 public:
@@ -100,11 +100,11 @@ public:
   // manage
   RGWBucketReshard(rgw::sal::RadosStore* _store,
                   const RGWBucketInfo& _bucket_info,
-                   const std::map<string, bufferlist>& _bucket_attrs,
+                   const std::map<std::string, bufferlist>& _bucket_attrs,
                   RGWBucketReshardLock* _outer_reshard_lock);
   int execute(int num_shards, int max_op_entries,
               const DoutPrefixProvider *dpp,
-              bool verbose = false, ostream *out = nullptr,
+              bool verbose = false, std::ostream *out = nullptr,
               Formatter *formatter = nullptr,
              RGWReshard *reshard_log = nullptr);
   int get_status(const DoutPrefixProvider *dpp, std::list<cls_rgw_bucket_instance_entry> *status);
@@ -123,10 +123,10 @@ public:
   static int set_resharding_status(const DoutPrefixProvider *dpp,
                                    rgw::sal::RadosStore* store,
                                   const RGWBucketInfo& bucket_info,
-                                  const string& new_instance_id,
+                                  const std::string& new_instance_id,
                                   int32_t num_shards,
                                   cls_rgw_reshard_status status);
-  int set_resharding_status(const DoutPrefixProvider *dpp, const string& new_instance_id,
+  int set_resharding_status(const DoutPrefixProvider *dpp, const std::string& new_instance_id,
                            int32_t num_shards,
                            cls_rgw_reshard_status status) {
     return set_resharding_status(dpp, store, bucket_info,
@@ -197,15 +197,15 @@ public:
 
 private:
     rgw::sal::RadosStore* store;
-    string lock_name;
+    std::string lock_name;
     rados::cls::lock::Lock instance_lock;
     int num_logshards;
 
     bool verbose;
-    ostream *out;
+    std::ostream *out;
     Formatter *formatter;
 
-    void get_logshard_oid(int shard_num, string *shard);
+    void get_logshard_oid(int shard_num, std::string *shard);
 protected:
   class ReshardWorker : public Thread, public DoutPrefixProvider {
     CephContext *cct;
@@ -230,17 +230,17 @@ protected:
   ReshardWorker *worker = nullptr;
   std::atomic<bool> down_flag = { false };
 
-  string get_logshard_key(const string& tenant, const string& bucket_name);
-  void get_bucket_logshard_oid(const string& tenant, const string& bucket_name, string *oid);
+  std::string get_logshard_key(const std::string& tenant, const std::string& bucket_name);
+  void get_bucket_logshard_oid(const std::string& tenant, const std::string& bucket_name, std::string *oid);
 
 public:
-  RGWReshard(rgw::sal::RadosStore* _store, bool _verbose = false, ostream *_out = nullptr, Formatter *_formatter = nullptr);
+  RGWReshard(rgw::sal::RadosStore* _store, bool _verbose = false, std::ostream *_out = nullptr, Formatter *_formatter = nullptr);
   int add(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry);
   int update(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const RGWBucketInfo& new_bucket_info);
   int get(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry);
   int remove(const DoutPrefixProvider *dpp, cls_rgw_reshard_entry& entry);
-  int list(const DoutPrefixProvider *dpp, int logshard_num, string& marker, uint32_t max, std::list<cls_rgw_reshard_entry>& entries, bool *is_truncated);
-  int clear_bucket_resharding(const DoutPrefixProvider *dpp, const string& bucket_instance_oid, cls_rgw_reshard_entry& entry);
+  int list(const DoutPrefixProvider *dpp, int logshard_num, std::string& marker, uint32_t max, std::list<cls_rgw_reshard_entry>& entries, bool *is_truncated);
+  int clear_bucket_resharding(const DoutPrefixProvider *dpp, const std::string& bucket_instance_oid, cls_rgw_reshard_entry& entry);
 
   /* reshard thread */
   int process_single_logshard(int logshard_num, const DoutPrefixProvider *dpp);
index 8971d60515cde4d8995dade765a5122b79f41368..b6f258ee0e8f129aad36d81223152e0df3c76eda 100644 (file)
@@ -18,6 +18,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 RGWResolver::~RGWResolver() {
 }
index 2c845ff729063df8dcaadc52d620cf8a62d6f777..92e09220cc6a0f22c37ec2fd3ee7598fab431eb7 100644 (file)
@@ -16,7 +16,7 @@ class RGWResolver {
 public:
   ~RGWResolver();
   RGWResolver();
-  int resolve_cname(const string& hostname, string& cname, bool *found);
+  int resolve_cname(const std::string& hostname, std::string& cname, bool *found);
 };
 
 
index dc1135d9bfd533f2328bb7a76033ffdefd39b34c..a07bd2500b9b5f9fc5a029de5633fa8aac93dbf3 100644 (file)
@@ -32,6 +32,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 struct rgw_http_status_code {
   int code;
   const char *name;
index db4ceb14bad6352b7ed3aa2139e6efa22446912f..c2129e8e74517e8568dad051f424c36d509466f6 100644 (file)
@@ -75,24 +75,24 @@ std::tuple<int, bufferlist > rgw_rest_get_json_input_keep_data(CephContext *cct,
 
 class RESTArgs {
 public:
-  static int get_string(struct req_state *s, const string& name,
-                       const string& def_val, string *val,
+  static int get_string(struct req_state *s, const std::string& name,
+                       const std::string& def_val, std::string *val,
                        bool *existed = NULL);
-  static int get_uint64(struct req_state *s, const string& name,
+  static int get_uint64(struct req_state *s, const std::string& name,
                        uint64_t def_val, uint64_t *val, bool *existed = NULL);
-  static int get_int64(struct req_state *s, const string& name,
+  static int get_int64(struct req_state *s, const std::string& name,
                       int64_t def_val, int64_t *val, bool *existed = NULL);
-  static int get_uint32(struct req_state *s, const string& name,
+  static int get_uint32(struct req_state *s, const std::string& name,
                        uint32_t def_val, uint32_t *val, bool *existed = NULL);
-  static int get_int32(struct req_state *s, const string& name,
+  static int get_int32(struct req_state *s, const std::string& name,
                       int32_t def_val, int32_t *val, bool *existed = NULL);
-  static int get_time(struct req_state *s, const string& name,
+  static int get_time(struct req_state *s, const std::string& name,
                      const utime_t& def_val, utime_t *val,
                      bool *existed = NULL);
-  static int get_epoch(struct req_state *s, const string& name,
+  static int get_epoch(struct req_state *s, const std::string& name,
                       uint64_t def_val, uint64_t *epoch,
                       bool *existed = NULL);
-  static int get_bool(struct req_state *s, const string& name, bool def_val,
+  static int get_bool(struct req_state *s, const std::string& name, bool def_val,
                      bool *val, bool *existed = NULL);
 };
 
@@ -556,8 +556,8 @@ public:
   RGWHandler_REST() {}
   ~RGWHandler_REST() override {}
 
-  static int validate_bucket_name(const string& bucket);
-  static int validate_object_name(const string& object);
+  static int validate_bucket_name(const std::string& bucket);
+  static int validate_object_name(const std::string& object);
   static int reallocate_formatter(struct req_state *s, int type);
 
   int init_permissions(RGWOp* op, optional_yield y) override;
@@ -664,7 +664,7 @@ public:
     mgr.put_handler(handler);
   }
 
-  void register_resource(string resource, RGWRESTMgr *m,
+  void register_resource(std::string resource, RGWRESTMgr *m,
                         bool register_empty = false) {
     if (!register_empty && resource.empty())
       return;
@@ -690,8 +690,8 @@ public:
 static constexpr int64_t NO_CONTENT_LENGTH = -1;
 static constexpr int64_t CHUNKED_TRANSFER_ENCODING = -2;
 
-extern void dump_errno(int http_ret, string& out);
-extern void dump_errno(const struct rgw_err &err, string& out);
+extern void dump_errno(int http_ret, std::string& out);
+extern void dump_errno(const struct rgw_err &err, std::string& out);
 extern void dump_errno(struct req_state *s);
 extern void dump_errno(struct req_state *s, int http_ret);
 extern void end_header(struct req_state *s,
@@ -703,7 +703,7 @@ extern void end_header(struct req_state *s,
                       bool force_no_error = false);
 extern void dump_start(struct req_state *s);
 extern void list_all_buckets_start(struct req_state *s);
-extern void dump_owner(struct req_state *s, const rgw_user& id, string& name,
+extern void dump_owner(struct req_state *s, const rgw_user& id, std::string& name,
                       const char *section = NULL);
 extern void dump_header(struct req_state* s,
                         const std::string_view& name,
@@ -804,7 +804,7 @@ extern void list_all_buckets_end(struct req_state *s);
 extern void dump_time(struct req_state *s, const char *name, real_time *t);
 extern std::string dump_time_to_str(const real_time& t);
 extern void dump_bucket_from_state(struct req_state *s);
-extern void dump_redirect(struct req_state *s, const string& redirect);
+extern void dump_redirect(struct req_state *s, const std::string& redirect);
 extern bool is_valid_url(const char *url);
 extern void dump_access_control(struct req_state *s, const char *origin,
                                const char *meth,
index 18eb322815892efbd5b6b09df0a50494176c969a..8dcb0aac5f7b4970d7d3532696e35d6433df2c1e 100644 (file)
@@ -13,6 +13,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 class RGWOp_Bucket_Info : public RGWRESTOp {
 
index dfb6a750029401214e994fc49effcd45189f0fc5..3cb888cdf7b2ceef43aa10875f459598055ba357 100644 (file)
@@ -14,6 +14,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWHTTPSimpleRequest::get_status()
 {
   int retcode = get_req_retcode();
index 8412b2e283df6508dc40c7977e1fb2c33ce39b9a..4ffdb2cfe8ebc0f7558dd876561f82543171b147 100644 (file)
@@ -15,7 +15,7 @@ protected:
   using unique_lock = std::unique_lock<std::mutex>;
 
   std::mutex out_headers_lock;
-  map<string, string> out_headers;
+  std::map<std::string, std::string> out_headers;
   param_vec_t params;
 
   bufferlist::iterator *send_iter;
@@ -23,11 +23,11 @@ protected:
   size_t max_response; /* we need this as we don't stream out response */
   bufferlist response;
 
-  virtual int handle_header(const string& name, const string& val);
-  void get_params_str(map<string, string>& extra_args, string& dest);
+  virtual int handle_header(const std::string& name, const std::string& val);
+  void get_params_str(std::map<std::string, std::string>& extra_args, std::string& dest);
 
 public:
-  RGWHTTPSimpleRequest(CephContext *_cct, const string& _method, const string& _url,
+  RGWHTTPSimpleRequest(CephContext *_cct, const std::string& _method, const std::string& _url,
                        param_vec_t *_headers, param_vec_t *_params) : RGWHTTPClient(_cct, _method, _url),
                 http_status(0), status(0),
                 send_iter(NULL),
@@ -52,7 +52,7 @@ public:
 
   bufferlist& get_response() { return response; }
 
-  void get_out_headers(map<string, string> *pheaders); /* modifies out_headers */
+  void get_out_headers(std::map<std::string, std::string> *pheaders); /* modifies out_headers */
 
   int get_http_status() { return http_status; }
   int get_status();
@@ -61,7 +61,7 @@ public:
 class RGWRESTSimpleRequest : public RGWHTTPSimpleRequest {
   std::optional<std::string> api_name;
 public:
-  RGWRESTSimpleRequest(CephContext *_cct, const string& _method, const string& _url,
+  RGWRESTSimpleRequest(CephContext *_cct, const std::string& _method, const std::string& _url,
                        param_vec_t *_headers, param_vec_t *_params,
                        std::optional<std::string> _api_name) : RGWHTTPSimpleRequest(_cct, _method, _url, _headers, _params), api_name(_api_name) {}
 
@@ -79,25 +79,25 @@ class RGWRESTGenerateHTTPHeaders : public DoutPrefix {
   CephContext *cct;
   RGWEnv *new_env;
   req_info *new_info;
-  string region;
-  string service;
-  string method;
-  string url;
-  string resource;
+  std::string region;
+  std::string service;
+  std::string method;
+  std::string url;
+  std::string resource;
 
 public:
   RGWRESTGenerateHTTPHeaders(CephContext *_cct, RGWEnv *_env, req_info *_info);
-  void init(const string& method, const string& host,
-            const string& resource_prefix, const string& url,
-            const string& resource, const param_vec_t& params,
-            std::optional<string> api_name);
-  void set_extra_headers(const map<string, string>& extra_headers);
-  int set_obj_attrs(const DoutPrefixProvider *dpp, map<string, bufferlist>& rgw_attrs);
-  void set_http_attrs(const map<string, string>& http_attrs);
+  void init(const std::string& method, const std::string& host,
+            const std::string& resource_prefix, const std::string& url,
+            const std::string& resource, const param_vec_t& params,
+            std::optional<std::string> api_name);
+  void set_extra_headers(const std::map<std::string, std::string>& extra_headers);
+  int set_obj_attrs(const DoutPrefixProvider *dpp, std::map<std::string, bufferlist>& rgw_attrs);
+  void set_http_attrs(const std::map<std::string, std::string>& http_attrs);
   void set_policy(RGWAccessControlPolicy& policy);
   int sign(const DoutPrefixProvider *dpp, RGWAccessKey& key, const bufferlist *opt_content);
 
-  const string& get_url() { return url; }
+  const std::string& get_url() { return url; }
 };
 
 class RGWHTTPStreamRWRequest : public RGWHTTPSimpleRequest {
@@ -122,7 +122,7 @@ private:
 protected:
   bufferlist outbl;
 
-  int handle_header(const string& name, const string& val) override;
+  int handle_header(const std::string& name, const std::string& val) override;
 public:
   int send_data(void *ptr, size_t len, bool *pause) override;
   int receive_data(void *ptr, size_t len, bool *pause) override;
@@ -139,10 +139,10 @@ public:
       }
   };
 
-  RGWHTTPStreamRWRequest(CephContext *_cct, const string& _method, const string& _url,
+  RGWHTTPStreamRWRequest(CephContext *_cct, const std::string& _method, const std::string& _url,
                          param_vec_t *_headers, param_vec_t *_params) : RGWHTTPSimpleRequest(_cct, _method, _url, _headers, _params) {
   }
-  RGWHTTPStreamRWRequest(CephContext *_cct, const string& _method, const string& _url, ReceiveCB *_cb,
+  RGWHTTPStreamRWRequest(CephContext *_cct, const std::string& _method, const std::string& _url, ReceiveCB *_cb,
                          param_vec_t *_headers, param_vec_t *_params) : RGWHTTPSimpleRequest(_cct, _method, _url, _headers, _params),
                                                                        cb(_cb) {
   }
@@ -167,11 +167,11 @@ public:
   void finish_write();
 
   int complete_request(optional_yield y,
-                       string *etag = nullptr,
+                       std::string *etag = nullptr,
                        real_time *mtime = nullptr,
                        uint64_t *psize = nullptr,
-                       map<string, string> *pattrs = nullptr,
-                       map<string, string> *pheaders = nullptr);
+                       std::map<std::string, std::string> *pattrs = nullptr,
+                       std::map<std::string, std::string> *pheaders = nullptr);
 };
 
 class RGWRESTStreamRWRequest : public RGWHTTPStreamRWRequest {
@@ -181,10 +181,10 @@ class RGWRESTStreamRWRequest : public RGWHTTPStreamRWRequest {
   req_info new_info;
   
 protected:
-  std::optional<string> api_name;
+  std::optional<std::string> api_name;
   HostStyle host_style;
 public:
-  RGWRESTStreamRWRequest(CephContext *_cct, const string& _method, const string& _url, RGWHTTPStreamRWRequest::ReceiveCB *_cb,
+  RGWRESTStreamRWRequest(CephContext *_cct, const std::string& _method, const std::string& _url, RGWHTTPStreamRWRequest::ReceiveCB *_cb,
                          param_vec_t *_headers, param_vec_t *_params,
                          std::optional<std::string> _api_name, HostStyle _host_style = PathStyle) :
                          RGWHTTPStreamRWRequest(_cct, _method, _url, _cb, _headers, _params),
@@ -193,41 +193,41 @@ public:
   }
   virtual ~RGWRESTStreamRWRequest() override {}
 
-  int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
-  int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj);
+  int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, std::map<std::string, std::string>& extra_headers, const std::string& resource, bufferlist *send_data = nullptr /* optional input data */);
+  int send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey& key, std::map<std::string, std::string>& extra_headers, const rgw_obj& obj);
   int send(RGWHTTPManager *mgr);
 
-  int send_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr);
-  int send_request(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, RGWHTTPManager *mgr, bufferlist *send_data = nullptr /* optional input data */);
+  int send_request(const DoutPrefixProvider *dpp, RGWAccessKey& key, std::map<std::string, std::string>& extra_headers, const rgw_obj& obj, RGWHTTPManager *mgr);
+  int send_request(const DoutPrefixProvider *dpp, RGWAccessKey *key, std::map<std::string, std::string>& extra_headers, const std::string& resource, RGWHTTPManager *mgr, bufferlist *send_data = nullptr /* optional input data */);
 
   void add_params(param_vec_t *params);
 
 private:
-  int do_send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, map<string, string>& extra_headers, const string& resource, bufferlist *send_data = nullptr /* optional input data */);
+  int do_send_prepare(const DoutPrefixProvider *dpp, RGWAccessKey *key, std::map<std::string, std::string>& extra_headers, const std::string& resource, bufferlist *send_data = nullptr /* optional input data */);
 };
 
 class RGWRESTStreamReadRequest : public RGWRESTStreamRWRequest {
 public:
-  RGWRESTStreamReadRequest(CephContext *_cct, const string& _url, ReceiveCB *_cb, param_vec_t *_headers,
+  RGWRESTStreamReadRequest(CephContext *_cct, const std::string& _url, ReceiveCB *_cb, param_vec_t *_headers,
                param_vec_t *_params, std::optional<std::string> _api_name,
                 HostStyle _host_style = PathStyle) : RGWRESTStreamRWRequest(_cct, "GET", _url, _cb, _headers, _params, _api_name, _host_style) {}
 };
 
 class RGWRESTStreamHeadRequest : public RGWRESTStreamRWRequest {
 public:
-  RGWRESTStreamHeadRequest(CephContext *_cct, const string& _url, ReceiveCB *_cb, param_vec_t *_headers,
+  RGWRESTStreamHeadRequest(CephContext *_cct, const std::string& _url, ReceiveCB *_cb, param_vec_t *_headers,
                param_vec_t *_params, std::optional<std::string> _api_name) : RGWRESTStreamRWRequest(_cct, "HEAD", _url, _cb, _headers, _params, _api_name) {}
 };
 
 class RGWRESTStreamS3PutObj : public RGWHTTPStreamRWRequest {
-  std::optional<string> api_name;
+  std::optional<std::string> api_name;
   HostStyle host_style;
   RGWGetDataCB *out_cb;
   RGWEnv new_env;
   req_info new_info;
   RGWRESTGenerateHTTPHeaders headers_gen;
 public:
-  RGWRESTStreamS3PutObj(CephContext *_cct, const string& _method, const string& _url, param_vec_t *_headers,
+  RGWRESTStreamS3PutObj(CephContext *_cct, const std::string& _method, const std::string& _url, param_vec_t *_headers,
                param_vec_t *_params, std::optional<std::string> _api_name,
                 HostStyle _host_style) : RGWHTTPStreamRWRequest(_cct, _method, _url, nullptr, _headers, _params),
                 api_name(_api_name), host_style(_host_style),
@@ -235,12 +235,12 @@ public:
   ~RGWRESTStreamS3PutObj() override;
 
   void send_init(rgw::sal::Object* obj);
-  void send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, map<string, bufferlist>& rgw_attrs);
-  void send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, const map<string, string>& http_attrs,
+  void send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, std::map<std::string, bufferlist>& rgw_attrs);
+  void send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key, const std::map<std::string, std::string>& http_attrs,
                   RGWAccessControlPolicy& policy);
   void send_ready(const DoutPrefixProvider *dpp, RGWAccessKey& key);
 
-  void put_obj_init(const DoutPrefixProvider *dpp, RGWAccessKey& key, rgw::sal::Object* obj, map<string, bufferlist>& attrs);
+  void put_obj_init(const DoutPrefixProvider *dpp, RGWAccessKey& key, rgw::sal::Object* obj, std::map<std::string, bufferlist>& attrs);
 
   RGWGetDataCB *get_out_cb() { return out_cb; }
 };
index 299ed28eb6ba365d00ead2f9aa5df403c6481992..f0b7c60bce38b5e316f533061af0b0f58c36998b 100644 (file)
@@ -30,6 +30,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWOp_ZoneGroupMap_Get::execute(optional_yield y) {
   op_ret = zonegroup_map.read(this, g_ceph_context, static_cast<rgw::sal::RadosStore*>(store)->svc()->sysobj, y);
   if (op_ret < 0) {
index 04293d64c7987ae31533e09173aaee89af9576b8..ff966d6ff3f76e074369f9197a2e3c9b10f82135 100644 (file)
@@ -10,6 +10,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWRESTConn::RGWRESTConn(CephContext *_cct, RGWSI_Zone *zone_svc,
                          const string& _remote_id,
                          const list<string>& remote_endpoints,
index fefa56ca0266f33d0f80b4bd177abb5b61352a83..e0e1b12abe5d7e5f350a1e69eb8f2331845f67e2 100644 (file)
@@ -41,14 +41,14 @@ struct rgw_http_param_pair {
 inline void append_param_list(param_vec_t& params, const rgw_http_param_pair* pp)
 {
   while (pp && pp->key) {
-    string k = pp->key;
-    string v = (pp->val ? pp->val : "");
+    std::string k = pp->key;
+    std::string v = (pp->val ? pp->val : "");
     params.emplace_back(make_pair(std::move(k), std::move(v)));
     ++pp;
   }
 }
 
-// copy a null-terminated rgw_http_param_pair list into a list of string pairs
+// copy a null-terminated rgw_http_param_pair list into a list of std::string pairs
 inline param_vec_t make_param_list(const rgw_http_param_pair* pp)
 {
   param_vec_t params;
@@ -56,7 +56,7 @@ inline param_vec_t make_param_list(const rgw_http_param_pair* pp)
   return params;
 }
 
-inline param_vec_t make_param_list(const map<string, string> *pp)
+inline param_vec_t make_param_list(const std::map<std::string, std::string> *pp)
 {
   param_vec_t params;
   if (!pp) {
@@ -71,11 +71,11 @@ inline param_vec_t make_param_list(const map<string, string> *pp)
 class RGWRESTConn
 {
   CephContext *cct;
-  vector<string> endpoints;
+  std::vector<std::string> endpoints;
   RGWAccessKey key;
-  string self_zone_group;
-  string remote_id;
-  std::optional<string> api_name;
+  std::string self_zone_group;
+  std::string remote_id;
+  std::optional<std::string> api_name;
   HostStyle host_style;
   std::atomic<int64_t> counter = { 0 };
 
@@ -83,29 +83,29 @@ public:
 
   RGWRESTConn(CephContext *_cct,
               RGWSI_Zone *zone_svc,
-              const string& _remote_id,
-              const list<string>& endpoints,
-              std::optional<string> _api_name,
+              const std::string& _remote_id,
+              const std::list<std::string>& endpoints,
+              std::optional<std::string> _api_name,
               HostStyle _host_style = PathStyle);
   RGWRESTConn(CephContext *_cct,
               rgw::sal::Store* store,
-              const string& _remote_id,
-              const list<string>& endpoints,
-              std::optional<string> _api_name,
+              const std::string& _remote_id,
+              const std::list<std::string>& endpoints,
+              std::optional<std::string> _api_name,
               HostStyle _host_style = PathStyle);
   RGWRESTConn(CephContext *_cct,
               RGWSI_Zone *zone_svc,
-              const string& _remote_id,
-              const list<string>& endpoints,
+              const std::string& _remote_id,
+              const std::list<std::string>& endpoints,
               RGWAccessKey _cred,
-              std::optional<string> _api_name,
+              std::optional<std::string> _api_name,
               HostStyle _host_style = PathStyle);
   RGWRESTConn(CephContext *_cct,
               rgw::sal::Store* store,
-              const string& _remote_id,
-              const list<string>& endpoints,
+              const std::string& _remote_id,
+              const std::list<std::string>& endpoints,
               RGWAccessKey _cred,
-              std::optional<string> _api_name,
+              std::optional<std::string> _api_name,
               HostStyle _host_style = PathStyle);
 
   // custom move needed for atomic
@@ -113,19 +113,19 @@ public:
   RGWRESTConn& operator=(RGWRESTConn&& other);
   virtual ~RGWRESTConn() = default;
 
-  int get_url(string& endpoint);
-  string get_url();
-  const string& get_self_zonegroup() {
+  int get_url(std::string& endpoint);
+  std::string get_url();
+  const std::string& get_self_zonegroup() {
     return self_zone_group;
   }
-  const string& get_remote_id() {
+  const std::string& get_remote_id() {
     return remote_id;
   }
   RGWAccessKey& get_key() {
     return key;
   }
 
-  std::optional<string> get_api_name() const {
+  std::optional<std::string> get_api_name() const {
     return api_name;
   }
 
@@ -138,7 +138,7 @@ public:
   }
   size_t get_endpoint_count() const { return endpoints.size(); }
 
-  virtual void populate_params(param_vec_t& params, const rgw_user *uid, const string& zonegroup);
+  virtual void populate_params(param_vec_t& params, const rgw_user *uid, const std::string& zonegroup);
 
   /* sync request */
   int forward(const DoutPrefixProvider *dpp, const rgw_user& uid, req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
@@ -147,8 +147,8 @@ public:
   /* async requests */
   int put_obj_send_init(rgw::sal::Object* obj, const rgw_http_param_pair *extra_params, RGWRESTStreamS3PutObj **req);
   int put_obj_async_init(const DoutPrefixProvider *dpp, const rgw_user& uid, rgw::sal::Object* obj,
-                         map<string, bufferlist>& attrs, RGWRESTStreamS3PutObj **req);
-  int complete_request(RGWRESTStreamS3PutObj *req, string& etag,
+                         std::map<std::string, bufferlist>& attrs, RGWRESTStreamS3PutObj **req);
+  int complete_request(RGWRESTStreamS3PutObj *req, std::string& etag,
                        ceph::real_time *mtime, optional_yield y);
 
   struct get_obj_params {
@@ -158,7 +158,7 @@ public:
     const ceph::real_time *unmod_ptr{nullptr};
     bool high_precision_time{true};
 
-    string etag;
+    std::string etag;
 
     uint32_t mod_zone_id{0};
     uint64_t mod_pg_ver{0};
@@ -184,41 +184,41 @@ public:
               bool prepend_metadata, bool get_op, bool rgwx_stat, bool sync_manifest,
               bool skip_decrypt, bool send, RGWHTTPStreamRWRequest::ReceiveCB *cb, RGWRESTStreamRWRequest **req);
   int complete_request(RGWRESTStreamRWRequest *req,
-                       string *etag,
+                       std::string *etag,
                        ceph::real_time *mtime,
                        uint64_t *psize,
-                       map<string, string> *pattrs,
-                       map<string, string> *pheaders,
+                       std::map<std::string, std::string> *pattrs,
+                       std::map<std::string, std::string> *pheaders,
                        optional_yield y);
 
   int get_resource(const DoutPrefixProvider *dpp,
-                   const string& resource,
+                   const std::string& resource,
                   param_vec_t *extra_params,
-                   map<string, string>* extra_headers,
+                   std::map<std::string, std::string>* extra_headers,
                    bufferlist& bl,
                    bufferlist *send_data,
                    RGWHTTPManager *mgr,
                    optional_yield y);
 
   template <class T>
-  int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
+  int get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, param_vec_t *params,
                         bufferlist *in_data, optional_yield y, T& t);
   template <class T>
-  int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
+  int get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, param_vec_t *params,
                         optional_yield y, T& t);
   template <class T>
-  int get_json_resource(const DoutPrefixProvider *dpp, const string& resource, const rgw_http_param_pair *pp,
+  int get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, const rgw_http_param_pair *pp,
                         optional_yield y, T& t);
 
 private:
-  void populate_zonegroup(param_vec_t& params, const string& zonegroup) {
+  void populate_zonegroup(param_vec_t& params, const std::string& zonegroup) {
     if (!zonegroup.empty()) {
       params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "zonegroup", zonegroup));
     }
   }
   void populate_uid(param_vec_t& params, const rgw_user *uid) {
     if (uid) {
-      string uid_str = uid->to_str();
+      std::string uid_str = uid->to_str();
       if (!uid->empty()){
         params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "uid", uid_str));
       }
@@ -230,20 +230,20 @@ class S3RESTConn : public RGWRESTConn {
 
 public:
 
-  S3RESTConn(CephContext *_cct, RGWSI_Zone *svc_zone, const string& _remote_id, const list<string>& endpoints, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle) :
+  S3RESTConn(CephContext *_cct, RGWSI_Zone *svc_zone, const std::string& _remote_id, const std::list<std::string>& endpoints, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle) :
     RGWRESTConn(_cct, svc_zone, _remote_id, endpoints, _api_name, _host_style) {}
 
-  S3RESTConn(CephContext *_cct, rgw::sal::Store* store, const string& _remote_id, const list<string>& endpoints, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle) :
+  S3RESTConn(CephContext *_cct, rgw::sal::Store* store, const std::string& _remote_id, const std::list<std::string>& endpoints, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle) :
     RGWRESTConn(_cct, store, _remote_id, endpoints, _api_name, _host_style) {}
 
-  S3RESTConn(CephContext *_cct, RGWSI_Zone *svc_zone, const string& _remote_id, const list<string>& endpoints, RGWAccessKey _cred, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle):
+  S3RESTConn(CephContext *_cct, RGWSI_Zone *svc_zone, const std::string& _remote_id, const std::list<std::string>& endpoints, RGWAccessKey _cred, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle):
     RGWRESTConn(_cct, svc_zone, _remote_id, endpoints, _cred, _api_name, _host_style) {}
 
-  S3RESTConn(CephContext *_cct, rgw::sal::Store* store, const string& _remote_id, const list<string>& endpoints, RGWAccessKey _cred, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle):
+  S3RESTConn(CephContext *_cct, rgw::sal::Store* store, const std::string& _remote_id, const std::list<std::string>& endpoints, RGWAccessKey _cred, std::optional<std::string> _api_name, HostStyle _host_style = PathStyle):
     RGWRESTConn(_cct, store, _remote_id, endpoints, _cred, _api_name, _host_style) {}
   ~S3RESTConn() override = default;
 
-  void populate_params(param_vec_t& params, const rgw_user *uid, const string& zonegroup) override {
+  void populate_params(param_vec_t& params, const rgw_user *uid, const std::string& zonegroup) override {
     // do not populate any params in S3 REST Connection.
     return;
   }
@@ -251,7 +251,7 @@ public:
 
 
 template<class T>
-int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, param_vec_t *params,
                                    bufferlist *in_data, optional_yield y, T& t)
 {
   bufferlist bl;
@@ -269,14 +269,14 @@ int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string&
 }
 
 template<class T>
-int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, param_vec_t *params,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, param_vec_t *params,
                                    optional_yield y, T& t)
 {
   return get_json_resource(dpp, resource, params, nullptr, y, t);
 }
 
 template<class T>
-int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const string& resource, const rgw_http_param_pair *pp,
+int RGWRESTConn::get_json_resource(const DoutPrefixProvider *dpp, const std::string& resource, const rgw_http_param_pair *pp,
                                    optional_yield y, T& t)
 {
   param_vec_t params = make_param_list(pp);
@@ -296,9 +296,9 @@ public:
 class RGWRESTReadResource : public RefCountedObject, public RGWIOProvider {
   CephContext *cct;
   RGWRESTConn *conn;
-  string resource;
+  std::string resource;
   param_vec_t params;
-  map<string, string> headers;
+  std::map<std::string, std::string> headers;
   bufferlist bl;
   RGWStreamIntoBufferlist cb;
 
@@ -309,13 +309,13 @@ class RGWRESTReadResource : public RefCountedObject, public RGWIOProvider {
 
 public:
   RGWRESTReadResource(RGWRESTConn *_conn,
-                     const string& _resource,
+                     const std::string& _resource,
                      const rgw_http_param_pair *pp,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr);
 
   RGWRESTReadResource(RGWRESTConn *_conn,
-                     const string& _resource,
+                     const std::string& _resource,
                      param_vec_t& _params,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr);
@@ -340,7 +340,7 @@ public:
 
   int aio_read(const DoutPrefixProvider *dpp);
 
-  string to_str() {
+  std::string to_str() {
     return req.to_str();
   }
 
@@ -416,10 +416,10 @@ int RGWRESTReadResource::wait(T *dest, optional_yield y)
 class RGWRESTSendResource : public RefCountedObject, public RGWIOProvider {
   CephContext *cct;
   RGWRESTConn *conn;
-  string method;
-  string resource;
+  std::string method;
+  std::string resource;
   param_vec_t params;
-  map<string, string> headers;
+  std::map<std::string, std::string> headers;
   bufferlist bl;
   RGWStreamIntoBufferlist cb;
 
@@ -430,15 +430,15 @@ class RGWRESTSendResource : public RefCountedObject, public RGWIOProvider {
 
 public:
   RGWRESTSendResource(RGWRESTConn *_conn,
-                      const string& _method,
-                     const string& _resource,
+                      const std::string& _method,
+                     const std::string& _resource,
                      const rgw_http_param_pair *pp,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr);
 
   RGWRESTSendResource(RGWRESTConn *_conn,
-                      const string& _method,
-                     const string& _resource,
+                      const std::string& _method,
+                     const std::string& _resource,
                      param_vec_t& params,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr);
@@ -461,7 +461,7 @@ public:
 
   int aio_send(const DoutPrefixProvider *dpp, bufferlist& bl);
 
-  string to_str() {
+  std::string to_str() {
     return req.to_str();
   }
 
@@ -512,14 +512,14 @@ int RGWRESTSendResource::wait(T *dest, optional_yield y, E *err_result)
 class RGWRESTPostResource : public RGWRESTSendResource {
 public:
   RGWRESTPostResource(RGWRESTConn *_conn,
-                     const string& _resource,
+                     const std::string& _resource,
                      const rgw_http_param_pair *pp,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "POST", _resource,
                                                                   pp, extra_headers, _mgr) {}
 
   RGWRESTPostResource(RGWRESTConn *_conn,
-                     const string& _resource,
+                     const std::string& _resource,
                      param_vec_t& params,
                      param_vec_t *extra_headers,
                      RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "POST", _resource,
@@ -530,14 +530,14 @@ public:
 class RGWRESTPutResource : public RGWRESTSendResource {
 public:
   RGWRESTPutResource(RGWRESTConn *_conn,
-                    const string& _resource,
+                    const std::string& _resource,
                     const rgw_http_param_pair *pp,
                     param_vec_t *extra_headers,
                     RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "PUT", _resource,
                                                                   pp, extra_headers, _mgr) {}
 
   RGWRESTPutResource(RGWRESTConn *_conn,
-                    const string& _resource,
+                    const std::string& _resource,
                     param_vec_t& params,
                     param_vec_t *extra_headers,
                     RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "PUT", _resource,
@@ -548,14 +548,14 @@ public:
 class RGWRESTDeleteResource : public RGWRESTSendResource {
 public:
   RGWRESTDeleteResource(RGWRESTConn *_conn,
-                    const string& _resource,
+                    const std::string& _resource,
                     const rgw_http_param_pair *pp,
                     param_vec_t *extra_headers,
                     RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "DELETE", _resource,
                                                                   pp, extra_headers, _mgr) {}
 
   RGWRESTDeleteResource(RGWRESTConn *_conn,
-                    const string& _resource,
+                    const std::string& _resource,
                     param_vec_t& params,
                     param_vec_t *extra_headers,
                     RGWHTTPManager *_mgr) : RGWRESTSendResource(_conn, "DELETE", _resource,
index 9a95cdb254fb35880d70735542ab7fdc8f2dcd61..bbc2e412f5a50ec038b1c918f74b588219abb8de 100644 (file)
@@ -16,6 +16,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWHandler_REST_IAM::rgw_iam_parse_input()
 {
   if (post_body.size() > 0) {
index 4d3b6b0af3d981fe823bc5329d026699cdc2b26d..0822f6f7e68932ef1d9526b0bfa5f3b47f4ba614 100644 (file)
@@ -9,14 +9,15 @@
 
 class RGWHandler_REST_IAM : public RGWHandler_REST {
   const rgw::auth::StrategyRegistry& auth_registry;
-  const string& post_body;
+  const std::string& post_body;
   RGWOp *op_post() override;
   void rgw_iam_parse_input();
 public:
 
   static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format);
 
-  RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry& auth_registry, const string& post_body="")
+  RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry& auth_registry,
+                     const std::string& post_body="")
     : RGWHandler_REST(),
       auth_registry(auth_registry),
       post_body(post_body) {}
index 58d37703a261e8678993f250a6d151a41d2068a5..348c3952dbfb1d0179c0a699084cb57165495702 100644 (file)
@@ -37,6 +37,8 @@
 #define LOG_CLASS_LIST_MAX_ENTRIES (1000)
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWOp_MDLog_List::execute(optional_yield y) {
   string   period = s->info.args.get("period");
   string   shard = s->info.args.get("id");
index 58d8b563cd25564528edf13e8af6777ce42fc705..9068165b64550145ea39ab281b74feadb860bc06 100644 (file)
@@ -34,7 +34,7 @@ public:
     return check_caps(s->user->get_caps());
   }
   void send_response() override;
-  virtual void send_response(list<rgw_bi_log_entry>& entries, string& marker);
+  virtual void send_response(std::list<rgw_bi_log_entry>& entries, std::string& marker);
   virtual void send_response_end();
   void execute(optional_yield y) override;
   const char* name() const override {
@@ -43,9 +43,9 @@ public:
 };
 
 class RGWOp_BILog_Info : public RGWRESTOp {
-  string bucket_ver;
-  string master_ver;
-  string max_marker;
+  std::string bucket_ver;
+  std::string master_ver;
+  std::string max_marker;
   bool syncstopped;
 public:
   RGWOp_BILog_Info() : bucket_ver(), master_ver(), syncstopped(false) {}
@@ -79,8 +79,8 @@ public:
 };
 
 class RGWOp_MDLog_List : public RGWRESTOp {
-  list<cls_log_entry> entries;
-  string last_marker;
+  std::list<cls_log_entry> entries;
+  std::string last_marker;
   bool truncated;
 public:
   RGWOp_MDLog_List() : truncated(false) {}
index 1d84ee399d0ade63f6b40841254bce0a671db86f..52303b871dccaf56f77c5dafc51e6680c551d81e 100644 (file)
@@ -30,6 +30,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static inline void frame_metadata_key(req_state *s, string& out) {
   bool exists;
   string key = s->info.args.get("key", &exists);
index 13691ac3a207601c94f4eff0f9f54a67cb934a41..dd512c8ea768f16dcbe4b4c1b0ace64535de18c1 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 class RGWOp_Metadata_Put : public RGWRESTOp {
   int get_data(bufferlist& bl);
-  string update_status;
+  std::string update_status;
   obj_version ondisk_version;
 public:
   RGWOp_Metadata_Put() {}
index 21d35e2c33d18550a87121eb8ba9db1a65f2ff3c..1a4dca23c8adc17a85a197b80c4fde689c765011 100644 (file)
@@ -20,6 +20,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWRestOIDCProvider::verify_permission(optional_yield y)
 {
   if (s->auth.identity->is_anonymous()) {
index b75dcc799f66d4ffa892011f15bc8f4a332642ce..33535c6b5123d4e498633f55d49f117b10ea0efe 100644 (file)
@@ -8,10 +8,10 @@
 
 class RGWRestOIDCProvider : public RGWRESTOp {
 protected:
-  vector<string> client_ids;
-  vector<string> thumbprints;
-  string provider_url; //'iss' field in JWT
-  string provider_arn;
+  std::vector<std::string> client_ids;
+  std::vector<std::string> thumbprints;
+  std::string provider_url; //'iss' field in JWT
+  std::string provider_arn;
 public:
   int verify_permission(optional_yield y) override;
   void send_response() override;
index 418f41c029c4570a27429bd1cead5f249b2a3958..32fd0b581a40af6a8ac7e18a43c3fd1d5f0a2b28 100644 (file)
@@ -21,6 +21,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static const char* AWS_SNS_NS("https://sns.amazonaws.com/doc/2010-03-31/");
 
 // command (AWS compliant): 
index f42a40e2fd1e57ef09782460998e0af872752b32..a702cf342041441866671fac35d8a38208b5fa65 100644 (file)
@@ -82,7 +82,7 @@ public:
 // delete a topic
 class RGWPSDeleteTopicOp : public RGWDefaultResponseOp {
 protected:
-  string topic_name;
+  std::string topic_name;
   std::optional<RGWPubSub> ps;
   
   virtual int get_params() = 0;
@@ -229,7 +229,7 @@ public:
 class RGWPSCreateNotifOp : public RGWDefaultResponseOp {
 protected:
   std::optional<RGWPubSub> ps;
-  string bucket_name;
+  std::string bucket_name;
   RGWBucketInfo bucket_info;
 
   virtual int get_params() = 0;
index 24925c55e890b7048bb2be7a18b367328559e4d6..6f4ebee800200267416658c9a2382bcc78f4f4d2 100644 (file)
@@ -15,6 +15,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 // reject 'period push' if we would have to fetch too many intermediate periods
 static const uint32_t PERIOD_HISTORY_FETCH_MAX = 64;
 
index 18dd15f7374c9105aab27d521a05a905bb15021b..6ae8e67d1ed18d22f209e517fe86009c2e2c0b8c 100644 (file)
@@ -19,6 +19,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWRestRole::verify_permission(optional_yield y)
 {
   if (s->auth.identity->is_anonymous()) {
index 4dc04186dc41a9edf5ad95fbbd691c6a89855973..30bf0446bb8a2eff1cac637840e6410a64022885 100644 (file)
 
 class RGWRestRole : public RGWRESTOp {
 protected:
-  string role_name;
-  string role_path;
-  string trust_policy;
-  string policy_name;
-  string perm_policy;
-  string path_prefix;
-  string max_session_duration;
+  std::string role_name;
+  std::string role_path;
+  std::string trust_policy;
+  std::string policy_name;
+  std::string perm_policy;
+  std::string path_prefix;
+  std::string max_session_duration;
   std::unique_ptr<rgw::sal::RGWRole> _role;
 public:
   int verify_permission(optional_yield y) override;
index 8b671454cfaef38675301f2ce29b9ed475146590..4ca77ee6ddf5f19c8b0861300742e0d316ff33b2 100644 (file)
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace rgw;
 using namespace ceph::crypto;
 
-using std::get;
-
 void list_all_buckets_start(struct req_state *s)
 {
   s->formatter->open_array_section_in_ns("ListAllMyBucketsResult", XMLNS_AWS_S3);
index 7e2d787cf97979a0a8566fcc4f894b9572af44a8..fd539a2553b23fb5b4d50bea8286d12f4545bfd3 100644 (file)
@@ -170,8 +170,8 @@ class RGWListBucket_ObjStore_S3v2 : public RGWListBucket_ObjStore_S3 {
   bool fetchOwner;
   bool start_after_exist;
   bool continuation_token_exist;
-  string startAfter;
-  string continuation_token;
+  std::string startAfter;
+  std::string continuation_token;
 public:
   RGWListBucket_ObjStore_S3v2() :  fetchOwner(false) {
   }
@@ -281,7 +281,7 @@ public:
                          rgw::sal::DataProcessor *cb) override;
   int get_decrypt_filter(std::unique_ptr<RGWGetObj_Filter>* filter,
                          RGWGetObj_Filter* cb,
-                         map<string, bufferlist>& attrs,
+                         std::map<std::string, bufferlist>& attrs,
                          bufferlist* manifest_bl) override;
 };
 
@@ -291,7 +291,7 @@ class RGWPostObj_ObjStore_S3 : public RGWPostObj_ObjStore {
   std::string content_type;
   RGWPolicyEnv env;
   RGWPolicy post_policy;
-  map<string, string> crypt_http_responses;
+  std::map<std::string, std::string> crypt_http_responses;
 
   const rgw::auth::StrategyRegistry* auth_registry_ptr = nullptr;
 
@@ -355,7 +355,7 @@ public:
   RGWPutACLs_ObjStore_S3() {}
   ~RGWPutACLs_ObjStore_S3() override {}
 
-  int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, stringstream& ss) override;
+  int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, std::stringstream& ss) override;
   void send_response() override;
   int get_params(optional_yield y) override;
 };
@@ -470,7 +470,7 @@ public:
 
   int get_params(optional_yield y) override;
   void send_response() override;
-  int prepare_encryption(map<string, bufferlist>& attrs) override;
+  int prepare_encryption(std::map<std::string, bufferlist>& attrs) override;
 };
 
 class RGWCompleteMultipart_ObjStore_S3 : public RGWCompleteMultipart_ObjStore {
@@ -517,7 +517,7 @@ public:
   void send_status() override;
   void begin_response() override;
   void send_partial_response(rgw_obj_key& key, bool delete_marker,
-                             const string& marker_version_id, int ret) override;
+                             const std::string& marker_version_id, int ret) override;
   void end_response() override;
 };
 
@@ -632,8 +632,8 @@ public:
   }
   ~RGWHandler_Auth_S3() override = default;
 
-  static int validate_bucket_name(const string& bucket);
-  static int validate_object_name(const string& bucket);
+  static int validate_bucket_name(const std::string& bucket);
+  static int validate_object_name(const std::string& bucket);
 
   int init(rgw::sal::Store* store,
            struct req_state *s,
@@ -827,7 +827,7 @@ static inline bool looks_like_ip_address(const char *bucket)
   return (num_periods == 3);
 }
 
-inline int valid_s3_object_name(const string& name) {
+inline int valid_s3_object_name(const std::string& name) {
   if (name.size() > 1024) {
     return -ERR_INVALID_OBJECT_NAME;
   }
@@ -837,7 +837,7 @@ inline int valid_s3_object_name(const string& name) {
   return 0;
 }
 
-inline int valid_s3_bucket_name(const string& name, bool relaxed=false)
+inline int valid_s3_bucket_name(const std::string& name, bool relaxed=false)
 {
   // This function enforces Amazon's spec for bucket names.
   // (The requirements, not the recommendations.)
index 36bf6f94a0406eb45647cc1186c2fd635c4cd180..33d816aed30a1c0e5a80f946c73558f78a7d26e5 100644 (file)
@@ -35,13 +35,13 @@ protected:
   RGWOp *op_copy() override { return NULL; }
   RGWOp *op_options() override { return NULL; }
 
-  int serve_errordoc(const DoutPrefixProvider *dpp, int http_ret, const string &errordoc_key, optional_yield y);
+  int serve_errordoc(const DoutPrefixProvider *dpp, int http_ret, const std::string &errordoc_key, optional_yield y);
 public:
   using RGWHandler_REST_S3::RGWHandler_REST_S3;
   ~RGWHandler_REST_S3Website() override = default;
 
   int init(rgw::sal::Store* store, req_state *s, rgw::io::BasicClient* cio) override;
-  int error_handler(int err_no, string *error_content, optional_yield y) override;
+  int error_handler(int err_no, std::string *error_content, optional_yield y) override;
 };
 
 class RGWHandler_REST_Service_S3Website : public RGWHandler_REST_S3Website {
index 7d51d699b64677726abef1a86e31873e9f75d11a..561bb4322fd531c0565d0a134fc425a32c559fff 100644 (file)
@@ -41,6 +41,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace rgw::auth::sts {
 
 bool
index 396b3cbe52b9440640a2f59c18eb743ca47dc5e8..741072fe82998800609fbcc41c07c9f9be336429 100644 (file)
@@ -25,20 +25,20 @@ class WebTokenEngine : public rgw::auth::Engine {
 
   bool is_applicable(const std::string& token) const noexcept;
 
-  bool is_client_id_valid(vector<string>& client_ids, const string& client_id) const;
+  bool is_client_id_valid(std::vector<std::string>& client_ids, const std::string& client_id) const;
 
-  bool is_cert_valid(const vector<string>& thumbprints, const string& cert) const;
+  bool is_cert_valid(const std::vector<std::string>& thumbprints, const std::string& cert) const;
 
-  std::unique_ptr<rgw::sal::RGWOIDCProvider> get_provider(const DoutPrefixProvider *dpp, const string& role_arn, const string& iss) const;
+  std::unique_ptr<rgw::sal::RGWOIDCProvider> get_provider(const DoutPrefixProvider *dpp, const std::string& role_arn, const std::string& iss) const;
 
-  std::string get_role_tenant(const string& role_arn) const;
+  std::string get_role_tenant(const std::string& role_arn) const;
 
-  std::string get_cert_url(const string& iss, const DoutPrefixProvider *dpp,optional_yield y) const;
+  std::string get_cert_url(const std::string& iss, const DoutPrefixProvider *dpp,optional_yield y) const;
 
   boost::optional<WebTokenEngine::token_t>
   get_from_jwt(const DoutPrefixProvider* dpp, const std::string& token, const req_state* const s, optional_yield y) const;
 
-  void validate_signature (const DoutPrefixProvider* dpp, const jwt::decoded_jwt& decoded, const string& algorithm, const string& iss, const vector<string>& thumbprints, optional_yield y) const;
+  void validate_signature (const DoutPrefixProvider* dpp, const jwt::decoded_jwt& decoded, const std::string& algorithm, const std::string& iss, const std::vector<std::string>& thumbprints, optional_yield y) const;
 
   result_t authenticate(const DoutPrefixProvider* dpp,
                         const std::string& token,
@@ -82,8 +82,8 @@ class DefaultStrategy : public rgw::auth::Strategy,
 
   aplptr_t create_apl_web_identity( CephContext* cct,
                                     const req_state* s,
-                                    const string& role_session,
-                                    const string& role_tenant,
+                                    const std::string& role_session,
+                                    const std::string& role_tenant,
                                     const rgw::web_idp::WebTokenClaims& token) const override {
     auto apl = rgw::auth::add_sysreq(cct, store, s,
       rgw::auth::WebIdentityApplier(cct, store, role_session, role_tenant, token));
@@ -123,14 +123,14 @@ public:
 
 class RGWSTSAssumeRoleWithWebIdentity : public RGWREST_STS {
 protected:
-  string duration;
-  string providerId;
-  string policy;
-  string roleArn;
-  string roleSessionName;
-  string sub;
-  string aud;
-  string iss;
+  std::string duration;
+  std::string providerId;
+  std::string policy;
+  std::string roleArn;
+  std::string roleSessionName;
+  std::string sub;
+  std::string aud;
+  std::string iss;
 public:
   RGWSTSAssumeRoleWithWebIdentity() = default;
   void execute(optional_yield y) override;
@@ -141,13 +141,13 @@ public:
 
 class RGWSTSAssumeRole : public RGWREST_STS {
 protected:
-  string duration;
-  string externalId;
-  string policy;
-  string roleArn;
-  string roleSessionName;
-  string serialNumber;
-  string tokenCode;
+  std::string duration;
+  std::string externalId;
+  std::string policy;
+  std::string roleArn;
+  std::string roleSessionName;
+  std::string serialNumber;
+  std::string tokenCode;
 public:
   RGWSTSAssumeRole() = default;
   void execute(optional_yield y) override;
@@ -158,9 +158,9 @@ public:
 
 class RGWSTSGetSessionToken : public RGWREST_STS {
 protected:
-  string duration;
-  string serialNumber;
-  string tokenCode;
+  std::string duration;
+  std::string serialNumber;
+  std::string tokenCode;
 public:
   RGWSTSGetSessionToken() = default;
   void execute(optional_yield y) override;
@@ -180,14 +180,14 @@ public:
 
 class RGWHandler_REST_STS : public RGWHandler_REST {
   const rgw::auth::StrategyRegistry& auth_registry;
-  const string& post_body;
+  const std::string& post_body;
   RGWOp *op_post() override;
   void rgw_sts_parse_input();
 public:
 
   static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format);
 
-  RGWHandler_REST_STS(const rgw::auth::StrategyRegistry& auth_registry, const string& post_body="")
+  RGWHandler_REST_STS(const rgw::auth::StrategyRegistry& auth_registry, const std::string& post_body="")
     : RGWHandler_REST(),
       auth_registry(auth_registry),
       post_body(post_body) {}
index 832dbb8795ddafea9495178559f561b0c8577633..17f8850b05a5537908bc3e93d7ab11671ed497e7 100644 (file)
@@ -39,6 +39,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWListBuckets_ObjStore_SWIFT::get_params(optional_yield y)
 {
   prefix = s->info.args.get("prefix");
index ffc84ed6e3f93aecf4a70116afdbdc6ca12fd6f8..e799a44c65ba60bba8aba0fb83c259920fe83543 100644 (file)
@@ -65,7 +65,7 @@ public:
 };
 
 class RGWListBucket_ObjStore_SWIFT : public RGWListBucket_ObjStore {
-  string path;
+  std::string path;
 public:
   RGWListBucket_ObjStore_SWIFT() {
     default_max = 10000;
@@ -78,7 +78,7 @@ public:
 };
 
 class RGWStatAccount_ObjStore_SWIFT : public RGWStatAccount_ObjStore {
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
 public:
   RGWStatAccount_ObjStore_SWIFT() {
   }
@@ -116,7 +116,7 @@ public:
 };
 
 class RGWPutObj_ObjStore_SWIFT : public RGWPutObj_ObjStore {
-  string lo_etag;
+  std::string lo_etag;
 public:
   RGWPutObj_ObjStore_SWIFT() {}
   ~RGWPutObj_ObjStore_SWIFT() override {}
@@ -235,10 +235,10 @@ protected:
   struct info
   {
     bool is_admin_info;
-    function<void (Formatter&, const ConfigProxy&, rgw::sal::Store*)> list_data;
+    std::function<void (Formatter&, const ConfigProxy&, rgw::sal::Store*)> list_data;
   };
 
-  static const vector<pair<string, struct info>> swift_info;
+  static const std::vector<std::pair<std::string, struct info>> swift_info;
 public:
   RGWInfo_ObjStore_SWIFT() {}
   ~RGWInfo_ObjStore_SWIFT() override {}
@@ -393,7 +393,7 @@ public:
   }
   ~RGWHandler_REST_SWIFT() override = default;
 
-  int validate_bucket_name(const string& bucket);
+  int validate_bucket_name(const std::string& bucket);
 
   int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider *dpp, optional_yield y) override;
index 0535269b8290704feb40680f4723392c6bb483e7..1de0abdd9a55cd171981be9188f8844645524d3f 100644 (file)
@@ -10,6 +10,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGWOp_Usage_Get : public RGWRESTOp {
 
 public:
index 38ff4e1267ee5d0b27c69c163412fc4773341294..37c13003ec5363cb6b29cda742c4a752206231ac 100644 (file)
@@ -17,6 +17,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGWOp_User_List : public RGWRESTOp {
 
 public:
index 4e98406511c837142fc0f41257ede77adfcd8ea0..a552f3b2b2a2ed4d2d38ddf5b165ee5757bc8694 100644 (file)
@@ -20,6 +20,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using rgw::IAM::Policy;
 
 void RGWRestUserPolicy::dump(Formatter *f) const
index b8627f335c2b1326a4db6c51bd0e6a0002ba6131..4a123456ecf1810d8782062096fbe1b5930df0dc 100644 (file)
@@ -7,9 +7,9 @@
 class RGWRestUserPolicy : public RGWRESTOp {
 protected:
   static constexpr int MAX_POLICY_NAME_LEN = 128;
-  string policy_name;
-  string user_name;
-  string policy;
+  std::string policy_name;
+  std::string user_name;
+  std::string policy;
 
   bool validate_input();
 
index 78ad6327e834d35aeb5b73a1d64756da9887129c..804fa892d831dc4bc2d3476827fcc04426cbe930 100644 (file)
@@ -24,6 +24,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace rgw { namespace sal {
 
 const string RGWRole::role_name_oid_prefix = "role_names.";
index e94fde18ffde022f5b250959b732e3c7e4f1640a..0563db8a27ff4c95bd6b37e6ec915d9b12dab8ce 100644 (file)
@@ -34,7 +34,7 @@ protected:
   std::string arn;
   std::string creation_date;
   std::string trust_policy;
-  map<std::string, std::string> perm_policy_map;
+  std::map<std::string, std::string> perm_policy_map;
   std::string tenant;
   uint64_t max_session_duration;
 
@@ -120,7 +120,7 @@ public:
   int update(const DoutPrefixProvider *dpp, optional_yield y);
   void update_trust_policy(std::string& trust_policy);
   void set_perm_policy(const std::string& policy_name, const std::string& perm_policy);
-  vector<std::string> get_role_policy_names();
+  std::vector<std::string> get_role_policy_names();
   int get_role_policy(const DoutPrefixProvider* dpp, const std::string& policy_name, std::string& perm_policy);
   int delete_policy(const DoutPrefixProvider* dpp, const std::string& policy_name);
   void dump(Formatter *f) const;
index a48b09353da7d4f38daae8822e5ca0bcf01f88e0..0c12348b44e20533f278a5605c3d0de1692919d1 100644 (file)
@@ -68,12 +68,12 @@ struct RGWClusterStat {
 class RGWGetBucketStats_CB : public RefCountedObject {
 protected:
   rgw_bucket bucket;
-  map<RGWObjCategory, RGWStorageStats>* stats;
+  std::map<RGWObjCategory, RGWStorageStats>* stats;
 public:
   explicit RGWGetBucketStats_CB(const rgw_bucket& _bucket) : bucket(_bucket), stats(NULL) {}
   ~RGWGetBucketStats_CB() override {}
   virtual void handle_response(int r) = 0;
-  virtual void set_response(map<RGWObjCategory, RGWStorageStats>* _stats) {
+  virtual void set_response(std::map<RGWObjCategory, RGWStorageStats>* _stats) {
     stats = _stats;
   }
 };
@@ -210,12 +210,12 @@ class Store {
     virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) = 0;
     virtual int get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) = 0;
 
-    virtual int log_usage(const DoutPrefixProvider *dpp, map<rgw_user_bucket, RGWUsageBatch>& usage_info) = 0;
+    virtual int log_usage(const DoutPrefixProvider *dpp, std::map<rgw_user_bucket, RGWUsageBatch>& usage_info) = 0;
     virtual int log_op(const DoutPrefixProvider *dpp, std::string& oid, bufferlist& bl) = 0;
     virtual int register_to_service_map(const DoutPrefixProvider *dpp, const std::string& daemon_type,
-                                       const map<std::string, std::string>& meta) = 0;
+                                       const std::map<std::string, std::string>& meta) = 0;
     virtual void get_quota(RGWQuotaInfo& bucket_quota, RGWQuotaInfo& user_quota) = 0;
-    virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector<rgw_bucket>& buckets, bool enabled) = 0;
+    virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, std::vector<rgw_bucket>& buckets, bool enabled) = 0;
     virtual uint64_t get_new_req_id() = 0;
     virtual int get_sync_policy_handler(const DoutPrefixProvider* dpp,
                                        std::optional<rgw_zone_id> zone,
@@ -223,17 +223,17 @@ class Store {
                                        RGWBucketSyncPolicyHandlerRef* phandler,
                                        optional_yield y) = 0;
     virtual RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone) = 0;
-    virtual void wakeup_meta_sync_shards(set<int>& shard_ids) = 0;
-    virtual void wakeup_data_sync_shards(const DoutPrefixProvider *dpp, const rgw_zone_id& source_zone, map<int, set<std::string> >& shard_ids) = 0;
+    virtual void wakeup_meta_sync_shards(std::set<int>& shard_ids) = 0;
+    virtual void wakeup_data_sync_shards(const DoutPrefixProvider *dpp, const rgw_zone_id& source_zone, std::map<int, std::set<std::string> >& shard_ids) = 0;
     virtual int clear_usage(const DoutPrefixProvider *dpp) = 0;
     virtual int read_all_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch,
                               uint32_t max_entries, bool* is_truncated,
                               RGWUsageIter& usage_iter,
-                              map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
+                              std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
     virtual int trim_all_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) = 0;
     virtual int get_config_key_val(std::string name, bufferlist* bl) = 0;
     virtual int meta_list_keys_init(const DoutPrefixProvider *dpp, const std::string& section, const std::string& marker, void** phandle) = 0;
-    virtual int meta_list_keys_next(const DoutPrefixProvider *dpp, void* handle, int max, list<std::string>& keys, bool* truncated) = 0;
+    virtual int meta_list_keys_next(const DoutPrefixProvider *dpp, void* handle, int max, std::list<std::string>& keys, bool* truncated) = 0;
     virtual void meta_list_keys_complete(void* handle) = 0;
     virtual std::string meta_get_marker(void* handle) = 0;
     virtual int meta_remove(const DoutPrefixProvider* dpp, std::string& metadata_key, optional_yield y) = 0;
@@ -250,11 +250,11 @@ class Store {
                          optional_yield y,
                          const std::string& path_prefix,
                          const std::string& tenant,
-                         vector<std::unique_ptr<RGWRole>>& roles) = 0;
+                         std::vector<std::unique_ptr<RGWRole>>& roles) = 0;
     virtual std::unique_ptr<RGWOIDCProvider> get_oidc_provider() = 0;
     virtual int get_oidc_providers(const DoutPrefixProvider *dpp,
                                   const std::string& tenant,
-                                  vector<std::unique_ptr<RGWOIDCProvider>>& providers) = 0;
+                                  std::vector<std::unique_ptr<RGWOIDCProvider>>& providers) = 0;
     virtual std::unique_ptr<MultipartUpload> get_multipart_upload(Bucket* bucket, const std::string& oid, std::optional<std::string> upload_id=std::nullopt, ceph::real_time mtime=real_clock::now()) = 0;
     virtual std::unique_ptr<Writer> get_append_writer(const DoutPrefixProvider *dpp,
                                  optional_yield y,
@@ -324,7 +324,7 @@ class User {
     virtual int complete_flush_stats(const DoutPrefixProvider *dpp, optional_yield y) = 0;
     virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
                           bool* is_truncated, RGWUsageIter& usage_iter,
-                          map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
+                          std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
     virtual int trim_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) = 0;
     virtual RGWObjVersionTracker& get_version_tracker() { return objv_tracker; }
     virtual Attrs& get_attrs() { return attrs; }
@@ -337,12 +337,12 @@ class User {
     /* dang temporary; will be removed when User is complete */
     RGWUserInfo& get_info() { return info; }
 
-    friend inline ostream& operator<<(ostream& out, const User& u) {
+    friend inline std::ostream& operator<<(std::ostream& out, const User& u) {
       out << u.info.user_id;
       return out;
     }
 
-    friend inline ostream& operator<<(ostream& out, const User* u) {
+    friend inline std::ostream& operator<<(std::ostream& out, const User* u) {
       if (!u)
        out << "<NULL>";
       else
@@ -350,7 +350,7 @@ class User {
       return out;
     }
 
-    friend inline ostream& operator<<(ostream& out, const std::unique_ptr<User>& p) {
+    friend inline std::ostream& operator<<(std::ostream& out, const std::unique_ptr<User>& p) {
       out << p.get();
       return out;
     }
@@ -381,8 +381,8 @@ class Bucket {
       int shard_id{RGW_NO_SHARD};
     };
     struct ListResults {
-      vector<rgw_bucket_dir_entry> objs;
-      map<std::string, bool> common_prefixes;
+      std::vector<rgw_bucket_dir_entry> objs;
+      std::map<std::string, bool> common_prefixes;
       bool is_truncated{false};
       rgw_obj_key next_marker;
     };
@@ -450,7 +450,7 @@ class Bucket {
     virtual int try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime) = 0;
     virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
                           bool* is_truncated, RGWUsageIter& usage_iter,
-                          map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
+                          std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
     virtual int trim_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) = 0;
     virtual int remove_objs_from_index(const DoutPrefixProvider *dpp, std::list<rgw_obj_index_key>& objs_to_unlink) = 0;
     virtual int check_index(const DoutPrefixProvider *dpp, std::map<RGWObjCategory, RGWStorageStats>& existing_stats, std::map<RGWObjCategory, RGWStorageStats>& calculated_stats) = 0;
@@ -482,27 +482,27 @@ class Bucket {
     virtual std::unique_ptr<Bucket> clone() = 0;
 
     virtual int list_multiparts(const DoutPrefixProvider *dpp,
-                               const string& prefix,
-                               string& marker,
-                               const string& delim,
+                               const std::string& prefix,
+                               std::string& marker,
+                               const std::string& delim,
                                const int& max_uploads,
-                               vector<std::unique_ptr<MultipartUpload>>& uploads,
-                               map<string, bool> *common_prefixes,
+                               std::vector<std::unique_ptr<MultipartUpload>>& uploads,
+                               std::map<std::string, bool> *common_prefixes,
                                bool *is_truncated) = 0;
     virtual int abort_multiparts(const DoutPrefixProvider *dpp,
                                 CephContext *cct,
-                                string& prefix, string& delim) = 0;
+                                std::string& prefix, std::string& delim) = 0;
 
     /* dang - This is temporary, until the API is completed */
     rgw_bucket& get_key() { return info.bucket; }
     RGWBucketInfo& get_info() { return info; }
 
-    friend inline ostream& operator<<(ostream& out, const Bucket& b) {
+    friend inline std::ostream& operator<<(std::ostream& out, const Bucket& b) {
       out << b.info.bucket;
       return out;
     }
 
-    friend inline ostream& operator<<(ostream& out, const Bucket* b) {
+    friend inline std::ostream& operator<<(std::ostream& out, const Bucket* b) {
       if (!b)
        out << "<NULL>";
       else
@@ -510,7 +510,7 @@ class Bucket {
       return out;
     }
 
-    friend inline ostream& operator<<(ostream& out, const std::unique_ptr<Bucket>& p) {
+    friend inline std::ostream& operator<<(std::ostream& out, const std::unique_ptr<Bucket>& p) {
       out << p.get();
       return out;
     }
@@ -551,7 +551,7 @@ public:
     return *this;
   };
 
-  map<std::string, std::unique_ptr<Bucket>>& get_buckets() { return buckets; }
+  std::map<std::string, std::unique_ptr<Bucket>>& get_buckets() { return buckets; }
   bool is_truncated(void) const { return truncated; }
   void set_truncated(bool trunc) { truncated = trunc; }
   void add(std::unique_ptr<Bucket> bucket) {
@@ -650,7 +650,7 @@ class Object {
         uint64_t olh_epoch{0};
        std::string marker_version_id;
         uint32_t bilog_flags{0};
-        list<rgw_obj_index_key>* remove_objs{nullptr};
+        std::list<rgw_obj_index_key>* remove_objs{nullptr};
         ceph::real_time expiration_time;
         ceph::real_time unmod_since;
         ceph::real_time mtime;
@@ -820,20 +820,20 @@ class Object {
     const std::string &get_instance() const { return key.instance; }
     bool have_instance(void) { return key.have_instance(); }
 
-    friend inline ostream& operator<<(ostream& out, const Object& o) {
+    friend inline std::ostream& operator<<(std::ostream& out, const Object& o) {
       if (o.bucket)
        out << o.bucket << ":";
       out << o.key;
       return out;
     }
-    friend inline ostream& operator<<(ostream& out, const Object* o) {
+    friend inline std::ostream& operator<<(std::ostream& out, const Object* o) {
       if (!o)
        out << "<NULL>";
       else
        out << *o;
       return out;
     }
-    friend inline ostream& operator<<(ostream& out, const std::unique_ptr<Object>& p) {
+    friend inline std::ostream& operator<<(std::ostream& out, const std::unique_ptr<Object>& p) {
       out << p.get();
       return out;
     }
@@ -880,8 +880,8 @@ public:
                    RGWObjectCtx* obj_ctx) = 0;
   virtual int complete(const DoutPrefixProvider* dpp, CephContext* cct,
                       std::string& etag, RGWObjManifest& manifest,
-                      map<int, string>& part_etags,
-                      list<rgw_obj_index_key>& remove_objs,
+                      std::map<int, std::string>& part_etags,
+                      std::list<rgw_obj_index_key>& remove_objs,
                       uint64_t& accounted_size, bool& compressed,
                       RGWCompressionInfo& cs_info, off_t& ofs) = 0;
 
@@ -895,20 +895,20 @@ public:
                          uint64_t part_num,
                          const std::string& part_num_str) = 0;
 
-  friend inline ostream& operator<<(ostream& out, const MultipartUpload& u) {
+  friend inline std::ostream& operator<<(std::ostream& out, const MultipartUpload& u) {
     out << u.get_meta();
     if (!u.get_upload_id().empty())
       out << ":" << u.get_upload_id();
     return out;
   }
-  friend inline ostream& operator<<(ostream& out, const MultipartUpload* u) {
+  friend inline std::ostream& operator<<(std::ostream& out, const MultipartUpload* u) {
     if (!u)
       out << "<NULL>";
     else
       out << *u;
     return out;
   }
-  friend inline ostream& operator<<(ostream& out, const
+  friend inline std::ostream& operator<<(std::ostream& out, const
                                    std::unique_ptr<MultipartUpload>& p) {
     out << p.get();
     return out;
@@ -965,7 +965,7 @@ public:
   virtual int get_next_entry(const std::string& oid, std::string& marker, LCEntry& entry) = 0;
   virtual int set_entry(const std::string& oid, const LCEntry& entry) = 0;
   virtual int list_entries(const std::string& oid, const std::string& marker,
-                          uint32_t max_entries, vector<LCEntry>& entries) = 0;
+                          uint32_t max_entries, std::vector<LCEntry>& entries) = 0;
   virtual int rm_entry(const std::string& oid, const LCEntry& entry) = 0;
   virtual int get_head(const std::string& oid, LCHead& head) = 0;
   virtual int put_head(const std::string& oid, const LCHead& head) = 0;
index 8b5ff1fbc92b227cc50a4cdceec6b53181c94cb4..a943d06842bf644236f75cf7741ab7712519be13 100644 (file)
@@ -45,6 +45,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string mp_ns = RGW_OBJ_NS_MULTIPART;
 
 namespace rgw::sal {
index 7d51e24637e95c1cab92bdba5071d5f7ea65e06b..b2c8a46251dacf821506d351a9d6387eb5d98658 100644 (file)
@@ -65,7 +65,7 @@ class RadosUser : public User {
     virtual int complete_flush_stats(const DoutPrefixProvider *dpp, optional_yield y) override;
     virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
                           bool* is_truncated, RGWUsageIter& usage_iter,
-                          map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
+                          std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
     virtual int trim_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) override;
 
     virtual int load_user(const DoutPrefixProvider* dpp, optional_yield y) override;
@@ -325,7 +325,7 @@ class RadosBucket : public Bucket {
     virtual int try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime) override;
     virtual int read_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries,
                           bool* is_truncated, RGWUsageIter& usage_iter,
-                          map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
+                          std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
     virtual int trim_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) override;
     virtual int remove_objs_from_index(const DoutPrefixProvider *dpp, std::list<rgw_obj_index_key>& objs_to_unlink) override;
     virtual int check_index(const DoutPrefixProvider *dpp, std::map<RGWObjCategory, RGWStorageStats>& existing_stats, std::map<RGWObjCategory, RGWStorageStats>& calculated_stats) override;
@@ -336,16 +336,16 @@ class RadosBucket : public Bucket {
       return std::make_unique<RadosBucket>(*this);
     }
     virtual int list_multiparts(const DoutPrefixProvider *dpp,
-                               const string& prefix,
-                               string& marker,
-                               const string& delim,
+                               const std::string& prefix,
+                               std::string& marker,
+                               const std::string& delim,
                                const int& max_uploads,
-                               vector<std::unique_ptr<MultipartUpload>>& uploads,
-                               map<string, bool> *common_prefixes,
+                               std::vector<std::unique_ptr<MultipartUpload>>& uploads,
+                               std::map<std::string, bool> *common_prefixes,
                                bool *is_truncated) override;
     virtual int abort_multiparts(const DoutPrefixProvider *dpp,
                                 CephContext *cct,
-                                string& prefix, string& delim) override;
+                                std::string& prefix, std::string& delim) override;
 
   private:
     int link(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint = true, RGWObjVersionTracker* objv = nullptr);
@@ -432,12 +432,12 @@ class RadosStore : public Store {
     virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) override;
     virtual int get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) override;
 
-    virtual int log_usage(const DoutPrefixProvider *dpp, map<rgw_user_bucket, RGWUsageBatch>& usage_info) override;
+    virtual int log_usage(const DoutPrefixProvider *dpp, std::map<rgw_user_bucket, RGWUsageBatch>& usage_info) override;
     virtual int log_op(const DoutPrefixProvider *dpp, std::string& oid, bufferlist& bl) override;
     virtual int register_to_service_map(const DoutPrefixProvider *dpp, const std::string& daemon_type,
-                               const map<std::string, std::string>& meta) override;
+                               const std::map<std::string, std::string>& meta) override;
     virtual void get_quota(RGWQuotaInfo& bucket_quota, RGWQuotaInfo& user_quota) override;
-    virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector<rgw_bucket>& buckets, bool enabled) override;
+    virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, std::vector<rgw_bucket>& buckets, bool enabled) override;
     virtual uint64_t get_new_req_id() override { return rados->get_new_req_id(); }
     virtual int get_sync_policy_handler(const DoutPrefixProvider* dpp,
                                        std::optional<rgw_zone_id> zone,
@@ -445,38 +445,38 @@ class RadosStore : public Store {
                                        RGWBucketSyncPolicyHandlerRef* phandler,
                                        optional_yield y) override;
     virtual RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone) override;
-    virtual void wakeup_meta_sync_shards(set<int>& shard_ids) override { rados->wakeup_meta_sync_shards(shard_ids); }
-    virtual void wakeup_data_sync_shards(const DoutPrefixProvider *dpp, const rgw_zone_id& source_zone, map<int, set<std::string> >& shard_ids) override { rados->wakeup_data_sync_shards(dpp, source_zone, shard_ids); }
+    virtual void wakeup_meta_sync_shards(std::set<int>& shard_ids) override { rados->wakeup_meta_sync_shards(shard_ids); }
+    virtual void wakeup_data_sync_shards(const DoutPrefixProvider *dpp, const rgw_zone_id& source_zone, std::map<int, std::set<std::string> >& shard_ids) override { rados->wakeup_data_sync_shards(dpp, source_zone, shard_ids); }
     virtual int clear_usage(const DoutPrefixProvider *dpp) override { return rados->clear_usage(dpp); }
     virtual int read_all_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch,
                               uint32_t max_entries, bool* is_truncated,
                               RGWUsageIter& usage_iter,
-                              map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
+                              std::map<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
     virtual int trim_all_usage(const DoutPrefixProvider *dpp, uint64_t start_epoch, uint64_t end_epoch) override;
     virtual int get_config_key_val(std::string name, bufferlist* bl) override;
     virtual int meta_list_keys_init(const DoutPrefixProvider *dpp, const std::string& section, const std::string& marker, void** phandle) override;
-    virtual int meta_list_keys_next(const DoutPrefixProvider *dpp, void* handle, int max, list<std::string>& keys, bool* truncated) override;
+    virtual int meta_list_keys_next(const DoutPrefixProvider *dpp, void* handle, int max, std::list<std::string>& keys, bool* truncated) override;
     virtual void meta_list_keys_complete(void* handle) override;
     virtual std::string meta_get_marker(void* handle) override;
     virtual int meta_remove(const DoutPrefixProvider* dpp, std::string& metadata_key, optional_yield y) override;
     virtual const RGWSyncModuleInstanceRef& get_sync_module() { return rados->get_sync_module(); }
     virtual std::string get_host_id() { return rados->host_id; }
     virtual std::unique_ptr<LuaScriptManager> get_lua_script_manager() override;
-    virtual std::unique_ptr<RGWRole> get_role(string name,
-                                             string tenant,
-                                             string path="",
-                                             string trust_policy="",
-                                             string max_session_duration_str="") override;
+    virtual std::unique_ptr<RGWRole> get_role(std::string name,
+                                             std::string tenant,
+                                             std::string path="",
+                                             std::string trust_policy="",
+                                             std::string max_session_duration_str="") override;
     virtual std::unique_ptr<RGWRole> get_role(std::string id) override;
     virtual int get_roles(const DoutPrefixProvider *dpp,
                          optional_yield y,
                          const std::string& path_prefix,
                          const std::string& tenant,
-                         vector<std::unique_ptr<RGWRole>>& roles) override;
+                         std::vector<std::unique_ptr<RGWRole>>& roles) override;
     virtual std::unique_ptr<RGWOIDCProvider> get_oidc_provider() override;
     virtual int get_oidc_providers(const DoutPrefixProvider *dpp,
                                   const std::string& tenant,
-                                  vector<std::unique_ptr<RGWOIDCProvider>>& providers) override;
+                                  std::vector<std::unique_ptr<RGWOIDCProvider>>& providers) override;
     virtual std::unique_ptr<MultipartUpload> get_multipart_upload(Bucket* bucket, const std::string& oid, std::optional<std::string> upload_id=std::nullopt, ceph::real_time mtime=real_clock::now()) override;
     virtual std::unique_ptr<Writer> get_append_writer(const DoutPrefixProvider *dpp,
                                  optional_yield y,
@@ -564,8 +564,8 @@ public:
                    RGWObjectCtx* obj_ctx) override;
   virtual int complete(const DoutPrefixProvider* dpp, CephContext* cct,
                       std::string& etag, RGWObjManifest& manifest,
-                      map<int, string>& part_etags,
-                      list<rgw_obj_index_key>& remove_objs,
+                      std::map<int, std::string>& part_etags,
+                      std::list<rgw_obj_index_key>& remove_objs,
                       uint64_t& accounted_size, bool& compressed,
                       RGWCompressionInfo& cs_info, off_t& ofs) override;
   virtual int get_info(const DoutPrefixProvider *dpp, optional_yield y, RGWObjectCtx* obj_ctx, rgw_placement_rule** rule, rgw::sal::Attrs* attrs = nullptr) override;
@@ -616,7 +616,7 @@ public:
   virtual int get_next_entry(const std::string& oid, std::string& marker, LCEntry& entry) override;
   virtual int set_entry(const std::string& oid, const LCEntry& entry) override;
   virtual int list_entries(const std::string& oid, const std::string& marker,
-                          uint32_t max_entries, vector<LCEntry>& entries) override;
+                          uint32_t max_entries, std::vector<LCEntry>& entries) override;
   virtual int rm_entry(const std::string& oid, const LCEntry& entry) override;
   virtual int get_head(const std::string& oid, LCHead& head) override;
   virtual int put_head(const std::string& oid, const LCHead& head) override;
@@ -629,7 +629,7 @@ class RadosNotification : public Notification {
 
   public:
     RadosNotification(const DoutPrefixProvider *_dpp, RadosStore* _store, Object* _obj, req_state* _s, 
-        rgw::notify::EventType _type, const std::string* object_name=nullptr) : 
+        rgw::notify::EventType _type, const std::string* object_name=nullptr) :
       Notification(_obj, _type), store(_store), res(_dpp, _store, _s, _obj, object_name) { }
     ~RadosNotification() = default;
 
index 9bedbb23ad68eff51ebb7597cfe07ed1e4a5ca14..874c2e3e3b34006ce3d530186e3f1151578a995a 100644 (file)
@@ -37,6 +37,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWServices_Def::RGWServices_Def() = default;
 RGWServices_Def::~RGWServices_Def()
 {
index 4f58d8326f20079cb866b1150fc15ae205efc047..fdaec2f6991dc25a151790d8de60b6c67f17f299 100644 (file)
@@ -30,6 +30,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 namespace STS {
 
 void Credentials::dump(Formatter *f) const
index 9730c2a1185c0d2dd9c282151b3802819b3195a4..6be5633488af5f35295f06117d6b60486b345dc3 100644 (file)
@@ -23,19 +23,19 @@ protected:
   uint64_t MAX_DURATION_IN_SECS;
   CephContext* cct;
   uint64_t duration;
-  string err_msg;
-  string iamPolicy;
-  string roleArn;
-  string roleSessionName;
+  std::string err_msg;
+  std::string iamPolicy;
+  std::string roleArn;
+  std::string roleSessionName;
 public:
   AssumeRoleRequestBase(CephContext* cct,
-                        const string& duration,
-                        const string& iamPolicy,
-                        const string& roleArn,
-                        const string& roleSessionName);
-  const string& getRoleARN() const { return roleArn; }
-  const string& getRoleSessionName() const { return roleSessionName; }
-  const string& getPolicy() const {return iamPolicy; }
+                        const std::string& duration,
+                        const std::string& iamPolicy,
+                        const std::string& roleArn,
+                        const std::string& roleSessionName);
+  const std::string& getRoleARN() const { return roleArn; }
+  const std::string& getRoleSessionName() const { return roleSessionName; }
+  const std::string& getPolicy() const {return iamPolicy; }
   static const uint64_t& getMaxPolicySize() { return MAX_POLICY_SIZE; }
   void setMaxDuration(const uint64_t& maxDuration) { MAX_DURATION_IN_SECS = maxDuration; }
   const uint64_t& getDuration() const { return duration; }
@@ -45,27 +45,27 @@ public:
 class AssumeRoleWithWebIdentityRequest : public AssumeRoleRequestBase {
   static constexpr uint64_t MIN_PROVIDER_ID_LEN = 4;
   static constexpr uint64_t MAX_PROVIDER_ID_LEN = 2048;
-  string providerId;
-  string iamPolicy;
-  string iss;
-  string sub;
-  string aud;
+  std::string providerId;
+  std::string iamPolicy;
+  std::string iss;
+  std::string sub;
+  std::string aud;
 public:
   AssumeRoleWithWebIdentityRequest( CephContext* cct,
-                      const string& duration,
-                      const string& providerId,
-                      const string& iamPolicy,
-                      const string& roleArn,
-                      const string& roleSessionName,
-                      const string& iss,
-                      const string& sub,
-                      const string& aud)
+                      const std::string& duration,
+                      const std::string& providerId,
+                      const std::string& iamPolicy,
+                      const std::string& roleArn,
+                      const std::string& roleSessionName,
+                      const std::string& iss,
+                      const std::string& sub,
+                      const std::string& aud)
     : AssumeRoleRequestBase(cct, duration, iamPolicy, roleArn, roleSessionName),
       providerId(providerId), iss(iss), sub(sub), aud(aud) {}
-  const string& getProviderId() const { return providerId; }
-  const string& getIss() const { return iss; }
-  const string& getAud() const { return aud; }
-  const string& getSub() const { return sub; }
+  const std::string& getProviderId() const { return providerId; }
+  const std::string& getIss() const { return iss; }
+  const std::string& getAud() const { return aud; }
+  const std::string& getSub() const { return sub; }
   int validate_input() const;
 };
 
@@ -75,18 +75,18 @@ class AssumeRoleRequest : public AssumeRoleRequestBase {
   static constexpr uint64_t MIN_SERIAL_NUMBER_SIZE = 9;
   static constexpr uint64_t MAX_SERIAL_NUMBER_SIZE = 256;
   static constexpr uint64_t TOKEN_CODE_SIZE = 6;
-  string externalId;
-  string serialNumber;
-  string tokenCode;
+  std::string externalId;
+  std::string serialNumber;
+  std::string tokenCode;
 public:
   AssumeRoleRequest(CephContext* cct,
-                    const string& duration,
-                    const string& externalId,
-                    const string& iamPolicy,
-                    const string& roleArn,
-                    const string& roleSessionName,
-                    const string& serialNumber,
-                    const string& tokenCode)
+                    const std::string& duration,
+                    const std::string& externalId,
+                    const std::string& iamPolicy,
+                    const std::string& roleArn,
+                    const std::string& roleSessionName,
+                    const std::string& serialNumber,
+                    const std::string& tokenCode)
     : AssumeRoleRequestBase(cct, duration, iamPolicy, roleArn, roleSessionName),
       externalId(externalId), serialNumber(serialNumber), tokenCode(tokenCode){}
   int validate_input() const;
@@ -97,44 +97,44 @@ protected:
   static constexpr uint64_t MIN_DURATION_IN_SECS = 900;
   static constexpr uint64_t DEFAULT_DURATION_IN_SECS = 3600;
   uint64_t duration;
-  string serialNumber;
-  string tokenCode;
+  std::string serialNumber;
+  std::string tokenCode;
 
 public:
-  GetSessionTokenRequest(const string& duration, const string& serialNumber, const string& tokenCode);
+  GetSessionTokenRequest(const std::string& duration, const std::string& serialNumber, const std::string& tokenCode);
 
   const uint64_t& getDuration() const { return duration; }
   static const uint64_t& getMinDuration() { return MIN_DURATION_IN_SECS; }
 };
 
 class AssumedRoleUser {
-  string arn;
-  string assumeRoleId;
+  std::string arn;
+  std::string assumeRoleId;
 public:
   int generateAssumedRoleUser( CephContext* cct,
                                 rgw::sal::Store* store,
-                                const string& roleId,
+                                const std::string& roleId,
                                 const rgw::ARN& roleArn,
-                                const string& roleSessionName);
-  const string& getARN() const { return arn; }
-  const string& getAssumeRoleId() const { return assumeRoleId; }
+                                const std::string& roleSessionName);
+  const std::string& getARN() const { return arn; }
+  const std::string& getAssumeRoleId() const { return assumeRoleId; }
   void dump(Formatter *f) const;
 };
 
 struct SessionToken {
-  string access_key_id;
-  string secret_access_key;
-  string expiration;
-  string policy;
-  string roleId;
+  std::string access_key_id;
+  std::string secret_access_key;
+  std::string expiration;
+  std::string policy;
+  std::string roleId;
   rgw_user user;
-  string acct_name;
+  std::string acct_name;
   uint32_t perm_mask;
   bool is_admin;
   uint32_t acct_type;
-  string role_session;
-  std::vector<string> token_claims;
-  string issued_at;
+  std::string role_session;
+  std::vector<std::string> token_claims;
+  std::string issued_at;
 
   SessionToken() {}
 
@@ -185,23 +185,23 @@ WRITE_CLASS_ENCODER(SessionToken)
 class Credentials {
   static constexpr int MAX_ACCESS_KEY_LEN = 20;
   static constexpr int MAX_SECRET_KEY_LEN = 40;
-  string accessKeyId;
-  string expiration;
-  string secretAccessKey;
-  string sessionToken;
+  std::string accessKeyId;
+  std::string expiration;
+  std::string secretAccessKey;
+  std::string sessionToken;
 public:
   int generateCredentials(CephContext* cct,
                           const uint64_t& duration,
-                          const boost::optional<string>& policy,
-                          const boost::optional<string>& roleId,
-                          const boost::optional<string>& role_session,
-                          const boost::optional<std::vector<string> > token_claims,
+                          const boost::optional<std::string>& policy,
+                          const boost::optional<std::string>& roleId,
+                          const boost::optional<std::string>& role_session,
+                          const boost::optional<std::vector<std::string> > token_claims,
                           boost::optional<rgw_user> user,
                           rgw::auth::Identity* identity);
-  const string& getAccessKeyId() const { return accessKeyId; }
-  const string& getExpiration() const { return expiration; }
-  const string& getSecretAccessKey() const { return secretAccessKey; }
-  const string& getSessionToken() const { return sessionToken; }
+  const std::string& getAccessKeyId() const { return accessKeyId; }
+  const std::string& getExpiration() const { return expiration; }
+  const std::string& getSecretAccessKey() const { return secretAccessKey; }
+  const std::string& getSessionToken() const { return sessionToken; }
   void dump(Formatter *f) const;
 };
 
@@ -214,9 +214,9 @@ struct AssumeRoleResponse {
 
 struct AssumeRoleWithWebIdentityResponse {
   AssumeRoleResponse assumeRoleResp;
-  string aud;
-  string providerId;
-  string sub;
+  std::string aud;
+  std::string providerId;
+  std::string sub;
 };
 
 using AssumeRoleResponse = struct AssumeRoleResponse ;
@@ -229,13 +229,13 @@ class STSService {
   rgw_user user_id;
   std::unique_ptr<rgw::sal::RGWRole> role;
   rgw::auth::Identity* identity;
-  int storeARN(const DoutPrefixProvider *dpp, string& arn, optional_yield y);
+  int storeARN(const DoutPrefixProvider *dpp, std::string& arn, optional_yield y);
 public:
   STSService() = default;
   STSService(CephContext* cct, rgw::sal::Store* store, rgw_user user_id,
             rgw::auth::Identity* identity)
     : cct(cct), store(store), user_id(user_id), identity(identity) {}
-  std::tuple<int, rgw::sal::RGWRole*> getRoleInfo(const DoutPrefixProvider *dpp, const string& arn, optional_yield y);
+  std::tuple<int, rgw::sal::RGWRole*> getRoleInfo(const DoutPrefixProvider *dpp, const std::string& arn, optional_yield y);
   AssumeRoleResponse assumeRole(const DoutPrefixProvider *dpp, AssumeRoleRequest& req, optional_yield y);
   GetSessionTokenResponse getSessionToken(GetSessionTokenRequest& req);
   AssumeRoleWithWebIdentityResponse assumeRoleWithWebIdentity(AssumeRoleWithWebIdentityRequest& req);
index 640c85fcdb0d99f4eab9c00e26c1485fff876990..3791e7d9214b7093b7a3e5b119e3a2edfe032243 100644 (file)
@@ -27,6 +27,7 @@
 
 #define DEFAULT_SWIFT_PREFIX "/swift"
 
+using namespace std;
 using namespace ceph::crypto;
 
 
index ae10118cbe6e5c267b537f45d9fb06a57786778e..e921aeb1adf1e463771670d02f07e4e7b92ad82a 100644 (file)
@@ -36,6 +36,8 @@
 #undef dout_prefix
 #define dout_prefix (*_dout << "meta sync: ")
 
+using namespace std;
+
 static string mdlog_sync_status_oid = "mdlog.sync-status";
 static string mdlog_sync_status_shard_prefix = "mdlog.sync-status.shard";
 static string mdlog_sync_full_sync_index_prefix = "meta.full-sync.index";
index 346232058b6f0a3a45d0e4c5f2a1dcec39d3772b..41b0119d58a31cfa0fb1e984601867ee176901f1 100644 (file)
@@ -32,9 +32,9 @@ struct rgw_mdlog_info {
 
 
 struct rgw_mdlog_entry {
-  string id;
-  string section;
-  string name;
+  std::string id;
+  std::string section;
+  std::string name;
   ceph::real_time timestamp;
   RGWMetadataLogData log_data;
 
@@ -56,9 +56,9 @@ struct rgw_mdlog_entry {
 };
 
 struct rgw_mdlog_shard_data {
-  string marker;
+  std::string marker;
   bool truncated;
-  vector<rgw_mdlog_entry> entries;
+  std::vector<rgw_mdlog_entry> entries;
 
   void decode_json(JSONObj *obj);
 };
@@ -72,24 +72,24 @@ class RGWSyncTraceManager;
 class RGWSyncErrorLogger {
   rgw::sal::RadosStore* store;
 
-  vector<string> oids;
+  std::vector<std::string> oids;
   int num_shards;
 
   std::atomic<int64_t> counter = { 0 };
 public:
-  RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const string &oid_prefix, int _num_shards);
-  RGWCoroutine *log_error_cr(const DoutPrefixProvider *dpp, const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message);
+  RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const std::string &oid_prefix, int _num_shards);
+  RGWCoroutine *log_error_cr(const DoutPrefixProvider *dpp, const std::string& source_zone, const std::string& section, const std::string& name, uint32_t error_code, const std::string& message);
 
-  static string get_shard_oid(const string& oid_prefix, int shard_id);
+  static std::string get_shard_oid(const std::string& oid_prefix, int shard_id);
 };
 
 struct rgw_sync_error_info {
-  string source_zone;
+  std::string source_zone;
   uint32_t error_code;
-  string message;
+  std::string message;
 
   rgw_sync_error_info() : error_code(0) {}
-  rgw_sync_error_info(const string& _source_zone, uint32_t _error_code, const string& _message) : source_zone(_source_zone), error_code(_error_code), message(_message) {}
+  rgw_sync_error_info(const std::string& _source_zone, uint32_t _error_code, const std::string& _message) : source_zone(_source_zone), error_code(_error_code), message(_message) {}
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -188,8 +188,8 @@ struct RGWMetaSyncEnv {
             RGWAsyncRadosProcessor *_async_rados, RGWHTTPManager *_http_manager,
             RGWSyncErrorLogger *_error_logger, RGWSyncTraceManager *_sync_tracer);
 
-  string shard_obj_name(int shard_id);
-  string status_oid();
+  std::string shard_obj_name(int shard_id);
+  std::string status_oid();
 };
 
 class RGWRemoteMetaLog : public RGWCoroutinesManager {
@@ -231,8 +231,8 @@ public:
   void finish();
 
   int read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info);
-  int read_master_log_shards_info(const DoutPrefixProvider *dpp, const string& master_period, map<int, RGWMetadataLogInfo> *shards_info);
-  int read_master_log_shards_next(const DoutPrefixProvider *dpp, const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result);
+  int read_master_log_shards_info(const DoutPrefixProvider *dpp, const std::string& master_period, std::map<int, RGWMetadataLogInfo> *shards_info);
+  int read_master_log_shards_next(const DoutPrefixProvider *dpp, const std::string& period, std::map<int, std::string> shard_markers, std::map<int, rgw_mdlog_shard_data> *result);
   int read_sync_status(const DoutPrefixProvider *dpp, rgw_meta_sync_status *sync_status);
   int init_sync_status(const DoutPrefixProvider *dpp);
   int run_sync(const DoutPrefixProvider *dpp, optional_yield y);
@@ -250,7 +250,7 @@ class RGWMetaSyncStatusManager : public DoutPrefixProvider {
 
   RGWRemoteMetaLog master_log;
 
-  map<int, rgw_raw_obj> shard_objs;
+  std::map<int, rgw_raw_obj> shard_objs;
 
   struct utime_shard {
     real_time ts;
@@ -267,8 +267,8 @@ class RGWMetaSyncStatusManager : public DoutPrefixProvider {
   };
 
   ceph::shared_mutex ts_to_shard_lock = ceph::make_shared_mutex("ts_to_shard_lock");
-  map<utime_shard, int> ts_to_shard;
-  vector<string> clone_markers;
+  std::map<utime_shard, int> ts_to_shard;
+  std::vector<std::string> clone_markers;
 
 public:
   RGWMetaSyncStatusManager(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados)
@@ -286,10 +286,10 @@ public:
   int read_log_info(const DoutPrefixProvider *dpp, rgw_mdlog_info *log_info) {
     return master_log.read_log_info(dpp, log_info);
   }
-  int read_master_log_shards_info(const DoutPrefixProvider *dpp, const string& master_period, map<int, RGWMetadataLogInfo> *shards_info) {
+  int read_master_log_shards_info(const DoutPrefixProvider *dpp, const std::string& master_period, std::map<int, RGWMetadataLogInfo> *shards_info) {
     return master_log.read_master_log_shards_info(dpp, master_period, shards_info);
   }
-  int read_master_log_shards_next(const DoutPrefixProvider *dpp, const string& period, map<int, string> shard_markers, map<int, rgw_mdlog_shard_data> *result) {
+  int read_master_log_shards_next(const DoutPrefixProvider *dpp, const std::string& period, std::map<int, std::string> shard_markers, std::map<int, rgw_mdlog_shard_data> *result) {
     return master_log.read_master_log_shards_next(dpp, period, shard_markers, result);
   }
 
@@ -348,7 +348,7 @@ class RGWSyncShardMarkerTrack {
   };
   typename std::map<T, marker_entry> pending;
 
-  map<T, marker_entry> finish_markers;
+  std::map<T, marker_entry> finish_markers;
 
   int window_size;
   int updates_since_flush;
@@ -483,13 +483,13 @@ class RGWMetaSyncShardMarkerTrack;
 class RGWMetaSyncSingleEntryCR : public RGWCoroutine {
   RGWMetaSyncEnv *sync_env;
 
-  string raw_key;
-  string entry_marker;
+  std::string raw_key;
+  std::string entry_marker;
   RGWMDLogStatus op_status;
 
   ssize_t pos;
-  string section;
-  string key;
+  std::string section;
+  std::string key;
 
   int sync_status;
 
@@ -505,7 +505,7 @@ class RGWMetaSyncSingleEntryCR : public RGWCoroutine {
 
 public:
   RGWMetaSyncSingleEntryCR(RGWMetaSyncEnv *_sync_env,
-                           const string& _raw_key, const string& _entry_marker,
+                           const std::string& _raw_key, const std::string& _entry_marker,
                            const RGWMDLogStatus& _op_status,
                            RGWMetaSyncShardMarkerTrack *_marker_tracker, const RGWSyncTraceNodeRef& _tn_parent);
 
index 5a3f62f7413081417e4e4975149781d2f780dde8..19292b3d80995d84578110b72b256804b5cbe115 100644 (file)
@@ -85,19 +85,19 @@ typedef std::shared_ptr<RGWSyncModule> RGWSyncModuleRef;
 class RGWSyncModulesManager {
   ceph::mutex lock = ceph::make_mutex("RGWSyncModulesManager");
 
-  map<string, RGWSyncModuleRef> modules;
+  std::map<std::string, RGWSyncModuleRef> modules;
 public:
   RGWSyncModulesManager() = default;
 
-  void register_module(const string& name, RGWSyncModuleRef& module, bool is_default = false) {
+  void register_module(const std::string& name, RGWSyncModuleRef& module, bool is_default = false) {
     std::lock_guard l{lock};
     modules[name] = module;
     if (is_default) {
-      modules[string()] = module;
+      modules[std::string()] = module;
     }
   }
 
-  bool get_module(const string& name, RGWSyncModuleRef *module) {
+  bool get_module(const std::string& name, RGWSyncModuleRef *module) {
     std::lock_guard l{lock};
     auto iter = modules.find(name);
     if (iter == modules.end()) {
@@ -110,7 +110,7 @@ public:
   }
 
 
-  bool supports_data_export(const string& name) {
+  bool supports_data_export(const std::string& name) {
     RGWSyncModuleRef module;
     if (!get_module(name, &module)) {
       return false;
@@ -119,7 +119,7 @@ public:
     return module->supports_data_export();
   }
 
-  int create_instance(CephContext *cct, const string& name, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) {
+  int create_instance(CephContext *cct, const std::string& name, const JSONFormattable& config, RGWSyncModuleInstanceRef *instance) {
     RGWSyncModuleRef module;
     if (!get_module(name, &module)) {
       return -ENOENT;
@@ -128,8 +128,8 @@ public:
     return module.get()->create_instance(cct, config, instance);
   }
 
-  vector<string> get_registered_module_names() const {
-    vector<string> names;
+  std::vector<std::string> get_registered_module_names() const {
+    std::vector<std::string> names;
     for (auto& i: modules) {
       if (!i.first.empty()) {
         names.push_back(i.first);
@@ -149,9 +149,9 @@ protected:
 
   ceph::real_time mtime;
   uint64_t size = 0;
-  string etag;
-  map<string, bufferlist> attrs;
-  map<string, string> headers;
+  std::string etag;
+  std::map<std::string, bufferlist> attrs;
+  std::map<std::string, std::string> headers;
 public:
   RGWStatRemoteObjCBCR(RGWDataSyncCtx *_sc,
                        rgw_bucket& _src_bucket, rgw_obj_key& _key);
@@ -159,9 +159,9 @@ public:
 
   void set_result(ceph::real_time& _mtime,
                   uint64_t _size,
-                  const string& _etag,
-                  map<string, bufferlist>&& _attrs,
-                  map<string, string>&& _headers) {
+                  const std::string& _etag,
+                  std::map<std::string, bufferlist>&& _attrs,
+                  std::map<std::string, std::string>&& _headers) {
     mtime = _mtime;
     size = _size;
     etag = _etag;
@@ -173,9 +173,9 @@ public:
 class RGWCallStatRemoteObjCR : public RGWCoroutine {
   ceph::real_time mtime;
   uint64_t size{0};
-  string etag;
-  map<string, bufferlist> attrs;
-  map<string, string> headers;
+  std::string etag;
+  std::map<std::string, bufferlist> attrs;
+  std::map<std::string, std::string> headers;
 
 protected:
   RGWDataSyncCtx *sc;
index 065c2cc701212b81039be9cf83769a694137a4bd..e74d289458f84b6daf7a0b100ecd7961c3a1f1df 100644 (file)
@@ -23,6 +23,8 @@
 
 #define DEFAULT_MULTIPART_SYNC_PART_SIZE (32 * 1024 * 1024)
 
+using namespace std;
+
 static string default_target_path = "rgw-${zonegroup}-${sid}/${bucket}";
 
 static string get_key_oid(const rgw_obj_key& key)
index def56eecee1bef5fe271f52a44d11e0915106b9f..7799fb8cb8ef6250a43833de5d4277f2befa0af4 100644 (file)
@@ -10,7 +10,7 @@ struct rgw_sync_aws_multipart_part_info {
   int part_num{0};
   uint64_t ofs{0};
   uint64_t size{0};
-  string etag;
+  std::string etag;
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -34,7 +34,7 @@ WRITE_CLASS_ENCODER(rgw_sync_aws_multipart_part_info)
 
 struct rgw_sync_aws_src_obj_properties {
   ceph::real_time mtime;
-  string etag;
+  std::string etag;
   uint32_t zone_short_id{0};
   uint64_t pg_ver{0};
   uint64_t versioned_epoch{0};
@@ -62,7 +62,7 @@ struct rgw_sync_aws_src_obj_properties {
 WRITE_CLASS_ENCODER(rgw_sync_aws_src_obj_properties)
 
 struct rgw_sync_aws_multipart_upload_info {
-  string upload_id;
+  std::string upload_id;
   uint64_t obj_size;
   rgw_sync_aws_src_obj_properties src_properties;
   uint32_t part_size{0};
index f01ec2c8af7026b5d1d39f460c71caf0268e5912..42c45104e327e48e2b3ce98a082eaadc79088dcf 100644 (file)
@@ -22,6 +22,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 /*
  * allowlist utility. Config string is a list of entries, where an entry is either an item,
index b61cfddfcd209d715e10a71916ef64b61c24c065..d8c088a9aa245ca8c5d3e8b13358b104d69a3fcd 100644 (file)
@@ -53,7 +53,7 @@ public:
   RGWRESTMgr *get_rest_filter(int dialect, RGWRESTMgr *orig) override;
   RGWRESTConn *get_rest_conn();
   std::string get_index_path();
-  map<string, string>& get_request_headers();
+  std::map<std::string, std::string>& get_request_headers();
   bool supports_user_writes() override {
     return true;
   }
index 5884322dba3b073415550ce717e754b97708a011..7beec151c1276b9df100adba026b5665996fb4a6 100644 (file)
@@ -12,6 +12,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 struct es_index_obj_response {
   string bucket;
   rgw_obj_key key;
index c85fd478f1c28ef655ecac9b8ed3cb8e1c2cb5d3..9c02818d329d42bceeb26f2debd2fbe18d7c03c6 100644 (file)
@@ -10,6 +10,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGWLogStatRemoteObjCBCR : public RGWStatRemoteObjCBCR {
 public:
   RGWLogStatRemoteObjCBCR(RGWDataSyncCtx *_sc,
index c37b5637907ee6eda1adb913b4c6b242f939f7f0..c14e795fc57e82760f99883f0a4b4600d513c833 100644 (file)
@@ -26,6 +26,8 @@
 
 #define PUBSUB_EVENTS_RETENTION_DEFAULT 7
 
+using namespace std;
+
 /*
 
 config:
index b6afdc54aca6c55f5072363da27182a5d923fcc7..47e202aeb2f819b239c5a249a2f4ad47290fa272 100644 (file)
@@ -19,6 +19,8 @@
 #define dout_context g_ceph_context
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 // command: PUT /topics/<topic-name>[&push-endpoint=<endpoint>[&<arg1>=<value1>]]
 class RGWPSCreateTopic_ObjStore : public RGWPSCreateTopicOp {
 public:
index 6b5ecf414e0f9246fe052b7d6ed0b90f8ce067b5..90798fffe33252d0c9a8c5972cfa0781d933f507 100644 (file)
@@ -5,6 +5,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 string rgw_sync_bucket_entity::bucket_key() const
 {
index 5231ab3f4dc9157953851d5883d2d6ed48c47c91..0ee79b4702fc6e365ae3c6f7127b0f1090c94707 100644 (file)
 
 
 struct rgw_sync_symmetric_group {
-  string id;
+  std::string id;
   std::set<rgw_zone_id> zones;
 
   rgw_sync_symmetric_group() {}
-  rgw_sync_symmetric_group(const string& _id,
+  rgw_sync_symmetric_group(const std::string& _id,
                            const std::set<rgw_zone_id> _zones) : id(_id), zones(_zones) {}
 
 
@@ -74,7 +74,7 @@ struct rgw_sync_bucket_entity {
   std::optional<rgw_zone_id> zone; /* define specific zones */
   std::optional<rgw_bucket> bucket; /* define specific bucket */
 
-  static bool match_str(const string& s1, const string& s2) { /* empty string is wildcard */
+  static bool match_str(const std::string& s1, const std::string& s2) { /* empty std::string is wildcard */
     return (s1.empty() ||
             s2.empty() ||
             s1 == s2);
@@ -114,7 +114,7 @@ struct rgw_sync_bucket_entity {
     return bucket.value_or(rgw_bucket());
   }
 
-  string bucket_key() const;
+  std::string bucket_key() const;
 
   bool match_zone(const rgw_zone_id& z) const {
     if (all_zones) {
@@ -132,7 +132,7 @@ struct rgw_sync_bucket_entity {
     zone = z;
   }
 
-  static bool match_bucket_id(const string& bid1, const string& bid2) {
+  static bool match_bucket_id(const std::string& bid1, const std::string& bid2) {
     return (bid1.empty() || bid2.empty() || (bid1 == bid2));
   }
 
@@ -178,15 +178,15 @@ struct rgw_sync_bucket_entity {
 WRITE_CLASS_ENCODER(rgw_sync_bucket_entity)
 
 struct rgw_sync_pipe_filter_tag {
-  string key;
-  string value;
+  std::string key;
+  std::string value;
 
   rgw_sync_pipe_filter_tag() {}
-  rgw_sync_pipe_filter_tag(const string& s) {
+  rgw_sync_pipe_filter_tag(const std::string& s) {
     from_str(s);
   }
-  rgw_sync_pipe_filter_tag(const string& _key,
-                           const string& _value) : key(_key),
+  rgw_sync_pipe_filter_tag(const std::string& _key,
+                           const std::string& _value) : key(_key),
                                                    value(_value) {}
 
   void encode(bufferlist& bl) const {
@@ -206,7 +206,7 @@ struct rgw_sync_pipe_filter_tag {
   void dump(ceph::Formatter *f) const;
   void decode_json(JSONObj *obj);
 
-  bool from_str(const string& s);
+  bool from_str(const std::string& s);
 
   bool operator<(const rgw_sync_pipe_filter_tag& t) const {
     if (key < t.key) {
@@ -218,12 +218,12 @@ struct rgw_sync_pipe_filter_tag {
     return (value < t.value);
   }
 
-  bool operator==(const string& s) const;
+  bool operator==(const std::string& s) const;
 };
 WRITE_CLASS_ENCODER(rgw_sync_pipe_filter_tag)
 
 struct rgw_sync_pipe_filter {
-  std::optional<string> prefix;
+  std::optional<std::string> prefix;
   std::set<rgw_sync_pipe_filter_tag> tags;
 
   void set_prefix(std::optional<std::string> opt_prefix,
@@ -240,9 +240,9 @@ struct rgw_sync_pipe_filter {
   bool is_subset_of(const rgw_sync_pipe_filter& f) const;
 
   bool has_tags() const;
-  bool check_tag(const string& s) const;
-  bool check_tag(const string& k, const string& v) const;
-  bool check_tags(const std::vector<string>& tags) const;
+  bool check_tag(const std::string& s) const;
+  bool check_tag(const std::string& k, const std::string& v) const;
+  bool check_tags(const std::vector<std::string>& tags) const;
   bool check_tags(const RGWObjTags::tag_map_t& tags) const;
 };
 WRITE_CLASS_ENCODER(rgw_sync_pipe_filter)
@@ -293,7 +293,7 @@ WRITE_CLASS_ENCODER(rgw_sync_pipe_source_params)
 
 struct rgw_sync_pipe_dest_params { 
   std::optional<rgw_sync_pipe_acl_translation> acl_translation;
-  std::optional<string> storage_class;
+  std::optional<std::string> storage_class;
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
@@ -309,7 +309,7 @@ struct rgw_sync_pipe_dest_params {
     DECODE_FINISH(bl);
   }
 
-  void set_storage_class(const string& sc) {
+  void set_storage_class(const std::string& sc) {
     storage_class = sc;
   }
 
@@ -370,7 +370,7 @@ struct rgw_sync_pipe_params {
 WRITE_CLASS_ENCODER(rgw_sync_pipe_params)
 
 struct rgw_sync_bucket_pipe {
-  string id;
+  std::string id;
   rgw_sync_bucket_entity source;
   rgw_sync_bucket_entity dest;
 
@@ -461,12 +461,12 @@ struct rgw_sync_bucket_entities {
 
   void add_zones(const std::vector<rgw_zone_id>& new_zones);
   void remove_zones(const std::vector<rgw_zone_id>& rm_zones);
-  void set_bucket(std::optional<string> tenant,
-                  std::optional<string> bucket_name,
-                  std::optional<string> bucket_id);
-  void remove_bucket(std::optional<string> tenant,
-                     std::optional<string> bucket_name,
-                     std::optional<string> bucket_id);
+  void set_bucket(std::optional<std::string> tenant,
+                  std::optional<std::string> bucket_name,
+                  std::optional<std::string> bucket_id);
+  void remove_bucket(std::optional<std::string> tenant,
+                     std::optional<std::string> bucket_name,
+                     std::optional<std::string> bucket_id);
 
   bool match_zone(const rgw_zone_id& zone) const {
     if (!zones) {
@@ -485,7 +485,7 @@ struct rgw_sync_bucket_entities {
     return bucket.value_or(rgw_bucket());
   }
 
-  static string bucket_key(std::optional<rgw_bucket> b);
+  static std::string bucket_key(std::optional<rgw_bucket> b);
 
   void set_all_zones(bool state) {
     all_zones = state;
@@ -497,7 +497,7 @@ struct rgw_sync_bucket_entities {
 WRITE_CLASS_ENCODER(rgw_sync_bucket_entities)
 
 struct rgw_sync_bucket_pipes {
-  string id;
+  std::string id;
   rgw_sync_bucket_entities source;
   rgw_sync_bucket_entities dest;
 
@@ -578,8 +578,8 @@ struct rgw_sync_data_flow_group {
     return (symmetrical.empty() && directional.empty());
   }
 
-  bool find_or_create_symmetrical(const string& flow_id, rgw_sync_symmetric_group **flow_group);
-  void remove_symmetrical(const string& flow_id, std::optional<std::vector<rgw_zone_id> > zones);
+  bool find_or_create_symmetrical(const std::string& flow_id, rgw_sync_symmetric_group **flow_group);
+  void remove_symmetrical(const std::string& flow_id, std::optional<std::vector<rgw_zone_id> > zones);
   bool find_or_create_directional(const rgw_zone_id& source_zone, const rgw_zone_id& dest_zone, rgw_sync_directional_rule **flow_group);
   void remove_directional(const rgw_zone_id& source_zone, const rgw_zone_id& dest_zone);
 
@@ -589,7 +589,7 @@ WRITE_CLASS_ENCODER(rgw_sync_data_flow_group)
 
 
 struct rgw_sync_policy_group {
-  string id;
+  std::string id;
 
   rgw_sync_data_flow_group data_flow; /* override data flow, howver, will not be able to
                                                         add new flows that don't exist at higher level */
@@ -626,7 +626,7 @@ struct rgw_sync_policy_group {
   void dump(ceph::Formatter *f) const;
   void decode_json(JSONObj *obj);
 
-  bool set_status(const string& s) {
+  bool set_status(const std::string& s) {
     if (s == "forbidden") {
       status = rgw_sync_policy_group::Status::FORBIDDEN;
     } else if (s == "allowed") {
@@ -641,8 +641,8 @@ struct rgw_sync_policy_group {
     return true;
   }
 
-  bool find_pipe(const string& pipe_id, bool create, rgw_sync_bucket_pipes **pipe);
-  void remove_pipe(const string& pipe_id);
+  bool find_pipe(const std::string& pipe_id, bool create, rgw_sync_bucket_pipes **pipe);
+  void remove_pipe(const std::string& pipe_id);
 
   void get_potential_related_buckets(const rgw_bucket& bucket,
                                      std::set<rgw_bucket> *sources,
@@ -652,7 +652,7 @@ struct rgw_sync_policy_group {
 WRITE_CLASS_ENCODER(rgw_sync_policy_group)
 
 struct rgw_sync_policy_info {
-  std::map<string, rgw_sync_policy_group> groups;
+  std::map<std::string, rgw_sync_policy_group> groups;
 
   void encode(bufferlist& bl) const {
     ENCODE_START(1, 1, bl);
index c0bf602c740d2b09830a6c622d00a5401029a091..dc29cfa857ec0b1b71d978fd7a938efcc2ac5aea 100644 (file)
@@ -16,6 +16,8 @@
 
 #define dout_context g_ceph_context
 
+using namespace std;
+
 RGWSyncTraceNode::RGWSyncTraceNode(CephContext *_cct, uint64_t _handle,
                                    const RGWSyncTraceNodeRef& _parent,
                                    const string& _type, const string& _id) : cct(_cct),
index 8e0a31cdfcb8d699a066c6afa03db5cd4073aafa..e66dde7cf41aa5a02266d32829e43f0246fc9cfd 100644 (file)
@@ -52,7 +52,7 @@ class RGWSyncTraceNode final {
 
   uint64_t handle;
 
-  boost::circular_buffer<string> history;
+  boost::circular_buffer<std::string> history;
 
   // private constructor, create with RGWSyncTraceManager::add_node()
   RGWSyncTraceNode(CephContext *_cct, uint64_t _handle,
@@ -60,11 +60,11 @@ class RGWSyncTraceNode final {
                    const std::string& _type, const std::string& _id);
 
  public:
-  void set_resource_name(const string& s) {
+  void set_resource_name(const std::string& s) {
     resource_name = s;
   }
 
-  const string& get_resource_name() {
+  const std::string& get_resource_name() {
     return resource_name;
   }
 
@@ -83,7 +83,7 @@ class RGWSyncTraceNode final {
     return prefix + " " + status;
   }
 
-  const string& get_prefix() {
+  const std::string& get_prefix() {
     return prefix;
   }
 
@@ -92,11 +92,11 @@ class RGWSyncTraceNode final {
     return os;            
   }
 
-  boost::circular_buffer<string>& get_history() {
+  boost::circular_buffer<std::string>& get_history() {
     return history;
   }
 
-  bool match(const string& search_term, bool search_history);
+  bool match(const std::string& search_term, bool search_history);
 };
 
 class RGWSyncTraceManager : public AdminSocketHook {
@@ -113,7 +113,7 @@ class RGWSyncTraceManager : public AdminSocketHook {
 
   std::atomic<uint64_t> count = { 0 };
 
-  std::list<std::array<string, 3> > admin_commands;
+  std::list<std::array<std::string, 3> > admin_commands;
 
   uint64_t alloc_handle() {
     return ++count;
@@ -137,7 +137,7 @@ public:
           Formatter *f,
           std::ostream& ss,
           bufferlist& out) override;
-  string get_active_names();
+  std::string get_active_names();
 };
 
 
index f43a1824868562dc226eaf411cd031dcde1d8a31..681ce1ed69b3cb3d34bfd1146a974350fd4f7847 100644 (file)
@@ -10,6 +10,8 @@
 #include "rgw_tag.h"
 #include "rgw_common.h"
 
+using namespace std;
+
 bool RGWObjTags::add_tag(const string&key, const string& val){
   return tag_map.emplace(std::make_pair(key,val)).second;
 }
index b03607f73a7e68976e7ad6160e2f39cbc7ce0910..c4b847b27e8580e5adacb3e6ca5ea7bc7ec0811c 100644 (file)
@@ -9,6 +9,8 @@
 
 #include "rgw_tag_s3.h"
 
+using namespace std;
+
 void RGWObjTagEntry_S3::decode_xml(XMLObj *obj) {
   RGWXMLDecoder::decode_xml("Key", key, obj, true);
   RGWXMLDecoder::decode_xml("Value", val, obj, true);
index 00430a6096a360dca4004b9fa5c8d99292c14b9f..aaa4f47ca2c8467d481c86185af182bf4f1f6d0c 100644 (file)
@@ -48,6 +48,8 @@ namespace {
 
 }
 
+using namespace std;
+
 void usage()
 {
   cout << "usage: radosgw-token --encode --ttype=<token type> [options...]" << std::endl;
index d95239bcf9f541c22be039e68845eefdce1bbcd8..9505f970c6037aa2f9eb4c7d9a83af591311c6fa 100644 (file)
@@ -152,13 +152,13 @@ namespace rgw {
       return to_base64(std::move(os.str()));
     }
 
-    friend inline ostream& operator<<(ostream& os, const RGWToken& token);
+    friend inline std::ostream& operator<<(std::ostream& os, const RGWToken& token);
 
     virtual ~RGWToken() {};
   };
   WRITE_CLASS_ENCODER(RGWToken)
 
-  inline ostream& operator<<(ostream& os, const RGWToken& token)
+  inline std::ostream& operator<<(std::ostream& os, const RGWToken& token)
   {
     os << "<<RGWToken"
        << " type=" << RGWToken::from_type(token.type)
index be95c472e40418aa83730c1eeca3ae15245f82da..7073e5c5aa5518a29a3ba2ee4e6017532da36c0e 100644 (file)
@@ -33,6 +33,8 @@
 
 #define READ_CHUNK_LEN (512 * 1024)
 
+using namespace std;
+
 static std::map<std::string, std::string>* ext_mime_map;
 
 int rgw_init_ioctx(const DoutPrefixProvider *dpp,
index d0ecfe7bb3a641bca9e12d0ba220b9436536badc..a1607ca663f8c99fd8ba4905abc7ebc5aab5d1a4 100644 (file)
@@ -54,15 +54,15 @@ static inline int rgw_shards_mod(unsigned hval, int max_shards)
 }
 
 // used for logging and tagging
-inline int rgw_shard_id(const string& key, int max_shards)
+inline int rgw_shard_id(const std::string& key, int max_shards)
 {
   return rgw_shards_mod(ceph_str_hash_linux(key.c_str(), key.size()),
                        max_shards);
 }
 
-void rgw_shard_name(const string& prefix, unsigned max_shards, const string& key, string& name, int *shard_id);
-void rgw_shard_name(const string& prefix, unsigned max_shards, const string& section, const string& key, string& name);
-void rgw_shard_name(const string& prefix, unsigned shard_id, string& name);
+void rgw_shard_name(const std::string& prefix, unsigned max_shards, const std::string& key, std::string& name, int *shard_id);
+void rgw_shard_name(const std::string& prefix, unsigned max_shards, const std::string& section, const std::string& key, std::string& name);
+void rgw_shard_name(const std::string& prefix, unsigned shard_id, std::string& name);
 
 struct rgw_name_to_flag {
   const char *type_name;
@@ -70,22 +70,22 @@ struct rgw_name_to_flag {
 };
 
 int rgw_parse_list_of_flags(struct rgw_name_to_flag *mapping,
-                           const string& str, uint32_t *perm);
+                           const std::string& str, uint32_t *perm);
 
-int rgw_put_system_obj(const DoutPrefixProvider *dpp, RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive,
-                       RGWObjVersionTracker *objv_tracker, real_time set_mtime, optional_yield y, map<string, bufferlist> *pattrs = NULL);
-int rgw_get_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const string& key, bufferlist& bl,
-                       RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, const DoutPrefixProvider *dpp, map<string, bufferlist> *pattrs = NULL,
+int rgw_put_system_obj(const DoutPrefixProvider *dpp, RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const std::string& oid, bufferlist& data, bool exclusive,
+                       RGWObjVersionTracker *objv_tracker, real_time set_mtime, optional_yield y, std::map<std::string, bufferlist> *pattrs = NULL);
+int rgw_get_system_obj(RGWSysObjectCtx& obj_ctx, const rgw_pool& pool, const std::string& key, bufferlist& bl,
+                       RGWObjVersionTracker *objv_tracker, real_time *pmtime, optional_yield y, const DoutPrefixProvider *dpp, std::map<std::string, bufferlist> *pattrs = NULL,
                        rgw_cache_entry_info *cache_info = NULL,
                       boost::optional<obj_version> refresh_version = boost::none);
 int rgw_delete_system_obj(const DoutPrefixProvider *dpp, 
-                          RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const string& oid,
+                          RGWSI_SysObj *sysobj_svc, const rgw_pool& pool, const std::string& oid,
                           RGWObjVersionTracker *objv_tracker, optional_yield y);
 
-const char *rgw_find_mime_by_ext(string& ext);
+const char *rgw_find_mime_by_ext(std::string& ext);
 
-void rgw_filter_attrset(map<string, bufferlist>& unfiltered_attrset, const string& check_prefix,
-                        map<string, bufferlist> *attrset);
+void rgw_filter_attrset(std::map<std::string, bufferlist>& unfiltered_attrset, const std::string& check_prefix,
+                        std::map<std::string, bufferlist> *attrset);
 
 /// indicates whether the current thread is in boost::asio::io_context::run(),
 /// used to log warnings if synchronous librados calls are made
@@ -123,12 +123,12 @@ public:
     }
   }
 
-  void update(const string& s) {
+  void update(const std::string& s) {
     if (!s.empty()) {
       update(s.c_str(), s.size());
     }
   }
-  void finish(string *etag) {
+  void finish(std::string *etag) {
     char etag_buf[S];
     char etag_buf_str[S * 2 + 16];
 
@@ -155,31 +155,31 @@ public:
   using BucketRef = std::shared_ptr<Bucket>;
   using ObjectRef = std::shared_ptr<Object>;
 
-  class Bucket : public enable_shared_from_this<Bucket> {
+  class Bucket : public std::enable_shared_from_this<Bucket> {
     friend class RGWDataAccess;
     friend class Object;
 
     RGWDataAccess *sd{nullptr};
     RGWBucketInfo bucket_info;
-    string tenant;
-    string name;
-    string bucket_id;
+    std::string tenant;
+    std::string name;
+    std::string bucket_id;
     ceph::real_time mtime;
-    map<std::string, bufferlist> attrs;
+    std::map<std::string, bufferlist> attrs;
 
     RGWAccessControlPolicy policy;
     int finish_init();
     
     Bucket(RGWDataAccess *_sd,
-          const string& _tenant,
-          const string& _name,
-          const string& _bucket_id) : sd(_sd),
+          const std::string& _tenant,
+          const std::string& _name,
+          const std::string& _bucket_id) : sd(_sd),
                                        tenant(_tenant),
                                        name(_name),
                                       bucket_id(_bucket_id) {}
     Bucket(RGWDataAccess *_sd) : sd(_sd) {}
     int init(const DoutPrefixProvider *dpp, optional_yield y);
-    int init(const RGWBucketInfo& _bucket_info, const map<string, bufferlist>& _attrs);
+    int init(const RGWBucketInfo& _bucket_info, const std::map<std::string, bufferlist>& _attrs);
   public:
     int get_object(const rgw_obj_key& key,
                   ObjectRef *obj);
@@ -193,10 +193,10 @@ public:
     rgw_obj_key key;
 
     ceph::real_time mtime;
-    string etag;
+    std::string etag;
     uint64_t olh_epoch{0};
     ceph::real_time delete_at;
-    std::optional<string> user_data;
+    std::optional<std::string> user_data;
 
     std::optional<bufferlist> aclbl;
 
@@ -206,13 +206,13 @@ public:
                                       bucket(_bucket),
                                       key(_key) {}
   public:
-    int put(bufferlist& data, map<string, bufferlist>& attrs, const DoutPrefixProvider *dpp, optional_yield y); /* might modify attrs */
+    int put(bufferlist& data, std::map<std::string, bufferlist>& attrs, const DoutPrefixProvider *dpp, optional_yield y); /* might modify attrs */
 
     void set_mtime(const ceph::real_time& _mtime) {
       mtime = _mtime;
     }
 
-    void set_etag(const string& _etag) {
+    void set_etag(const std::string& _etag) {
       etag = _etag;
     }
 
@@ -224,7 +224,7 @@ public:
       delete_at = _delete_at;
     }
 
-    void set_user_data(const string& _user_data) {
+    void set_user_data(const std::string& _user_data) {
       user_data = _user_data;
     }
 
@@ -234,9 +234,9 @@ public:
   };
 
   int get_bucket(const DoutPrefixProvider *dpp, 
-                 const string& tenant,
-                const string name,
-                const string bucket_id,
+                 const std::string& tenant,
+                const std::string name,
+                const std::string bucket_id,
                 BucketRef *bucket,
                 optional_yield y) {
     bucket->reset(new Bucket(this, tenant, name, bucket_id));
@@ -244,7 +244,7 @@ public:
   }
 
   int get_bucket(const RGWBucketInfo& bucket_info,
-                const map<string, bufferlist>& attrs,
+                const std::map<std::string, bufferlist>& attrs,
                 BucketRef *bucket) {
     bucket->reset(new Bucket(this));
     return (*bucket)->init(bucket_info, attrs);
index 4fb54333a3fc99c060fa065b30709c41178e461c..887b13a92b4d1596d90a84526d9126f3e70daf7b 100644 (file)
 
 #define dout_subsys ceph_subsys_rgw
 
-using ceph::crypto::MD5;
+using namespace std;
 using namespace librados;
 using namespace boost;
+using ceph::crypto::MD5;
 using ceph::crypto::SHA1;
 
 seed::seed()
index a3837e5ad4fb6a303edaac81a99c2eb76d0419c0..89868c4f9da8aa3f791225d674920e8f87c15166 100644 (file)
@@ -93,16 +93,16 @@ private:
   {
     int piece_length;    // each piece length
     bufferlist sha1_bl;  // save sha1
-    string name;    // file name
+    std::string name;    // file name
     off_t len;    // file total bytes
   }info;
 
-  string  announce;    // tracker
-  string origin; // origin
+  std::string  announce;    // tracker
+  std::string origin; // origin
   time_t create_date{0};    // time of the file created
-  string comment;  // comment
-  string create_by;    // app name and version
-  string encoding;    // if encode use gbk rather than gtf-8 use this field
+  std::string comment;  // comment
+  std::string create_by;    // app name and version
+  std::string encoding;    // if encode use gbk rather than gtf-8 use this field
   uint64_t sha_len;  // sha1 length
   bool is_torrent;  // flag
   bufferlist bl;  // bufflist ready to send
@@ -127,7 +127,7 @@ public:
   bool get_flag();
 
   void set_create_date(ceph::real_time& value);
-  void set_info_name(const string& value);
+  void set_info_name(const std::string& value);
   void update(bufferlist &bl);
   int complete(optional_yield y);
 
index 0f481a699f97a4f3ef5b1a235bfe7517186a99f7..1756d7f7a1695c1ecab8b154e8799bba55ede5ab 100644 (file)
@@ -43,6 +43,8 @@
 #undef dout_prefix
 #define dout_prefix (*_dout << "trim: ")
 
+using namespace std;
+
 using rgw::BucketTrimConfig;
 using BucketChangeCounter = BoundedKeyCounter<std::string, int>;
 
index e76995eb48649dd27da7ff56d945334379b39da8..cf0cac66cd629b40707a38bac21eadc7d0560efa 100644 (file)
@@ -9,7 +9,7 @@
 #include "rgw_formats.h"
 #include "rgw_sal.h"
 
-
+using namespace std;
 
 static void dump_usage_categories_info(Formatter *formatter, const rgw_usage_log_entry& entry, map<string, bool> *categories)
 {
index 9d45170a54c7a0ef57ba7171f189c817b67fca24..20301e047b2ccac22186e49f4e28ecd681812dfb 100644 (file)
@@ -32,7 +32,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
-
+using namespace std;
 
 extern void op_type_to_str(uint32_t mask, char *buf, int len);
 
index 542efc2092561e1c505ba1300dcc97eceab932d1..5015e0d02e2f5b01b1b3a6eac1ae92cd3eb30620 100644 (file)
@@ -43,13 +43,13 @@ struct RGWUID
 {
   rgw_user user_id;
   void encode(bufferlist& bl) const {
-    string s;
+    std::string s;
     user_id.to_str(s);
     using ceph::encode;
     encode(s, bl);
   }
   void decode(bufferlist::const_iterator& bl) {
-    string s;
+    std::string s;
     using ceph::decode;
     decode(s, bl);
     user_id.from_str(s);
@@ -60,7 +60,7 @@ WRITE_CLASS_ENCODER(RGWUID)
 extern int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::Store* store, rgw::sal::User* user, optional_yield y);
 extern int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
   rgw::sal::Store* store, rgw::sal::User* user,
-  map<string, cls_user_bucket_entry>& buckets_usage_map, optional_yield y);
+  std::map<std::string, cls_user_bucket_entry>& buckets_usage_map, optional_yield y);
 
 /**
  * Get the anonymous (ie, unauthenticated) user info.
@@ -70,7 +70,7 @@ extern void rgw_get_anon_user(RGWUserInfo& info);
 extern void rgw_perm_to_str(uint32_t mask, char *buf, int len);
 extern uint32_t rgw_str_to_perm(const char *str);
 
-extern int rgw_validate_tenant_name(const string& t);
+extern int rgw_validate_tenant_name(const std::string& t);
 
 enum ObjectKeyType {
   KEY_TYPE_SWIFT,
@@ -111,7 +111,7 @@ struct RGWUserAdminOpState {
   std::string caps;
   RGWObjVersionTracker objv;
   uint32_t op_mask{0};
-  map<int, string> temp_url_keys;
+  std::map<int, std::string> temp_url_keys;
 
   // subuser attributes
   std::string subuser;
@@ -122,7 +122,7 @@ struct RGWUserAdminOpState {
   std::string key; // secret key
   int32_t key_type{-1};
 
-  std::set<string> mfa_ids;
+  std::set<std::string> mfa_ids;
 
   // operation attributes
   bool existing_user{false};
@@ -174,7 +174,7 @@ struct RGWUserAdminOpState {
   rgw_placement_rule default_placement; // user default placement
   bool default_placement_specified{false};
 
-  list<string> placement_tags;  // user default placement_tags
+  std::list<std::string> placement_tags;  // user default placement_tags
   bool placement_tags_specified{false};
 
   void set_access_key(const std::string& access_key) {
@@ -244,7 +244,7 @@ struct RGWUserAdminOpState {
     op_mask_specified = true;
   }
 
-  void set_temp_url_key(const string& key, int index) {
+  void set_temp_url_key(const std::string& key, int index) {
     temp_url_keys[index] = key;
     temp_url_key_specified = true;
   }
@@ -326,7 +326,7 @@ struct RGWUserAdminOpState {
     user_quota_specified = true;
   }
 
-  void set_mfa_ids(const std::set<string>& ids) {
+  void set_mfa_ids(const std::set<std::string>& ids) {
     mfa_ids = ids;
     mfa_ids_specified = true;
   }
@@ -336,7 +336,7 @@ struct RGWUserAdminOpState {
     default_placement_specified = true;
   }
 
-  void set_placement_tags(const list<string>& _tags) {
+  void set_placement_tags(const std::list<std::string>& _tags) {
     placement_tags = _tags;
     placement_tags_specified = true;
   }
@@ -377,7 +377,7 @@ struct RGWUserAdminOpState {
   uint32_t get_op_mask() { return op_mask; }
   RGWQuotaInfo& get_bucket_quota() { return bucket_quota; }
   RGWQuotaInfo& get_user_quota() { return user_quota; }
-  set<string>& get_mfa_ids() { return mfa_ids; }
+  std::set<std::string>& get_mfa_ids() { return mfa_ids; }
 
   rgw::sal::User* get_user() { return user.get(); }
   const rgw_user& get_user_id();
@@ -389,13 +389,13 @@ struct RGWUserAdminOpState {
   std::string get_display_name() { return display_name; }
   rgw_user& get_new_uid() { return new_user_id; }
   bool get_overwrite_new_user() const { return overwrite_new_user; }
-  map<int, std::string>& get_temp_url_keys() { return temp_url_keys; }
+  std::map<int, std::string>& get_temp_url_keys() { return temp_url_keys; }
 
   RGWUserInfo&  get_user_info();
 
-  map<std::string, RGWAccessKey>* get_swift_keys();
-  map<std::string, RGWAccessKey>* get_access_keys();
-  map<std::string, RGWSubUser>* get_subusers();
+  std::map<std::string, RGWAccessKey>* get_swift_keys();
+  std::map<std::string, RGWAccessKey>* get_access_keys();
+  std::map<std::string, RGWSubUser>* get_subusers();
 
   RGWUserCaps* get_caps_obj();
 
@@ -416,8 +416,8 @@ class RGWAccessKeyPool
   rgw_user user_id;
   rgw::sal::Store* store{nullptr};
 
-  map<std::string, RGWAccessKey> *swift_keys{nullptr};
-  map<std::string, RGWAccessKey> *access_keys{nullptr};
+  std::map<std::string, RGWAccessKey> *swift_keys{nullptr};
+  std::map<std::string, RGWAccessKey> *access_keys{nullptr};
 
   // we don't want to allow keys for the anonymous user or a null user
   bool keys_allowed{false};
@@ -470,7 +470,7 @@ class RGWSubUserPool
   rgw::sal::Store* store{nullptr};
   bool subusers_allowed{false};
 
-  map<string, RGWSubUser> *subuser_map{nullptr};
+  std::map<std::string, RGWSubUser> *subuser_map{nullptr};
 
 private:
   int check_op(RGWUserAdminOpState& op_state, std::string *err_msg = NULL);
@@ -670,7 +670,7 @@ public:
 
 struct RGWUserCompleteInfo {
   RGWUserInfo info;
-  map<string, bufferlist> attrs;
+  std::map<std::string, bufferlist> attrs;
   bool has_attrs{false};
 
   void dump(Formatter * const f) const {
@@ -736,7 +736,7 @@ public:
     RGWObjVersionTracker *objv_tracker{nullptr};
     ceph::real_time *mtime{nullptr};
     rgw_cache_entry_info *cache_info{nullptr};
-    map<string, bufferlist> *attrs{nullptr};
+    std::map<std::string, bufferlist> *attrs{nullptr};
 
     GetParams() {}
 
@@ -755,7 +755,7 @@ public:
       return *this;
     }
 
-    GetParams& set_attrs(map<string, bufferlist> *_attrs) {
+    GetParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
       attrs = _attrs;
       return *this;
     }
@@ -766,7 +766,7 @@ public:
     RGWObjVersionTracker *objv_tracker{nullptr};
     ceph::real_time mtime;
     bool exclusive{false};
-    map<string, bufferlist> *attrs{nullptr};
+    std::map<std::string, bufferlist> *attrs{nullptr};
 
     PutParams() {}
 
@@ -790,7 +790,7 @@ public:
       return *this;
     }
 
-    PutParams& set_attrs(map<string, bufferlist> *_attrs) {
+    PutParams& set_attrs(std::map<std::string, bufferlist> *_attrs) {
       attrs = _attrs;
       return *this;
     }
@@ -811,18 +811,18 @@ public:
                       const rgw_user& uid, RGWUserInfo *info,
                       optional_yield y, const GetParams& params = {});
   int get_info_by_email(const DoutPrefixProvider *dpp, 
-                        const string& email, RGWUserInfo *info,
+                        const std::string& email, RGWUserInfo *info,
                         optional_yield y, const GetParams& params = {});
   int get_info_by_swift(const DoutPrefixProvider *dpp, 
-                        const string& swift_name, RGWUserInfo *info,
+                        const std::string& swift_name, RGWUserInfo *info,
                         optional_yield y, const GetParams& params = {});
   int get_info_by_access_key(const DoutPrefixProvider *dpp, 
-                             const string& access_key, RGWUserInfo *info,
+                             const std::string& access_key, RGWUserInfo *info,
                              optional_yield y, const GetParams& params = {});
 
   int get_attrs_by_uid(const DoutPrefixProvider *dpp, 
                        const rgw_user& user_id,
-                       map<string, bufferlist> *attrs,
+                       std::map<std::string, bufferlist> *attrs,
                        optional_yield y,
                        RGWObjVersionTracker *objv_tracker = nullptr);
 
@@ -843,8 +843,8 @@ public:
                     const rgw_bucket& bucket, optional_yield y);
   int list_buckets(const DoutPrefixProvider *dpp, 
                    const rgw_user& user,
-                   const string& marker,
-                   const string& end_marker,
+                   const std::string& marker,
+                   const std::string& end_marker,
                    uint64_t max,
                    bool need_stats,
                    RGWUserBuckets *buckets,
index ff58786c77d0fe79ed2383ba5752e54a84f13ddb..8710228570645cdf75166808f281a335b13e82bd 100644 (file)
@@ -25,7 +25,7 @@
 #include "include/types.h"
 #include "rgw_website.h"
 
-
+using namespace std;
 
 bool RGWBWRoutingRuleCondition::check_key_condition(const string& key) {
   return (key.size() >= key_prefix_equals.size() &&
index f878ff8a6d18d7b5c66f5597043888206328b39c..d01456172a00e9171321efc38104c034a6759ba3 100644 (file)
@@ -67,12 +67,12 @@ protected:
 
   std::atomic<bool> down_flag = { false };
 
-  string thread_name;
+  std::string thread_name;
 
   virtual uint64_t interval_msec() = 0;
   virtual void stop_process() {}
 public:
-  RGWRadosThread(RGWRados *_store, const string& thread_name = "radosgw")
+  RGWRadosThread(RGWRados *_store, const std::string& thread_name = "radosgw")
     : worker(NULL), cct(_store->ctx()), store(_store), thread_name(thread_name) {}
   virtual ~RGWRadosThread() {
     stop();
index 19f0ac4f98eeed31a27b18b982d484b8da99ba2b..22a62ac480a5a3ea94b8790bd452ddc36ad77c16 100644 (file)
@@ -13,6 +13,8 @@
 
 #include "rgw_xml.h"
 
+using namespace std;
+
 XMLObjIter::
 XMLObjIter()
 {
index b3e1e8ee681fc671dfbd79c013e556754d753848..c56c8c5247d74d38ae13225ac20cd1daba6436bd 100644 (file)
@@ -16,8 +16,8 @@ class RGWXMLParser;
 
 class XMLObjIter {
 public:
-  typedef map<std::string, XMLObj *>::iterator map_iter_t;
-  typedef map<std::string, XMLObj *>::iterator const_map_iter_t;
+  typedef std::map<std::string, XMLObj *>::iterator map_iter_t;
+  typedef std::map<std::string, XMLObj *>::iterator const_map_iter_t;
 
   XMLObjIter();
   ~XMLObjIter();
@@ -76,7 +76,7 @@ public:
   // return the first sub-tags matching the name
   XMLObj *find_first(const std::string& name);
 
-  friend ostream& operator<<(ostream &out, const XMLObj &obj);
+  friend std::ostream& operator<<(std::ostream &out, const XMLObj &obj);
   friend RGWXMLParser;
 };
 
@@ -165,7 +165,7 @@ namespace RGWXMLDecoder {
   void decode_xml(const char *name, T& val, T& default_val, XMLObj* obj);
 }
 
-static inline ostream& operator<<(ostream &out, RGWXMLDecoder::err& err)
+static inline std::ostream& operator<<(std::ostream &out, RGWXMLDecoder::err& err)
 {
   return out << err.what();
 }
@@ -176,7 +176,7 @@ void decode_xml_obj(T& val, XMLObj *obj)
   val.decode_xml(obj);
 }
 
-static inline void decode_xml_obj(string& val, XMLObj *obj)
+static inline void decode_xml_obj(std::string& val, XMLObj *obj)
 {
   val = obj->get_data();
 }
@@ -200,7 +200,7 @@ void decode_xml_obj(std::optional<T>& val, XMLObj *obj)
 }
 
 template<class T>
-void do_decode_xml_obj(list<T>& l, const string& name, XMLObj *obj)
+void do_decode_xml_obj(std::list<T>& l, const std::string& name, XMLObj *obj)
 {
   l.clear();
 
@@ -221,7 +221,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, T& val, XMLObj *obj, bool manda
   XMLObj *o = iter.get_next();
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     val = T();
@@ -231,7 +231,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, T& val, XMLObj *obj, bool manda
   try {
     decode_xml_obj(val, o);
   } catch (const err& e) {
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -249,7 +249,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, std::vector<T>& v, XMLObj *obj,
 
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     return false;
@@ -260,7 +260,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, std::vector<T>& v, XMLObj *obj,
     try {
       decode_xml_obj(val, o);
     } catch (const err& e) {
-      string s = string(name) + ": ";
+      std::string s = std::string(name) + ": ";
       s.append(e.what());
       throw err(s);
     }
@@ -278,7 +278,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, C& container, void (*cb)(C&, XM
   XMLObj *o = iter.get_next();
   if (!o) {
     if (mandatory) {
-      string s = "missing mandatory field " + string(name);
+      std::string s = "missing mandatory field " + std::string(name);
       throw err(s);
     }
     return false;
@@ -287,7 +287,7 @@ bool RGWXMLDecoder::decode_xml(const char *name, C& container, void (*cb)(C&, XM
   try {
     decode_xml_obj(container, cb, o);
   } catch (const err& e) {
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -309,7 +309,7 @@ void RGWXMLDecoder::decode_xml(const char *name, T& val, T& default_val, XMLObj
     decode_xml_obj(val, o);
   } catch (const err& e) {
     val = default_val;
-    string s = string(name) + ": ";
+    std::string s = std::string(name) + ": ";
     s.append(e.what());
     throw err(s);
   }
@@ -331,7 +331,7 @@ static void encode_xml(const char *name, const char *ns, const T& val, ceph::For
   f->close_section();
 }
 
-void encode_xml(const char *name, const string& val, ceph::Formatter *f);
+void encode_xml(const char *name, const std::string& val, ceph::Formatter *f);
 void encode_xml(const char *name, const char *val, ceph::Formatter *f);
 void encode_xml(const char *name, bool val, ceph::Formatter *f);
 void encode_xml(const char *name, int val, ceph::Formatter *f);
index 3c7afcbbdc7b43cc9c05d6bbb29fe803251b2934..c12d15f4bc5a3cb8e704eab69ccacb49cad03923 100644 (file)
@@ -21,6 +21,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 void RGWBWRedirectInfo::dump_xml(Formatter *f) const
 {
   if (!redirect.protocol.empty()) {
index 4c4b47b145dcd5ba1a05bf9e871f6564a4306bb0..9dd98d43f5dff998f38bff78b920902d3ed483f5 100644 (file)
@@ -41,6 +41,7 @@ std::string default_storage_pool_suffix = "rgw.buckets.data";
 
 }
 
+using namespace std;
 using namespace rgw_zone_defaults;
 
 RGWMetaSyncStatusManager::~RGWMetaSyncStatusManager(){}
index c167dd4d73e57e52ebf2ba03a5e903c8a46f9215..2823d54fc71bb8b6ed83cab8e3069f898928c455 100644 (file)
@@ -184,7 +184,7 @@ WRITE_CLASS_ENCODER(RGWZoneStorageClass)
 
 
 class RGWZoneStorageClasses {
-  map<string, RGWZoneStorageClass> m;
+  std::map<std::string, RGWZoneStorageClass> m;
 
   /* in memory only */
   RGWZoneStorageClass *standard_class;
@@ -207,7 +207,7 @@ public:
     return *standard_class;
   }
 
-  bool find(const string& sc, const RGWZoneStorageClass **pstorage_class) const {
+  bool find(const std::string& sc, const RGWZoneStorageClass **pstorage_class) const {
     auto iter = m.find(sc);
     if (iter == m.end()) {
       return false;
@@ -216,7 +216,7 @@ public:
     return true;
   }
 
-  bool exists(const string& sc) const {
+  bool exists(const std::string& sc) const {
     if (sc.empty()) {
       return true;
     }
@@ -224,16 +224,16 @@ public:
     return (iter != m.end());
   }
 
-  const map<string, RGWZoneStorageClass>& get_all() const {
+  const std::map<std::string, RGWZoneStorageClass>& get_all() const {
     return m;
   }
 
-  map<string, RGWZoneStorageClass>& get_all() {
+  std::map<std::string, RGWZoneStorageClass>& get_all() {
     return m;
   }
 
-  void set_storage_class(const string& sc, const rgw_pool *data_pool, const string *compression_type) {
-    const string *psc = &sc;
+  void set_storage_class(const std::string& sc, const rgw_pool *data_pool, const std::string *compression_type) {
+    const std::string *psc = &sc;
     if (sc.empty()) {
       psc = &RGW_STORAGE_CLASS_STANDARD;
     }
@@ -246,7 +246,7 @@ public:
     }
   }
 
-  void remove_storage_class(const string& sc) {
+  void remove_storage_class(const std::string& sc) {
     if (!sc.empty()) {
       m.erase(sc);
     }
@@ -285,7 +285,7 @@ struct RGWZonePlacementInfo {
     encode(standard_data_pool.to_str(), bl);
     encode(data_extra_pool.to_str(), bl);
     encode((uint32_t)index_type, bl);
-    string standard_compression_type = get_compression_type(RGW_STORAGE_CLASS_STANDARD);
+    std::string standard_compression_type = get_compression_type(RGW_STORAGE_CLASS_STANDARD);
     encode(standard_compression_type, bl);
     encode(storage_classes, bl);
     ENCODE_FINISH(bl);
@@ -293,14 +293,14 @@ struct RGWZonePlacementInfo {
 
   void decode(bufferlist::const_iterator& bl) {
     DECODE_START(7, bl);
-    string index_pool_str;
-    string data_pool_str;
+    std::string index_pool_str;
+    std::string data_pool_str;
     decode(index_pool_str, bl);
     index_pool = rgw_pool(index_pool_str);
     decode(data_pool_str, bl);
     rgw_pool standard_data_pool(data_pool_str);
     if (struct_v >= 4) {
-      string data_extra_pool_str;
+      std::string data_extra_pool_str;
       decode(data_extra_pool_str, bl);
       data_extra_pool = rgw_pool(data_extra_pool_str);
     }
@@ -309,7 +309,7 @@ struct RGWZonePlacementInfo {
       decode(it, bl);
       index_type = (rgw::BucketIndexType)it;
     }
-    string standard_compression_type;
+    std::string standard_compression_type;
     if (struct_v >= 6) {
       decode(standard_compression_type, bl);
     }
@@ -328,7 +328,7 @@ struct RGWZonePlacementInfo {
     }
     return data_extra_pool;
   }
-  const rgw_pool& get_data_pool(const string& sc) const {
+  const rgw_pool& get_data_pool(const std::string& sc) const {
     const RGWZoneStorageClass *storage_class;
     static rgw_pool no_pool;
 
@@ -342,9 +342,9 @@ struct RGWZonePlacementInfo {
     return get_data_pool(RGW_STORAGE_CLASS_STANDARD);
   }
 
-  const string& get_compression_type(const string& sc) const {
+  const std::string& get_compression_type(const std::string& sc) const {
     const RGWZoneStorageClass *storage_class;
-    static string no_compression;
+    static std::string no_compression;
 
     if (!storage_classes.find(sc, &storage_class)) {
       return no_compression;
@@ -352,7 +352,7 @@ struct RGWZonePlacementInfo {
     return storage_class->compression_type.get_value_or(no_compression);
   }
 
-  bool storage_class_exists(const string& sc) const {
+  bool storage_class_exists(const std::string& sc) const {
     return storage_classes.exists(sc);
   }
 
@@ -382,7 +382,7 @@ struct RGWZoneParams : RGWSystemMetaObj {
 
   RGWAccessKey system_key;
 
-  map<std::string, RGWZonePlacementInfo> placement_pools;
+  std::map<std::string, RGWZonePlacementInfo> placement_pools;
 
   std::string realm_id;
 
@@ -413,7 +413,7 @@ struct RGWZoneParams : RGWSystemMetaObj {
   int create(const DoutPrefixProvider *dpp, optional_yield y, bool exclusive = true) override;
   int fix_pool_names(const DoutPrefixProvider *dpp, optional_yield y);
 
-  const string& get_compression_type(const rgw_placement_rule& placement_rule) const;
+  const std::string& get_compression_type(const rgw_placement_rule& placement_rule) const;
   
   void encode(bufferlist& bl) const override {
     ENCODE_START(14, 1, bl);
@@ -434,7 +434,7 @@ struct RGWZoneParams : RGWSystemMetaObj {
     encode(unused_metadata_heap, bl);
     encode(realm_id, bl);
     encode(lc_pool, bl);
-    map<std::string, std::string, ltstr_nocase> old_tier_config;
+    std::map<std::string, std::string, ltstr_nocase> old_tier_config;
     encode(old_tier_config, bl);
     encode(roles_pool, bl);
     encode(reshard_pool, bl);
@@ -479,7 +479,7 @@ struct RGWZoneParams : RGWSystemMetaObj {
     } else {
       lc_pool = log_pool.name + ":lc";
     }
-    map<std::string, std::string, ltstr_nocase> old_tier_config;
+    std::map<std::string, std::string, ltstr_nocase> old_tier_config;
     if (struct_v >= 8) {
       decode(old_tier_config, bl);
     }
@@ -519,7 +519,7 @@ struct RGWZoneParams : RGWSystemMetaObj {
   }
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWZoneParams*>& o);
+  static void generate_test_instances(std::list<RGWZoneParams*>& o);
 
   bool get_placement(const std::string& placement_id, RGWZonePlacementInfo *placement) const {
     auto iter = placement_pools.find(placement_id);
@@ -571,7 +571,7 @@ WRITE_CLASS_ENCODER(RGWZoneParams)
 struct RGWZone {
   std::string id;
   std::string name;
-  list<std::string> endpoints;
+  std::list<std::string> endpoints;
   bool log_meta;
   bool log_data;
   bool read_only;
@@ -594,7 +594,7 @@ struct RGWZone {
   static constexpr uint32_t default_bucket_index_max_shards = 11;
 
   bool sync_from_all;
-  set<std::string> sync_from; /* list of zones to sync from */
+  std::set<std::string> sync_from; /* list of zones to sync from */
 
   RGWZone()
     : log_meta(false), log_data(false), read_only(false),
@@ -649,7 +649,7 @@ struct RGWZone {
   }
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWZone*>& o);
+  static void generate_test_instances(std::list<RGWZone*>& o);
 
   bool is_read_only() const { return read_only; }
 
@@ -681,10 +681,10 @@ WRITE_CLASS_ENCODER(RGWDefaultZoneGroupInfo)
 
 struct RGWZoneGroupPlacementTarget {
   std::string name;
-  set<std::string> tags;
-  set<std::string> storage_classes;
+  std::set<std::string> tags;
+  std::set<std::string> storage_classes;
 
-  bool user_permitted(const list<std::string>& user_tags) const {
+  bool user_permitted(const std::list<std::string>& user_tags) const {
     if (tags.empty()) {
       return true;
     }
@@ -723,24 +723,24 @@ WRITE_CLASS_ENCODER(RGWZoneGroupPlacementTarget)
 
 struct RGWZoneGroup : public RGWSystemMetaObj {
   std::string api_name;
-  list<std::string> endpoints;
+  std::list<std::string> endpoints;
   bool is_master = false;
 
   rgw_zone_id master_zone;
-  map<rgw_zone_id, RGWZone> zones;
+  std::map<rgw_zone_id, RGWZone> zones;
 
-  map<std::string, RGWZoneGroupPlacementTarget> placement_targets;
+  std::map<std::string, RGWZoneGroupPlacementTarget> placement_targets;
   rgw_placement_rule default_placement;
 
-  list<std::string> hostnames;
-  list<std::string> hostnames_s3website;
-  // TODO: Maybe convert hostnames to a map<std::string,list<std::string>> for
+  std::list<std::string> hostnames;
+  std::list<std::string> hostnames_s3website;
+  // TODO: Maybe convert hostnames to a map<std::string,std::list<std::string>> for
   // endpoint_type->hostnames
 /*
 20:05 < _robbat21irssi> maybe I do someting like: if (hostname_map.empty()) { populate all map keys from hostnames; };
 20:05 < _robbat21irssi> but that's a later compatability migration planning bit
 20:06 < yehudasa> more like if (!hostnames.empty()) {
-20:06 < yehudasa> for (list<std::string>::iterator iter = hostnames.begin(); iter != hostnames.end(); ++iter) {
+20:06 < yehudasa> for (std::list<std::string>::iterator iter = hostnames.begin(); iter != hostnames.end(); ++iter) {
 20:06 < yehudasa> hostname_map["s3"].append(iter->second);
 20:07 < yehudasa> hostname_map["s3website"].append(iter->second);
 20:07 < yehudasa> s/append/push_back/g
@@ -748,8 +748,8 @@ struct RGWZoneGroup : public RGWSystemMetaObj {
 20:08 < yehudasa> yeah, probably
 20:08 < _robbat21irssi> s3, s3website, swift, swith_auth, swift_website
 */
-  map<std::string, list<std::string> > api_hostname_map;
-  map<std::string, list<std::string> > api_endpoints_map;
+  std::map<std::string, std::list<std::string> > api_hostname_map;
+  std::map<std::string, std::list<std::string> > api_endpoints_map;
 
   std::string realm_id;
 
@@ -759,7 +759,7 @@ struct RGWZoneGroup : public RGWSystemMetaObj {
   RGWZoneGroup(const std::string &id, const std::string &name):RGWSystemMetaObj(id, name) {}
   explicit RGWZoneGroup(const std::string &_name):RGWSystemMetaObj(_name) {}
   RGWZoneGroup(const std::string &_name, bool _is_master, CephContext *cct, RGWSI_SysObj* sysobj_svc,
-              const std::string& _realm_id, const list<std::string>& _endpoints)
+              const std::string& _realm_id, const std::list<std::string>& _endpoints)
     : RGWSystemMetaObj(_name, cct , sysobj_svc), endpoints(_endpoints), is_master(_is_master),
       realm_id(_realm_id) {}
 
@@ -822,9 +822,9 @@ struct RGWZoneGroup : public RGWSystemMetaObj {
   int equals(const std::string& other_zonegroup) const;
   int add_zone(const DoutPrefixProvider *dpp, 
                const RGWZoneParams& zone_params, bool *is_master, bool *read_only,
-               const list<std::string>& endpoints, const std::string *ptier_type,
-               bool *psync_from_all, list<std::string>& sync_from,
-               list<std::string>& sync_from_rm, std::string *predirect_zone,
+               const std::list<std::string>& endpoints, const std::string *ptier_type,
+               bool *psync_from_all, std::list<std::string>& sync_from,
+               std::list<std::string>& sync_from_rm, std::string *predirect_zone,
                std::optional<int> bucket_index_max_shards, RGWSyncModulesManager *sync_mgr,
               optional_yield y);
   int remove_zone(const DoutPrefixProvider *dpp, const std::string& zone_id, optional_yield y);
@@ -838,16 +838,16 @@ struct RGWZoneGroup : public RGWSystemMetaObj {
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWZoneGroup*>& o);
+  static void generate_test_instances(std::list<RGWZoneGroup*>& o);
 };
 WRITE_CLASS_ENCODER(RGWZoneGroup)
 
 struct RGWPeriodMap
 {
   std::string id;
-  map<std::string, RGWZoneGroup> zonegroups;
-  map<std::string, RGWZoneGroup> zonegroups_by_api;
-  map<std::string, uint32_t> short_zone_ids;
+  std::map<std::string, RGWZoneGroup> zonegroups;
+  std::map<std::string, RGWZoneGroup> zonegroups_by_api;
+  std::map<std::string, uint32_t> short_zone_ids;
 
   std::string master_zonegroup;
 
@@ -870,7 +870,7 @@ struct RGWPeriodMap
   bool find_zone_by_id(const rgw_zone_id& zone_id,
                        RGWZoneGroup *zonegroup,
                        RGWZone *zone) const;
-  bool find_zone_by_name(const string& zone_id,
+  bool find_zone_by_name(const std::string& zone_id,
                        RGWZoneGroup *zonegroup,
                        RGWZone *zone) const;
 };
@@ -912,7 +912,7 @@ WRITE_CLASS_ENCODER(RGWPeriodConfig)
 /* for backward comaptability */
 struct RGWRegionMap {
 
-  map<std::string, RGWZoneGroup> regions;
+  std::map<std::string, RGWZoneGroup> regions;
 
   std::string master_region;
 
@@ -929,8 +929,8 @@ WRITE_CLASS_ENCODER(RGWRegionMap)
 
 struct RGWZoneGroupMap {
 
-  map<std::string, RGWZoneGroup> zonegroups;
-  map<std::string, RGWZoneGroup> zonegroups_by_api;
+  std::map<std::string, RGWZoneGroup> zonegroups;
+  std::map<std::string, RGWZoneGroup> zonegroups_by_api;
 
   std::string master_zonegroup;
 
@@ -994,7 +994,7 @@ public:
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWRealm*>& o);
+  static void generate_test_instances(std::list<RGWRealm*>& o);
 
   const std::string& get_current_period() const {
     return current_period;
@@ -1038,7 +1038,7 @@ struct RGWPeriodLatestEpochInfo {
 
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWPeriodLatestEpochInfo*>& o);
+  static void generate_test_instances(std::list<RGWPeriodLatestEpochInfo*>& o);
 };
 WRITE_CLASS_ENCODER(RGWPeriodLatestEpochInfo)
 
@@ -1127,7 +1127,7 @@ public:
     period_config.bucket_quota = bucket_quota;
   }
 
-  void set_id(const string& _id) {
+  void set_id(const std::string& _id) {
     this->id = _id;
     period_map.id = _id;
   }
@@ -1233,7 +1233,7 @@ public:
   }
   void dump(Formatter *f) const;
   void decode_json(JSONObj *obj);
-  static void generate_test_instances(list<RGWPeriod*>& o);
+  static void generate_test_instances(std::list<RGWPeriod*>& o);
 
   static std::string get_staging_id(const std::string& realm_id) {
     return realm_id + ":staging";
index dd9bcc6add235c27c8af7175f6f7d9005acea787..950ded02f6345162eb6e10a16078a2240b5ceac2 100644 (file)
@@ -13,6 +13,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string dir_oid_prefix = ".dir.";
 
 RGWSI_BucketIndex_RADOS::RGWSI_BucketIndex_RADOS(CephContext *cct) : RGWSI_BucketIndex(cct)
index 9037f43c8af357dc1d978c88af652fd22450de11..85eb3e5b7fedefb49f35d6ddadc60c20a54a7052 100644 (file)
@@ -47,22 +47,22 @@ class RGWSI_BucketIndex_RADOS : public RGWSI_BucketIndex
   int open_bucket_index_base(const DoutPrefixProvider *dpp,
                              const RGWBucketInfo& bucket_info,
                              RGWSI_RADOS::Pool *index_pool,
-                             string *bucket_oid_base);
+                             std::string *bucket_oid_base);
 
-  void get_bucket_index_object(const string& bucket_oid_base,
+  void get_bucket_index_object(const std::string& bucket_oid_base,
                                uint32_t num_shards,
                                int shard_id,
                                uint64_t gen_id,
-                               string *bucket_obj);
-  int get_bucket_index_object(const string& bucket_oid_base, const string& obj_key,
+                               std::string *bucket_obj);
+  int get_bucket_index_object(const std::string& bucket_oid_base, const std::string& obj_key,
                               uint32_t num_shards, rgw::BucketHashType hash_type,
-                              string *bucket_obj, int *shard_id);
+                              std::string *bucket_obj, int *shard_id);
 
   int cls_bucket_head(const DoutPrefixProvider *dpp,
                       const RGWBucketInfo& bucket_info,
                       int shard_id,
-                      vector<rgw_bucket_dir_header> *headers,
-                      map<int, string> *bucket_instance_ids,
+                      std::vector<rgw_bucket_dir_header> *headers,
+                      std::map<int, std::string> *bucket_instance_ids,
                       optional_yield y);
 
 public:
@@ -85,7 +85,7 @@ public:
     return RGW_SHARDS_PRIME_1;
   }
 
-  static int shard_id(const string& key, int max_shards) {
+  static int shard_id(const std::string& key, int max_shards) {
     return rgw_shard_id(key, max_shards);
   }
 
@@ -115,7 +115,7 @@ public:
 
   int open_bucket_index_shard(const DoutPrefixProvider *dpp,
                               const RGWBucketInfo& bucket_info,
-                              const string& obj_key,
+                              const std::string& obj_key,
                               RGWSI_RADOS::Obj *bucket_obj,
                               int *shard_id);
 
@@ -128,14 +128,14 @@ public:
   int open_bucket_index(const DoutPrefixProvider *dpp,
                         const RGWBucketInfo& bucket_info,
                         RGWSI_RADOS::Pool *index_pool,
-                        string *bucket_oid);
+                        std::string *bucket_oid);
 
   int open_bucket_index(const DoutPrefixProvider *dpp,
                         const RGWBucketInfo& bucket_info,
                         std::optional<int> shard_id,
                         RGWSI_RADOS::Pool *index_pool,
-                        map<int, string> *bucket_objs,
-                        map<int, string> *bucket_instance_ids);
+                        std::map<int, std::string> *bucket_objs,
+                        std::map<int, std::string> *bucket_instance_ids);
 };
 
 
index 06cf5ce7a67ed8363a0be3f2992e4637d105201d..79f096e839ae1f453a16d4e0c84a720f210cfbff 100644 (file)
@@ -6,9 +6,10 @@
 
 #include "cls/rgw/cls_rgw_client.h"
 
-
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWSI_BILog_RADOS::RGWSI_BILog_RADOS(CephContext *cct) : RGWServiceInstance(cct)
 {
 }
index 84f5679af1051395a091dcdb31a8ced1daa73083..8bebf72113bbd6612939d81ee2993e223026ac53 100644 (file)
@@ -54,7 +54,7 @@ public:
   int get_log_status(const DoutPrefixProvider *dpp,
                      const RGWBucketInfo& bucket_info,
                      int shard_id,
-                     map<int, string> *markers,
+                     std::map<int, std::string> *markers,
                      optional_yield y);
 };
 
index dff3677cf2be66f2f9953b76b2c4b82d59afdaf4..b115990d2bf80441d51ce39620b50c5b5412eb0d 100644 (file)
@@ -6,7 +6,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
-string RGWSI_Bucket::get_entrypoint_meta_key(const rgw_bucket& bucket)
+std::string RGWSI_Bucket::get_entrypoint_meta_key(const rgw_bucket& bucket)
 {
   if (bucket.bucket_id.empty()) {
     return bucket.get_key();
@@ -18,7 +18,7 @@ string RGWSI_Bucket::get_entrypoint_meta_key(const rgw_bucket& bucket)
   return b.get_key();
 }
 
-string RGWSI_Bucket::get_bi_meta_key(const rgw_bucket& bucket)
+std::string RGWSI_Bucket::get_bi_meta_key(const rgw_bucket& bucket)
 {
   return bucket.get_key();
 }
index fcdabca8b6f21238bf93ab461ca47361f62c5a0b..f1212c9d86f0a8871d58127158fe45bb2fa438cc 100644 (file)
@@ -27,44 +27,44 @@ public:
   RGWSI_Bucket(CephContext *cct) : RGWServiceInstance(cct) {}
   virtual ~RGWSI_Bucket() {}
 
-  static string get_entrypoint_meta_key(const rgw_bucket& bucket);
-  static string get_bi_meta_key(const rgw_bucket& bucket);
+  static std::string get_entrypoint_meta_key(const rgw_bucket& bucket);
+  static std::string get_bi_meta_key(const rgw_bucket& bucket);
 
   virtual RGWSI_Bucket_BE_Handler& get_ep_be_handler() = 0;
   virtual RGWSI_BucketInstance_BE_Handler& get_bi_be_handler() = 0;
 
   virtual int read_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                          const string& key,
+                                          const std::string& key,
                                           RGWBucketEntryPoint *entry_point,
                                           RGWObjVersionTracker *objv_tracker,
                                           real_time *pmtime,
-                                          map<string, bufferlist> *pattrs,
+                                          std::map<std::string, bufferlist> *pattrs,
                                           optional_yield y,
                                           const DoutPrefixProvider *dpp,
                                           rgw_cache_entry_info *cache_info = nullptr,
                                           boost::optional<obj_version> refresh_version = boost::none) = 0;
 
   virtual int store_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                   const string& key,
+                                   const std::string& key,
                                    RGWBucketEntryPoint& info,
                                    bool exclusive,
                                    real_time mtime,
-                                   map<string, bufferlist> *pattrs,
+                                   std::map<std::string, bufferlist> *pattrs,
                                    RGWObjVersionTracker *objv_tracker,
                                    optional_yield y,
                                    const DoutPrefixProvider *dpp) = 0;
 
   virtual int remove_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                    const string& key,
+                                    const std::string& key,
                                     RGWObjVersionTracker *objv_tracker,
                                     optional_yield y,
                                     const DoutPrefixProvider *dpp) = 0;
 
   virtual int read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                const string& key,
+                                const std::string& key,
                                 RGWBucketInfo *info,
                                 real_time *pmtime,
-                                map<string, bufferlist> *pattrs,
+                                std::map<std::string, bufferlist> *pattrs,
                                 optional_yield y,
                                 const DoutPrefixProvider *dpp,
                                 rgw_cache_entry_info *cache_info = nullptr,
@@ -74,24 +74,24 @@ public:
                        const rgw_bucket& bucket,
                        RGWBucketInfo *info,
                        real_time *pmtime,
-                       map<string, bufferlist> *pattrs,
+                       std::map<std::string, bufferlist> *pattrs,
                        boost::optional<obj_version> refresh_version,
                        optional_yield y,
                        const DoutPrefixProvider *dpp) = 0;
 
   virtual int store_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                 const string& key,
+                                 const std::string& key,
                                  RGWBucketInfo& info,
                                  std::optional<RGWBucketInfo *> orig_info, /* nullopt: orig_info was not fetched,
                                                                               nullptr: orig_info was not found (new bucket instance */
                                  bool exclusive,
                                  real_time mtime,
-                                 map<string, bufferlist> *pattrs,
+                                 std::map<std::string, bufferlist> *pattrs,
                                  optional_yield y,
                                  const DoutPrefixProvider *dpp) = 0;
 
   virtual int remove_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                  const string& key,
+                                  const std::string& key,
                                  const RGWBucketInfo& bucket_info,
                                   RGWObjVersionTracker *objv_tracker,
                                   optional_yield y,
@@ -104,7 +104,7 @@ public:
                         const DoutPrefixProvider *dpp) = 0;
 
   virtual int read_buckets_stats(RGWSI_Bucket_X_Ctx& ctx,
-                                 map<string, RGWBucketEnt>& m,
+                                 std::map<std::string, RGWBucketEnt>& m,
                                  optional_yield y,
                                  const DoutPrefixProvider *dpp) = 0;
 };
index f4086e8bd0ddaf3d9a12902297c4291361ad7aef..c5bdd69b0746e1168218b523be091bfa4b138140 100644 (file)
@@ -19,6 +19,8 @@
 
 #define RGW_BUCKET_INSTANCE_MD_PREFIX ".bucket.meta."
 
+using namespace std;
+
 class RGWSI_Bucket_SObj_Module : public RGWSI_MBSObj_Handler_Module {
   RGWSI_Bucket_SObj::Svc& svc;
 
index 776367e8aba4f0aa9b927e245a0fa529a5ea21a6..643291536a513f86a3087a642059dfdef2b01cb2 100644 (file)
@@ -40,11 +40,11 @@ class RGWSI_Bucket_SObj : public RGWSI_Bucket
   struct bucket_info_cache_entry {
     RGWBucketInfo info;
     real_time mtime;
-    map<string, bufferlist> attrs;
+    std::map<std::string, bufferlist> attrs;
   };
 
   using RGWChainedCacheImpl_bucket_info_cache_entry = RGWChainedCacheImpl<bucket_info_cache_entry>;
-  unique_ptr<RGWChainedCacheImpl_bucket_info_cache_entry> binfo_cache;
+  std::unique_ptr<RGWChainedCacheImpl_bucket_info_cache_entry> binfo_cache;
 
   RGWSI_Bucket_BE_Handler ep_be_handler;
   std::unique_ptr<RGWSI_MetaBackend::Module> ep_be_module;
@@ -54,10 +54,10 @@ class RGWSI_Bucket_SObj : public RGWSI_Bucket
   int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
 
   int do_read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                   const string& key,
+                                   const std::string& key,
                                    RGWBucketInfo *info,
                                    real_time *pmtime,
-                                   map<string, bufferlist> *pattrs,
+                                   std::map<std::string, bufferlist> *pattrs,
                                    rgw_cache_entry_info *cache_info,
                                    boost::optional<obj_version> refresh_version,
                                    optional_yield y,
@@ -103,37 +103,37 @@ public:
 
 
   int read_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                  const string& key,
+                                  const std::string& key,
                                   RGWBucketEntryPoint *entry_point,
                                   RGWObjVersionTracker *objv_tracker,
                                   real_time *pmtime,
-                                  map<string, bufferlist> *pattrs,
+                                  std::map<std::string, bufferlist> *pattrs,
                                   optional_yield y,
                                   const DoutPrefixProvider *dpp,
                                   rgw_cache_entry_info *cache_info = nullptr,
                                   boost::optional<obj_version> refresh_version = boost::none) override;
 
   int store_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                   const string& key,
+                                   const std::string& key,
                                    RGWBucketEntryPoint& info,
                                    bool exclusive,
                                    real_time mtime,
-                                   map<string, bufferlist> *pattrs,
+                                   std::map<std::string, bufferlist> *pattrs,
                                    RGWObjVersionTracker *objv_tracker,
                                    optional_yield y,
                                    const DoutPrefixProvider *dpp) override;
 
   int remove_bucket_entrypoint_info(RGWSI_Bucket_EP_Ctx& ctx,
-                                    const string& key,
+                                    const std::string& key,
                                     RGWObjVersionTracker *objv_tracker,
                                     optional_yield y,
                                     const DoutPrefixProvider *dpp) override;
 
   int read_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                const string& key,
+                                const std::string& key,
                                 RGWBucketInfo *info,
                                 real_time *pmtime,
-                                map<string, bufferlist> *pattrs,
+                                std::map<std::string, bufferlist> *pattrs,
                                 optional_yield y,
                                 const DoutPrefixProvider *dpp,
                                 rgw_cache_entry_info *cache_info = nullptr,
@@ -143,24 +143,24 @@ public:
                        const rgw_bucket& bucket,
                        RGWBucketInfo *info,
                        real_time *pmtime,
-                       map<string, bufferlist> *pattrs,
+                       std::map<std::string, bufferlist> *pattrs,
                        boost::optional<obj_version> refresh_version,
                        optional_yield y,
                        const DoutPrefixProvider *dpp) override;
 
   int store_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                 const string& key,
+                                 const std::string& key,
                                  RGWBucketInfo& info,
                                  std::optional<RGWBucketInfo *> orig_info, /* nullopt: orig_info was not fetched,
                                                                               nullptr: orig_info was not found (new bucket instance */
                                  bool exclusive,
                                  real_time mtime,
-                                 map<string, bufferlist> *pattrs,
+                                 std::map<std::string, bufferlist> *pattrs,
                                  optional_yield y,
                                  const DoutPrefixProvider *dpp) override;
 
   int remove_bucket_instance_info(RGWSI_Bucket_BI_Ctx& ctx,
-                                  const string& key,
+                                  const std::string& key,
                                   const RGWBucketInfo& bucket_info,
                                   RGWObjVersionTracker *objv_tracker,
                                   optional_yield y,
@@ -173,7 +173,7 @@ public:
                         const DoutPrefixProvider *dpp) override;
 
   int read_buckets_stats(RGWSI_Bucket_X_Ctx& ctx,
-                         map<string, RGWBucketEnt>& m,
+                         std::map<std::string, RGWBucketEnt>& m,
                          optional_yield y,
                          const DoutPrefixProvider *dpp) override;
 };
index 52cd64617c9b8f841b5f01b9112c2dc7d06102b2..87a2372488cc6ef75df9bc441ad0bc57c516615d 100644 (file)
@@ -9,6 +9,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string bucket_sync_sources_oid_prefix = "bucket.sync-source-hints";
 static string bucket_sync_targets_oid_prefix = "bucket.sync-target-hints";
 
index 60786665d1d5ae5746cd70125e816bc473e74dc4..951affb2d4e17dfcbb8d2ff2259c1902d6a2e26b 100644 (file)
@@ -39,18 +39,18 @@ class RGWSI_Bucket_Sync_SObj : public RGWSI_Bucket_Sync
     std::shared_ptr<RGWBucketSyncPolicyHandler> handler;
   };
 
-  unique_ptr<RGWChainedCacheImpl<bucket_sync_policy_cache_entry> > sync_policy_cache;
+  std::unique_ptr<RGWChainedCacheImpl<bucket_sync_policy_cache_entry> > sync_policy_cache;
 
   std::unique_ptr<RGWSI_Bucket_Sync_SObj_HintIndexManager> hint_index_mgr;
 
   int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
 
   struct optional_zone_bucket {
-    optional<rgw_zone_id> zone;
-    optional<rgw_bucket> bucket;
+    std::optional<rgw_zone_id> zone;
+    std::optional<rgw_bucket> bucket;
 
-    optional_zone_bucket(const optional<rgw_zone_id>& _zone,
-                         const optional<rgw_bucket>& _bucket) : zone(_zone), bucket(_bucket) {}
+    optional_zone_bucket(const std::optional<rgw_zone_id>& _zone,
+                         const std::optional<rgw_bucket>& _bucket) : zone(_zone), bucket(_bucket) {}
 
     bool operator<(const optional_zone_bucket& ozb) const {
       if (zone < ozb.zone) {
index d2aaa6d889d94fef6ba6c0fa7d571425631c3efe..73b9328ebc22bc73ae5c6f55387dc46ceeab1f44 100644 (file)
@@ -15,6 +15,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string log_lock_name = "rgw_log_lock";
 
 int RGWSI_Cls::do_start(optional_yield y, const DoutPrefixProvider *dpp)
index 61487b2f95487d2632cf68c2573f2ef332866410..ca17d0f8f2e6cdc572d134ed89a2e658552ca4d9 100644 (file)
@@ -58,96 +58,96 @@ public:
   public:
     MFA(CephContext *cct): ClsSubService(cct) {}
 
-    string get_mfa_oid(const rgw_user& user) {
-      return string("user:") + user.to_str();
+    std::string get_mfa_oid(const rgw_user& user) {
+      return std::string("user:") + user.to_str();
     }
 
-    int check_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& otp_id, const string& pin, optional_yield y);
+    int check_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const std::string& otp_id, const std::string& pin, optional_yield y);
     int create_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const rados::cls::otp::otp_info_t& config,
                   RGWObjVersionTracker *objv_tracker, const ceph::real_time& mtime, optional_yield y);
     int remove_mfa(const DoutPrefixProvider *dpp, 
-                   const rgw_user& user, const string& id,
+                   const rgw_user& user, const std::string& id,
                   RGWObjVersionTracker *objv_tracker,
                   const ceph::real_time& mtime,
                   optional_yield y);
-    int get_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const string& id, rados::cls::otp::otp_info_t *result, optional_yield y);
-    int list_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, list<rados::cls::otp::otp_info_t> *result, optional_yield y);
+    int get_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, const std::string& id, rados::cls::otp::otp_info_t *result, optional_yield y);
+    int list_mfa(const DoutPrefixProvider *dpp, const rgw_user& user, std::list<rados::cls::otp::otp_info_t> *result, optional_yield y);
     int otp_get_current_time(const DoutPrefixProvider *dpp, const rgw_user& user, ceph::real_time *result, optional_yield y);
-    int set_mfa(const DoutPrefixProvider *dpp, const string& oid, const list<rados::cls::otp::otp_info_t>& entries,
+    int set_mfa(const DoutPrefixProvider *dpp, const std::string& oid, const std::list<rados::cls::otp::otp_info_t>& entries,
                bool reset_obj, RGWObjVersionTracker *objv_tracker,
                const real_time& mtime, optional_yield y);
-    int list_mfa(const DoutPrefixProvider *dpp, const string& oid, list<rados::cls::otp::otp_info_t> *result,
+    int list_mfa(const DoutPrefixProvider *dpp, const std::string& oid, std::list<rados::cls::otp::otp_info_t> *result,
                 RGWObjVersionTracker *objv_tracker, ceph::real_time *pmtime, optional_yield y);
   } mfa;
 
   class TimeLog : public ClsSubService {
-    int init_obj(const DoutPrefixProvider *dpp, const string& oid, RGWSI_RADOS::Obj& obj);
+    int init_obj(const DoutPrefixProvider *dpp, const std::string& oid, RGWSI_RADOS::Obj& obj);
   public:
     TimeLog(CephContext *cct): ClsSubService(cct) {}
 
     void prepare_entry(cls_log_entry& entry,
                        const real_time& ut,
-                       const string& section,
-                       const string& key,
+                       const std::string& section,
+                       const std::string& key,
                        bufferlist& bl);
     int add(const DoutPrefixProvider *dpp, 
-            const string& oid,
+            const std::string& oid,
             const real_time& ut,
-            const string& section,
-            const string& key,
+            const std::string& section,
+            const std::string& key,
             bufferlist& bl,
             optional_yield y);
     int add(const DoutPrefixProvider *dpp, 
-            const string& oid,
+            const std::string& oid,
             std::list<cls_log_entry>& entries,
             librados::AioCompletion *completion,
             bool monotonic_inc,
             optional_yield y);
     int list(const DoutPrefixProvider *dpp, 
-             const string& oid,
+             const std::string& oid,
              const real_time& start_time,
              const real_time& end_time,
-             int max_entries, list<cls_log_entry>& entries,
-             const string& marker,
-             string *out_marker,
+             int max_entries, std::list<cls_log_entry>& entries,
+             const std::string& marker,
+             std::string *out_marker,
              bool *truncated,
              optional_yield y);
     int info(const DoutPrefixProvider *dpp, 
-             const string& oid,
+             const std::string& oid,
              cls_log_header *header,
              optional_yield y);
     int info_async(const DoutPrefixProvider *dpp,
                    RGWSI_RADOS::Obj& obj,
-                   const string& oid,
+                   const std::string& oid,
                    cls_log_header *header,
                    librados::AioCompletion *completion);
     int trim(const DoutPrefixProvider *dpp, 
-             const string& oid,
+             const std::string& oid,
              const real_time& start_time,
              const real_time& end_time,
-             const string& from_marker,
-             const string& to_marker,
+             const std::string& from_marker,
+             const std::string& to_marker,
              librados::AioCompletion *completion,
              optional_yield y);
   } timelog;
 
   class Lock : public ClsSubService {
-    int init_obj(const string& oid, RGWSI_RADOS::Obj& obj);
+    int init_obj(const std::string& oid, RGWSI_RADOS::Obj& obj);
     public:
     Lock(CephContext *cct): ClsSubService(cct) {}
     int lock_exclusive(const DoutPrefixProvider *dpp,
                        const rgw_pool& pool,
-                       const string& oid,
+                       const std::string& oid,
                        timespan& duration,
-                       string& zone_id,
-                       string& owner_id,
-                       std::optional<string> lock_name = std::nullopt);
+                       std::string& zone_id,
+                       std::string& owner_id,
+                       std::optional<std::string> lock_name = std::nullopt);
     int unlock(const DoutPrefixProvider *dpp,
                const rgw_pool& pool,
-               const string& oid,
-               string& zone_id,
-               string& owner_id,
-               std::optional<string> lock_name = std::nullopt);
+               const std::string& oid,
+               std::string& zone_id,
+               std::string& owner_id,
+               std::optional<std::string> lock_name = std::nullopt);
   } lock;
 
   RGWSI_Cls(CephContext *cct): RGWServiceInstance(cct), mfa(cct), timelog(cct), lock(cct) {}
index e008aea5ff43ce449f5c01873ca7718bdc6cfb52..1740336d19198ba2e87e14ff34c1f7812312bba0 100644 (file)
@@ -26,6 +26,6 @@ public:
   RGWSI_ConfigKey(CephContext *cct) : RGWServiceInstance(cct) {}
   virtual ~RGWSI_ConfigKey() {}
 
-  virtual int get(const string& key, bool secure, bufferlist *result) = 0;
+  virtual int get(const std::string& key, bool secure, bufferlist *result) = 0;
 };
 
index 7cc84ea80cb116dd8309277516f79fd603973328..5edb02ea7f34c9052b5036f5849dcfeabc062842 100644 (file)
@@ -2,6 +2,8 @@
 #include "svc_rados.h"
 #include "svc_config_key_rados.h"
 
+using namespace std;
+
 RGWSI_ConfigKey_RADOS::~RGWSI_ConfigKey_RADOS(){}
 
 int RGWSI_ConfigKey_RADOS::do_start(optional_yield, const DoutPrefixProvider *dpp)
index 086da63889cf77232ef5a11173634444598e680b..e867a01f57aa05be72053e0516d5ad262df4fbf5 100644 (file)
@@ -48,7 +48,7 @@ public:
 
   virtual ~RGWSI_ConfigKey_RADOS() override;
 
-  int get(const string& key, bool secure, bufferlist *result) override;
+  int get(const std::string& key, bool secure, bufferlist *result) override;
 };
 
 
index 83e1b1514e42f759e7112b87dd5802ae2bab9c1e..b3d5d50220719fe4d69a6f29c360759835f1d3d4 100644 (file)
@@ -5,6 +5,8 @@
 
 #include "svc_finisher.h"
 
+using namespace std;
+
 int RGWSI_Finisher::do_start(optional_yield, const DoutPrefixProvider *dpp)
 {
   finisher = new Finisher(cct);
index f93c44d680e36b98acf629f19482816f626575da..a553072778c8c5518acf2c1f7f7ea1170da72e38 100644 (file)
@@ -18,6 +18,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 using Svc = RGWSI_MDLog::Svc;
 using Cursor = RGWPeriodHistory::Cursor;
 
index 57103efb464f40b02b04255c95d19f5b1cc4c42e..70c8628a56d409ccf695af32efc88ba7312e984c 100644 (file)
@@ -102,9 +102,9 @@ public:
                     RGWObjVersionTracker *objv_tracker,
                    optional_yield y, bool exclusive = false);
 
-  int add_entry(const DoutPrefixProvider *dpp, const string& hash_key, const string& section, const string& key, bufferlist& bl);
+  int add_entry(const DoutPrefixProvider *dpp, const std::string& hash_key, const std::string& section, const std::string& key, bufferlist& bl);
 
-  int get_shard_id(const string& hash_key, int *shard_id);
+  int get_shard_id(const std::string& hash_key, int *shard_id);
 
   RGWPeriodHistory *get_period_history() {
     return period_history.get();
index a4ca764201616e0d74fd01f017ed97a679268ef5..6efc3764f70bd9688e1e3e4be494b27b0c42a40d 100644 (file)
@@ -8,6 +8,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 RGWSI_Meta::RGWSI_Meta(CephContext *cct) : RGWServiceInstance(cct) {
 }
index ef3d6ebbd96ee7b2713f283b9dcbc794460e1166..8cfc8de0aaaab2a0828e5b3f2bc3858d8577e245 100644 (file)
@@ -30,9 +30,9 @@ class RGWSI_Meta : public RGWServiceInstance
   RGWSI_SysObj *sysobj_svc{nullptr};
   RGWSI_MDLog *mdlog_svc{nullptr};
 
-  map<RGWSI_MetaBackend::Type, RGWSI_MetaBackend *> be_svc;
+  std::map<RGWSI_MetaBackend::Type, RGWSI_MetaBackend *> be_svc;
 
-  vector<unique_ptr<RGWSI_MetaBackend_Handler> > be_handlers;
+  std::vector<std::unique_ptr<RGWSI_MetaBackend_Handler> > be_handlers;
 
 public:
   RGWSI_Meta(CephContext *cct);
@@ -40,7 +40,7 @@ public:
 
   void init(RGWSI_SysObj *_sysobj_svc,
             RGWSI_MDLog *_mdlog_svc,
-            vector<RGWSI_MetaBackend *>& _be_svc);
+            std::vector<RGWSI_MetaBackend *>& _be_svc);
 
   int create_be_handler(RGWSI_MetaBackend::Type be_type,
                         RGWSI_MetaBackend_Handler **phandler);
index 0d4daffe2a41a4fcc49840ef8819c34104380296..5037ae536277d117f0b123d1f976f9a7c5841c1e 100644 (file)
@@ -8,6 +8,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 RGWSI_MetaBackend::Context::~Context() {} // needed, even though destructor is pure virtual
 RGWSI_MetaBackend::Module::~Module() {} // ditto
index da2bb716df7ac4abf29a3382c0b762111c03a39a..79f0a4aa1ae8ed5e1ee4556c1a766864117b1178 100644 (file)
@@ -159,16 +159,16 @@ public:
                            RGWObjVersionTracker *objv_tracker,
                            optional_yield y) = 0;
 
-  virtual int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& marker) = 0;
+  virtual int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const std::string& marker) = 0;
   virtual int list_next(const DoutPrefixProvider *dpp,
                         RGWSI_MetaBackend::Context *ctx,
-                        int max, list<string> *keys,
+                        int max, std::list<std::string> *keys,
                         bool *truncated)  = 0;
   virtual int list_get_marker(RGWSI_MetaBackend::Context *ctx,
-                              string *marker) = 0;
+                              std::string *marker) = 0;
 
   int call(std::function<int(RGWSI_MetaBackend::Context *)> f) {
-    return call(nullopt, f);
+    return call(std::nullopt, f);
   }
 
   virtual int call(std::optional<RGWSI_MetaBackend_CtxParams> opt,
@@ -257,14 +257,14 @@ public:
       return be->mutate(be_ctx, key, params, objv_tracker, y, f, dpp);
     }
 
-    int list_init(const DoutPrefixProvider *dpp, const string& marker) {
+    int list_init(const DoutPrefixProvider *dpp, const std::string& marker) {
       return be->list_init(dpp, be_ctx, marker);
     }
-    int list_next(const DoutPrefixProvider *dpp, int max, list<string> *keys,
+    int list_next(const DoutPrefixProvider *dpp, int max, std::list<std::string> *keys,
                   bool *truncated) {
       return be->list_next(dpp, be_ctx, max, keys, truncated);
     }
-    int list_get_marker(string *marker) {
+    int list_get_marker(std::string *marker) {
       return be->list_get_marker(be_ctx, marker);
     }
 
@@ -283,7 +283,7 @@ public:
   virtual ~RGWSI_MetaBackend_Handler() {}
 
   int call(std::function<int(Op *)> f) {
-    return call(nullopt, f);
+    return call(std::nullopt, f);
   }
 
   virtual int call(std::optional<RGWSI_MetaBackend_CtxParams> bectx_params,
index 1800f8a3cac52bb27f21c15f35ba10874f862f5d..e8c8b7864d143e97c1d512b09ac037819c9d669a 100644 (file)
@@ -9,6 +9,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 RGWSI_MetaBackend_OTP::RGWSI_MetaBackend_OTP(CephContext *cct) : RGWSI_MetaBackend_SObj(cct) {
 }
index 9da97b024bbb784d54028c7968bb10c08ae50c03..52ea66b337359b8a45cd17f7566473940623a0bc 100644 (file)
@@ -29,7 +29,7 @@
 using RGWSI_MBOTP_Handler_Module  = RGWSI_MBSObj_Handler_Module;
 using RGWSI_MetaBackend_Handler_OTP  = RGWSI_MetaBackend_Handler_SObj;
 
-using otp_devices_list_t = list<rados::cls::otp::otp_info_t>;
+using otp_devices_list_t = std::list<rados::cls::otp::otp_info_t>;
 
 struct RGWSI_MBOTP_GetParams : public RGWSI_MetaBackend::GetParams {
   otp_devices_list_t *pdevices{nullptr};
@@ -59,7 +59,7 @@ public:
     return MDBE_OTP;
   }
 
-  static string get_meta_key(const rgw_user& user);
+  static std::string get_meta_key(const rgw_user& user);
 
   void init(RGWSI_SysObj *_sysobj_svc,
             RGWSI_MDLog *_mdlog_svc,
@@ -74,14 +74,14 @@ public:
   int call_with_get_params(ceph::real_time *pmtime, std::function<int(RGWSI_MetaBackend::GetParams&)> cb) override;
 
   int get_entry(RGWSI_MetaBackend::Context *ctx,
-                const string& key,
+                const std::string& key,
                 RGWSI_MetaBackend::GetParams& _params,
                 RGWObjVersionTracker *objv_tracker,
                 optional_yield y,
                 const DoutPrefixProvider *dpp);
   int put_entry(const DoutPrefixProvider *dpp, 
                 RGWSI_MetaBackend::Context *ctx,
-                const string& key,
+                const std::string& key,
                 RGWSI_MetaBackend::PutParams& _params,
                 RGWObjVersionTracker *objv_tracker,
                 optional_yield y);
index 88f74472cf6f0dc8a130c81987b7e307ef3812ae..6c06182af477f7431385121faa081a1e7bc89907 100644 (file)
@@ -11,6 +11,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 
 RGWSI_MetaBackend_SObj::RGWSI_MetaBackend_SObj(CephContext *cct) : RGWSI_MetaBackend(cct) {
 }
index f587fe882bb436f7ee5f81b5223703d37a8ed35f..8183617d437b0bfc9b9de502fdafb5648485e11b 100644 (file)
@@ -26,9 +26,9 @@
 
 class RGWSI_MBSObj_Handler_Module : public RGWSI_MetaBackend::Module {
 protected:
-  string section;
+  std::string section;
 public:
-  RGWSI_MBSObj_Handler_Module(const string& _section) : section(_section) {}
+  RGWSI_MBSObj_Handler_Module(const std::string& _section) : section(_section) {}
   virtual void get_pool_and_oid(const std::string& key, rgw_pool *pool, std::string *oid) = 0;
   virtual const std::string& get_oid_prefix() = 0;
   virtual std::string key_to_oid(const std::string& key) = 0;
@@ -47,13 +47,13 @@ public:
 
 struct RGWSI_MBSObj_GetParams : public RGWSI_MetaBackend::GetParams {
   bufferlist *pbl{nullptr};
-  map<string, bufferlist> *pattrs{nullptr};
+  std::map<std::string, bufferlist> *pattrs{nullptr};
   rgw_cache_entry_info *cache_info{nullptr};
   boost::optional<obj_version> refresh_version;
 
   RGWSI_MBSObj_GetParams() {}
   RGWSI_MBSObj_GetParams(bufferlist *_pbl,
-                         std::map<string, bufferlist> *_pattrs,
+                         std::map<std::string, bufferlist> *_pattrs,
                          ceph::real_time *_pmtime) : RGWSI_MetaBackend::GetParams(_pmtime),
                                                      pbl(_pbl),
                                                      pattrs(_pattrs) {}
@@ -70,15 +70,15 @@ struct RGWSI_MBSObj_GetParams : public RGWSI_MetaBackend::GetParams {
 
 struct RGWSI_MBSObj_PutParams : public RGWSI_MetaBackend::PutParams {
   bufferlist bl;
-  map<string, bufferlist> *pattrs{nullptr};
+  std::map<std::string, bufferlist> *pattrs{nullptr};
   bool exclusive{false};
 
   RGWSI_MBSObj_PutParams() {}
-  RGWSI_MBSObj_PutParams(std::map<string, bufferlist> *_pattrs,
+  RGWSI_MBSObj_PutParams(std::map<std::string, bufferlist> *_pattrs,
                          const ceph::real_time& _mtime) : RGWSI_MetaBackend::PutParams(_mtime),
                                                           pattrs(_pattrs) {}
   RGWSI_MBSObj_PutParams(bufferlist& _bl,
-                         std::map<string, bufferlist> *_pattrs,
+                         std::map<std::string, bufferlist> *_pattrs,
                          const ceph::real_time& _mtime,
                          bool _exclusive) : RGWSI_MetaBackend::PutParams(_mtime),
                                             bl(_bl),
@@ -134,44 +134,44 @@ public:
 
   int pre_modify(const DoutPrefixProvider *dpp, 
                  RGWSI_MetaBackend::Context *ctx,
-                 const string& key,
+                 const std::string& key,
                  RGWMetadataLogData& log_data,
                  RGWObjVersionTracker *objv_tracker,
                  RGWMDLogStatus op_type,
                  optional_yield y);
   int post_modify(const DoutPrefixProvider *dpp, 
                   RGWSI_MetaBackend::Context *ctx,
-                  const string& key,
+                  const std::string& key,
                   RGWMetadataLogData& log_data,
                   RGWObjVersionTracker *objv_tracker, int ret,
                   optional_yield y);
 
   int get_entry(RGWSI_MetaBackend::Context *ctx,
-                const string& key,
+                const std::string& key,
                 RGWSI_MetaBackend::GetParams& params,
                 RGWObjVersionTracker *objv_tracker,
                 optional_yield y,
                 const DoutPrefixProvider *dpp) override;
   int put_entry(const DoutPrefixProvider *dpp, 
                 RGWSI_MetaBackend::Context *ctx,
-                const string& key,
+                const std::string& key,
                 RGWSI_MetaBackend::PutParams& params,
                 RGWObjVersionTracker *objv_tracker,
                 optional_yield y) override;
   int remove_entry(const DoutPrefixProvider *dpp, 
                    RGWSI_MetaBackend::Context *ctx,
-                   const string& key,
+                   const std::string& key,
                    RGWSI_MetaBackend::RemoveParams& params,
                    RGWObjVersionTracker *objv_tracker,
                    optional_yield y) override;
 
-  int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *_ctx, const string& marker) override;
+  int list_init(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *_ctx, const std::string& marker) override;
   int list_next(const DoutPrefixProvider *dpp,
                 RGWSI_MetaBackend::Context *_ctx,
-                int max, list<string> *keys,
+                int max, std::list<std::string> *keys,
                 bool *truncated) override;
   int list_get_marker(RGWSI_MetaBackend::Context *ctx,
-                      string *marker) override;
+                      std::string *marker) override;
 
   int get_shard_id(RGWSI_MetaBackend::Context *ctx,
                   const std::string& key,
index dafd89ad06e726beae993f1415b16ff4be5680c9..093e7d76534b3f71c613651c5418acddd949a4b2 100644 (file)
@@ -15,6 +15,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 static string notify_oid_prefix = "notify";
 
 RGWSI_Notify::~RGWSI_Notify()
index b630bf21f25f4b31077daf494930a0c7e6c5fc94..8531b2e23be938c8fbb6a7b32341370c10e9dbf2 100644 (file)
@@ -37,15 +37,15 @@ private:
   int num_watchers{0};
   RGWWatcher **watchers{nullptr};
   std::set<int> watchers_set;
-  vector<RGWSI_RADOS::Obj> notify_objs;
+  std::vector<RGWSI_RADOS::Obj> notify_objs;
 
   bool enabled{false};
 
   double inject_notify_timeout_probability{0};
   static constexpr unsigned max_notify_retries = 10;
 
-  string get_control_oid(int i);
-  RGWSI_RADOS::Obj pick_control_obj(const string& key);
+  std::string get_control_oid(int i);
+  RGWSI_RADOS::Obj pick_control_obj(const std::string& key);
 
   CB *cb{nullptr};
 
@@ -99,7 +99,7 @@ public:
       virtual void set_enabled(bool status) = 0;
   };
 
-  int distribute(const DoutPrefixProvider *dpp, const string& key, const RGWCacheNotifyInfo& bl,
+  int distribute(const DoutPrefixProvider *dpp, const std::string& key, const RGWCacheNotifyInfo& bl,
                 optional_yield y);
 
   void register_watch_cb(CB *cb);
index fc386ae72359f214ab0daeabecad3e3f3c015282..bd08fb94c269e88741d51d067e5b24ebc70f9352 100644 (file)
@@ -10,6 +10,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGW_MB_Handler_Module_OTP : public RGWSI_MBSObj_Handler_Module {
   RGWSI_Zone *zone_svc;
   string prefix;
index f4b2e4ed2cc890fdc48807c4aa27896c5406d5e5..f95df40731944d8480b59432c3c44eba31f1d45b 100644 (file)
@@ -53,7 +53,7 @@ public:
             RGWSI_MetaBackend *_meta_be_svc);
 
   int read_all(RGWSI_OTP_BE_Ctx& ctx,
-               const string& key,
+               const std::string& key,
                otp_devices_list_t *devices,
                real_time *pmtime,
                RGWObjVersionTracker *objv_tracker,
@@ -68,7 +68,7 @@ public:
                const DoutPrefixProvider *dpp);
   int store_all(const DoutPrefixProvider *dpp, 
                 RGWSI_OTP_BE_Ctx& ctx,
-                const string& key,
+                const std::string& key,
                 const otp_devices_list_t& devices,
                 real_time mtime,
                 RGWObjVersionTracker *objv_tracker,
@@ -82,7 +82,7 @@ public:
                 optional_yield y);
   int remove_all(const DoutPrefixProvider *dpp, 
                  RGWSI_OTP_BE_Ctx& ctx,
-                 const string& key,
+                 const std::string& key,
                  RGWObjVersionTracker *objv_tracker,
                  optional_yield y);
   int remove_all(const DoutPrefixProvider *dpp, 
index 8bfe5324f5ee713f69c9053cba692a0ec495c148..217882f1919e20c61a63a4ce8a5007e51ca73946 100644 (file)
@@ -13,6 +13,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWSI_RADOS::RGWSI_RADOS(CephContext *cct) : RGWServiceInstance(cct)
 {
 }
index a334d26509d9666466c3362a70ebb9a7099b6cbb..7e6e8fedc1dcd32a62977050a18caff59e5342c7 100644 (file)
@@ -13,14 +13,14 @@ class RGWAsyncRadosProcessor;
 class RGWAccessListFilter {
 public:
   virtual ~RGWAccessListFilter() {}
-  virtual bool filter(const string& name, string& key) = 0;
+  virtual bool filter(const std::string& name, std::string& key) = 0;
 };
 
 struct RGWAccessListFilterPrefix : public RGWAccessListFilter {
-  string prefix;
+  std::string prefix;
 
-  explicit RGWAccessListFilterPrefix(const string& _prefix) : prefix(_prefix) {}
-  bool filter(const string& name, string& key) override {
+  explicit RGWAccessListFilterPrefix(const std::string& _prefix) : prefix(_prefix) {}
+  bool filter(const std::string& name, std::string& key) override {
     return (prefix.compare(key.substr(0, prefix.size())) == 0);
   }
 };
@@ -55,7 +55,7 @@ private:
   int pool_iterate(const DoutPrefixProvider *dpp,
                    librados::IoCtx& ioctx,
                    librados::NObjectIterator& iter,
-                   uint32_t num, vector<rgw_bucket_dir_entry>& objs,
+                   uint32_t num, std::vector<rgw_bucket_dir_entry>& objs,
                    RGWAccessListFilter *filter,
                    bool *is_truncated);
 
@@ -74,7 +74,7 @@ public:
     return async_processor.get();
   }
 
-  int clog_warn(const string& msg);
+  int clog_warn(const std::string& msg);
 
   class Handle;
 
@@ -124,12 +124,12 @@ public:
       List() {}
       List(Pool *_pool) : pool(_pool) {}
 
-      int init(const DoutPrefixProvider *dpp, const string& marker, RGWAccessListFilter *filter = nullptr);
+      int init(const DoutPrefixProvider *dpp, const std::string& marker, RGWAccessListFilter *filter = nullptr);
       int get_next(const DoutPrefixProvider *dpp, int max,
-                   std::vector<string> *oids,
+                   std::vector<std::string> *oids,
                    bool *is_truncated);
 
-      int get_marker(string *marker);
+      int get_marker(std::string *marker);
     };
 
     List op() {
@@ -159,7 +159,7 @@ public:
       init(_obj);
     }
 
-    Obj(Pool& pool, const string& oid);
+    Obj(Pool& pool, const std::string& oid);
 
   public:
     Obj() {}
@@ -222,7 +222,7 @@ public:
     return Obj(this, o);
   }
 
-  Obj obj(Pool& pool, const string& oid) {
+  Obj obj(Pool& pool, const std::string& oid) {
     return Obj(pool, oid);
   }
 
@@ -241,6 +241,6 @@ public:
 
 using rgw_rados_ref = RGWSI_RADOS::rados_ref;
 
-inline ostream& operator<<(ostream& out, const RGWSI_RADOS::Obj& obj) {
+inline std::ostream& operator<<(std::ostream& out, const RGWSI_RADOS::Obj& obj) {
   return out << obj.get_raw_obj();
 }
index f0a18c9ec6902ae20bd664faa5ee38c5f1a8b7a8..771a0169ac28999a7c13c5f48cee8e72b4b5e872 100644 (file)
@@ -10,6 +10,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 RGWSysObjectCtx RGWSI_SysObj::init_obj_ctx()
 {
   return RGWSysObjectCtx(this);
index db2c1fa40c9f4e2ae47f089484b66daf01eee9ea..cc618bf7b75cd220d4ab1f1bb7854391d2a7983b 100644 (file)
@@ -53,7 +53,7 @@ public:
       ceph::static_ptr<RGWSI_SysObj_Obj_GetObjState, sizeof(RGWSI_SysObj_Core_GetObjState)> state;
       
       RGWObjVersionTracker *objv_tracker{nullptr};
-      map<string, bufferlist> *attrs{nullptr};
+      std::map<std::string, bufferlist> *attrs{nullptr};
       bool raw_attrs{false};
       boost::optional<obj_version> refresh_version{boost::none};
       ceph::real_time *lastmod{nullptr};
@@ -75,7 +75,7 @@ public:
         return *this;
       }
 
-      ROp& set_attrs(map<string, bufferlist> *_attrs) {
+      ROp& set_attrs(std::map<std::string, bufferlist> *_attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -109,7 +109,7 @@ public:
       Obj& source;
 
       RGWObjVersionTracker *objv_tracker{nullptr};
-      map<string, bufferlist> attrs;
+      std::map<std::string, bufferlist> attrs;
       ceph::real_time mtime;
       ceph::real_time *pmtime{nullptr};
       bool exclusive{false};
@@ -119,12 +119,12 @@ public:
         return *this;
       }
 
-      WOp& set_attrs(map<string, bufferlist>& _attrs) {
+      WOp& set_attrs(std::map<std::string, bufferlist>& _attrs) {
         attrs = _attrs;
         return *this;
       }
 
-      WOp& set_attrs(map<string, bufferlist>&& _attrs) {
+      WOp& set_attrs(std::map<std::string, bufferlist>&& _attrs) {
         attrs = _attrs;
         return *this;
       }
@@ -167,12 +167,12 @@ public:
 
       OmapOp(Obj& _source) : source(_source) {}
 
-      int get_all(const DoutPrefixProvider *dpp, std::map<string, bufferlist> *m, optional_yield y);
-      int get_vals(const DoutPrefixProvider *dpp, const string& marker, uint64_t count,
-                   std::map<string, bufferlist> *m,
+      int get_all(const DoutPrefixProvider *dpp, std::map<std::string, bufferlist> *m, optional_yield y);
+      int get_vals(const DoutPrefixProvider *dpp, const std::string& marker, uint64_t count,
+                   std::map<std::string, bufferlist> *m,
                    bool *pmore, optional_yield y);
       int set(const DoutPrefixProvider *dpp, const std::string& key, bufferlist& bl, optional_yield y);
-      int set(const DoutPrefixProvider *dpp, const map<std::string, bufferlist>& m, optional_yield y);
+      int set(const DoutPrefixProvider *dpp, const std::map<std::string, bufferlist>& m, optional_yield y);
       int del(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y);
     };
 
@@ -231,16 +231,16 @@ public:
       Op(Pool& _source) : source(_source) {}
 
       int init(const DoutPrefixProvider *dpp, const std::string& marker, const std::string& prefix);
-      int get_next(const DoutPrefixProvider *dpp, int max, std::vector<string> *oids, bool *is_truncated);
-      int get_marker(string *marker);
+      int get_next(const DoutPrefixProvider *dpp, int max, std::vector<std::string> *oids, bool *is_truncated);
+      int get_marker(std::string *marker);
     };
 
-    int list_prefixed_objs(const DoutPrefixProvider *dpp, const std::string& prefix, std::function<void(const string&)> cb);
+    int list_prefixed_objs(const DoutPrefixProvider *dpp, const std::string& prefix, std::function<void(const std::string&)> cb);
 
     template <typename Container>
-    int list_prefixed_objs(const DoutPrefixProvider *dpp, const string& prefix,
+    int list_prefixed_objs(const DoutPrefixProvider *dpp, const std::string& prefix,
                            Container *result) {
-      return list_prefixed_objs(dpp, prefix, [&](const string& val) {
+      return list_prefixed_objs(dpp, prefix, [&](const std::string& val) {
         result->push_back(val);
       });
     }
index 5690f8d14c5beac331ece7b2eaf8fa8520b09229..3453f43e16ad1b0c0e0be5f9d59cad63ead29012 100644 (file)
@@ -13,6 +13,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 class RGWSI_SysObj_Cache_CB : public RGWSI_Notify::CB
 {
   RGWSI_SysObj_Cache *svc;
index 9b99d6dbda3ce7f931071ac3f64404eed764d77e..3999d514da0032029e93f2afe54917052a7143e0 100644 (file)
@@ -25,7 +25,7 @@ class RGWSI_SysObj_Cache : public RGWSI_SysObj_Core
 
   std::shared_ptr<RGWSI_SysObj_Cache_CB> cb;
 
-  void normalize_pool_and_obj(const rgw_pool& src_pool, const string& src_obj, rgw_pool& dst_pool, string& dst_obj);
+  void normalize_pool_and_obj(const rgw_pool& src_pool, const std::string& src_obj, rgw_pool& dst_pool, std::string& dst_obj);
 protected:
   void init(RGWSI_RADOS *_rados_svc,
             RGWSI_Zone *_zone_svc,
@@ -38,7 +38,7 @@ protected:
   void shutdown() override;
 
   int raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize, real_time *pmtime, uint64_t *epoch,
-               map<string, bufferlist> *attrs, bufferlist *first_chunk,
+               std::map<std::string, bufferlist> *attrs, bufferlist *first_chunk,
                RGWObjVersionTracker *objv_tracker,
                optional_yield y) override;
 
@@ -48,7 +48,7 @@ protected:
            RGWObjVersionTracker *objv_tracker,
            const rgw_raw_obj& obj,
            bufferlist *bl, off_t ofs, off_t end,
-           map<string, bufferlist> *attrs,
+           std::map<std::string, bufferlist> *attrs,
           bool raw_attrs,
            rgw_cache_entry_info *cache_info,
            boost::optional<obj_version>,
@@ -59,8 +59,8 @@ protected:
 
   int set_attrs(const DoutPrefixProvider *dpp, 
                 const rgw_raw_obj& obj, 
-                map<string, bufferlist>& attrs,
-                map<string, bufferlist> *rmattrs,
+                std::map<std::string, bufferlist>& attrs,
+                std::map<std::string, bufferlist> *rmattrs,
                 RGWObjVersionTracker *objv_tracker,
                 optional_yield y);
 
@@ -73,7 +73,7 @@ protected:
   int write(const DoutPrefixProvider *dpp, 
             const rgw_raw_obj& obj,
             real_time *pmtime,
-            map<std::string, bufferlist>& attrs,
+            std::map<std::string, bufferlist>& attrs,
             bool exclusive,
             const bufferlist& data,
             RGWObjVersionTracker *objv_tracker,
@@ -87,7 +87,7 @@ protected:
                  RGWObjVersionTracker *objv_tracker,
                  optional_yield y);
 
-  int distribute_cache(const DoutPrefixProvider *dpp, const string& normal_name, const rgw_raw_obj& obj,
+  int distribute_cache(const DoutPrefixProvider *dpp, const std::string& normal_name, const rgw_raw_obj& obj,
                        ObjectCacheInfo& obj_info, int op,
                        optional_yield y);
 
@@ -125,7 +125,7 @@ public:
 
     // `call_list` must iterate over all cache entries and call
     // `cache_list_dump_helper` with the supplied Formatter on any that
-    // include `filter` as a substring.
+    // include `filter` as a substd::string.
     //
     void call_list(const std::optional<std::string>& filter, Formatter* f);
 
@@ -175,7 +175,7 @@ public:
                                    "rgw_cache_expiry_interval"));
   }
 
-  boost::optional<T> find(const string& key) {
+  boost::optional<T> find(const std::string& key) {
     std::shared_lock rl{lock};
     auto iter = entries.find(key);
     if (iter == entries.end()) {
@@ -189,7 +189,7 @@ public:
     return iter->second.first;
   }
 
-  bool put(const DoutPrefixProvider *dpp, RGWSI_SysObj_Cache *svc, const string& key, T *entry,
+  bool put(const DoutPrefixProvider *dpp, RGWSI_SysObj_Cache *svc, const std::string& key, T *entry,
           std::initializer_list<rgw_cache_entry_info *> cache_info_entries) {
     if (!svc) {
       return false;
@@ -201,7 +201,7 @@ public:
     return svc->chain_cache_entry(dpp, cache_info_entries, &chain_entry);
   }
 
-  void chain_cb(const string& key, void *data) override {
+  void chain_cb(const std::string& key, void *data) override {
     T *entry = static_cast<T *>(data);
     std::unique_lock wl{lock};
     entries[key].first = *entry;
@@ -210,7 +210,7 @@ public:
     }
   }
 
-  void invalidate(const string& key) override {
+  void invalidate(const std::string& key) override {
     std::unique_lock wl{lock};
     entries.erase(key);
   }
index 94467c22ebe689f1a5008fbf1693ce2f49972785..e673fdb86f9aa43b124f35527de746c4e0ada09f 100644 (file)
@@ -9,6 +9,8 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
+
 int RGWSI_SysObj_Core_GetObjState::get_rados_obj(const DoutPrefixProvider *dpp,
                                                  RGWSI_RADOS *rados_svc,
                                                  RGWSI_Zone *zone_svc,
index b8ee00794fc5593410a0ee0aa2754d17aa62882a..7a6ffce0e028ab742c35826e8d425a5e9920a0e6 100644 (file)
@@ -35,7 +35,7 @@ protected:
 
   virtual int raw_stat(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t *psize,
                        real_time *pmtime, uint64_t *epoch,
-                       map<string, bufferlist> *attrs, bufferlist *first_chunk,
+                       std::map<std::string, bufferlist> *attrs, bufferlist *first_chunk,
                        RGWObjVersionTracker *objv_tracker,
                        optional_yield y);
 
@@ -45,7 +45,7 @@ protected:
                    RGWObjVersionTracker *objv_tracker,
                    const rgw_raw_obj& obj,
                    bufferlist *bl, off_t ofs, off_t end,
-                   map<string, bufferlist> *attrs,
+                   std::map<std::string, bufferlist> *attrs,
                   bool raw_attrs,
                    rgw_cache_entry_info *cache_info,
                    boost::optional<obj_version>,
@@ -60,7 +60,7 @@ protected:
   virtual int write(const DoutPrefixProvider *dpp, 
                     const rgw_raw_obj& obj,
                     real_time *pmtime,
-                    map<std::string, bufferlist>& attrs,
+                    std::map<std::string, bufferlist>& attrs,
                     bool exclusive,
                     const bufferlist& data,
                     RGWObjVersionTracker *objv_tracker,
@@ -79,18 +79,18 @@ protected:
                        optional_yield y);
 
   virtual int set_attrs(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
-                        map<string, bufferlist>& attrs,
-                        map<string, bufferlist> *rmattrs,
+                        std::map<std::string, bufferlist>& attrs,
+                        std::map<std::string, bufferlist> *rmattrs,
                         RGWObjVersionTracker *objv_tracker,
                         optional_yield y);
 
-  virtual int omap_get_all(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, std::map<string, bufferlist> *m,
+  virtual int omap_get_all(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, std::map<std::string, bufferlist> *m,
                            optional_yield y);
   virtual int omap_get_vals(const DoutPrefixProvider *dpp, 
                             const rgw_raw_obj& obj,
-                            const string& marker,
+                            const std::string& marker,
                             uint64_t count,
-                            std::map<string, bufferlist> *m,
+                            std::map<std::string, bufferlist> *m,
                             bool *pmore,
                             optional_yield y);
   virtual int omap_set(const DoutPrefixProvider *dpp, 
@@ -98,7 +98,7 @@ protected:
                        bufferlist& bl, bool must_exist,
                        optional_yield y);
   virtual int omap_set(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj,
-                       const map<std::string, bufferlist>& m, bool must_exist,
+                       const std::map<std::string, bufferlist>& m, bool must_exist,
                        optional_yield y);
   virtual int omap_del(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, const std::string& key,
                        optional_yield y);
@@ -110,8 +110,8 @@ protected:
 
   virtual int pool_list_prefixed_objs(const DoutPrefixProvider *dpp,
                                       const rgw_pool& pool,
-                                      const string& prefix,
-                                      std::function<void(const string&)> cb);
+                                      const std::string& prefix,
+                                      std::function<void(const std::string&)> cb);
 
   virtual int pool_list_objects_init(const DoutPrefixProvider *dpp,
                                      const rgw_pool& pool,
@@ -121,11 +121,11 @@ protected:
   virtual int pool_list_objects_next(const DoutPrefixProvider *dpp,
                                      RGWSI_SysObj::Pool::ListCtx& ctx,
                                      int max,
-                                     vector<string> *oids,
+                                     std::vector<std::string> *oids,
                                      bool *is_truncated);
 
   virtual int pool_list_objects_get_marker(RGWSI_SysObj::Pool::ListCtx& _ctx,
-                                           string *marker);
+                                           std::string *marker);
 
   /* wrappers */
   int get_system_obj_state_impl(RGWSysObjectCtxBase *rctx,
@@ -142,7 +142,7 @@ protected:
   int stat(RGWSysObjectCtxBase& obj_ctx,
            RGWSI_SysObj_Obj_GetObjState& state,
            const rgw_raw_obj& obj,
-           map<string, bufferlist> *attrs,
+           std::map<std::string, bufferlist> *attrs,
           bool raw_attrs,
            real_time *lastmod,
            uint64_t *obj_size,
index f45fe77f5b4a36b063baac1f778d350ab84d3041..159c55115813f8a88723d2ca550d36078a5bb417 100644 (file)
@@ -30,7 +30,7 @@ struct RGWSI_SysObj_Core_PoolListImplInfo : public RGWSI_SysObj_Pool_ListInfo {
   RGWSI_RADOS::Pool::List op;
   RGWAccessListFilterPrefix filter;
 
-  RGWSI_SysObj_Core_PoolListImplInfo(const string& prefix) : op(pool.op()), filter(prefix) {}
+  RGWSI_SysObj_Core_PoolListImplInfo(const std::string& prefix) : op(pool.op()), filter(prefix) {}
 };
 
 struct RGWSysObjState {
@@ -50,7 +50,7 @@ struct RGWSysObjState {
 
   RGWObjVersionTracker objv_tracker;
 
-  map<string, bufferlist> attrset;
+  std::map<std::string, bufferlist> attrset;
   RGWSysObjState() {}
   RGWSysObjState(const RGWSysObjState& rhs) : obj (rhs.obj) {
     has_attrs = rhs.has_attrs;
index f9b57d5593db8aee2446ac93746dc07e4d19cd7f..ca87e8aceb90818f07a597c7cbaea4508bce3e14 100644 (file)
@@ -3,6 +3,8 @@
 
 #include "svc_tier_rados.h"
 
+using namespace std;
+
 const std::string MP_META_SUFFIX = ".meta";
 
 MultipartMetaFilter::~MultipartMetaFilter() {}
index fd48e40e8a76d750bb7aa87a53d18cdd00a95ec1..1796b7b3565096054e26fd759fd22755e3953a7a 100644 (file)
 extern const std::string MP_META_SUFFIX;
 
 class RGWMPObj {
-  string oid;
-  string prefix;
-  string meta;
-  string upload_id;
+  std::string oid;
+  std::string prefix;
+  std::string meta;
+  std::string upload_id;
 public:
   RGWMPObj() {}
-  RGWMPObj(const string& _oid, const string& _upload_id) {
+  RGWMPObj(const std::string& _oid, const std::string& _upload_id) {
     init(_oid, _upload_id, _upload_id);
   }
-  RGWMPObj(const string& _oid, std::optional<string> _upload_id) {
+  RGWMPObj(const std::string& _oid, std::optional<std::string> _upload_id) {
     if (_upload_id) {
       init(_oid, *_upload_id, *_upload_id);
     } else {
       from_meta(_oid);
     }
   }
-  void init(const string& _oid, const string& _upload_id) {
+  void init(const std::string& _oid, const std::string& _upload_id) {
     init(_oid, _upload_id, _upload_id);
   }
-  void init(const string& _oid, const string& _upload_id, const string& part_unique_str) {
+  void init(const std::string& _oid, const std::string& _upload_id, const std::string& part_unique_str) {
     if (_oid.empty()) {
       clear();
       return;
@@ -55,27 +55,27 @@ public:
     meta = prefix + upload_id + MP_META_SUFFIX;
     prefix.append(part_unique_str);
   }
-  const string& get_meta() const { return meta; }
-  string get_part(int num) const {
+  const std::string& get_meta() const { return meta; }
+  std::string get_part(int num) const {
     char buf[16];
     snprintf(buf, 16, ".%d", num);
-    string s = prefix;
+    std::string s = prefix;
     s.append(buf);
     return s;
   }
-  string get_part(const string& part) const {
-    string s = prefix;
+  std::string get_part(const std::string& part) const {
+    std::string s = prefix;
     s.append(".");
     s.append(part);
     return s;
   }
-  const string& get_upload_id() const {
+  const std::string& get_upload_id() const {
     return upload_id;
   }
-  const string& get_key() const {
+  const std::string& get_key() const {
     return oid;
   }
-  bool from_meta(const string& meta) {
+  bool from_meta(const std::string& meta) {
     int end_pos = meta.rfind('.'); // search for ".meta"
     if (end_pos < 0)
       return false;
@@ -123,7 +123,7 @@ public:
    * @return true if the name provided is in the form of a multipart meta
    *         object, false otherwise
    */
-  bool filter(const string& name, string& key) override;
+  bool filter(const std::string& name, std::string& key) override;
 };
 
 class RGWSI_Tier_RADOS : public RGWServiceInstance
index 37e533d6dfc4fd74bc01beea577211a8b6b3623e..a998f857e8b9276bb327e82a17210c754e5adea9 100644 (file)
@@ -30,11 +30,11 @@ public:
   RGWSI_User(CephContext *cct);
   virtual ~RGWSI_User();
 
-  static string get_meta_key(const rgw_user& user) {
+  static std::string get_meta_key(const rgw_user& user) {
     return user.to_str();
   }
 
-  static rgw_user user_from_meta_key(const string& key) {
+  static rgw_user user_from_meta_key(const std::string& key) {
     return rgw_user(key);
   }
 
@@ -48,7 +48,7 @@ public:
                              RGWObjVersionTracker * const objv_tracker,
                              real_time * const pmtime,
                              rgw_cache_entry_info * const cache_info,
-                             map<string, bufferlist> * const pattrs,
+                             std::map<std::string, bufferlist> * const pattrs,
                              optional_yield y,
                              const DoutPrefixProvider *dpp) = 0;
 
@@ -58,7 +58,7 @@ public:
                               RGWObjVersionTracker *objv_tracker,
                               const real_time& mtime,
                               bool exclusive,
-                              map<string, bufferlist> *attrs,
+                              std::map<std::string, bufferlist> *attrs,
                               optional_yield y,
                               const DoutPrefixProvider *dpp) = 0;
 
@@ -69,13 +69,13 @@ public:
                                const DoutPrefixProvider *dpp) = 0;
 
   virtual int get_user_info_by_email(RGWSI_MetaBackend::Context *ctx,
-                             const string& email, RGWUserInfo *info,
+                             const std::string& email, RGWUserInfo *info,
                              RGWObjVersionTracker *objv_tracker,
                              real_time *pmtime,
                              optional_yield y,
                              const DoutPrefixProvider *dpp) = 0;
   virtual int get_user_info_by_swift(RGWSI_MetaBackend::Context *ctx,
-                             const string& swift_name,
+                             const std::string& swift_name,
                              RGWUserInfo *info,        /* out */
                              RGWObjVersionTracker * const objv_tracker,
                              real_time * const pmtime,
@@ -102,8 +102,8 @@ public:
   virtual int list_buckets(const DoutPrefixProvider *dpp, 
                            RGWSI_MetaBackend::Context *ctx,
                            const rgw_user& user,
-                           const string& marker,
-                           const string& end_marker,
+                           const std::string& marker,
+                           const std::string& end_marker,
                            uint64_t max,
                            RGWUserBuckets *buckets,
                            bool *is_truncated,
index eb30f3e663ee2cdc9c7db7d62e872f0cecd5c241..bb8e8aaf88608e9e462e5ccd2b48f6a45659ba9f 100644 (file)
@@ -24,6 +24,8 @@
 
 #define RGW_BUCKETS_OBJ_SUFFIX ".buckets"
 
+using namespace std;
+
 class RGWSI_User_Module : public RGWSI_MBSObj_Handler_Module {
   RGWSI_User_RADOS::Svc& svc;
 
index f0b025e9db04c224beec133b999a8e60a9f54eae..3ab69b0355d1d3805dcf94841e87e36f86b9b9d7 100644 (file)
@@ -53,12 +53,12 @@ class RGWSI_User_RADOS : public RGWSI_User
   };
 
   using RGWChainedCacheImpl_user_info_cache_entry = RGWChainedCacheImpl<user_info_cache_entry>;
-  unique_ptr<RGWChainedCacheImpl_user_info_cache_entry> uinfo_cache;
+  std::unique_ptr<RGWChainedCacheImpl_user_info_cache_entry> uinfo_cache;
 
   rgw_raw_obj get_buckets_obj(const rgw_user& user_id) const;
 
   int get_user_info_from_index(RGWSI_MetaBackend::Context *ctx,
-                               const string& key,
+                               const std::string& key,
                                const rgw_pool& pool,
                                RGWUserInfo *info,
                                RGWObjVersionTracker * const objv_tracker,
@@ -70,11 +70,11 @@ class RGWSI_User_RADOS : public RGWSI_User
                        optional_yield y, const DoutPrefixProvider *dpp);
 
   int remove_key_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const RGWAccessKey& access_key, optional_yield y);
-  int remove_email_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& email, optional_yield y);
-  int remove_swift_name_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const string& swift_name, optional_yield y);
+  int remove_email_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const std::string& email, optional_yield y);
+  int remove_swift_name_index(const DoutPrefixProvider *dpp, RGWSI_MetaBackend::Context *ctx, const std::string& swift_name, optional_yield y);
 
   /* admin management */
-  int cls_user_update_buckets(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, list<cls_user_bucket_entry>& entries, bool add, optional_yield y);
+  int cls_user_update_buckets(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, std::list<cls_user_bucket_entry>& entries, bool add, optional_yield y);
   int cls_user_add_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket_entry& entry, optional_yield y);
   int cls_user_remove_bucket(const DoutPrefixProvider *dpp, rgw_raw_obj& obj, const cls_user_bucket& bucket, optional_yield y);
 
@@ -83,17 +83,17 @@ class RGWSI_User_RADOS : public RGWSI_User
                                   const RGWBucketEnt& ent, optional_yield y);
   int cls_user_list_buckets(const DoutPrefixProvider *dpp, 
                             rgw_raw_obj& obj,
-                            const string& in_marker,
-                            const string& end_marker,
+                            const std::string& in_marker,
+                            const std::string& end_marker,
                             const int max_entries,
-                            list<cls_user_bucket_entry>& entries,
-                            string * const out_marker,
+                            std::list<cls_user_bucket_entry>& entries,
+                            std::string * const out_marker,
                             bool * const truncated,
                             optional_yield y);
 
   int cls_user_reset_stats(const DoutPrefixProvider *dpp, const rgw_user& user, optional_yield y);
   int cls_user_get_header(const DoutPrefixProvider *dpp, const rgw_user& user, cls_user_header *header, optional_yield y);
-  int cls_user_get_header_async(const DoutPrefixProvider *dpp, const string& user, RGWGetUserHeader_CB *cb);
+  int cls_user_get_header_async(const DoutPrefixProvider *dpp, const std::string& user, RGWGetUserHeader_CB *cb);
 
   int do_start(optional_yield, const DoutPrefixProvider *dpp) override;
 public:
@@ -127,7 +127,7 @@ public:
                      RGWObjVersionTracker * const objv_tracker,
                      real_time * const pmtime,
                      rgw_cache_entry_info * const cache_info,
-                     map<string, bufferlist> * const pattrs,
+                     std::map<std::string, bufferlist> * const pattrs,
                      optional_yield y,
                      const DoutPrefixProvider *dpp) override;
 
@@ -137,7 +137,7 @@ public:
                       RGWObjVersionTracker *objv_tracker,
                       const real_time& mtime,
                       bool exclusive,
-                      map<string, bufferlist> *attrs,
+                      std::map<std::string, bufferlist> *attrs,
                       optional_yield y,
                       const DoutPrefixProvider *dpp) override;
 
@@ -148,13 +148,13 @@ public:
                        const DoutPrefixProvider *dpp) override;
 
   int get_user_info_by_email(RGWSI_MetaBackend::Context *ctx,
-                             const string& email, RGWUserInfo *info,
+                             const std::string& email, RGWUserInfo *info,
                              RGWObjVersionTracker *objv_tracker,
                              real_time *pmtime,
                              optional_yield y,
                              const DoutPrefixProvider *dpp) override;
   int get_user_info_by_swift(RGWSI_MetaBackend::Context *ctx,
-                             const string& swift_name,
+                             const std::string& swift_name,
                              RGWUserInfo *info,        /* out */
                              RGWObjVersionTracker * const objv_tracker,
                              real_time * const pmtime,
@@ -184,8 +184,8 @@ public:
   int list_buckets(const DoutPrefixProvider *dpp, 
                    RGWSI_MetaBackend::Context *ctx,
                    const rgw_user& user,
-                   const string& marker,
-                   const string& end_marker,
+                   const std::string& marker,
+                   const std::string& end_marker,
                    uint64_t max,
                    RGWUserBuckets *buckets,
                    bool *is_truncated,
index fdaeb6cbeb43b8b4acdae31e9d75fa1dd6582e72..a3502b3b5abe2c88436d7b2d85000a94353af87d 100644 (file)
@@ -15,6 +15,7 @@
 
 #define dout_subsys ceph_subsys_rgw
 
+using namespace std;
 using namespace rgw_zone_defaults;
 
 RGWSI_Zone::RGWSI_Zone(CephContext *cct) : RGWServiceInstance(cct)
index a9e70932bb035b9fc92b3e3b3241d6d848dbe634..175fbc2c4a0e415b5656a7fc11629acfbab572b7 100644 (file)
@@ -47,13 +47,13 @@ class RGWSI_Zone : public RGWServiceInstance
   std::map<rgw_zone_id, std::shared_ptr<RGWBucketSyncPolicyHandler> > sync_policy_handlers;
 
   RGWRESTConn *rest_master_conn{nullptr};
-  map<rgw_zone_id, RGWRESTConn *> zone_conn_map;
+  std::map<rgw_zone_id, RGWRESTConn *> zone_conn_map;
   std::vector<const RGWZone*> data_sync_source_zones;
-  map<rgw_zone_id, RGWRESTConn *> zone_data_notify_to_map;
-  map<string, RGWRESTConn *> zonegroup_conn_map;
+  std::map<rgw_zone_id, RGWRESTConn *> zone_data_notify_to_map;
+  std::map<std::string, RGWRESTConn *> zonegroup_conn_map;
 
-  map<string, rgw_zone_id> zone_id_by_name;
-  map<rgw_zone_id, RGWZone> zone_by_id;
+  std::map<std::string, rgw_zone_id> zone_id_by_name;
+  std::map<rgw_zone_id, RGWZone> zone_by_id;
 
   std::unique_ptr<rgw_sync_policy_info> sync_policy;
 
@@ -89,23 +89,23 @@ public:
   const RGWPeriod& get_current_period() const;
   const RGWRealm& get_realm() const;
   const RGWZoneGroup& get_zonegroup() const;
-  int get_zonegroup(const string& id, RGWZoneGroup& zonegroup) const;
+  int get_zonegroup(const std::string& id, RGWZoneGroup& zonegroup) const;
   const RGWZone& get_zone() const;
 
-  std::shared_ptr<RGWBucketSyncPolicyHandler> get_sync_policy_handler(std::optional<rgw_zone_id> zone = nullopt) const;
+  std::shared_ptr<RGWBucketSyncPolicyHandler> get_sync_policy_handler(std::optional<rgw_zone_id> zone = std::nullopt) const;
 
-  const string& zone_name() const;
+  const std::string& zone_name() const;
   const rgw_zone_id& zone_id() const {
     return cur_zone_id;
   }
   uint32_t get_zone_short_id() const;
 
-  const string& get_current_period_id() const;
+  const std::string& get_current_period_id() const;
   bool has_zonegroup_api(const std::string& api) const;
 
   bool zone_is_writeable();
   bool zone_syncs_from(const RGWZone& target_zone, const RGWZone& source_zone) const;
-  bool get_redirect_zone_endpoint(string *endpoint);
+  bool get_redirect_zone_endpoint(std::string *endpoint);
   bool sync_module_supports_writes() const { return writeable_zone; }
   bool sync_module_exports_data() const { return exports_data; }
 
@@ -113,11 +113,11 @@ public:
     return rest_master_conn;
   }
 
-  map<string, RGWRESTConn *>& get_zonegroup_conn_map() {
+  std::map<std::string, RGWRESTConn *>& get_zonegroup_conn_map() {
     return zonegroup_conn_map;
   }
 
-  map<rgw_zone_id, RGWRESTConn *>& get_zone_conn_map() {
+  std::map<rgw_zone_id, RGWRESTConn *>& get_zone_conn_map() {
     return zone_conn_map;
   }
 
@@ -125,21 +125,21 @@ public:
     return data_sync_source_zones;
   }
 
-  map<rgw_zone_id, RGWRESTConn *>& get_zone_data_notify_to_map() {
+  std::map<rgw_zone_id, RGWRESTConn *>& get_zone_data_notify_to_map() {
     return zone_data_notify_to_map;
   }
 
   bool find_zone(const rgw_zone_id& id, RGWZone **zone);
 
   RGWRESTConn *get_zone_conn(const rgw_zone_id& zone_id);
-  RGWRESTConn *get_zone_conn_by_name(const string& name);
-  bool find_zone_id_by_name(const string& name, rgw_zone_id *id);
+  RGWRESTConn *get_zone_conn_by_name(const std::string& name);
+  bool find_zone_id_by_name(const std::string& name, rgw_zone_id *id);
 
-  int select_bucket_placement(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
+  int select_bucket_placement(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const std::string& zonegroup_id,
                               const rgw_placement_rule& rule,
                               rgw_placement_rule *pselected_rule, RGWZonePlacementInfo *rule_info, optional_yield y);
   int select_legacy_bucket_placement(const DoutPrefixProvider *dpp, RGWZonePlacementInfo *rule_info, optional_yield y);
-  int select_new_bucket_location(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const string& zonegroup_id,
+  int select_new_bucket_location(const DoutPrefixProvider *dpp, const RGWUserInfo& user_info, const std::string& zonegroup_id,
                                  const rgw_placement_rule& rule,
                                  rgw_placement_rule *pselected_rule_name, RGWZonePlacementInfo *rule_info,
                                 optional_yield y);
@@ -147,7 +147,7 @@ public:
 
   int add_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& new_pool, optional_yield y);
   int remove_bucket_placement(const DoutPrefixProvider *dpp, const rgw_pool& old_pool, optional_yield y);
-  int list_placement_set(const DoutPrefixProvider *dpp, set<rgw_pool>& names, optional_yield y);
+  int list_placement_set(const DoutPrefixProvider *dpp, std::set<rgw_pool>& names, optional_yield y);
 
   bool is_meta_master() const;
 
@@ -157,10 +157,10 @@ public:
   bool can_reshard() const;
   bool is_syncing_bucket_meta(const rgw_bucket& bucket);
 
-  int list_zonegroups(const DoutPrefixProvider *dpp, list<string>& zonegroups);
-  int list_regions(const DoutPrefixProvider *dpp, list<string>& regions);
-  int list_zones(const DoutPrefixProvider *dpp, list<string>& zones);
-  int list_realms(const DoutPrefixProvider *dpp, list<string>& realms);
-  int list_periods(const DoutPrefixProvider *dpp, list<string>& periods);
-  int list_periods(const DoutPrefixProvider *dpp, const string& current_period, list<string>& periods, optional_yield y);
+  int list_zonegroups(const DoutPrefixProvider *dpp, std::list<std::string>& zonegroups);
+  int list_regions(const DoutPrefixProvider *dpp, std::list<std::string>& regions);
+  int list_zones(const DoutPrefixProvider *dpp, std::list<std::string>& zones);
+  int list_realms(const DoutPrefixProvider *dpp, std::list<std::string>& realms);
+  int list_periods(const DoutPrefixProvider *dpp, std::list<std::string>& periods);
+  int list_periods(const DoutPrefixProvider *dpp, const std::string& current_period, std::list<std::string>& periods, optional_yield y);
 };
index b292d7b992f07ea23d8a6f91339a73a355fe5120..0641f8335046243c5da3db757be55e43935f7698 100644 (file)
@@ -7,6 +7,8 @@
 
 #include "rgw/rgw_zone.h"
 
+using namespace std;
+
 int RGWSI_ZoneUtils::do_start(optional_yield, const DoutPrefixProvider *dpp)
 {
   init_unique_trans_id_deps();
index 24abe528e53b31ccc40269e0b2cb7bc9105cb9f9..c534e7ea346ea2de42bfc7d18a685dd1287561b3 100644 (file)
@@ -16,7 +16,7 @@ class RGWSI_ZoneUtils : public RGWServiceInstance
   RGWSI_RADOS *rados_svc{nullptr};
   RGWSI_Zone *zone_svc{nullptr};
 
-  string trans_id_suffix;
+  std::string trans_id_suffix;
 
   void init(RGWSI_RADOS *_rados_svc,
             RGWSI_Zone *_zone_svc) {
@@ -31,8 +31,8 @@ class RGWSI_ZoneUtils : public RGWServiceInstance
 public:
   RGWSI_ZoneUtils(CephContext *cct): RGWServiceInstance(cct) {}
 
-  string gen_host_id();
-  string unique_id(uint64_t unique_num);
+  std::string gen_host_id();
+  std::string unique_id(uint64_t unique_num);
 
-  string unique_trans_id(const uint64_t unique_num);
+  std::string unique_trans_id(const uint64_t unique_num);
 };