]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_object_expirer.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / rgw / rgw_object_expirer.cc
index e2e82ad58b12e14d915498185196ef78f0713ce7..fd36a49c6fb22110e9d8b05ce8615ecbaa6c362c 100644 (file)
 
 #define dout_subsys ceph_subsys_rgw
 
-static rgw::sal::Store* store = NULL;
+static rgw::sal::Driver* driver = NULL;
 
 class StoreDestructor {
-  rgw::sal::Store* store;
+  rgw::sal::Driver* driver;
 
 public:
-  explicit StoreDestructor(rgw::sal::Store* _s) : store(_s) {}
+  explicit StoreDestructor(rgw::sal::Driver* _s) : driver(_s) {}
   ~StoreDestructor() {
-    if (store) {
-      StoreManager::close_storage(store);
+    if (driver) {
+      DriverManager::close_storage(driver);
     }
   }
 };
@@ -55,7 +55,7 @@ int main(const int argc, const char **argv)
 {
   auto args = argv_to_vec(argc, argv);
   if (args.empty()) {
-    cerr << argv[0] << ": -h or --help for usage" << std::endl;
+    std::cerr << argv[0] << ": -h or --help for usage" << std::endl;
     exit(1);
   }
   if (ceph_argparse_need_usage(args)) {
@@ -80,16 +80,19 @@ int main(const int argc, const char **argv)
   common_init_finish(g_ceph_context);
 
   const DoutPrefix dp(cct.get(), dout_subsys, "rgw object expirer: ");
-  store = StoreManager::get_storage(&dp, g_ceph_context, "rados", false, false, false, false, false);
-  if (!store) {
+  DriverManager::Config cfg;
+  cfg.store_name = "rados";
+  cfg.filter_name = "none";
+  driver = DriverManager::get_storage(&dp, g_ceph_context, cfg, false, false, false, false, false);
+  if (!driver) {
     std::cerr << "couldn't init storage provider" << std::endl;
     return EIO;
   }
 
-  /* Guard to not forget about closing the rados store. */
-  StoreDestructor store_dtor(store);
+  /* Guard to not forget about closing the rados driver. */
+  StoreDestructor store_dtor(driver);
 
-  RGWObjectExpirer objexp(store);
+  RGWObjectExpirer objexp(driver);
   objexp.start_processor();
 
   const utime_t interval(g_ceph_context->_conf->rgw_objexp_gc_interval, 0);