]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_loadgen_process.cc
bump version to 18.2.4-pve3
[ceph.git] / ceph / src / rgw / rgw_loadgen_process.cc
index 9235f13d1160f23cf4397805205c7d790973c7d8..f8165185db30a5046919027064aa18430056f8fc 100644 (file)
 #include "rgw_process.h"
 #include "rgw_loadgen.h"
 #include "rgw_client_io.h"
+#include "rgw_signal.h"
 
 #include <atomic>
 
 #define dout_subsys ceph_subsys_rgw
 
-extern void signal_shutdown();
+using namespace std;
 
 void RGWLoadGenProcess::checkpoint()
 {
@@ -98,7 +99,7 @@ done:
 
   delete[] objs;
 
-  signal_shutdown();
+  rgw::signal::signal_shutdown();
 } /* RGWLoadGenProcess::run() */
 
 void RGWLoadGenProcess::gen_request(const string& method,
@@ -106,7 +107,7 @@ void RGWLoadGenProcess::gen_request(const string& method,
                                    int content_length, std::atomic<bool>* fail_flag)
 {
   RGWLoadGenRequest* req =
-    new RGWLoadGenRequest(store->getRados()->get_new_req_id(), method, resource,
+    new RGWLoadGenRequest(env.driver->get_new_req_id(), method, resource,
                          content_length, fail_flag);
   dout(10) << "allocated request req=" << hex << req << dec << dendl;
   req_throttle.get(1);
@@ -117,23 +118,21 @@ void RGWLoadGenProcess::handle_request(const DoutPrefixProvider *dpp, RGWRequest
 {
   RGWLoadGenRequest* req = static_cast<RGWLoadGenRequest*>(r);
 
-  RGWLoadGenRequestEnv env;
+  RGWLoadGenRequestEnv renv;
 
   utime_t tm = ceph_clock_now();
 
-  env.port = 80;
-  env.content_length = req->content_length;
-  env.content_type = "binary/octet-stream";
-  env.request_method = req->method;
-  env.uri = req->resource;
-  env.set_date(tm);
-  env.sign(dpp, access_key);
+  renv.port = 80;
+  renv.content_length = req->content_length;
+  renv.content_type = "binary/octet-stream";
+  renv.request_method = req->method;
+  renv.uri = req->resource;
+  renv.set_date(tm);
+  renv.sign(dpp, access_key);
 
-  RGWLoadGenIO real_client_io(&env);
+  RGWLoadGenIO real_client_io(&renv);
   RGWRestfulIO client_io(cct, &real_client_io);
-
-  int ret = process_request(store, rest, req, uri_prefix,
-                            *auth_registry, &client_io, olog,
+  int ret = process_request(env, req, uri_prefix, &client_io,
                             null_yield, nullptr, nullptr, nullptr);
   if (ret < 0) {
     /* we don't really care about return code */