]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unnecessary "struct" from req_state declarations 46788/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Tue, 21 Jun 2022 22:12:32 +0000 (18:12 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 21 Jun 2022 23:11:24 +0000 (19:11 -0400)
The "struct" is superfluous and makes it harder for those looking for
the definition.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
55 files changed:
src/rgw/librgw.cc
src/rgw/rgw_auth.h
src/rgw/rgw_client_io.h
src/rgw/rgw_common.cc
src/rgw/rgw_common.h
src/rgw/rgw_crypt.cc
src/rgw/rgw_crypt.h
src/rgw/rgw_file.cc
src/rgw/rgw_file.h
src/rgw/rgw_lib.h
src/rgw/rgw_log.cc
src/rgw/rgw_log.h
src/rgw/rgw_lua_request.h
src/rgw/rgw_op.cc
src/rgw/rgw_op.h
src/rgw/rgw_os_lib.cc
src/rgw/rgw_process.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_request.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_bucket.h
src/rgw/rgw_rest_config.h
src/rgw/rgw_rest_iam.cc
src/rgw/rgw_rest_iam.h
src/rgw/rgw_rest_info.h
src/rgw/rgw_rest_log.h
src/rgw/rgw_rest_metadata.h
src/rgw/rgw_rest_ratelimit.h
src/rgw/rgw_rest_realm.cc
src/rgw/rgw_rest_realm.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.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.h
src/rgw/rgw_rest_user.h
src/rgw/rgw_s3select_private.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_dbstore.cc
src/rgw/rgw_sal_dbstore.h
src/rgw/rgw_sal_motr.cc
src/rgw/rgw_sal_motr.h
src/rgw/rgw_sal_rados.cc
src/rgw/rgw_sal_rados.h
src/rgw/rgw_swift_auth.cc
src/rgw/rgw_swift_auth.h
src/rgw/rgw_sync_module_es_rest.cc
src/rgw/rgw_sync_module_es_rest.h
src/rgw/rgw_sync_module_pubsub_rest.cc
src/rgw/rgw_sync_module_pubsub_rest.h
src/rgw/rgw_torrent.cc
src/rgw/rgw_torrent.h

index 7e3068c382ea29d86acd14fb971e39bbdfb3bfdc..87fbb97ad6dd1f81a2928b39762619e6c38c668b 100644 (file)
@@ -183,7 +183,7 @@ namespace rgw {
     return ret;
   } /* process_request */
 
-  static inline void abort_req(struct req_state *s, RGWOp *op, int err_no)
+  static inline void abort_req(req_state *s, RGWOp *op, int err_no)
   {
     if (!s)
       return;
@@ -234,8 +234,8 @@ namespace rgw {
     rgw_env.set("HTTP_HOST", "");
 
     /* XXX and -then- bloat up req_state with string copies from it */
-    struct req_state rstate(req->cct, &rgw_env, req->id);
-    struct req_state *s = &rstate;
+    req_state rstate(req->cct, &rgw_env, req->id);
+    req_state *s = &rstate;
 
     // XXX fix this
     s->cio = io;
@@ -371,7 +371,7 @@ namespace rgw {
       return -EINVAL;
     }
 
-    struct req_state* s = req->get_state();
+    req_state* s = req->get_state();
     RGWLibIO& io_ctx = req->get_io();
     RGWEnv& rgw_env = io_ctx.get_env();
 
index 50f2d12e424221677148320cb37198f7c45f2fd7..f14066592afeedc47697a29d31482a1f77ceeaa2 100644 (file)
@@ -19,6 +19,7 @@
 
 class RGWCtl;
 struct rgw_log_entry;
+struct req_state;
 
 namespace rgw {
 namespace auth {
index 9626d289fc9dac740293d0c179abac8411d71fdf..5e47aee0627a4db59fffdd4f4f684bf750898d59 100644 (file)
@@ -352,13 +352,13 @@ public:
 
 /* Type conversions to work around lack of req_state type hierarchy matching
  * (e.g.) REST backends (may be replaced w/dynamic typed req_state). */
-static inline rgw::io::RestfulClient* RESTFUL_IO(struct req_state* s) {
+static inline rgw::io::RestfulClient* RESTFUL_IO(req_state* s) {
   ceph_assert(dynamic_cast<rgw::io::RestfulClient*>(s->cio) != nullptr);
 
   return static_cast<rgw::io::RestfulClient*>(s->cio);
 }
 
-static inline rgw::io::Accounter* ACCOUNTING_IO(struct req_state* s) {
+static inline rgw::io::Accounter* ACCOUNTING_IO(req_state* s) {
   auto ptr = dynamic_cast<rgw::io::Accounter*>(s->cio);
   ceph_assert(ptr != nullptr);
 
index 750157edd5671173b1e90ce06f503949cc678aac..96eded1f56a93ab0cba8628ce5f8508b3e564d01 100644 (file)
@@ -333,7 +333,7 @@ void set_req_state_err(struct rgw_err& err, /* out */
   err.err_code = "UnknownError";
 }
 
-void set_req_state_err(struct req_state* s, int err_no, const string& err_msg)
+void set_req_state_err(req_state* s, int err_no, const string& err_msg)
 {
   if (s) {
     set_req_state_err(s, err_no);
@@ -351,14 +351,14 @@ void set_req_state_err(struct req_state* s, int err_no, const string& err_msg)
   }
 }
 
-void set_req_state_err(struct req_state* s, int err_no)
+void set_req_state_err(req_state* s, int err_no)
 {
   if (s) {
     set_req_state_err(s->err, err_no, s->prot_flags);
   }
 }
 
-void dump(struct req_state* s)
+void dump(req_state* s)
 {
   if (s->format != RGW_FORMAT_HTML)
     s->formatter->open_object_section("Error");
@@ -1189,7 +1189,7 @@ bool verify_user_permission_no_policy(const DoutPrefixProvider* dpp,
 }
 
 bool verify_user_permission(const DoutPrefixProvider* dpp,
-                            struct req_state * const s,
+                            req_state * const s,
                             const rgw::ARN& res,
                             const uint64_t op)
 {
@@ -1198,7 +1198,7 @@ bool verify_user_permission(const DoutPrefixProvider* dpp,
 }
 
 bool verify_user_permission_no_policy(const DoutPrefixProvider* dpp, 
-                                      struct req_state * const s,
+                                      req_state * const s,
                                       const int perm)
 {
   perm_state_from_req_state ps(s);
@@ -1281,7 +1281,7 @@ bool verify_bucket_permission(const DoutPrefixProvider* dpp,
 }
 
 bool verify_bucket_permission(const DoutPrefixProvider* dpp,
-                              struct req_state * const s,
+                              req_state * const s,
                              const rgw_bucket& bucket,
                               RGWAccessControlPolicy * const user_acl,
                               RGWAccessControlPolicy * const bucket_acl,
@@ -1320,7 +1320,7 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct pe
   return user_acl->verify_permission(dpp, *s->identity, perm, perm);
 }
 
-bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct req_state * const s,
+bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, req_state * const s,
                                        RGWAccessControlPolicy * const user_acl,
                                        RGWAccessControlPolicy * const bucket_acl,
                                        const int perm)
@@ -1333,7 +1333,7 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct re
                                             perm);
 }
 
-bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct req_state * const s, const int perm)
+bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, req_state * const s, const int perm)
 {
   perm_state_from_req_state ps(s);
 
@@ -1347,7 +1347,7 @@ bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp, struct re
                                             perm);
 }
 
-bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state * const s, const uint64_t op)
+bool verify_bucket_permission(const DoutPrefixProvider* dpp, req_state * const s, const uint64_t op)
 {
   perm_state_from_req_state ps(s);
 
@@ -1365,7 +1365,7 @@ bool verify_bucket_permission(const DoutPrefixProvider* dpp, struct req_state *
 // Authorize anyone permitted by the bucket policy, identity policies, session policies and the bucket owner
 // unless explicitly denied by the policy.
 
-int verify_bucket_owner_or_policy(struct req_state* const s,
+int verify_bucket_owner_or_policy(req_state* const s,
                                  const uint64_t op)
 {
   auto identity_policy_res = eval_identity_or_session_policies(s->iam_user_policies, s->env, op, ARN(s->bucket->get_key()));
@@ -1536,7 +1536,7 @@ bool verify_object_permission(const DoutPrefixProvider* dpp, struct perm_state_b
   return user_acl->verify_permission(dpp, *s->identity, swift_perm, swift_perm);
 }
 
-bool verify_object_permission(const DoutPrefixProvider* dpp, struct req_state * const s,
+bool verify_object_permission(const DoutPrefixProvider* dpp, req_state * const s,
                              const rgw_obj& obj,
                               RGWAccessControlPolicy * const user_acl,
                               RGWAccessControlPolicy * const bucket_acl,
@@ -1604,7 +1604,7 @@ bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp,
   return user_acl->verify_permission(dpp, *s->identity, swift_perm, swift_perm);
 }
 
-bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp, struct req_state *s, int perm)
+bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp, req_state *s, int perm)
 {
   perm_state_from_req_state ps(s);
 
@@ -1619,7 +1619,7 @@ bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp, struct re
                                             perm);
 }
 
-bool verify_object_permission(const DoutPrefixProvider* dpp, struct req_state *s, uint64_t op)
+bool verify_object_permission(const DoutPrefixProvider* dpp, req_state *s, uint64_t op)
 {
   perm_state_from_req_state ps(s);
 
index 9e3096a2795a3bfdf4c5fe504d8a504c1be97c4a..eafa25806e98871c046fe4d0e2585b0cd3e4020c 100644 (file)
@@ -279,8 +279,6 @@ using ceph::crypto::MD5;
 #define UINT32_MAX (0xffffffffu)
 #endif
 
-struct req_state;
-
 typedef void *RGWAccessHandle;
 
 enum RGWIntentEvent {
@@ -1714,10 +1712,10 @@ struct req_state : DoutPrefixProvider {
   unsigned get_subsys() const override { return ceph_subsys_rgw; }
 };
 
-void set_req_state_err(struct req_state*, int);
-void set_req_state_err(struct req_state*, int, const std::string&);
+void set_req_state_err(req_state*, int);
+void set_req_state_err(req_state*, int, const std::string&);
 void set_req_state_err(struct rgw_err&, int, const int);
-void dump(struct req_state*);
+void dump(req_state*);
 
 /** Store basic data on bucket */
 struct RGWBucketEnt {
@@ -2190,26 +2188,26 @@ rgw::IAM::Effect eval_identity_or_session_policies(const std::vector<rgw::IAM::P
                           const uint64_t op,
                           const rgw::ARN& arn);
 bool verify_user_permission(const DoutPrefixProvider* dpp,
-                            struct req_state * const s,
+                            req_state * const s,
                             RGWAccessControlPolicy * const user_acl,
                             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,
-                                      struct req_state * const s,
+                                      req_state * const s,
                                       RGWAccessControlPolicy * const user_acl,
                                       const int perm);
 bool verify_user_permission(const DoutPrefixProvider* dpp,
-                            struct req_state * const s,
+                            req_state * const s,
                             const rgw::ARN& res,
                             const uint64_t op);
 bool verify_user_permission_no_policy(const DoutPrefixProvider* dpp,
-                                      struct req_state * const s,
+                                      req_state * const s,
                                       int perm);
 bool verify_bucket_permission(
   const DoutPrefixProvider* dpp,
-  struct req_state * const s,
+  req_state * const s,
   const rgw_bucket& bucket,
   RGWAccessControlPolicy * const user_acl,
   RGWAccessControlPolicy * const bucket_acl,
@@ -2217,21 +2215,21 @@ bool verify_bucket_permission(
   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(const DoutPrefixProvider* dpp, req_state * const s, const uint64_t op);
 bool verify_bucket_permission_no_policy(
   const DoutPrefixProvider* dpp,
-  struct req_state * const s,
+  req_state * const s,
   RGWAccessControlPolicy * const user_acl,
   RGWAccessControlPolicy * const bucket_acl,
   const int perm);
 bool verify_bucket_permission_no_policy(const DoutPrefixProvider* dpp,
-                                        struct req_state * const s,
+                                        req_state * const s,
                                        const int perm);
-int verify_bucket_owner_or_policy(struct req_state* const s,
+int verify_bucket_owner_or_policy(req_state* const s,
                                  const uint64_t op);
 extern bool verify_object_permission(
   const DoutPrefixProvider* dpp,
-  struct req_state * const s,
+  req_state * const s,
   const rgw_obj& obj,
   RGWAccessControlPolicy * const user_acl,
   RGWAccessControlPolicy * const bucket_acl,
@@ -2240,15 +2238,15 @@ extern bool verify_object_permission(
   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(const DoutPrefixProvider* dpp, req_state *s, uint64_t op);
 extern bool verify_object_permission_no_policy(
   const DoutPrefixProvider* dpp,
-  struct req_state * const s,
+  req_state * const s,
   RGWAccessControlPolicy * const user_acl,
   RGWAccessControlPolicy * const bucket_acl,
   RGWAccessControlPolicy * const object_acl,
   int perm);
-extern bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp, struct req_state *s,
+extern bool verify_object_permission_no_policy(const DoutPrefixProvider* dpp, req_state *s,
                                               int perm);
 extern int verify_object_lock(
   const DoutPrefixProvider* dpp,
index 515a5ba78c0e0b0cba1ab9f6c971442da3411777..0c6d36de257db5c7a1b66e62db906d55a435e1b8 100644 (file)
@@ -217,7 +217,7 @@ get_tenant_or_id(req_state *s)
 }
 
 int
-make_canonical_context(struct req_state *s,
+make_canonical_context(req_state *s,
     std::string_view &context,
     std::string &cooked_context)
 {
@@ -892,7 +892,7 @@ struct CryptAttributes {
   }
 };
 
-std::string fetch_bucket_key_id(struct req_state *s)
+std::string fetch_bucket_key_id(req_state *s)
 {
   auto kek_iter = s->bucket_attrs.find(RGW_ATTR_BUCKET_ENCRYPTION_KEY_ID);
   if (kek_iter == s->bucket_attrs.end())
@@ -907,7 +907,7 @@ std::string fetch_bucket_key_id(struct req_state *s)
 }
 
 const std::string cant_expand_key{ "\uFFFD" };
-std::string expand_key_name(struct req_state *s, const std::string_view&t)
+std::string expand_key_name(req_state *s, const std::string_view&t)
 {
   std::string r;
   size_t i, j;
@@ -989,7 +989,7 @@ static int get_sse_s3_bucket_key(req_state *s,
   return 0;
 }
 
-int rgw_s3_prepare_encrypt(struct req_state* s,
+int rgw_s3_prepare_encrypt(req_state* s,
                            std::map<std::string, ceph::bufferlist>& attrs,
                            std::unique_ptr<BlockCrypt>* block_crypt,
                            std::map<std::string, std::string>& crypt_http_responses)
@@ -1270,7 +1270,7 @@ int rgw_s3_prepare_encrypt(struct req_state* s,
 }
 
 
-int rgw_s3_prepare_decrypt(struct req_state* s,
+int rgw_s3_prepare_decrypt(req_state* s,
                        map<string, bufferlist>& attrs,
                        std::unique_ptr<BlockCrypt>* block_crypt,
                        std::map<std::string, std::string>& crypt_http_responses)
index 921d9ff21f589076724f352da9db80fab48853a1..33d6bc3bbc38c49324b998fc5903186b7aa396ff 100644 (file)
@@ -139,13 +139,13 @@ public:
 }; /* RGWPutObj_BlockEncrypt */
 
 
-int rgw_s3_prepare_encrypt(struct req_state* s,
+int rgw_s3_prepare_encrypt(req_state* s,
                            std::map<std::string, ceph::bufferlist>& attrs,
                            std::unique_ptr<BlockCrypt>* block_crypt,
                            std::map<std::string,
                                     std::string>& crypt_http_responses);
 
-int rgw_s3_prepare_decrypt(struct req_state* s,
+int rgw_s3_prepare_decrypt(req_state* s,
                            std::map<std::string, ceph::bufferlist>& attrs,
                            std::unique_ptr<BlockCrypt>* block_crypt,
                            std::map<std::string,
index 079eab63b9d47e009cd7aae81aa682814b156221..500776bff1e510cdc7d90608f91e8317a54b0ecb 100644 (file)
@@ -1820,7 +1820,7 @@ namespace rgw {
   }
 
   int RGWWriteRequest::exec_start() {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
 
     /* Object needs a bucket from this point */
     state->object->set_bucket(state->bucket.get());
@@ -1892,7 +1892,7 @@ namespace rgw {
 
   int RGWWriteRequest::exec_continue()
   {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     op_ret = 0;
 
     /* check guards (e.g., contig write) */
@@ -1930,7 +1930,7 @@ namespace rgw {
     map<string, string>::iterator iter;
     char calc_md5[CEPH_CRYPTO_MD5_DIGESTSIZE * 2 + 1];
     unsigned char m[CEPH_CRYPTO_MD5_DIGESTSIZE];
-    struct req_state* state = get_state();
+    req_state* state = get_state();
 
     size_t osize = rgw_fh->get_size();
     struct timespec octime = rgw_fh->get_ctime();
index d1c19ab0a5005c696a9c91f1623da74e12045e77..81e7ac0a3465ff2464a333c05d78d2620fdc7272 100644 (file)
@@ -1383,7 +1383,7 @@ public:
   }
 
   int header_init() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -1518,7 +1518,7 @@ public:
   }
 
   int header_init() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -1578,7 +1578,7 @@ public:
   }
 
   void send_response() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     auto cnow = real_clock::now();
 
     /* enumerate objs and common_prefixes in parallel,
@@ -1819,7 +1819,7 @@ public:
   }
 
   int header_init() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -1899,7 +1899,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "PUT";
     state->op = OP_PUT;
 
@@ -1915,7 +1915,7 @@ public:
   }
 
   int get_params(optional_yield) override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     RGWAccessControlPolicy_S3 s3policy(state->cct);
     /* we don't have (any) headers, so just create canned ACLs */
     int ret = s3policy.create_canned(state->owner, state->bucket_owner, state->canned_acl);
@@ -1956,7 +1956,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "DELETE";
     state->op = OP_DELETE;
 
@@ -2012,7 +2012,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "PUT";
     state->op = OP_PUT;
 
@@ -2031,7 +2031,7 @@ public:
   }
 
   int get_params(optional_yield) override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     RGWAccessControlPolicy_S3 s3policy(state->cct);
     /* we don't have (any) headers, so just create canned ACLs */
     int ret = s3policy.create_canned(state->owner, state->bucket_owner, state->canned_acl);
@@ -2103,7 +2103,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -2184,7 +2184,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "DELETE";
     state->op = OP_DELETE;
 
@@ -2259,7 +2259,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -2333,7 +2333,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -2396,7 +2396,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
 
@@ -2423,7 +2423,7 @@ public:
   }
 
   void send_response() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     // try objects
     for (const auto& iter : objs) {
       auto& name = iter.key.name;
@@ -2518,7 +2518,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "PUT";
     state->op = OP_PUT;
 
@@ -2534,7 +2534,7 @@ public:
   }
 
   int get_params(optional_yield) override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     RGWAccessControlPolicy_S3 s3policy(state->cct);
     /* we don't have (any) headers, so just create canned ACLs */
     int ret = s3policy.create_canned(state->owner, state->bucket_owner, state->canned_acl);
@@ -2607,7 +2607,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "PUT"; // XXX check
     state->op = OP_PUT;
 
@@ -2640,7 +2640,7 @@ public:
   }
 
   int get_params(optional_yield) override {
-    struct req_state* s = get_state();
+    req_state* s = get_state();
     RGWAccessControlPolicy_S3 s3policy(s->cct);
     /* we don't have (any) headers, so just create canned ACLs */
     int ret = s3policy.create_canned(s->owner, s->bucket_owner, s->canned_acl);
@@ -2688,7 +2688,7 @@ public:
 
   virtual int header_init() {
 
-    struct req_state* s = get_state();
+    req_state* s = get_state();
     s->info.method = "GET";
     s->op = OP_GET;
 
@@ -2739,7 +2739,7 @@ public:
 
   int header_init() override {
 
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "PUT";
     state->op = OP_PUT;
 
@@ -2793,7 +2793,7 @@ public:
 
   virtual int header_init() {
 
-    struct req_state* s = get_state();
+    req_state* s = get_state();
     s->info.method = "DELETE";
     s->op = OP_PUT;
 
@@ -2837,7 +2837,7 @@ public:
   }
 
   int header_init() override {
-    struct req_state* state = get_state();
+    req_state* state = get_state();
     state->info.method = "GET";
     state->op = OP_GET;
     return 0;
index 4f3bd0205cce07e74a420d0b1008e194ae6f22b8..7713f19935fe88cbd956424d61201eaa8234bca8 100644 (file)
@@ -128,7 +128,7 @@ namespace rgw {
     RGWHandler_Lib() {}
     ~RGWHandler_Lib() override {}
     static int init_from_header(rgw::sal::Store* store,
-                               struct req_state *s);
+                               req_state *s);
   }; /* RGWHandler_Lib */
 
   class RGWLibRequest : public RGWRequest,
@@ -139,7 +139,7 @@ namespace rgw {
     CephContext* cct;
 
     /* unambiguiously return req_state */
-    inline struct req_state* get_state() { return this->RGWRequest::s; }
+    inline req_state* get_state() { return this->RGWRequest::s; }
 
     RGWLibRequest(CephContext* _cct, std::unique_ptr<rgw::sal::User> _user)
       :  RGWRequest(rgwlib.get_store()->get_new_req_id()),
@@ -161,7 +161,7 @@ namespace rgw {
     using RGWHandler::init;
 
     int init(const RGWEnv& rgw_env, rgw::sal::Store* _store,
-            RGWLibIO* io, struct req_state* _s) {
+            RGWLibIO* io, req_state* _s) {
 
       RGWRequest::init_state(_s);
       RGWHandler::init(_store, _s, io);
@@ -189,7 +189,7 @@ namespace rgw {
 
   class RGWLibContinuedReq : public RGWLibRequest {
     RGWLibIO io_ctx;
-    struct req_state rstate;
+    req_state rstate;
   public:
 
     RGWLibContinuedReq(CephContext* _cct,
index 6617ac3e5a84bee8b55fba17420c1217a693c17a..75b1d9d8f30a3d9205d6e9edd79ebec8208a5700 100644 (file)
@@ -24,7 +24,7 @@
 
 using namespace std;
 
-static void set_param_str(struct req_state *s, const char *name, string& str)
+static void set_param_str(req_state *s, const char *name, string& str)
 {
   const char *p = s->info.env->get(name);
   if (p)
@@ -192,7 +192,7 @@ void rgw_log_usage_finalize()
   usage_logger = NULL;
 }
 
-static void log_usage(struct req_state *s, const string& op_name)
+static void log_usage(req_state *s, const string& op_name)
 {
   if (s->system_request) /* don't log system user operations */
     return;
@@ -338,7 +338,7 @@ void OpsLogManifold::add_sink(OpsLogSink* sink)
     sinks.push_back(sink);
 }
 
-int OpsLogManifold::log(struct req_state* s, struct rgw_log_entry& entry)
+int OpsLogManifold::log(req_state* s, struct rgw_log_entry& entry)
 {
   int ret = 0;
   for (const auto &sink : sinks) {
@@ -431,7 +431,7 @@ OpsLogFile::~OpsLogFile()
   file.close();
 }
 
-int OpsLogFile::log_json(struct req_state* s, bufferlist& bl)
+int OpsLogFile::log_json(req_state* s, bufferlist& bl)
 {
   std::unique_lock lock(mutex);
   if (data_size + bl.length() >= max_data_size) {
@@ -464,7 +464,7 @@ void JsonOpsLogSink::formatter_to_bl(bufferlist& bl)
   bl.append(s);
 }
 
-int JsonOpsLogSink::log(struct req_state* s, struct rgw_log_entry& entry)
+int JsonOpsLogSink::log(req_state* s, struct rgw_log_entry& entry)
 {
   bufferlist bl;
 
@@ -486,7 +486,7 @@ OpsLogSocket::OpsLogSocket(CephContext *cct, uint64_t _backlog) : OutputDataSock
   delim.append(",\n");
 }
 
-int OpsLogSocket::log_json(struct req_state* s, bufferlist& bl)
+int OpsLogSocket::log_json(req_state* s, bufferlist& bl)
 {
   append_output(bl);
   return 0;
@@ -496,7 +496,7 @@ OpsLogRados::OpsLogRados(rgw::sal::Store* const& store): store(store)
 {
 }
 
-int OpsLogRados::log(struct req_state* s, struct rgw_log_entry& entry)
+int OpsLogRados::log(req_state* s, struct rgw_log_entry& entry)
 {
   if (!s->cct->_conf->rgw_ops_log_rados) {
     return 0;
@@ -519,7 +519,7 @@ int OpsLogRados::log(struct req_state* s, struct rgw_log_entry& entry)
   return 0;
 }
 
-int rgw_log_op(RGWREST* const rest, struct req_state *s, const string& op_name, OpsLogSink *olog)
+int rgw_log_op(RGWREST* const rest, req_state *s, const string& op_name, OpsLogSink *olog)
 {
   struct rgw_log_entry entry;
   string bucket_id;
index db1ff2e710c85bd3dccc3017cd676fcfd4ab1303..f798941a13ce416e16fc031096df95bcb17cac5e 100644 (file)
@@ -147,7 +147,7 @@ WRITE_CLASS_ENCODER(rgw_log_entry)
 
 class OpsLogSink {
 public:
-  virtual int log(struct req_state* s, struct rgw_log_entry& entry) = 0;
+  virtual int log(req_state* s, struct rgw_log_entry& entry) = 0;
   virtual ~OpsLogSink() = default;
 };
 
@@ -156,7 +156,7 @@ class OpsLogManifold: public OpsLogSink {
 public:
   ~OpsLogManifold() override;
   void add_sink(OpsLogSink* sink);
-  int log(struct req_state* s, struct rgw_log_entry& entry) override;
+  int log(req_state* s, struct rgw_log_entry& entry) override;
 };
 
 class JsonOpsLogSink : public OpsLogSink {
@@ -165,11 +165,11 @@ class JsonOpsLogSink : public OpsLogSink {
 
   void formatter_to_bl(bufferlist& bl);
 protected:
-  virtual int log_json(struct req_state* s, bufferlist& bl) = 0;
+  virtual int log_json(req_state* s, bufferlist& bl) = 0;
 public:
   JsonOpsLogSink();
   ~JsonOpsLogSink() override;
-  int log(struct req_state* s, struct rgw_log_entry& entry) override;
+  int log(req_state* s, struct rgw_log_entry& entry) override;
 };
 
 class OpsLogFile : public JsonOpsLogSink, public Thread, public DoutPrefixProvider {
@@ -187,7 +187,7 @@ class OpsLogFile : public JsonOpsLogSink, public Thread, public DoutPrefixProvid
 
   void flush();
 protected:
-  int log_json(struct req_state* s, bufferlist& bl) override;
+  int log_json(req_state* s, bufferlist& bl) override;
   void *entry() override;
 public:
   OpsLogFile(CephContext* cct, std::string& path, uint64_t max_data_size);
@@ -202,7 +202,7 @@ public:
 
 class OpsLogSocket : public OutputDataSocket, public JsonOpsLogSink {
 protected:
-  int log_json(struct req_state* s, bufferlist& bl) override;
+  int log_json(req_state* s, bufferlist& bl) override;
   void init_connection(bufferlist& bl) override;
 
 public:
@@ -215,12 +215,12 @@ class OpsLogRados : public OpsLogSink {
 
 public:
   OpsLogRados(rgw::sal::Store* const& store);
-  int log(struct req_state* s, struct rgw_log_entry& entry) override;
+  int log(req_state* s, struct rgw_log_entry& entry) override;
 };
 
 class RGWREST;
 
-int rgw_log_op(RGWREST* const rest, struct req_state* s,
+int rgw_log_op(RGWREST* const rest, req_state* s,
               const std::string& op_name, OpsLogSink* olog);
 void rgw_log_usage_init(CephContext* cct, rgw::sal::Store* store);
 void rgw_log_usage_finalize();
index d1410b584ff0ac73650346581e336bef483fa0e1..e49989e32e3a3d92f1338ebdfbe92fdaaed90328 100644 (file)
@@ -3,7 +3,7 @@
 #include <string>
 #include "include/common_fwd.h"
 
-class req_state;
+struct req_state;
 class RGWREST;
 class OpsLogSink;
 namespace rgw::sal {
index 44efe7e3a007e6e0b1038e2ca0a4e4de3f5ad9c6..717725fc0ed0a7d8a3f6fba8feb5042cfb7742d8 100644 (file)
@@ -334,7 +334,7 @@ vector<Policy> get_iam_user_policy_from_attr(CephContext* cct,
 
 static int read_bucket_policy(const DoutPrefixProvider *dpp, 
                               rgw::sal::Store* store,
-                              struct req_state *s,
+                              req_state *s,
                               RGWBucketInfo& bucket_info,
                               map<string, bufferlist>& bucket_attrs,
                               RGWAccessControlPolicy *policy,
@@ -361,7 +361,7 @@ static int read_bucket_policy(const DoutPrefixProvider *dpp,
 
 static int read_obj_policy(const DoutPrefixProvider *dpp, 
                            rgw::sal::Store* store,
-                           struct req_state *s,
+                           req_state *s,
                            RGWBucketInfo& bucket_info,
                            map<string, bufferlist>& bucket_attrs,
                            RGWAccessControlPolicy* acl,
@@ -449,7 +449,7 @@ static int read_obj_policy(const DoutPrefixProvider *dpp,
  * only_bucket: If true, reads the user and bucket ACLs rather than the object ACL.
  * Returns: 0 on success, -ERR# otherwise.
  */
-int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store, struct req_state* s, optional_yield y)
+int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store, req_state* s, optional_yield y)
 {
   int ret = 0;
 
@@ -644,7 +644,7 @@ int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* st
  * Returns: 0 on success, -ERR# otherwise.
  */
 int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store,
-                             struct req_state *s, bool prefetch_data, optional_yield y)
+                             req_state *s, bool prefetch_data, optional_yield y)
 {
   int ret = 0;
 
@@ -666,7 +666,7 @@ int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* st
   return ret;
 }
 
-static int rgw_iam_remove_objtags(const DoutPrefixProvider *dpp, struct req_state* s, rgw::sal::Object* object, bool has_existing_obj_tag, bool has_resource_tag) {
+static int rgw_iam_remove_objtags(const DoutPrefixProvider *dpp, req_state* s, rgw::sal::Object* object, bool has_existing_obj_tag, bool has_resource_tag) {
   object->set_atomic();
   int op_ret = object->get_obj_attrs(s->yield, dpp);
   if (op_ret < 0)
@@ -723,7 +723,7 @@ void rgw_add_to_iam_environment(rgw::IAM::Environment& e, std::string_view key,
     e.emplace(key,val);
 }
 
-static int rgw_iam_add_tags_from_bl(struct req_state* s, bufferlist& bl, bool has_existing_obj_tag=false, bool has_resource_tag=false){
+static int rgw_iam_add_tags_from_bl(req_state* s, bufferlist& bl, bool has_existing_obj_tag=false, bool has_resource_tag=false){
   RGWObjTags& tagset = s->tagset;
   try {
     auto bliter = bl.cbegin();
@@ -742,7 +742,7 @@ static int rgw_iam_add_tags_from_bl(struct req_state* s, bufferlist& bl, bool ha
   return 0;
 }
 
-static int rgw_iam_add_objtags(const DoutPrefixProvider *dpp, struct req_state* s, rgw::sal::Object* object, bool has_existing_obj_tag, bool has_resource_tag) {
+static int rgw_iam_add_objtags(const DoutPrefixProvider *dpp, req_state* s, rgw::sal::Object* object, bool has_existing_obj_tag, bool has_resource_tag) {
   object->set_atomic();
   int op_ret = object->get_obj_attrs(s->yield, dpp);
   if (op_ret < 0)
@@ -755,14 +755,14 @@ static int rgw_iam_add_objtags(const DoutPrefixProvider *dpp, struct req_state*
   return 0;
 }
 
-static int rgw_iam_add_objtags(const DoutPrefixProvider *dpp, struct req_state* s, bool has_existing_obj_tag, bool has_resource_tag) {
+static int rgw_iam_add_objtags(const DoutPrefixProvider *dpp, req_state* s, bool has_existing_obj_tag, bool has_resource_tag) {
   if (!rgw::sal::Object::empty(s->object.get())) {
     return rgw_iam_add_objtags(dpp, s, s->object.get(), has_existing_obj_tag, has_resource_tag);
   }
   return 0;
 }
 
-static int rgw_iam_add_buckettags(const DoutPrefixProvider *dpp, struct req_state* s, rgw::sal::Bucket* bucket) {
+static int rgw_iam_add_buckettags(const DoutPrefixProvider *dpp, req_state* s, rgw::sal::Bucket* bucket) {
   rgw::sal::Attrs attrs = bucket->get_attrs();
   auto tags = attrs.find(RGW_ATTR_TAGS);
   if (tags != attrs.end()) {
@@ -771,7 +771,7 @@ static int rgw_iam_add_buckettags(const DoutPrefixProvider *dpp, struct req_stat
   return 0;
 }
 
-static int rgw_iam_add_buckettags(const DoutPrefixProvider *dpp, struct req_state* s) {
+static int rgw_iam_add_buckettags(const DoutPrefixProvider *dpp, req_state* s) {
   return rgw_iam_add_buckettags(dpp, s, s->bucket.get());
 }
 
@@ -822,11 +822,11 @@ static std::tuple<bool, bool> rgw_check_policy_condition(const DoutPrefixProvide
   return make_tuple(has_existing_obj_tag, has_resource_tag);
 }
 
-static std::tuple<bool, bool> rgw_check_policy_condition(const DoutPrefixProvider *dpp, struct req_state* s, bool check_obj_exist_tag=true) {
+static std::tuple<bool, bool> rgw_check_policy_condition(const DoutPrefixProvider *dpp, req_state* s, bool check_obj_exist_tag=true) {
   return rgw_check_policy_condition(dpp, s->iam_policy, s->iam_user_policies, s->session_policies, check_obj_exist_tag);
 }
 
-static void rgw_add_grant_to_iam_environment(rgw::IAM::Environment& e, struct req_state *s){
+static void rgw_add_grant_to_iam_environment(rgw::IAM::Environment& e, req_state *s){
 
   using header_pair_t = std::pair <const char*, const char*>;
   static const std::initializer_list <header_pair_t> acl_header_conditionals {
@@ -848,7 +848,7 @@ static void rgw_add_grant_to_iam_environment(rgw::IAM::Environment& e, struct re
 }
 
 void rgw_build_iam_environment(rgw::sal::Store* store,
-                                     struct req_state* s)
+                                     req_state* s)
 {
   const auto& m = s->info.env->get_map();
   auto t = ceph::real_clock::now();
@@ -907,7 +907,7 @@ void rgw_build_iam_environment(rgw::sal::Store* store,
   }
 }
 
-void rgw_bucket_object_pre_exec(struct req_state *s)
+void rgw_bucket_object_pre_exec(req_state *s)
 {
   if (s->expect_cont)
     dump_continue(s);
@@ -2110,7 +2110,7 @@ void RGWGetObj::pre_exec()
 }
 
 static inline void rgw_cond_decode_objtags(
-  struct req_state *s,
+  req_state *s,
   const std::map<std::string, buffer::list> &attrs)
 {
   const auto& tags = attrs.find(RGW_ATTR_TAGS);
@@ -7204,7 +7204,7 @@ RGWBulkUploadOp::parse_path(const std::string_view& path)
 }
 
 std::pair<std::string, std::string>
-RGWBulkUploadOp::handle_upload_path(struct req_state *s)
+RGWBulkUploadOp::handle_upload_path(req_state *s)
 {
   std::string bucket_path, file_prefix;
   if (! s->init_state.url_bucket.empty()) {
@@ -7258,7 +7258,7 @@ static void forward_req_info(const DoutPrefixProvider *dpp, CephContext *cct, re
 }
 
 void RGWBulkUploadOp::init(rgw::sal::Store* const store,
-                           struct req_state* const s,
+                           req_state* const s,
                            RGWHandler* const h)
 {
   RGWOp::init(store, s, h);
@@ -7893,7 +7893,7 @@ RGWHandler::~RGWHandler()
 }
 
 int RGWHandler::init(rgw::sal::Store* _store,
-                     struct req_state *_s,
+                     req_state *_s,
                      rgw::io::BasicClient *cio)
 {
   store = _store;
index a7885922f9ea0900d6027f242b4a06d55a6e0087..9176d2389350a0314827e163fa39b1e32cafc548 100644 (file)
@@ -88,7 +88,7 @@ int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
 class RGWHandler {
 protected:
   rgw::sal::Store* store{nullptr};
-  struct req_state *s{nullptr};
+  req_state *s{nullptr};
 
   int do_init_permissions(const DoutPrefixProvider *dpp, optional_yield y);
   int do_read_permissions(RGWOp* op, bool only_bucket, optional_yield y);
@@ -98,7 +98,7 @@ public:
   virtual ~RGWHandler();
 
   virtual int init(rgw::sal::Store* store,
-                   struct req_state* _s,
+                   req_state* _s,
                    rgw::io::BasicClient* cio);
 
   virtual int init_permissions(RGWOp*, optional_yield y) {
@@ -123,11 +123,11 @@ public:
 
 
 
-void rgw_bucket_object_pre_exec(struct req_state *s);
+void rgw_bucket_object_pre_exec(req_state *s);
 
 namespace dmc = rgw::dmclock;
 
-std::tuple<int, bufferlist > rgw_rest_read_all_input(struct req_state *s,
+std::tuple<int, bufferlist > rgw_rest_read_all_input(req_state *s,
                                         const uint64_t max_len,
                                         const bool allow_chunked=true);
 
@@ -173,7 +173,7 @@ int rgw_rest_get_json_input(CephContext *cct, req_state *s, T& out,
  */
 class RGWOp : public DoutPrefixProvider {
 protected:
-  struct req_state *s;
+  req_state *s;
   RGWHandler *dialect_handler;
   rgw::sal::Store* store;
   RGWCORSConfiguration bucket_cors;
@@ -184,7 +184,7 @@ protected:
 
   virtual int init_quota();
 
-  std::tuple<int, bufferlist> read_all_input(struct req_state *s,
+  std::tuple<int, bufferlist> read_all_input(req_state *s,
                                              const uint64_t max_len,
                                              const bool allow_chunked=true) {
 
@@ -231,7 +231,7 @@ public:
     return 0;
   }
 
-  virtual void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *dialect_handler) {
+  virtual void init(rgw::sal::Store* store, req_state *s, RGWHandler *dialect_handler) {
     this->store = store;
     this->s = s;
     this->dialect_handler = dialect_handler;
@@ -690,7 +690,7 @@ protected:
   parse_path(const std::string_view& path);
   
   std::pair<std::string, std::string>
-  handle_upload_path(struct req_state *s);
+  handle_upload_path(req_state *s);
 
   bool handle_file_verify_permission(RGWBucketInfo& binfo,
                                     const rgw_obj& obj,
@@ -711,7 +711,7 @@ public:
   }
 
   void init(rgw::sal::Store* const store,
-            struct req_state* const s,
+            req_state* const s,
             RGWHandler* const h) override;
 
   int verify_permission(optional_yield y) override;
@@ -921,7 +921,7 @@ public:
   void pre_exec() override;
   void execute(optional_yield y) override;
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
   }
   virtual int get_params(optional_yield y) = 0;
@@ -1094,7 +1094,7 @@ public:
   int verify_permission(optional_yield y) override;
   void pre_exec() override;
   void execute(optional_yield y) override;
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
     relaxed_region_enforcement =
@@ -1248,7 +1248,7 @@ public:
     delete obj_legal_hold;
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1320,7 +1320,7 @@ public:
     attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1359,7 +1359,7 @@ public:
       has_policy(false) {
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1398,7 +1398,7 @@ public:
     attrs.emplace(std::move(key), std::move(bl)); /* key and bl are r-value refs */
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1425,7 +1425,7 @@ public:
     : dlo_manifest(NULL)
   {}
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1550,13 +1550,13 @@ public:
   static bool parse_copy_location(const std::string_view& src,
                                   std::string& bucket_name,
                                   rgw_obj_key& object,
-                                  struct req_state *s);
+                                  req_state *s);
 
   void emplace_attr(std::string&& key, buffer::list&& bl) {
     attrs.emplace(std::move(key), std::move(bl));
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     dest_policy.set_ctx(s->cct);
   }
@@ -1609,7 +1609,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, std::stringstream& ss) { return 0; }
+  virtual int get_policy_from_state(rgw::sal::Store* store, 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"; }
@@ -1646,7 +1646,7 @@ public:
   }
   ~RGWPutLC() override {}
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *dialect_handler) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *dialect_handler) override {
 #define COOKIE_LEN 16
     char buf[COOKIE_LEN + 1];
 
@@ -1659,7 +1659,7 @@ public:
   void pre_exec() override;
   void execute(optional_yield y) override;
 
-//  virtual int get_policy_from_state(RGWRados* store, struct req_state *s, std::stringstream& ss) { return 0; }
+//  virtual int get_policy_from_state(RGWRados* store, 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"; }
@@ -1839,7 +1839,7 @@ protected:
 public:
   RGWInitMultipart() {}
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy.set_ctx(s->cct);
   }
@@ -1914,7 +1914,7 @@ public:
     truncated = false;
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     policy = RGWAccessControlPolicy(s->cct);
   }
@@ -1952,7 +1952,7 @@ public:
     default_max = 0;
   }
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
     max_uploads = default_max;
   }
@@ -2062,11 +2062,11 @@ public:
 };
 
 extern int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store,
-                                    struct req_state* s, optional_yield y);
+                                    req_state* s, optional_yield y);
 extern int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store,
-                                    struct req_state *s, bool prefetch_data, optional_yield y);
+                                    req_state *s, bool prefetch_data, optional_yield y);
 extern void rgw_build_iam_environment(rgw::sal::Store* store,
-                                     struct req_state* s);
+                                     req_state* s);
 extern std::vector<rgw::IAM::Policy> get_iam_user_policy_from_attr(CephContext* cct,
                         std::map<std::string, bufferlist>& attrs,
                         const std::string& tenant);
@@ -2531,7 +2531,7 @@ protected:
 public:
   RGWGetClusterStat() {}
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWOp::init(store, s, h);
   }
   int verify_permission(optional_yield) override {return 0;}
index 379f4a911a457de201731ceab51e6df342fab6d0..64ae8e102b1a0337ba4342d6daa3608899f744a5 100644 (file)
@@ -12,7 +12,7 @@ namespace rgw {
 
 /* static */
   int RGWHandler_Lib::init_from_header(rgw::sal::Store* store,
-                                      struct req_state *s)
+                                      req_state *s)
   {
     string req;
     string first;
index c5dcb28f3c53490b69d45668f48d187f3d462816..1d4c8014c1fdd9cb1fde62c71cfbf36d960352ce 100644 (file)
@@ -283,8 +283,8 @@ int process_request(rgw::sal::Store* const store,
 
   RGWEnv& rgw_env = client_io->get_env();
 
-  struct req_state rstate(g_ceph_context, &rgw_env, req->id);
-  struct req_state *s = &rstate;
+  req_state rstate(g_ceph_context, &rgw_env, req->id);
+  req_state *s = &rstate;
 
   s->ratelimit_data = ratelimit;
   std::unique_ptr<rgw::sal::User> u = store->get_user(rgw_user());
index ad5c71fddbc6ae3ba338951ff0b064246e629612..927a01c7970ea0efab15b80c13e36e68dbfb6b36 100644 (file)
@@ -3064,7 +3064,7 @@ int RGWRados::Object::Write::_do_write_meta(const DoutPrefixProvider *dpp,
 
   ObjectWriteOperation op;
 #ifdef WITH_LTTNG
-  const struct req_state* s =  get_req_state();
+  const req_state* s =  get_req_state();
   string req_id;
   if (!s) {
     // fake req_id
index 8a9005047e8ac7e0755a0ff75842f0225dd7715e..ed54dca595ec45850271e58087799b87e24b7d6b 100644 (file)
@@ -16,7 +16,7 @@
 struct RGWRequest
 {
   uint64_t id;
-  struct req_state *s;
+  req_state *s;
   RGWOp *op;
 
   explicit RGWRequest(uint64_t id) : id(id), s(NULL), op(NULL) {}
index 0e898dee9d1d996aa7171f58dccd878f5ea48a30..7279bbcc5ef0d4e3bf57522aa0fe1353434e8000 100644 (file)
@@ -280,7 +280,7 @@ static bool rgw_find_host_in_domains(const string& host, string *domain, string
   return false;
 }
 
-static void dump_status(struct req_state *s, int status,
+static void dump_status(req_state *s, int status,
                        const char *status_name)
 {
   s->formatter->set_status(status, status_name);
@@ -292,7 +292,7 @@ static void dump_status(struct req_state *s, int status,
   }
 }
 
-void rgw_flush_formatter_and_reset(struct req_state *s, Formatter *formatter)
+void rgw_flush_formatter_and_reset(req_state *s, Formatter *formatter)
 {
   std::ostringstream oss;
   formatter->output_footer();
@@ -305,7 +305,7 @@ void rgw_flush_formatter_and_reset(struct req_state *s, Formatter *formatter)
   s->formatter->reset();
 }
 
-void rgw_flush_formatter(struct req_state *s, Formatter *formatter)
+void rgw_flush_formatter(req_state *s, Formatter *formatter)
 {
   std::ostringstream oss;
   formatter->flush(oss);
@@ -326,17 +326,17 @@ void dump_errno(const struct rgw_err &err, string& out) {
   dump_errno(err.http_ret, out);
 }
 
-void dump_errno(struct req_state *s)
+void dump_errno(req_state *s)
 {
   dump_status(s, s->err.http_ret, http_status_names[s->err.http_ret]);
 }
 
-void dump_errno(struct req_state *s, int http_ret)
+void dump_errno(req_state *s, int http_ret)
 {
   dump_status(s, http_ret, http_status_names[http_ret]);
 }
 
-void dump_header(struct req_state* const s,
+void dump_header(req_state* const s,
                  const std::string_view& name,
                  const std::string_view& val)
 {
@@ -348,14 +348,14 @@ void dump_header(struct req_state* const s,
   }
 }
 
-void dump_header(struct req_state* const s,
+void dump_header(req_state* const s,
                  const std::string_view& name,
                  ceph::buffer::list& bl)
 {
   return dump_header(s, name, rgw_sanitized_hdrval(bl));
 }
 
-void dump_header(struct req_state* const s,
+void dump_header(req_state* const s,
                  const std::string_view& name,
                  const long long val)
 {
@@ -365,7 +365,7 @@ void dump_header(struct req_state* const s,
   return dump_header(s, name, std::string_view(buf, len));
 }
 
-void dump_header(struct req_state* const s,
+void dump_header(req_state* const s,
                  const std::string_view& name,
                  const utime_t& ut)
 {
@@ -377,7 +377,7 @@ void dump_header(struct req_state* const s,
   return dump_header(s, name, std::string_view(buf, len));
 }
 
-void dump_content_length(struct req_state* const s, const uint64_t len)
+void dump_content_length(req_state* const s, const uint64_t len)
 {
   try {
     RESTFUL_IO(s)->send_content_length(len);
@@ -388,7 +388,7 @@ void dump_content_length(struct req_state* const s, const uint64_t len)
   dump_header(s, "Accept-Ranges", "bytes");
 }
 
-static void dump_chunked_encoding(struct req_state* const s)
+static void dump_chunked_encoding(req_state* const s)
 {
   try {
     RESTFUL_IO(s)->send_chunked_transfer_encoding();
@@ -398,7 +398,7 @@ static void dump_chunked_encoding(struct req_state* const s)
   }
 }
 
-void dump_etag(struct req_state* const s,
+void dump_etag(req_state* const s,
                const std::string_view& etag,
                const bool quoted)
 {
@@ -413,7 +413,7 @@ void dump_etag(struct req_state* const s,
   }
 }
 
-void dump_bucket_from_state(struct req_state *s)
+void dump_bucket_from_state(req_state *s)
 {
   if (g_conf()->rgw_expose_bucket && ! s->bucket_name.empty()) {
     if (! s->bucket_tenant.empty()) {
@@ -425,7 +425,7 @@ void dump_bucket_from_state(struct req_state *s)
   }
 }
 
-void dump_redirect(struct req_state * const s, const std::string& redirect)
+void dump_redirect(req_state * const s, const std::string& redirect)
 {
   return dump_header_if_nonempty(s, "Location", redirect);
 }
@@ -446,7 +446,7 @@ static size_t dump_time_header_impl(char (&timestr)[TIME_BUF_SIZE],
                   "%a, %d %b %Y %H:%M:%S %Z", tmp);
 }
 
-void dump_time_header(struct req_state *s, const char *name, real_time t)
+void dump_time_header(req_state *s, const char *name, real_time t)
 {
   char timestr[TIME_BUF_SIZE];
 
@@ -467,12 +467,12 @@ std::string dump_time_to_str(const real_time& t)
 }
 
 
-void dump_last_modified(struct req_state *s, real_time t)
+void dump_last_modified(req_state *s, real_time t)
 {
   dump_time_header(s, "Last-Modified", t);
 }
 
-void dump_epoch_header(struct req_state *s, const char *name, real_time t)
+void dump_epoch_header(req_state *s, const char *name, real_time t)
 {
   utime_t ut(t);
   char buf[65];
@@ -483,7 +483,7 @@ void dump_epoch_header(struct req_state *s, const char *name, real_time t)
   return dump_header(s, name, std::string_view(buf, len));
 }
 
-void dump_time(struct req_state *s, const char *name, real_time t)
+void dump_time(req_state *s, const char *name, real_time t)
 {
   char buf[TIME_BUF_SIZE];
   rgw_to_iso8601(t, buf, sizeof(buf));
@@ -491,7 +491,7 @@ void dump_time(struct req_state *s, const char *name, real_time t)
   s->formatter->dump_string(name, buf);
 }
 
-void dump_owner(struct req_state *s, const rgw_user& id, const string& name,
+void dump_owner(req_state *s, const rgw_user& id, const string& name,
                const char *section)
 {
   if (!section)
@@ -502,7 +502,7 @@ void dump_owner(struct req_state *s, const rgw_user& id, const string& name,
   s->formatter->close_section();
 }
 
-void dump_access_control(struct req_state *s, const char *origin,
+void dump_access_control(req_state *s, const char *origin,
                         const char *meth,
                         const char *hdr, const char *exp_hdr,
                         uint32_t max_age) {
@@ -547,7 +547,7 @@ void dump_access_control(req_state *s, RGWOp *op)
                      exp_header.c_str(), max_age);
 }
 
-void dump_start(struct req_state *s)
+void dump_start(req_state *s)
 {
   if (!s->content_started) {
     s->formatter->output_header();
@@ -565,7 +565,7 @@ void dump_trans_id(req_state *s)
   }
 }
 
-void end_header(struct req_state* s, RGWOp* op, const char *content_type,
+void end_header(req_state* s, RGWOp* op, const char *content_type,
                const int64_t proposed_content_length, bool force_content_type,
                bool force_no_error)
 {
@@ -654,7 +654,7 @@ static void build_redirect_url(req_state *s, const string& redirect_base, string
   dest_uri += s->info.request_params;
 }
 
-void abort_early(struct req_state *s, RGWOp* op, int err_no,
+void abort_early(req_state *s, RGWOp* op, int err_no,
                 RGWHandler* handler, optional_yield y)
 {
   string error_content("");
@@ -725,7 +725,7 @@ void abort_early(struct req_state *s, RGWOp* op, int err_no,
   perfcounter->inc(l_rgw_failed_req);
 }
 
-void dump_continue(struct req_state * const s)
+void dump_continue(req_state * const s)
 {
   try {
     RESTFUL_IO(s)->send_100_continue();
@@ -735,7 +735,7 @@ void dump_continue(struct req_state * const s)
   }
 }
 
-void dump_range(struct req_state* const s,
+void dump_range(req_state* const s,
                 const uint64_t ofs,
                 const uint64_t end,
                const uint64_t total)
@@ -759,7 +759,7 @@ void dump_range(struct req_state* const s,
 }
 
 
-int dump_body(struct req_state* const s,
+int dump_body(req_state* const s,
               const char* const buf,
               const size_t len)
 {
@@ -780,17 +780,17 @@ int dump_body(struct req_state* const s,
   }
 }
 
-int dump_body(struct req_state* const s, /* const */ ceph::buffer::list& bl)
+int dump_body(req_state* const s, /* const */ ceph::buffer::list& bl)
 {
   return dump_body(s, bl.c_str(), bl.length());
 }
 
-int dump_body(struct req_state* const s, const std::string& str)
+int dump_body(req_state* const s, const std::string& str)
 {
   return dump_body(s, str.c_str(), str.length());
 }
 
-int recv_body(struct req_state* const s,
+int recv_body(req_state* const s,
               char* const buf,
               const size_t max)
 {
@@ -835,7 +835,7 @@ int RGWGetObj_ObjStore::get_params(optional_yield y)
   return 0;
 }
 
-int RESTArgs::get_string(struct req_state *s, const string& name,
+int RESTArgs::get_string(req_state *s, const string& name,
                         const string& def_val, string *val, bool *existed)
 {
   bool exists;
@@ -852,7 +852,7 @@ int RESTArgs::get_string(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_uint64(struct req_state *s, const string& name,
+int RESTArgs::get_uint64(req_state *s, const string& name,
                         uint64_t def_val, uint64_t *val, bool *existed)
 {
   bool exists;
@@ -873,7 +873,7 @@ int RESTArgs::get_uint64(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_int64(struct req_state *s, const string& name,
+int RESTArgs::get_int64(req_state *s, const string& name,
                        int64_t def_val, int64_t *val, bool *existed)
 {
   bool exists;
@@ -894,7 +894,7 @@ int RESTArgs::get_int64(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_uint32(struct req_state *s, const string& name,
+int RESTArgs::get_uint32(req_state *s, const string& name,
                         uint32_t def_val, uint32_t *val, bool *existed)
 {
   bool exists;
@@ -915,7 +915,7 @@ int RESTArgs::get_uint32(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_int32(struct req_state *s, const string& name,
+int RESTArgs::get_int32(req_state *s, const string& name,
                        int32_t def_val, int32_t *val, bool *existed)
 {
   bool exists;
@@ -936,7 +936,7 @@ int RESTArgs::get_int32(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_time(struct req_state *s, const string& name,
+int RESTArgs::get_time(req_state *s, const string& name,
                       const utime_t& def_val, utime_t *val, bool *existed)
 {
   bool exists;
@@ -961,7 +961,7 @@ int RESTArgs::get_time(struct req_state *s, const string& name,
   return 0;
 }
 
-int RESTArgs::get_epoch(struct req_state *s, const string& name, uint64_t def_val, uint64_t *epoch, bool *existed)
+int RESTArgs::get_epoch(req_state *s, const string& name, uint64_t def_val, uint64_t *epoch, bool *existed)
 {
   bool exists;
   string date = s->info.args.get(name, &exists);
@@ -981,7 +981,7 @@ int RESTArgs::get_epoch(struct req_state *s, const string& name, uint64_t def_va
   return 0;
 }
 
-int RESTArgs::get_bool(struct req_state *s, const string& name, bool def_val, bool *val, bool *existed)
+int RESTArgs::get_bool(req_state *s, const string& name, bool def_val, bool *val, bool *existed)
 {
   bool exists;
   string sval = s->info.args.get(name, &exists);
@@ -1529,7 +1529,7 @@ static std::tuple<int, bufferlist> read_all_chunked_input(req_state *s, const ui
   return std::make_tuple(0, std::move(bl));
 }
 
-std::tuple<int, bufferlist > rgw_rest_read_all_input(struct req_state *s,
+std::tuple<int, bufferlist > rgw_rest_read_all_input(req_state *s,
                                         const uint64_t max_len,
                                         const bool allow_chunked)
 {
@@ -1724,7 +1724,7 @@ void RGWHandler_REST::put_op(RGWOp* op)
   delete op;
 } /* put_op */
 
-int RGWHandler_REST::allocate_formatter(struct req_state *s,
+int RGWHandler_REST::allocate_formatter(req_state *s,
                                        int default_type,
                                        bool configurable)
 {
@@ -1760,7 +1760,7 @@ int RGWHandler_REST::allocate_formatter(struct req_state *s,
   return RGWHandler_REST::reallocate_formatter(s, type);
 }
 
-int RGWHandler_REST::reallocate_formatter(struct req_state *s, int type)
+int RGWHandler_REST::reallocate_formatter(req_state *s, int type)
 {
   if (s->format == type) {
     // do nothing, just reset
@@ -1982,7 +1982,7 @@ void RGWRESTMgr::register_default_mgr(RGWRESTMgr *mgr)
   default_mgr = mgr;
 }
 
-RGWRESTMgr* RGWRESTMgr::get_resource_mgr(struct req_state* const s,
+RGWRESTMgr* RGWRESTMgr::get_resource_mgr(req_state* const s,
                                          const std::string& uri,
                                          std::string* const out_uri)
 {
@@ -2042,7 +2042,7 @@ int64_t parse_content_length(const char *content_length)
   return len;
 }
 
-int RGWREST::preprocess(struct req_state *s, rgw::io::BasicClient* cio)
+int RGWREST::preprocess(req_state *s, rgw::io::BasicClient* cio)
 {
   req_info& info = s->info;
 
@@ -2305,7 +2305,7 @@ int RGWREST::preprocess(struct req_state *s, rgw::io::BasicClient* cio)
 
 RGWHandler_REST* RGWREST::get_handler(
   rgw::sal::Store*  const store,
-  struct req_state* const s,
+  req_state* const s,
   const rgw::auth::StrategyRegistry& auth_registry,
   const std::string& frontend_prefix,
   RGWRestfulIO* const rio,
index 4a0142fbaa0eb9b27e90e31960d42a15550d7d08..833be21ecbb76c520865ed347d34c4dd1363caa1 100644 (file)
@@ -18,10 +18,10 @@ extern std::map<std::string, std::string> rgw_to_http_attrs;
 
 extern void rgw_rest_init(CephContext *cct, const rgw::sal::ZoneGroup& zone_group);
 
-extern void rgw_flush_formatter_and_reset(struct req_state *s,
+extern void rgw_flush_formatter_and_reset(req_state *s,
                                         ceph::Formatter *formatter);
 
-extern void rgw_flush_formatter(struct req_state *s,
+extern void rgw_flush_formatter(req_state *s,
                                ceph::Formatter *formatter);
 
 inline std::string_view rgw_sanitized_hdrval(ceph::buffer::list& raw)
@@ -75,39 +75,39 @@ 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 std::string& name,
+  static int get_string(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 std::string& name,
+  static int get_uint64(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 std::string& name,
+  static int get_int64(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 std::string& name,
+  static int get_uint32(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 std::string& name,
+  static int get_int32(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 std::string& name,
+  static int get_time(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 std::string& name,
+  static int get_epoch(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 std::string& name, bool def_val,
+  static int get_bool(req_state *s, const std::string& name, bool def_val,
                      bool *val, bool *existed = NULL);
 };
 
 class RGWRESTFlusher : public RGWFormatterFlusher {
-  struct req_state *s;
+  req_state *s;
   RGWOp *op;
 protected:
   void do_flush() override;
   void do_start(int ret) override;
 public:
-  RGWRESTFlusher(struct req_state *_s, RGWOp *_op) :
+  RGWRESTFlusher(req_state *_s, RGWOp *_op) :
     RGWFormatterFlusher(_s->formatter), s(_s), op(_op) {}
   RGWRESTFlusher() : RGWFormatterFlusher(NULL), s(NULL), op(NULL) {}
 
-  void init(struct req_state *_s, RGWOp *_op) {
+  void init(req_state *_s, RGWOp *_op) {
     s = _s;
     op = _op;
     set_formatter(s->formatter);
@@ -121,7 +121,7 @@ protected:
 public:
   RGWGetObj_ObjStore() : sent_header(false) {}
 
-  void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override {
+  void init(rgw::sal::Store* store, req_state *s, RGWHandler *h) override {
     RGWGetObj::init(store, s, h);
     sent_header = false;
   }
@@ -522,7 +522,7 @@ protected:
   RGWRESTFlusher flusher;
 
 public:
-  void init(rgw::sal::Store* store, struct req_state *s,
+  void init(rgw::sal::Store* store, req_state *s,
             RGWHandler *dialect_handler) override {
     RGWOp::init(store, s, dialect_handler);
     flusher.init(s, this);
@@ -547,7 +547,7 @@ protected:
   virtual RGWOp *op_options() { return NULL; }
 
 public:
-  static int allocate_formatter(struct req_state *s, int default_formatter,
+  static int allocate_formatter(req_state *s, int default_formatter,
                                bool configurable);
 
   static constexpr int MAX_BUCKET_NAME_LEN = 255;
@@ -558,7 +558,7 @@ public:
 
   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);
+  static int reallocate_formatter(req_state *s, int type);
 
   int init_permissions(RGWOp* op, optional_yield y) override;
   int read_permissions(RGWOp* op, optional_yield y) override;
@@ -585,11 +585,11 @@ protected:
   std::multimap<size_t, std::string> resources_by_size;
   RGWRESTMgr* default_mgr;
 
-  virtual RGWRESTMgr* get_resource_mgr(struct req_state* s,
+  virtual RGWRESTMgr* get_resource_mgr(req_state* s,
                                        const std::string& uri,
                                        std::string* out_uri);
 
-  virtual RGWRESTMgr* get_resource_mgr_as_default(struct req_state* const s,
+  virtual RGWRESTMgr* get_resource_mgr_as_default(req_state* const s,
                                                   const std::string& uri,
                                                   std::string* our_uri) {
     return this;
@@ -605,7 +605,7 @@ public:
   void register_resource(std::string resource, RGWRESTMgr* mgr);
   void register_default_mgr(RGWRESTMgr* mgr);
 
-  virtual RGWRESTMgr* get_manager(struct req_state* const s,
+  virtual RGWRESTMgr* get_manager(req_state* const s,
                                   /* Prefix to be concatenated with @uri
                                    * during the lookup. */
                                   const std::string& frontend_prefix,
@@ -616,7 +616,7 @@ public:
 
   virtual RGWHandler_REST* get_handler(
     rgw::sal::Store* store,
-    struct req_state* const s,
+    req_state* const s,
     const rgw::auth::StrategyRegistry& auth_registry,
     const std::string& frontend_prefix
   ) {
@@ -644,18 +644,18 @@ class RGWREST {
   boost::container::flat_set<x_header> x_headers;
   RGWRESTMgr mgr;
 
-  static int preprocess(struct req_state *s, rgw::io::BasicClient* rio);
+  static int preprocess(req_state *s, rgw::io::BasicClient* rio);
 public:
   RGWREST() {}
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                               struct req_state *s,
+                               req_state *s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix,
                                RGWRestfulIO *rio,
                                RGWRESTMgr **pmgr,
                                int *init_error);
 #if 0
-  RGWHandler *get_handler(RGWRados *store, struct req_state *s,
+  RGWHandler *get_handler(RGWRados *store, req_state *s,
                          RGWLibIO *io, RGWRESTMgr **pmgr,
                          int *init_error);
 #endif
@@ -692,34 +692,34 @@ static constexpr int64_t CHUNKED_TRANSFER_ENCODING = -2;
 
 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,
+extern void dump_errno(req_state *s);
+extern void dump_errno(req_state *s, int http_ret);
+extern void end_header(req_state *s,
                        RGWOp* op = nullptr,
                        const char *content_type = nullptr,
                        const int64_t proposed_content_length =
                       NO_CONTENT_LENGTH,
                       bool force_content_type = false,
                       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,
+extern void dump_start(req_state *s);
+extern void list_all_buckets_start(req_state *s);
+extern void dump_owner(req_state *s, const rgw_user& id,
                        const std::string& name, const char *section = NULL);
-extern void dump_header(struct req_state* s,
+extern void dump_header(req_state* s,
                         const std::string_view& name,
                         const std::string_view& val);
-extern void dump_header(struct req_state* s,
+extern void dump_header(req_state* s,
                         const std::string_view& name,
                         ceph::buffer::list& bl);
-extern void dump_header(struct req_state* s,
+extern void dump_header(req_state* s,
                         const std::string_view& name,
                         long long val);
-extern void dump_header(struct req_state* s,
+extern void dump_header(req_state* s,
                         const std::string_view& name,
                         const utime_t& val);
 
 template <class... Args>
-inline void dump_header_prefixed(struct req_state* s,
+inline void dump_header_prefixed(req_state* s,
                                 const std::string_view& name_prefix,
                                 const std::string_view& name,
                                 Args&&... args) {
@@ -734,7 +734,7 @@ inline void dump_header_prefixed(struct req_state* s,
 }
 
 template <class... Args>
-inline void dump_header_infixed(struct req_state* s,
+inline void dump_header_infixed(req_state* s,
                                const std::string_view& prefix,
                                const std::string_view& infix,
                                const std::string_view& sufix,
@@ -752,7 +752,7 @@ inline void dump_header_infixed(struct req_state* s,
 }
 
 template <class... Args>
-inline void dump_header_quoted(struct req_state* s,
+inline void dump_header_quoted(req_state* s,
                               const std::string_view& name,
                               const std::string_view& val) {
   /* We need two extra bytes for quotes. */
@@ -763,7 +763,7 @@ inline void dump_header_quoted(struct req_state* s,
 }
 
 template <class ValueT>
-inline void dump_header_if_nonempty(struct req_state* s,
+inline void dump_header_if_nonempty(req_state* s,
                                    const std::string_view& name,
                                    const ValueT& value) {
   if (name.length() > 0 && value.length() > 0) {
@@ -771,7 +771,7 @@ inline void dump_header_if_nonempty(struct req_state* s,
   }
 }
 
-inline std::string compute_domain_uri(const struct req_state *s) {
+inline std::string compute_domain_uri(const req_state *s) {
   std::string uri = (!s->info.domain.empty()) ? s->info.domain :
     [&s]() -> std::string {
     RGWEnv const &env(*(s->info.env));
@@ -787,32 +787,32 @@ inline std::string compute_domain_uri(const struct req_state *s) {
   return uri;
 }
 
-extern void dump_content_length(struct req_state *s, uint64_t len);
+extern void dump_content_length(req_state *s, uint64_t len);
 extern int64_t parse_content_length(const char *content_length);
-extern void dump_etag(struct req_state *s,
+extern void dump_etag(req_state *s,
                       const std::string_view& etag,
                       bool quoted = false);
-extern void dump_epoch_header(struct req_state *s, const char *name, real_time t);
-extern void dump_time_header(struct req_state *s, const char *name, real_time t);
-extern void dump_last_modified(struct req_state *s, real_time t);
-extern void abort_early(struct req_state* s, RGWOp* op, int err,
+extern void dump_epoch_header(req_state *s, const char *name, real_time t);
+extern void dump_time_header(req_state *s, const char *name, real_time t);
+extern void dump_last_modified(req_state *s, real_time t);
+extern void abort_early(req_state* s, RGWOp* op, int err,
                        RGWHandler* handler, optional_yield y);
-extern void dump_range(struct req_state* s, uint64_t ofs, uint64_t end,
+extern void dump_range(req_state* s, uint64_t ofs, uint64_t end,
                       uint64_t total_size);
-extern void dump_continue(struct req_state *s);
-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 void dump_continue(req_state *s);
+extern void list_all_buckets_end(req_state *s);
+extern void dump_time(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 std::string& redirect);
+extern void dump_bucket_from_state(req_state *s);
+extern void dump_redirect(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,
+extern void dump_access_control(req_state *s, const char *origin,
                                const char *meth,
                                const char *hdr, const char *exp_hdr,
                                uint32_t max_age);
 extern void dump_access_control(req_state *s, RGWOp *op);
 
-extern int dump_body(struct req_state* s, const char* buf, size_t len);
-extern int dump_body(struct req_state* s, /* const */ ceph::buffer::list& bl);
-extern int dump_body(struct req_state* s, const std::string& str);
-extern int recv_body(struct req_state* s, char* buf, size_t max);
+extern int dump_body(req_state* s, const char* buf, size_t len);
+extern int dump_body(req_state* s, /* const */ ceph::buffer::list& bl);
+extern int dump_body(req_state* s, const std::string& str);
+extern int recv_body(req_state* s, char* buf, size_t max);
index e22fc0576ae215314acadad5b56fd265b5013b44..3f3d5a6ba9b639aa94b6035d60ec7a776cd049e8 100644 (file)
@@ -28,7 +28,7 @@ public:
   ~RGWRESTMgr_Bucket() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Bucket(auth_registry);
index f79f811dd534e4c94d24bfeca256270c0d42cdd9..ac1cde433d17d316731d2855c357ab765bea8170 100644 (file)
@@ -80,7 +80,7 @@ public:
   ~RGWRESTMgr_Config() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* ,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Config(auth_registry);
index f63018d189b3b9dd723e68dc8a5f15ca661ec5d2..7389cc6f011a50556c2a4154b7f6b743323b0dc3 100644 (file)
@@ -92,7 +92,7 @@ RGWOp *RGWHandler_REST_IAM::op_post()
 }
 
 int RGWHandler_REST_IAM::init(rgw::sal::Store* store,
-                              struct req_state *s,
+                              req_state *s,
                               rgw::io::BasicClient *cio)
 {
   s->dialect = "iam";
@@ -110,7 +110,7 @@ int RGWHandler_REST_IAM::authorize(const DoutPrefixProvider* dpp, optional_yield
   return RGW_Auth_S3::authorize(dpp, store, auth_registry, s, y);
 }
 
-int RGWHandler_REST_IAM::init_from_header(struct req_state* s,
+int RGWHandler_REST_IAM::init_from_header(req_state* s,
                                           int default_formatter,
                                           bool configurable_format)
 {
@@ -154,7 +154,7 @@ int RGWHandler_REST_IAM::init_from_header(struct req_state* s,
 
 RGWHandler_REST*
 RGWRESTMgr_IAM::get_handler(rgw::sal::Store* store,
-                           struct req_state* const s,
+                           req_state* const s,
                            const rgw::auth::StrategyRegistry& auth_registry,
                            const std::string& frontend_prefix)
 {
index d2421b603210a9b894f78f661a9ab5bbe262426b..93bcc58d82f19c771ef729c6df578b9e989376b5 100644 (file)
@@ -14,7 +14,7 @@ class RGWHandler_REST_IAM : public RGWHandler_REST {
   void rgw_iam_parse_input();
 public:
 
-  static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format);
+  static int init_from_header(req_state *s, int default_formatter, bool configurable_format);
 
   RGWHandler_REST_IAM(const rgw::auth::StrategyRegistry& auth_registry,
                      bufferlist& bl_post_body)
@@ -24,7 +24,7 @@ public:
   ~RGWHandler_REST_IAM() override = default;
 
   int init(rgw::sal::Store* store,
-           struct req_state *s,
+           req_state *s,
            rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider* dpp, optional_yield y) override;
   int postauth_init(optional_yield y) override { return 0; }
@@ -35,14 +35,14 @@ public:
   RGWRESTMgr_IAM() = default;
   ~RGWRESTMgr_IAM() override = default;
 
-  RGWRESTMgr *get_resource_mgr(struct req_state* const s,
+  RGWRESTMgr *get_resource_mgr(req_state* const s,
                                const std::string& uri,
                                std::string* const out_uri) override {
     return this;
   }
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override;
 };
index 4beb65d8076decdd8bfe317188d723780ec5de4e..f109af01f65d4c71dc56d172381aa607048f4be7 100644 (file)
@@ -25,7 +25,7 @@ public:
   ~RGWRESTMgr_Info() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Info(auth_registry);
index 0838a0e510b87533c152f801a4242f1a19a06c2f..3232f03ca6854da29da7b19d7d0fb487e460fa16 100644 (file)
@@ -327,7 +327,7 @@ public:
   ~RGWRESTMgr_Log() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state* const,
+                              req_state* const,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefixs) override {
     return new RGWHandler_Log(auth_registry);
index dd512c8ea768f16dcbe4b4c1b0ace64535de18c1..9dc29953a05ee8d30d4e20c3d955fc2cca7e30ab 100644 (file)
@@ -99,7 +99,7 @@ public:
   ~RGWRESTMgr_Metadata() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state* const s,
+                              req_state* const s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override {
     return new RGWHandler_Metadata(auth_registry);
index e1f14a594f1777b6956203edb90f31cda4e10a8d..0f2f594203b483cbd69a8cdbf4ea9198e3ceddc2 100644 (file)
@@ -26,7 +26,7 @@ public:
   ~RGWRESTMgr_Ratelimit() override = default;
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Ratelimit(auth_registry);
index 9e318ef400ae043f44beaf2ff0488982e94811af..771355dee1152ed17a99148f663428ea18d8e951 100644 (file)
@@ -251,7 +251,7 @@ class RGWHandler_Period : public RGWHandler_Auth_S3 {
 class RGWRESTMgr_Period : public RGWRESTMgr {
  public:
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Period(auth_registry);
@@ -368,7 +368,7 @@ RGWRESTMgr_Realm::RGWRESTMgr_Realm()
 
 RGWHandler_REST*
 RGWRESTMgr_Realm::get_handler(rgw::sal::Store* store,
-                             struct req_state*,
+                             req_state*,
                               const rgw::auth::StrategyRegistry& auth_registry,
                               const std::string&)
 {
index 7800f91f896b4dc9daab69f9baebd959ba9c24dc..aa9aa423fd10da51e76aba475e8952a1211b7af4 100644 (file)
@@ -10,7 +10,7 @@ public:
   RGWRESTMgr_Realm();
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override;
 };
index 7020e3f18cbc86227d48080e0ae5cdf1e8c6b150..4f90abb914a4d7ddea3466f4d00afd0bf0dcd975 100644 (file)
@@ -79,17 +79,17 @@ using namespace std;
 using namespace rgw;
 using namespace ceph::crypto;
 
-void list_all_buckets_start(struct req_state *s)
+void list_all_buckets_start(req_state *s)
 {
   s->formatter->open_array_section_in_ns("ListAllMyBucketsResult", XMLNS_AWS_S3);
 }
 
-void list_all_buckets_end(struct req_state *s)
+void list_all_buckets_end(req_state *s)
 {
   s->formatter->close_section();
 }
 
-void dump_bucket(struct req_state *s, rgw::sal::Bucket& obj)
+void dump_bucket(req_state *s, rgw::sal::Bucket& obj)
 {
   s->formatter->open_object_section("Bucket");
   s->formatter->dump_string("Name", obj.get_name());
@@ -111,7 +111,7 @@ void rgw_get_errno_s3(rgw_http_error *e , int err_no)
 }
 
 static inline std::string get_s3_expiration_header(
-  struct req_state* s,
+  req_state* s,
   const ceph::real_time& mtime)
 {
   return rgw::lc::s3_expiration_header(
@@ -119,7 +119,7 @@ static inline std::string get_s3_expiration_header(
 }
 
 static inline bool get_s3_multipart_abort_header(
-  struct req_state* s, const ceph::real_time& mtime,
+  req_state* s, const ceph::real_time& mtime,
   ceph::real_time& date, std::string& rule_id)
 {
   return rgw::lc::s3_multipart_abort_header(
@@ -2266,7 +2266,7 @@ void RGWGetBucketWebsite_ObjStore_S3::send_response()
   rgw_flush_formatter_and_reset(s, s->formatter);
 }
 
-static void dump_bucket_metadata(struct req_state *s, rgw::sal::Bucket* bucket)
+static void dump_bucket_metadata(req_state *s, rgw::sal::Bucket* bucket)
 {
   dump_header(s, "X-RGW-Object-Count", static_cast<long long>(bucket->get_count()));
   dump_header(s, "X-RGW-Bytes-Used", static_cast<long long>(bucket->get_size()));
@@ -2294,7 +2294,7 @@ void RGWStatBucket_ObjStore_S3::send_response()
   dump_start(s);
 }
 
-static int create_s3_policy(struct req_state *s, rgw::sal::Store* store,
+static int create_s3_policy(req_state *s, rgw::sal::Store* store,
                            RGWAccessControlPolicy_S3& s3policy,
                            ACLOwner& owner)
 {
@@ -2463,7 +2463,7 @@ void RGWDeleteBucket_ObjStore_S3::send_response()
   end_header(s, this);
 }
 
-static inline void map_qs_metadata(struct req_state* s, bool crypto_too)
+static inline void map_qs_metadata(req_state* s, bool crypto_too)
 {
   /* merge S3 valid user metadata from the query-string into
    * x_meta_map, which maps them to attributes */
@@ -3508,7 +3508,7 @@ int RGWPutACLs_ObjStore_S3::get_params(optional_yield y)
 }
 
 int RGWPutACLs_ObjStore_S3::get_policy_from_state(rgw::sal::Store* store,
-                                                 struct req_state *s,
+                                                 req_state *s,
                                                  stringstream& ss)
 {
   RGWAccessControlPolicy_S3 s3policy(s->cct);
@@ -4743,7 +4743,7 @@ RGWOp *RGWHandler_REST_Obj_S3::op_options()
 }
 
 int RGWHandler_REST_S3::init_from_header(rgw::sal::Store* store,
-                                        struct req_state* s,
+                                        req_state* s,
                                         int default_formatter,
                                         bool configurable_format)
 {
@@ -4897,7 +4897,7 @@ int RGWHandler_REST_S3::postauth_init(optional_yield y)
   return 0;
 }
 
-int RGWHandler_REST_S3::init(rgw::sal::Store* store, struct req_state *s,
+int RGWHandler_REST_S3::init(rgw::sal::Store* store, req_state *s,
                              rgw::io::BasicClient *cio)
 {
   int ret;
@@ -5009,7 +5009,7 @@ discover_aws_flavour(const req_info& info)
 int RGW_Auth_S3::authorize(const DoutPrefixProvider *dpp,
                            rgw::sal::Store* const store,
                            const rgw::auth::StrategyRegistry& auth_registry,
-                           struct req_state* const s, optional_yield y)
+                           req_state* const s, optional_yield y)
 {
 
   /* neither keystone and rados enabled; warn and exit! */
@@ -5029,7 +5029,7 @@ int RGW_Auth_S3::authorize(const DoutPrefixProvider *dpp,
   return ret;
 }
 
-int RGWHandler_Auth_S3::init(rgw::sal::Store* store, struct req_state *state,
+int RGWHandler_Auth_S3::init(rgw::sal::Store* store, req_state *state,
                              rgw::io::BasicClient *cio)
 {
   int ret = RGWHandler_REST_S3::init_from_header(store, state, RGW_FORMAT_JSON, true);
@@ -5040,7 +5040,7 @@ int RGWHandler_Auth_S3::init(rgw::sal::Store* store, struct req_state *state,
 }
 
 RGWHandler_REST* RGWRESTMgr_S3::get_handler(rgw::sal::Store* store,
-                                           struct req_state* const s,
+                                           req_state* const s,
                                             const rgw::auth::StrategyRegistry& auth_registry,
                                             const std::string& frontend_prefix)
 {
index d9d60376d0728290ad6e64cba1ad7db89998829f..a4c9c893c1b1d75c2543b473ee715077adf46ec9 100644 (file)
@@ -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, std::stringstream& ss) override;
+  int get_policy_from_state(rgw::sal::Store* store, req_state *s, std::stringstream& ss) override;
   void send_response() override;
   int get_params(optional_yield y) override;
 };
@@ -617,7 +617,7 @@ public:
   static int authorize(const DoutPrefixProvider *dpp,
                        rgw::sal::Store* store,
                        const rgw::auth::StrategyRegistry& auth_registry,
-                       struct req_state *s, optional_yield y);
+                       req_state *s, optional_yield y);
 };
 
 class RGWHandler_Auth_S3 : public RGWHandler_REST {
@@ -636,7 +636,7 @@ public:
   static int validate_object_name(const std::string& bucket);
 
   int init(rgw::sal::Store* store,
-           struct req_state *s,
+           req_state *s,
            rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider *dpp, optional_yield y) override {
     return RGW_Auth_S3::authorize(dpp, store, auth_registry, s, y);
@@ -649,7 +649,7 @@ class RGWHandler_REST_S3 : public RGWHandler_REST {
 protected:
   const rgw::auth::StrategyRegistry& auth_registry;
 public:
-  static int init_from_header(rgw::sal::Store* store, struct req_state *s, int default_formatter, bool configurable_format);
+  static int init_from_header(rgw::sal::Store* store, req_state *s, int default_formatter, bool configurable_format);
 
   explicit RGWHandler_REST_S3(const rgw::auth::StrategyRegistry& auth_registry)
     : RGWHandler_REST(),
@@ -658,7 +658,7 @@ public:
   ~RGWHandler_REST_S3() override = default;
 
   int init(rgw::sal::Store* store,
-           struct req_state *s,
+           req_state *s,
            rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider *dpp, optional_yield y) override;
   int postauth_init(optional_yield y) override;
@@ -793,7 +793,7 @@ public:
   ~RGWRESTMgr_S3() override = default;
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state* s,
+                              req_state* s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override;
 };
index 093c92d3633ea5e2c5d16eb4a67e9dc6ffc6d0eb..bd1b842f8cf991d1c76d063c4ab6f1814068829d 100644 (file)
@@ -743,7 +743,7 @@ void RGWSTSAssumeRole::execute(optional_yield y)
 int RGW_Auth_STS::authorize(const DoutPrefixProvider *dpp,
                             rgw::sal::Store* store,
                             const rgw::auth::StrategyRegistry& auth_registry,
-                            struct req_state *s, optional_yield y)
+                            req_state *s, optional_yield y)
 {
   return rgw::auth::Strategy::apply(dpp, auth_registry.get_sts(), s, y);
 }
@@ -788,7 +788,7 @@ RGWOp *RGWHandler_REST_STS::op_post()
 }
 
 int RGWHandler_REST_STS::init(rgw::sal::Store* store,
-                              struct req_state *s,
+                              req_state *s,
                               rgw::io::BasicClient *cio)
 {
   s->dialect = "sts";
@@ -809,7 +809,7 @@ int RGWHandler_REST_STS::authorize(const DoutPrefixProvider* dpp, optional_yield
   return RGW_Auth_S3::authorize(dpp, store, auth_registry, s, y);
 }
 
-int RGWHandler_REST_STS::init_from_header(struct req_state* s,
+int RGWHandler_REST_STS::init_from_header(req_state* s,
                                           int default_formatter,
                                           bool configurable_format)
 {
@@ -853,7 +853,7 @@ int RGWHandler_REST_STS::init_from_header(struct req_state* s,
 
 RGWHandler_REST*
 RGWRESTMgr_STS::get_handler(rgw::sal::Store* store,
-                           struct req_state* const s,
+                           req_state* const s,
                            const rgw::auth::StrategyRegistry& auth_registry,
                            const std::string& frontend_prefix)
 {
index 54f0cfff9f895fde98ff17633c8b47c204796b28..3a3abdf26e8b00a80f7b7e5d34e25d02679c5a91 100644 (file)
@@ -194,7 +194,7 @@ public:
   static int authorize(const DoutPrefixProvider *dpp,
                        rgw::sal::Store* store,
                        const rgw::auth::StrategyRegistry& auth_registry,
-                       struct req_state *s, optional_yield y);
+                       req_state *s, optional_yield y);
 };
 
 class RGWHandler_REST_STS : public RGWHandler_REST {
@@ -204,7 +204,7 @@ class RGWHandler_REST_STS : public RGWHandler_REST {
   void rgw_sts_parse_input();
 public:
 
-  static int init_from_header(struct req_state *s, int default_formatter, bool configurable_format);
+  static int init_from_header(req_state *s, int default_formatter, bool configurable_format);
 
   RGWHandler_REST_STS(const rgw::auth::StrategyRegistry& auth_registry, const std::string& post_body="")
     : RGWHandler_REST(),
@@ -213,7 +213,7 @@ public:
   ~RGWHandler_REST_STS() override = default;
 
   int init(rgw::sal::Store* store,
-           struct req_state *s,
+           req_state *s,
            rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider* dpp, optional_yield y) override;
   int postauth_init(optional_yield y) override { return 0; }
@@ -224,14 +224,14 @@ public:
   RGWRESTMgr_STS() = default;
   ~RGWRESTMgr_STS() override = default;
   
-  RGWRESTMgr *get_resource_mgr(struct req_state* const s,
+  RGWRESTMgr *get_resource_mgr(req_state* const s,
                                const std::string& uri,
                                std::string* const out_uri) override {
     return this;
   }
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override;
 };
index 858397079b1bbec280897e05b26bb46eca731f4f..15647ec0f80d55ebb2fe570d9b4179fb25915fa9 100644 (file)
@@ -85,7 +85,7 @@ int RGWListBuckets_ObjStore_SWIFT::get_params(optional_yield y)
   return 0;
 }
 
-static void dump_account_metadata(struct req_state * const s,
+static void dump_account_metadata(req_state * const s,
                                   const RGWUsageStats& global_stats,
                                   const std::map<std::string, RGWUsageStats> &policies_stats,
                                   /* const */map<string, bufferlist>& attrs,
@@ -341,7 +341,7 @@ int RGWListBucket_ObjStore_SWIFT::get_params(optional_yield y)
   return 0;
 }
 
-static void dump_container_metadata(struct req_state *,
+static void dump_container_metadata(req_state *,
                                     const rgw::sal::Bucket*,
                                     const RGWQuotaInfo&,
                                     const RGWBucketWebsiteConf&);
@@ -451,7 +451,7 @@ next:
   rgw_flush_formatter_and_reset(s, s->formatter);
 } // RGWListBucket_ObjStore_SWIFT::send_response
 
-static void dump_container_metadata(struct req_state *s,
+static void dump_container_metadata(req_state *s,
                                     const rgw::sal::Bucket* bucket,
                                     const RGWQuotaInfo& quota,
                                     const RGWBucketWebsiteConf& ws_conf)
@@ -1311,7 +1311,7 @@ static void get_contype_from_attrs(map<string, bufferlist>& attrs,
   }
 }
 
-static void dump_object_metadata(const DoutPrefixProvider* dpp, struct req_state * const s,
+static void dump_object_metadata(const DoutPrefixProvider* dpp, req_state * const s,
                                 const map<string, bufferlist>& attrs)
 {
   map<string, string> response_attrs;
@@ -2904,7 +2904,7 @@ static void next_tok(string& str, string& tok, char delim)
 }
 
 int RGWHandler_REST_SWIFT::init_from_header(rgw::sal::Store* store,
-                                           struct req_state* const s,
+                                           req_state* const s,
                                             const std::string& frontend_prefix)
 {
   string req;
@@ -3029,7 +3029,7 @@ int RGWHandler_REST_SWIFT::init_from_header(rgw::sal::Store* store,
   return 0;
 }
 
-int RGWHandler_REST_SWIFT::init(rgw::sal::Store* store, struct req_state* s,
+int RGWHandler_REST_SWIFT::init(rgw::sal::Store* store, req_state* s,
                                rgw::io::BasicClient *cio)
 {
   struct req_init_state *t = &s->init_state;
@@ -3077,7 +3077,7 @@ int RGWHandler_REST_SWIFT::init(rgw::sal::Store* store, struct req_state* s,
 
 RGWHandler_REST*
 RGWRESTMgr_SWIFT::get_handler(rgw::sal::Store* store,
-                             struct req_state* const s,
+                             req_state* const s,
                               const rgw::auth::StrategyRegistry& auth_registry,
                               const std::string& frontend_prefix)
 {
@@ -3102,7 +3102,7 @@ RGWRESTMgr_SWIFT::get_handler(rgw::sal::Store* store,
 
 RGWHandler_REST* RGWRESTMgr_SWIFT_Info::get_handler(
   rgw::sal::Store* store,
-  struct req_state* const s,
+  req_state* const s,
   const rgw::auth::StrategyRegistry& auth_registry,
   const std::string& frontend_prefix)
 {
index e799a44c65ba60bba8aba0fb83c259920fe83543..a6e0bd90d9ff206c2a8848016d2139c4cb24fec2 100644 (file)
@@ -385,7 +385,7 @@ protected:
     return false;
   }
 
-  static int init_from_header(rgw::sal::Store* store, struct req_state* s,
+  static int init_from_header(rgw::sal::Store* store, req_state* s,
                               const std::string& frontend_prefix);
 public:
   explicit RGWHandler_REST_SWIFT(const rgw::auth::Strategy& auth_strategy)
@@ -395,7 +395,7 @@ public:
 
   int validate_bucket_name(const std::string& bucket);
 
-  int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override;
+  int init(rgw::sal::Store* store, req_state *s, rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider *dpp, optional_yield y) override;
   int postauth_init(optional_yield y) override;
 
@@ -444,7 +444,7 @@ public:
   }
 
   int init(rgw::sal::Store* const store,
-           struct req_state* const s,
+           req_state* const s,
            rgw::io::BasicClient* const cio) override {
     website_handler = boost::in_place<RGWSwiftWebsiteHandler>(store, s, this);
     return RGWHandler_REST_SWIFT::init(store, s, cio);
@@ -483,7 +483,7 @@ public:
   }
 
   int init(rgw::sal::Store* const store,
-           struct req_state* const s,
+           req_state* const s,
            rgw::io::BasicClient* const cio) override {
     website_handler = boost::in_place<RGWSwiftWebsiteHandler>(store, s, this);
     return RGWHandler_REST_SWIFT::init(store, s, cio);
@@ -492,7 +492,7 @@ public:
 
 class RGWRESTMgr_SWIFT : public RGWRESTMgr {
 protected:
-  RGWRESTMgr* get_resource_mgr_as_default(struct req_state* const s,
+  RGWRESTMgr* get_resource_mgr_as_default(req_state* const s,
                                           const std::string& uri,
                                           std::string* const out_uri) override {
     return this->get_resource_mgr(s, uri, out_uri);
@@ -503,7 +503,7 @@ public:
   ~RGWRESTMgr_SWIFT() override = default;
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state *s,
+                              req_state *s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override;
 };
@@ -537,7 +537,7 @@ public:
   }
 
   int init(rgw::sal::Store* const store,
-           struct req_state* const state,
+           req_state* const state,
            rgw::io::BasicClient* const cio) override {
     state->dialect = "swift";
     state->formatter = new JSONFormatter;
@@ -564,7 +564,7 @@ public:
 
 class RGWRESTMgr_SWIFT_CrossDomain : public RGWRESTMgr {
 protected:
-  RGWRESTMgr *get_resource_mgr(struct req_state* const s,
+  RGWRESTMgr *get_resource_mgr(req_state* const s,
                                const std::string& uri,
                                std::string* const out_uri) override {
     return this;
@@ -575,7 +575,7 @@ public:
   ~RGWRESTMgr_SWIFT_CrossDomain() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state* const s,
+                              req_state* const s,
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override {
     s->prot_flags |= RGW_REST_SWIFT;
@@ -594,7 +594,7 @@ public:
   }
 
   int init(rgw::sal::Store* const store,
-           struct req_state* const state,
+           req_state* const state,
            rgw::io::BasicClient* const cio) override {
     state->dialect = "swift";
     state->formatter = new JSONFormatter;
@@ -621,7 +621,7 @@ public:
 
 class RGWRESTMgr_SWIFT_HealthCheck : public RGWRESTMgr {
 protected:
-  RGWRESTMgr *get_resource_mgr(struct req_state* const s,
+  RGWRESTMgr *get_resource_mgr(req_state* const s,
                                const std::string& uri,
                                std::string* const out_uri) override {
     return this;
@@ -632,7 +632,7 @@ public:
   ~RGWRESTMgr_SWIFT_HealthCheck() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state* const s,
+                              req_state* const s,
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override {
     s->prot_flags |= RGW_REST_SWIFT;
@@ -651,7 +651,7 @@ public:
   }
 
   int init(rgw::sal::Store* const store,
-           struct req_state* const state,
+           req_state* const state,
            rgw::io::BasicClient* const cio) override {
     state->dialect = "swift";
     state->formatter = new JSONFormatter;
@@ -679,7 +679,7 @@ public:
   ~RGWRESTMgr_SWIFT_Info() override = default;
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state* s,
+                              req_state* s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override;
 };
index e7195cd31e83503ab3e510ebb83dc60b62a32cea..a6c1a8493cb9349117c05dc4d1d4e0db609f254b 100644 (file)
@@ -26,7 +26,7 @@ public:
   ~RGWRESTMgr_Usage() override = default;
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_Usage(auth_registry);
index d3e3e1627bb2f0114164661aa769528ac45bf8f8..d094df745dcfbc80c8e31787c7d4c65275f2f1f1 100644 (file)
@@ -28,7 +28,7 @@ public:
   ~RGWRESTMgr_User() override = default;
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string&) override {
     return new RGWHandler_User(auth_registry);
index 9174c04908fe39661ea769792f5b5380ca3d1cbc..8fffbfbade5e6c53a4bf550c360c2a4d2cc4c5e3 100644 (file)
@@ -41,7 +41,7 @@ class aws_response_handler
 
 private:
   std::string sql_result;
-  struct req_state* s;
+  req_state* s;
   uint32_t header_size;
   // the parameters are according to CRC-32 algorithm and its aligned with AWS-cli checksum
   boost::crc_optimal<32, 0x04C11DB7, 0xFFFFFFFF, 0xFFFFFFFF, true, true> crc32;
@@ -82,7 +82,7 @@ private:
   int create_message(u_int32_t header_len);
 
 public:
-  aws_response_handler(struct req_state* ps, RGWOp* rgwop) : s(ps), m_rgwop(rgwop), total_bytes_returned{0}, processed_size{0}
+  aws_response_handler(req_state* ps, RGWOp* rgwop) : s(ps), m_rgwop(rgwop), total_bytes_returned{0}, processed_size{0}
   {}
 
   aws_response_handler() : s(nullptr), m_rgwop(nullptr), total_bytes_returned{0}, processed_size{0}
@@ -96,7 +96,7 @@ public:
     return true;
   }
 
-  void set(struct req_state* ps, RGWOp* rgwop)
+  void set(req_state* ps, RGWOp* rgwop)
   {
     s = ps;
     m_rgwop = rgwop;
index 7da18bbe7be2ae2ac2ff905c998712446b752063..0fcb6b005d09605d5d5840ea462d86d9831f0d35 100644 (file)
@@ -341,7 +341,7 @@ class Store {
      /** Get a @a Notification object.  Used to communicate with non-RGW daemons, such as
       * management/tracking software */
     /** RGWOp variant */
-    virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
+    virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s,
         rgw::notify::EventType event_type, const std::string* object_name=nullptr) = 0;
     /** No-req_state variant (e.g., rgwlc) */
     virtual std::unique_ptr<Notification> get_notification(
index 9cebbc81e0df917827333364ec19645e09ee10bf..76adbaee3a627ea65de02f4e4b000a240baa837c 100644 (file)
@@ -1809,7 +1809,7 @@ namespace rgw::sal {
   }
 
   std::unique_ptr<Notification> DBStore::get_notification(
-    rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
+    rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s,
     rgw::notify::EventType event_type, const std::string* object_name)
   {
     return std::make_unique<DBNotification>(obj, src_obj, event_type);
index b3b92db63e9da94a60041689780a3d4c0fe555e2..c3d956cbdc3573eb4ec5b5b934f2c2c8bcb701f2 100644 (file)
@@ -778,7 +778,7 @@ public:
       virtual std::unique_ptr<Completions> get_completions(void) override;
 
   virtual std::unique_ptr<Notification> get_notification(
-    rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
+    rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s,
     rgw::notify::EventType event_type, const std::string* object_name) override;
 
   virtual std::unique_ptr<Notification> get_notification(
index 5623b2efa2813de46b54398a48983ae1725b43f8..deb129624fcded90678174301b96e2e77af215ba 100644 (file)
@@ -2969,7 +2969,7 @@ std::unique_ptr<Completions> MotrStore::get_completions(void)
   return 0;
 }
 
-std::unique_ptr<Notification> MotrStore::get_notification(Object* obj, Object* src_obj, struct req_state* s,
+std::unique_ptr<Notification> MotrStore::get_notification(Object* obj, Object* src_obj, req_state* s,
     rgw::notify::EventType event_type, const string* object_name)
 {
   return std::make_unique<MotrNotification>(obj, src_obj, event_type);
index 872393b6cafe6f28c00303194b70dc355e0804f7..c87053903339df38c1086f1041771299a8b37112 100644 (file)
@@ -925,7 +925,7 @@ class MotrStore : public Store {
     virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
     virtual std::unique_ptr<Completions> get_completions(void) override;
     virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj,
-        struct req_state* s, rgw::notify::EventType event_type, const std::string* object_name=nullptr) override;
+        req_state* s, rgw::notify::EventType event_type, const std::string* object_name=nullptr) override;
     virtual std::unique_ptr<Notification> get_notification(const DoutPrefixProvider* dpp, rgw::sal::Object* obj,
         rgw::sal::Object* src_obj, rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket,
         std::string& _user_id, std::string& _user_tenant, std::string& _req_id, optional_yield y) override;
index 158d54752bacd070da232fa4c2bf9df4a0bc7ced..8da5df5d8cd5f9b3362df411d2bcac7e58b17602 100644 (file)
@@ -1209,7 +1209,7 @@ std::unique_ptr<Completions> RadosStore::get_completions(void)
 }
 
 std::unique_ptr<Notification> RadosStore::get_notification(
-  rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, const std::string* object_name)
+  rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, const std::string* object_name)
 {
   return std::make_unique<RadosNotification>(s, this, obj, src_obj, s, event_type, object_name);
 }
index 663a11d4a30ed4743cbb76a3c2caa76a1c2c795f..119e09e5dd7d8c055f5ce6ee55e2f8aca6dd5dc1 100644 (file)
@@ -151,7 +151,7 @@ class RadosStore : public Store {
     virtual int cluster_stat(RGWClusterStat& stats) override;
     virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
     virtual std::unique_ptr<Completions> get_completions(void) override;
-    virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s, rgw::notify::EventType event_type, const std::string* object_name=nullptr) override;
+    virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, const std::string* object_name=nullptr) override;
     virtual std::unique_ptr<Notification> get_notification(
     const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj, 
     rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant,
index 8f41807368c997db838cd4a2a8e02d61cd1b178e..0069d02e6551ef2eda436c417e4c32287cfe35ff 100644 (file)
@@ -751,7 +751,7 @@ done:
   end_header(s);
 }
 
-int RGWHandler_SWIFT_Auth::init(rgw::sal::Store* store, struct req_state *state,
+int RGWHandler_SWIFT_Auth::init(rgw::sal::Store* store, req_state *state,
                                rgw::io::BasicClient *cio)
 {
   state->dialect = "swift-auth";
index 430739a447c8a8db9e7e5d345ab7b83ff6c5095b..25bc3e3dd823f141d1fb1b9c420452b59f03fc88 100644 (file)
@@ -317,7 +317,7 @@ public:
   ~RGWHandler_SWIFT_Auth() override {}
   RGWOp *op_get() override;
 
-  int init(rgw::sal::Store* store, struct req_state *state, rgw::io::BasicClient *cio) override;
+  int init(rgw::sal::Store* store, req_state *state, rgw::io::BasicClient *cio) override;
   int authorize(const DoutPrefixProvider *dpp, optional_yield y) override;
   int postauth_init(optional_yield) override { return 0; }
   int read_permissions(RGWOp *op, optional_yield) override { return 0; }
@@ -331,14 +331,14 @@ public:
   RGWRESTMgr_SWIFT_Auth() = default;
   ~RGWRESTMgr_SWIFT_Auth() override = default;
 
-  RGWRESTMgr *get_resource_mgr(struct req_state* const s,
+  RGWRESTMgr *get_resource_mgr(req_state* const s,
                                const std::string& uri,
                                std::string* const out_uri) override {
     return this;
   }
 
   RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state*,
+                              req_state*,
                                const rgw::auth::StrategyRegistry&,
                                const std::string&) override {
     return new RGWHandler_SWIFT_Auth;
index f21c307ffd0d1d01c8c198ec3ae98534a97affdd..d5c202e9a01e7ffb6722a305255169bd367c7823 100644 (file)
@@ -404,7 +404,7 @@ public:
 
 
 RGWHandler_REST* RGWRESTMgr_MDSearch_S3::get_handler(rgw::sal::Store* store,
-                                                    struct req_state* const s,
+                                                    req_state* const s,
                                                      const rgw::auth::StrategyRegistry& auth_registry,
                                                      const std::string& frontend_prefix)
 {
index 9224ffe4022cfd3e30ba7a477744592b46549aa9..f9fba879f0a360788f15fdcad1bd3aebf6884d54 100644 (file)
@@ -12,7 +12,7 @@ public:
   explicit RGWRESTMgr_MDSearch_S3() {}
 
   RGWHandler_REST *get_handler(rgw::sal::Store* store,
-                              struct req_state* s,
+                              req_state* s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override;
 };
index b663cb15e2cb445f195649830648f5d7a159bde0..8ae6f1dfe6ee2a9b9598b249656049a430bcb254 100644 (file)
@@ -500,7 +500,7 @@ public:
 
 // factory for ceph specific PubSub REST handlers 
 RGWHandler_REST* RGWRESTMgr_PubSub::get_handler(rgw::sal::Store* store,
-                                               struct req_state* const s,
+                                               req_state* const s,
                                                const rgw::auth::StrategyRegistry& auth_registry,
                                                const std::string& frontend_prefix)
 {
index 32335f69486af82f625019f8312a71d38234100c..e782942cb51bfecd6f1906fb4eb92ee3c5d7b279 100644 (file)
@@ -8,7 +8,7 @@
 class RGWRESTMgr_PubSub : public RGWRESTMgr {
 public:
   virtual RGWHandler_REST* get_handler(rgw::sal::Store* store,
-                              struct req_state* s,
+                              req_state* s,
                                const rgw::auth::StrategyRegistry& auth_registry,
                                const std::string& frontend_prefix) override;
 };
index 41a4a4d91a510339a6ad2a02044c26866cdbbb09..5670bc1a0d90b5c89890cbbff9ae33543dbc7c9d 100644 (file)
@@ -37,7 +37,7 @@ seed::~seed()
   store = NULL;
 }
 
-void seed::init(struct req_state *p_req, rgw::sal::Store* p_store)
+void seed::init(req_state *p_req, rgw::sal::Store* p_store)
 {
   s = p_req;
   store = p_store;
index cc84a1778ceb61554c9842159f017f4a18006b9d..7e225b771400d58549db293c160dfac3d35632c3 100644 (file)
@@ -106,7 +106,7 @@ private:
   bool is_torrent;  // flag
   bufferlist bl;  // bufflist ready to send
 
-  struct req_state *s{nullptr};
+  req_state *s{nullptr};
   rgw::sal::Store* store{nullptr};
   SHA1 h;
 
@@ -116,7 +116,7 @@ public:
   ~seed();
 
   int get_params();
-  void init(struct req_state *p_req, rgw::sal::Store* p_store);
+  void init(req_state *p_req, rgw::sal::Store* p_store);
   int get_torrent_file(rgw::sal::Object* object,
                        uint64_t &total_len,
                        ceph::bufferlist &bl_data,