From: Daniel Gryniewicz Date: Fri, 19 Mar 2021 16:27:16 +0000 (-0400) Subject: RGW Zipper - Fix style violations X-Git-Tag: v17.1.0~2223^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b0b0e0b15fde33e9ab225bc87e8d0a4aea377b9;p=ceph.git RGW Zipper - Fix style violations Change type *var; to type* var; Signed-off-by: Daniel Gryniewicz --- diff --git a/src/rgw/librgw.cc b/src/rgw/librgw.cc index 51026ee61f8..e98aaf93a33 100644 --- a/src/rgw/librgw.cc +++ b/src/rgw/librgw.cc @@ -677,7 +677,7 @@ namespace rgw { return 0; } /* RGWLib::stop() */ - int RGWLibIO::set_uid(rgw::sal::Store *store, const rgw_user& uid) + int RGWLibIO::set_uid(rgw::sal::Store* store, const rgw_user& uid) { const DoutPrefix dp(store->ctx(), dout_subsys, "librgw: "); std::unique_ptr user = store->get_user(uid); diff --git a/src/rgw/rgw_admin.cc b/src/rgw/rgw_admin.cc index 42239bf9afc..cafe1ea7eba 100644 --- a/src/rgw/rgw_admin.cc +++ b/src/rgw/rgw_admin.cc @@ -74,7 +74,7 @@ extern "C" { #define SECRET_KEY_LEN 40 #define PUBLIC_ID_LEN 20 -static rgw::sal::Store *store = NULL; +static rgw::sal::Store* store = NULL; static const DoutPrefixProvider* dpp() { struct GlobalPrefix : public DoutPrefixProvider { @@ -1121,9 +1121,9 @@ static void show_reshard_status( } class StoreDestructor { - rgw::sal::Store *store; + rgw::sal::Store* store; public: - explicit StoreDestructor(rgw::sal::RadosStore *_s) : store(_s) {} + explicit StoreDestructor(rgw::sal::RadosStore* _s) : store(_s) {} ~StoreDestructor() { StoreManager::close_storage(store); rgw_http_client_cleanup(); @@ -1297,7 +1297,7 @@ void set_quota_info(RGWQuotaInfo& quota, OPT opt_cmd, int64_t max_size, int64_t } } -int set_bucket_quota(rgw::sal::Store *store, OPT opt_cmd, +int set_bucket_quota(rgw::sal::Store* store, OPT opt_cmd, const string& tenant_name, const string& bucket_name, int64_t max_size, int64_t max_objects, bool have_max_size, bool have_max_objects) @@ -1355,7 +1355,7 @@ int set_user_quota(OPT opt_cmd, RGWUser& user, RGWUserAdminOpState& op_state, in return 0; } -int check_min_obj_stripe_size(rgw::sal::Store *store, rgw::sal::Object* obj, uint64_t min_stripe_size, bool *need_rewrite) +int check_min_obj_stripe_size(rgw::sal::Store* store, rgw::sal::Object* obj, uint64_t min_stripe_size, bool *need_rewrite) { RGWObjectCtx obj_ctx(store); int ret = obj->get_obj_attrs(&obj_ctx, null_yield, dpp()); @@ -1542,7 +1542,7 @@ int do_check_object_locator(const string& tenant_name, const string& bucket_name } /// search for a matching zone/zonegroup id and return a connection if found -static boost::optional get_remote_conn(rgw::sal::RadosStore *store, +static boost::optional get_remote_conn(rgw::sal::RadosStore* store, const RGWZoneGroup& zonegroup, const std::string& remote) { @@ -1562,7 +1562,7 @@ static boost::optional get_remote_conn(rgw::sal::RadosStore *store, } /// search each zonegroup for a connection -static boost::optional get_remote_conn(rgw::sal::RadosStore *store, +static boost::optional get_remote_conn(rgw::sal::RadosStore* store, const RGWPeriodMap& period_map, const std::string& remote) { @@ -2246,7 +2246,7 @@ std::ostream& operator<<(std::ostream& out, const indented& h) { return out << std::setw(h.w) << h.header << std::setw(1) << ' '; } -static int bucket_source_sync_status(rgw::sal::RadosStore *store, const RGWZone& zone, +static int bucket_source_sync_status(rgw::sal::RadosStore* store, const RGWZone& zone, const RGWZone& source, RGWRESTConn *conn, const RGWBucketInfo& bucket_info, rgw_sync_bucket_pipe pipe, @@ -2505,7 +2505,7 @@ static int sync_info(std::optional opt_target_zone, std::optionalget_zone()->get_realm(); @@ -2544,7 +2544,7 @@ static int bucket_sync_info(rgw::sal::RadosStore *store, const RGWBucketInfo& in return 0; } -static int bucket_sync_status(rgw::sal::RadosStore *store, const RGWBucketInfo& info, +static int bucket_sync_status(rgw::sal::RadosStore* store, const RGWBucketInfo& info, const rgw_zone_id& source_zone_id, std::optional& opt_source_bucket, std::ostream& out) @@ -2676,7 +2676,7 @@ static int check_pool_support_omap(const rgw_pool& pool) return 0; } -int check_reshard_bucket_params(rgw::sal::RadosStore *store, +int check_reshard_bucket_params(rgw::sal::RadosStore* store, const string& bucket_name, const string& tenant, const string& bucket_id, @@ -2796,7 +2796,7 @@ static int trim_sync_error_log(int shard_id, const string& marker, int delay_ms) // unreachable } -const string& get_tier_type(rgw::sal::RadosStore *store) { +const string& get_tier_type(rgw::sal::RadosStore* store) { return store->svc()->zone->get_zone().tier_type; } diff --git a/src/rgw/rgw_admin_user.h b/src/rgw/rgw_admin_user.h index ef5cd7cda76..905ddcd9065 100644 --- a/src/rgw/rgw_admin_user.h +++ b/src/rgw/rgw_admin_user.h @@ -26,7 +26,7 @@ namespace rgw { class RGWLibAdmin { - rgw::sal::Store *store; + rgw::sal::Store* store; boost::intrusive_ptr cct; public: diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 475822f65cd..75c63034a1d 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -631,7 +631,7 @@ class ExpandMetaVar { map meta_map; public: - ExpandMetaVar(rgw::sal::Zone *zone_svc) { + ExpandMetaVar(rgw::sal::Zone* zone_svc) { meta_map["realm"] = zone_svc->get_realm().get_name(); meta_map["realm_id"] = zone_svc->get_realm().get_id(); meta_map["zonegroup"] = zone_svc->get_zonegroup().get_name(); diff --git a/src/rgw/rgw_asio_frontend.h b/src/rgw/rgw_asio_frontend.h index 301c389625d..ce488441888 100644 --- a/src/rgw/rgw_asio_frontend.h +++ b/src/rgw/rgw_asio_frontend.h @@ -22,7 +22,7 @@ public: void join() override; void pause_for_new_config() override; - void unpause_with_new_config(rgw::sal::Store *store, + void unpause_with_new_config(rgw::sal::Store* store, rgw_auth_registry_ptr_t auth_registry) override; }; diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index b9a1123927d..4dbeec2287d 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -241,7 +241,7 @@ static void dump_mulipart_index_results(list& objs_to_unlink, } } -void check_bad_user_bucket_mapping(rgw::sal::Store *store, rgw::sal::User* user, +void check_bad_user_bucket_mapping(rgw::sal::Store* store, rgw::sal::User* user, bool fix, optional_yield y, const DoutPrefixProvider *dpp) @@ -301,7 +301,7 @@ bool rgw_bucket_object_check_filter(const string& oid) return rgw_obj_key::oid_to_key_in_ns(oid, &key, ns); } -int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::Store *store, rgw::sal::Bucket* bucket, rgw_obj_key& key) +int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::Store* store, rgw::sal::Bucket* bucket, rgw_obj_key& key) { RGWObjectCtx rctx(store); @@ -314,7 +314,7 @@ int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::Store *store, rgw return object->delete_object(dpp, &rctx, null_yield); } -int rgw_remove_bucket_bypass_gc(rgw::sal::Store *store, rgw::sal::Bucket* bucket, +int rgw_remove_bucket_bypass_gc(rgw::sal::Store* store, rgw::sal::Bucket* bucket, int concurrent_max, bool keep_index_consistent, optional_yield y, const DoutPrefixProvider *dpp) @@ -453,7 +453,7 @@ static void set_err_msg(std::string *sink, std::string msg) *sink = msg; } -int RGWBucket::init(rgw::sal::Store *_store, RGWBucketAdminOpState& op_state, +int RGWBucket::init(rgw::sal::Store* _store, RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg) { if (!_store) { @@ -1031,7 +1031,7 @@ int RGWBucket::get_policy(RGWBucketAdminOpState& op_state, RGWAccessControlPolic } -int RGWBucketAdminOp::get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +int RGWBucketAdminOp::get_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, const DoutPrefixProvider *dpp) { RGWBucket bucket; @@ -1050,7 +1050,7 @@ int RGWBucketAdminOp::get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& /* Wrappers to facilitate RESTful interface */ -int RGWBucketAdminOp::get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +int RGWBucketAdminOp::get_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp) { RGWAccessControlPolicy policy(store->ctx()); @@ -1072,7 +1072,7 @@ int RGWBucketAdminOp::get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& return 0; } -int RGWBucketAdminOp::dump_s3_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +int RGWBucketAdminOp::dump_s3_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, ostream& os, const DoutPrefixProvider *dpp) { RGWAccessControlPolicy_S3 policy(store->ctx()); @@ -1086,7 +1086,7 @@ int RGWBucketAdminOp::dump_s3_policy(rgw::sal::Store *store, RGWBucketAdminOpSta return 0; } -int RGWBucketAdminOp::unlink(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) +int RGWBucketAdminOp::unlink(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) { RGWBucket bucket; @@ -1097,7 +1097,7 @@ int RGWBucketAdminOp::unlink(rgw::sal::Store *store, RGWBucketAdminOpState& op_s return bucket.unlink(op_state, null_yield, dpp); } -int RGWBucketAdminOp::link(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err) +int RGWBucketAdminOp::link(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err) { RGWBucket bucket; int ret = bucket.init(store, op_state, null_yield, dpp, err); @@ -1108,7 +1108,7 @@ int RGWBucketAdminOp::link(rgw::sal::Store *store, RGWBucketAdminOpState& op_sta } -int RGWBucketAdminOp::chown(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err) +int RGWBucketAdminOp::chown(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err) { RGWBucket bucket; @@ -1124,7 +1124,7 @@ int RGWBucketAdminOp::chown(rgw::sal::Store *store, RGWBucketAdminOpState& op_st } -int RGWBucketAdminOp::check_index(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +int RGWBucketAdminOp::check_index(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp) { int ret; @@ -1159,7 +1159,7 @@ int RGWBucketAdminOp::check_index(rgw::sal::Store *store, RGWBucketAdminOpState& return 0; } -int RGWBucketAdminOp::remove_bucket(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +int RGWBucketAdminOp::remove_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, bool bypass_gc, bool keep_index_consistent) { @@ -1180,7 +1180,7 @@ int RGWBucketAdminOp::remove_bucket(rgw::sal::Store *store, RGWBucketAdminOpStat return ret; } -int RGWBucketAdminOp::remove_object(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) +int RGWBucketAdminOp::remove_object(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) { RGWBucket bucket; @@ -1191,7 +1191,7 @@ int RGWBucketAdminOp::remove_object(rgw::sal::Store *store, RGWBucketAdminOpStat return bucket.remove_object(dpp, op_state); } -int RGWBucketAdminOp::sync_bucket(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg) +int RGWBucketAdminOp::sync_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg) { RGWBucket bucket; int ret = bucket.init(store, op_state, null_yield, dpp, err_msg); @@ -1202,7 +1202,7 @@ int RGWBucketAdminOp::sync_bucket(rgw::sal::Store *store, RGWBucketAdminOpState& return bucket.sync(op_state, dpp, err_msg); } -static int bucket_stats(rgw::sal::Store *store, +static int bucket_stats(rgw::sal::Store* store, const std::string& tenant_name, const std::string& bucket_name, Formatter *formatter, @@ -1268,7 +1268,7 @@ static int bucket_stats(rgw::sal::Store *store, return 0; } -int RGWBucketAdminOp::limit_check(rgw::sal::Store *store, +int RGWBucketAdminOp::limit_check(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const std::list& user_ids, RGWFormatterFlusher& flusher, optional_yield y, @@ -1380,7 +1380,7 @@ int RGWBucketAdminOp::limit_check(rgw::sal::Store *store, return ret; } /* RGWBucketAdminOp::limit_check */ -int RGWBucketAdminOp::info(rgw::sal::Store *store, +int RGWBucketAdminOp::info(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, @@ -1481,7 +1481,7 @@ int RGWBucketAdminOp::info(rgw::sal::Store *store, return 0; } -int RGWBucketAdminOp::set_quota(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) +int RGWBucketAdminOp::set_quota(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp) { RGWBucket bucket; @@ -1491,7 +1491,7 @@ int RGWBucketAdminOp::set_quota(rgw::sal::Store *store, RGWBucketAdminOpState& o return bucket.set_quota(op_state, dpp); } -static int purge_bucket_instance(rgw::sal::Store *store, const RGWBucketInfo& bucket_info, const DoutPrefixProvider *dpp) +static int purge_bucket_instance(rgw::sal::Store* store, const RGWBucketInfo& bucket_info, const DoutPrefixProvider *dpp) { std::unique_ptr bucket; int ret = store->get_bucket(nullptr, bucket_info, &bucket); @@ -1510,7 +1510,7 @@ inline auto split_tenant(const std::string& bucket_name){ } using bucket_instance_ls = std::vector; -void get_stale_instances(rgw::sal::Store *store, const std::string& bucket_name, +void get_stale_instances(rgw::sal::Store* store, const std::string& bucket_name, const vector& lst, bucket_instance_ls& stale_instances, const DoutPrefixProvider *dpp) @@ -1600,7 +1600,7 @@ void get_stale_instances(rgw::sal::Store *store, const std::string& bucket_name, return; } -static int process_stale_instances(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, +static int process_stale_instances(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp, std::functionclose_section(); // bucket_entry } -static void process_single_lc_entry(rgw::sal::Store *store, +static void process_single_lc_entry(rgw::sal::Store* store, Formatter *formatter, const std::string& tenant_name, const std::string& bucket_name, @@ -1731,7 +1731,7 @@ static void process_single_lc_entry(rgw::sal::Store *store, format_lc_status(formatter, tenant_name, bucket_name, -ret); } -int RGWBucketAdminOp::fix_lc_shards(rgw::sal::Store *store, +int RGWBucketAdminOp::fix_lc_shards(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp) @@ -1783,7 +1783,7 @@ int RGWBucketAdminOp::fix_lc_shards(rgw::sal::Store *store, } static bool has_object_expired(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_obj_key& key, utime_t& delete_at) { @@ -1808,7 +1808,7 @@ static bool has_object_expired(const DoutPrefixProvider *dpp, } static int fix_bucket_obj_expiry(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, rgw::sal::Bucket* bucket, RGWFormatterFlusher& flusher, bool dry_run) { @@ -1858,7 +1858,7 @@ static int fix_bucket_obj_expiry(const DoutPrefixProvider *dpp, return 0; } -int RGWBucketAdminOp::fix_obj_expiry(rgw::sal::Store *store, +int RGWBucketAdminOp::fix_obj_expiry(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp, bool dry_run) @@ -3052,7 +3052,7 @@ int RGWBucketCtl::set_acl(ACLOwner& owner, rgw_bucket& bucket, } // TODO: remove RGWRados dependency for bucket listing -int RGWBucketCtl::chown(rgw::sal::Store *store, rgw::sal::Bucket* bucket, +int RGWBucketCtl::chown(rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_user& user_id, const std::string& display_name, const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp) { diff --git a/src/rgw/rgw_bucket.h b/src/rgw/rgw_bucket.h index 0c790ff3f7a..3ce0f3baad0 100644 --- a/src/rgw/rgw_bucket.h +++ b/src/rgw/rgw_bucket.h @@ -219,14 +219,14 @@ public: static RGWBucketInstanceMetadataHandlerBase *alloc(); }; -extern int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::Store *store, rgw::sal::Bucket* bucket, rgw_obj_key& key); -extern int rgw_remove_bucket_bypass_gc(rgw::sal::Store *store, rgw::sal::Bucket* bucket, int concurrent_max, optional_yield y); +extern int rgw_remove_object(const DoutPrefixProvider *dpp, rgw::sal::Store* store, rgw::sal::Bucket* bucket, rgw_obj_key& key); +extern int rgw_remove_bucket_bypass_gc(rgw::sal::Store* store, rgw::sal::Bucket* bucket, int concurrent_max, optional_yield y); extern int rgw_object_get_attr(rgw::sal::Store* store, rgw::sal::Object* obj, const char* attr_name, bufferlist& out_bl, optional_yield y); -extern void check_bad_user_bucket_mapping(rgw::sal::Store *store, rgw::sal::User* user, bool fix, optional_yield y, const DoutPrefixProvider *dpp); +extern void check_bad_user_bucket_mapping(rgw::sal::Store* store, rgw::sal::User* user, bool fix, optional_yield y, const DoutPrefixProvider *dpp); struct RGWBucketAdminOpState { rgw_user uid; @@ -318,7 +318,7 @@ struct RGWBucketAdminOpState { class RGWBucket { RGWUserBuckets buckets; - rgw::sal::Store *store; + rgw::sal::Store* store; RGWAccessHandle handle; std::unique_ptr bucket; @@ -330,7 +330,7 @@ class RGWBucket public: RGWBucket() : store(NULL), handle(NULL), failure(false) {} - int init(rgw::sal::Store *storage, RGWBucketAdminOpState& op_state, optional_yield y, + int init(rgw::sal::Store* storage, RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, std::string *err_msg = NULL); int check_bad_index_multipart(RGWBucketAdminOpState& op_state, @@ -368,42 +368,42 @@ public: class RGWBucketAdminOp { public: - static int get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int get_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp); - static int get_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int get_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWAccessControlPolicy& policy, const DoutPrefixProvider *dpp); - static int dump_s3_policy(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int dump_s3_policy(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, ostream& os, const DoutPrefixProvider *dpp); - static int unlink(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); - static int link(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL); - static int chown(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err_msg = NULL); + static int unlink(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); + static int link(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL); + static int chown(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const string& marker, const DoutPrefixProvider *dpp, string *err_msg = NULL); - static int check_index(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int check_index(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp); - static int remove_bucket(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, optional_yield y, + static int remove_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, optional_yield y, const DoutPrefixProvider *dpp, bool bypass_gc = false, bool keep_index_consistent = true); - static int remove_object(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); - static int info(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp); - static int limit_check(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int remove_object(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); + static int info(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp); + static int limit_check(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const std::list& user_ids, RGWFormatterFlusher& flusher, optional_yield y, const DoutPrefixProvider *dpp, bool warnings_only = false); - static int set_quota(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); + static int set_quota(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp); - static int list_stale_instances(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int list_stale_instances(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp); - static int clear_stale_instances(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int clear_stale_instances(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp); - static int fix_lc_shards(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int fix_lc_shards(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp); - static int fix_obj_expiry(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, + static int fix_obj_expiry(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, RGWFormatterFlusher& flusher, const DoutPrefixProvider *dpp, bool dry_run = false); - static int sync_bucket(rgw::sal::Store *store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL); + static int sync_bucket(rgw::sal::Store* store, RGWBucketAdminOpState& op_state, const DoutPrefixProvider *dpp, string *err_msg = NULL); }; struct rgw_ep_info { @@ -690,7 +690,7 @@ public: const DoutPrefixProvider *dpp, bool update_entrypoint = true); - int chown(rgw::sal::Store *store, rgw::sal::Bucket* bucket, + int chown(rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_user& user_id, const std::string& display_name, const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp); diff --git a/src/rgw/rgw_cr_rados.cc b/src/rgw/rgw_cr_rados.cc index bbe1683a85b..98c0e3d45bb 100644 --- a/src/rgw/rgw_cr_rados.cc +++ b/src/rgw/rgw_cr_rados.cc @@ -187,7 +187,7 @@ RGWAsyncPutSystemObjAttrs::RGWAsyncPutSystemObjAttrs(RGWCoroutine *caller, RGWAi } -RGWOmapAppend::RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, const rgw_raw_obj& _obj, +RGWOmapAppend::RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, uint64_t _window_size) : RGWConsumerCR(_store->ctx()), async_rados(_async_rados), store(_store), obj(_obj), going_down(false), num_pending_entries(0), window_size(_window_size), total_entries(0) @@ -212,7 +212,7 @@ int RGWAsyncLockSystemObj::_send_request() return l.lock_exclusive(&ref.pool.ioctx(), ref.obj.oid); } -RGWAsyncLockSystemObj::RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, +RGWAsyncLockSystemObj::RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, const string& _name, const string& _cookie, uint32_t _duration_secs) : RGWAsyncRadosRequest(caller, cn), store(_store), obj(_obj), @@ -238,7 +238,7 @@ int RGWAsyncUnlockSystemObj::_send_request() return l.unlock(&ref.pool.ioctx(), ref.obj.oid); } -RGWAsyncUnlockSystemObj::RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, +RGWAsyncUnlockSystemObj::RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, const string& _name, const string& _cookie) : RGWAsyncRadosRequest(caller, cn), store(_store), obj(_obj), @@ -246,7 +246,7 @@ RGWAsyncUnlockSystemObj::RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCom { } -RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(rgw::sal::RadosStore *_store, +RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, map& _entries) : RGWSimpleCoroutine(_store->ctx()), store(_store), @@ -290,7 +290,7 @@ int RGWRadosSetOmapKeysCR::request_complete() return r; } -RGWRadosGetOmapKeysCR::RGWRadosGetOmapKeysCR(rgw::sal::RadosStore *_store, +RGWRadosGetOmapKeysCR::RGWRadosGetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _marker, int _max_entries, @@ -328,7 +328,7 @@ int RGWRadosGetOmapKeysCR::request_complete() return r; } -RGWRadosGetOmapValsCR::RGWRadosGetOmapValsCR(rgw::sal::RadosStore *_store, +RGWRadosGetOmapValsCR::RGWRadosGetOmapValsCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _marker, int _max_entries, @@ -366,7 +366,7 @@ int RGWRadosGetOmapValsCR::request_complete() return r; } -RGWRadosRemoveOmapKeysCR::RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore *_store, +RGWRadosRemoveOmapKeysCR::RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const set& _keys) : RGWSimpleCoroutine(_store->ctx()), store(_store), @@ -401,7 +401,7 @@ int RGWRadosRemoveOmapKeysCR::request_complete() return r; } -RGWRadosRemoveCR::RGWRadosRemoveCR(rgw::sal::RadosStore *store, const rgw_raw_obj& obj, +RGWRadosRemoveCR::RGWRadosRemoveCR(rgw::sal::RadosStore* store, const rgw_raw_obj& obj, RGWObjVersionTracker* objv_tracker) : RGWSimpleCoroutine(store->ctx()), store(store), obj(obj), objv_tracker(objv_tracker) @@ -440,7 +440,7 @@ int RGWRadosRemoveCR::request_complete() return r; } -RGWSimpleRadosLockCR::RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, +RGWSimpleRadosLockCR::RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _lock_name, const string& _cookie, @@ -479,7 +479,7 @@ int RGWSimpleRadosLockCR::request_complete() return req->get_ret_status(); } -RGWSimpleRadosUnlockCR::RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, +RGWSimpleRadosUnlockCR::RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _lock_name, const string& _cookie) : RGWSimpleCoroutine(_store->ctx()), @@ -595,7 +595,7 @@ int RGWAsyncGetBucketInstanceInfo::_send_request() return 0; } -RGWRadosBILogTrimCR::RGWRadosBILogTrimCR(rgw::sal::RadosStore *store, +RGWRadosBILogTrimCR::RGWRadosBILogTrimCR(rgw::sal::RadosStore* store, const RGWBucketInfo& bucket_info, int shard_id, const std::string& start_marker, @@ -816,7 +816,7 @@ int RGWContinuousLeaseCR::operate() return 0; } -RGWRadosTimelogAddCR::RGWRadosTimelogAddCR(rgw::sal::RadosStore *_store, const string& _oid, +RGWRadosTimelogAddCR::RGWRadosTimelogAddCR(rgw::sal::RadosStore* _store, const string& _oid, const cls_log_entry& entry) : RGWSimpleCoroutine(_store->ctx()), store(_store), oid(_oid), cn(NULL) @@ -843,7 +843,7 @@ int RGWRadosTimelogAddCR::request_complete() return r; } -RGWRadosTimelogTrimCR::RGWRadosTimelogTrimCR(rgw::sal::RadosStore *store, +RGWRadosTimelogTrimCR::RGWRadosTimelogTrimCR(rgw::sal::RadosStore* store, const std::string& oid, const real_time& start_time, const real_time& end_time, @@ -878,7 +878,7 @@ int RGWRadosTimelogTrimCR::request_complete() } -RGWSyncLogTrimCR::RGWSyncLogTrimCR(rgw::sal::RadosStore *store, const std::string& oid, +RGWSyncLogTrimCR::RGWSyncLogTrimCR(rgw::sal::RadosStore* store, const std::string& oid, const std::string& to_marker, std::string *last_trim_marker) : RGWRadosTimelogTrimCR(store, oid, real_time{}, real_time{}, @@ -909,7 +909,7 @@ int RGWAsyncStatObj::_send_request() nullptr, nullptr, objv_tracker, null_yield); } -RGWStatObjCR::RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RadosStore *store, +RGWStatObjCR::RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RadosStore* store, const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize, real_time* pmtime, uint64_t *pepoch, RGWObjVersionTracker *objv_tracker) @@ -940,7 +940,7 @@ int RGWStatObjCR::request_complete() return req->get_ret_status(); } -RGWRadosNotifyCR::RGWRadosNotifyCR(rgw::sal::RadosStore *store, const rgw_raw_obj& obj, +RGWRadosNotifyCR::RGWRadosNotifyCR(rgw::sal::RadosStore* store, const rgw_raw_obj& obj, bufferlist& request, uint64_t timeout_ms, bufferlist *response) : RGWSimpleCoroutine(store->ctx()), store(store), obj(obj), diff --git a/src/rgw/rgw_cr_rados.h b/src/rgw/rgw_cr_rados.h index 1f70576db32..e6918c8cef5 100644 --- a/src/rgw/rgw_cr_rados.h +++ b/src/rgw/rgw_cr_rados.h @@ -111,13 +111,13 @@ public: template class RGWSimpleWriteOnlyAsyncCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; P params; const DoutPrefixProvider *dpp; class Request : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; P params; const DoutPrefixProvider *dpp; protected: @@ -125,7 +125,7 @@ class RGWSimpleWriteOnlyAsyncCR : public RGWSimpleCoroutine { public: Request(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const P& _params, const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(store), @@ -135,7 +135,7 @@ class RGWSimpleWriteOnlyAsyncCR : public RGWSimpleCoroutine { public: RGWSimpleWriteOnlyAsyncCR(RGWAsyncRadosProcessor *_async_rados, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, const P& _params, const DoutPrefixProvider *_dpp) : RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), @@ -172,14 +172,14 @@ class RGWSimpleWriteOnlyAsyncCR : public RGWSimpleCoroutine { template class RGWSimpleAsyncCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; P params; std::shared_ptr result; const DoutPrefixProvider *dpp; class Request : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; P params; std::shared_ptr result; const DoutPrefixProvider *dpp; @@ -188,7 +188,7 @@ class RGWSimpleAsyncCR : public RGWSimpleCoroutine { public: Request(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, const P& _params, std::shared_ptr& _result, const DoutPrefixProvider *_dpp) : RGWAsyncRadosRequest(caller, cn), @@ -200,7 +200,7 @@ class RGWSimpleAsyncCR : public RGWSimpleCoroutine { public: RGWSimpleAsyncCR(RGWAsyncRadosProcessor *_async_rados, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, const P& _params, std::shared_ptr& _result, const DoutPrefixProvider *_dpp) : RGWSimpleCoroutine(_store->ctx()), @@ -238,7 +238,7 @@ class RGWSimpleAsyncCR : public RGWSimpleCoroutine { class RGWGenericAsyncCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; public: @@ -353,7 +353,7 @@ public: }; class RGWAsyncLockSystemObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_raw_obj obj; string lock_name; string cookie; @@ -362,13 +362,13 @@ class RGWAsyncLockSystemObj : public RGWAsyncRadosRequest { protected: int _send_request() override; public: - RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncLockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, const string& _name, const string& _cookie, uint32_t _duration_secs); }; class RGWAsyncUnlockSystemObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_raw_obj obj; string lock_name; string cookie; @@ -376,7 +376,7 @@ class RGWAsyncUnlockSystemObj : public RGWAsyncRadosRequest { protected: int _send_request() override; public: - RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncUnlockSystemObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, RGWObjVersionTracker *_objv_tracker, const rgw_raw_obj& _obj, const string& _name, const string& _cookie); }; @@ -584,7 +584,7 @@ public: }; class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; map entries; rgw_rados_ref ref; @@ -594,7 +594,7 @@ class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine { boost::intrusive_ptr cn; public: - RGWRadosSetOmapKeysCR(rgw::sal::RadosStore *_store, + RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, map& _entries); @@ -611,7 +611,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine { }; using ResultPtr = std::shared_ptr; - RGWRadosGetOmapKeysCR(rgw::sal::RadosStore *_store, const rgw_raw_obj& _obj, + RGWRadosGetOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _marker, int _max_entries, ResultPtr result); @@ -619,7 +619,7 @@ class RGWRadosGetOmapKeysCR : public RGWSimpleCoroutine { int request_complete() override; private: - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_raw_obj obj; string marker; int max_entries; @@ -636,7 +636,7 @@ class RGWRadosGetOmapValsCR : public RGWSimpleCoroutine { }; using ResultPtr = std::shared_ptr; - RGWRadosGetOmapValsCR(rgw::sal::RadosStore *_store, const rgw_raw_obj& _obj, + RGWRadosGetOmapValsCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _marker, int _max_entries, ResultPtr result); @@ -644,7 +644,7 @@ class RGWRadosGetOmapValsCR : public RGWSimpleCoroutine { int request_complete() override; private: - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_raw_obj obj; string marker; int max_entries; @@ -653,7 +653,7 @@ class RGWRadosGetOmapValsCR : public RGWSimpleCoroutine { }; class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_rados_ref ref; @@ -664,7 +664,7 @@ class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine { boost::intrusive_ptr cn; public: - RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore *_store, + RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const set& _keys); @@ -674,14 +674,14 @@ public: }; class RGWRadosRemoveCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; librados::IoCtx ioctx; const rgw_raw_obj obj; RGWObjVersionTracker* objv_tracker; boost::intrusive_ptr cn; public: - RGWRadosRemoveCR(rgw::sal::RadosStore *store, const rgw_raw_obj& obj, + RGWRadosRemoveCR(rgw::sal::RadosStore* store, const rgw_raw_obj& obj, RGWObjVersionTracker* objv_tracker = nullptr); int send_request() override; @@ -690,7 +690,7 @@ public: class RGWSimpleRadosLockCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; string lock_name; string cookie; uint32_t duration; @@ -700,7 +700,7 @@ class RGWSimpleRadosLockCR : public RGWSimpleCoroutine { RGWAsyncLockSystemObj *req; public: - RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWSimpleRadosLockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _lock_name, const string& _cookie, @@ -723,7 +723,7 @@ public: class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; string lock_name; string cookie; @@ -732,7 +732,7 @@ class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine { RGWAsyncUnlockSystemObj *req; public: - RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWSimpleRadosUnlockCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _lock_name, const string& _cookie); @@ -749,7 +749,7 @@ public: class RGWOmapAppend : public RGWConsumerCR { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_raw_obj obj; @@ -763,7 +763,7 @@ class RGWOmapAppend : public RGWConsumerCR { uint64_t window_size; uint64_t total_entries; public: - RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWOmapAppend(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, uint64_t _window_size = OMAP_APPEND_MAX_ENTRIES_DEFAULT); int operate() override; @@ -782,14 +782,14 @@ public: class RGWShardedOmapCRManager { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWCoroutine *op; int num_shards; vector shards; public: - RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const string& oid_prefix) + RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const string& oid_prefix) : async_rados(_async_rados), store(_store), op(_op), num_shards(_num_shards) { shards.reserve(num_shards); @@ -826,7 +826,7 @@ public: }; class RGWAsyncGetBucketInstanceInfo : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_bucket bucket; const DoutPrefixProvider *dpp; @@ -834,7 +834,7 @@ protected: int _send_request() override; public: RGWAsyncGetBucketInstanceInfo(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, - rgw::sal::RadosStore *_store, const rgw_bucket& bucket, + rgw::sal::RadosStore* _store, const rgw_bucket& bucket, const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(_store), bucket(bucket), dpp(dpp) {} @@ -844,7 +844,7 @@ public: class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_bucket bucket; RGWBucketInfo *bucket_info; map *pattrs; @@ -854,7 +854,7 @@ class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine { public: // rgw_bucket constructor - RGWGetBucketInstanceInfoCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWGetBucketInstanceInfoCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_bucket& _bucket, RGWBucketInfo *_bucket_info, map *_pattrs, const DoutPrefixProvider *dpp) : RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), store(_store), @@ -891,7 +891,7 @@ class RGWRadosBILogTrimCR : public RGWSimpleCoroutine { std::string end_marker; boost::intrusive_ptr cn; public: - RGWRadosBILogTrimCR(rgw::sal::RadosStore *store, const RGWBucketInfo& bucket_info, + RGWRadosBILogTrimCR(rgw::sal::RadosStore* store, const RGWBucketInfo& bucket_info, int shard_id, const std::string& start_marker, const std::string& end_marker); @@ -900,7 +900,7 @@ class RGWRadosBILogTrimCR : public RGWSimpleCoroutine { }; class RGWAsyncFetchRemoteObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; std::optional user_id; @@ -924,7 +924,7 @@ class RGWAsyncFetchRemoteObj : public RGWAsyncRadosRequest { protected: int _send_request() override; public: - RGWAsyncFetchRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncFetchRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, std::optional& _user_id, const rgw_bucket& _src_bucket, @@ -960,7 +960,7 @@ public: class RGWFetchRemoteObjCR : public RGWSimpleCoroutine { CephContext *cct; RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; std::optional user_id; @@ -985,7 +985,7 @@ class RGWFetchRemoteObjCR : public RGWSimpleCoroutine { const DoutPrefixProvider *dpp; public: - RGWFetchRemoteObjCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWFetchRemoteObjCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, std::optional _user_id, const rgw_bucket& _src_bucket, @@ -1040,7 +1040,7 @@ public: }; class RGWAsyncStatRemoteObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; rgw_bucket src_bucket; @@ -1055,7 +1055,7 @@ class RGWAsyncStatRemoteObj : public RGWAsyncRadosRequest { protected: int _send_request() override; public: - RGWAsyncStatRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncStatRemoteObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, rgw_bucket& _src_bucket, const rgw_obj_key& _key, @@ -1077,7 +1077,7 @@ public: class RGWStatRemoteObjCR : public RGWSimpleCoroutine { CephContext *cct; RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; rgw_bucket src_bucket; @@ -1092,7 +1092,7 @@ class RGWStatRemoteObjCR : public RGWSimpleCoroutine { RGWAsyncStatRemoteObj *req; public: - RGWStatRemoteObjCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWStatRemoteObjCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, rgw_bucket& _src_bucket, const rgw_obj_key& _key, @@ -1138,7 +1138,7 @@ public: class RGWAsyncRemoveObj : public RGWAsyncRadosRequest { const DoutPrefixProvider *dpp; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; RGWBucketInfo bucket_info; @@ -1158,7 +1158,7 @@ protected: int _send_request() override; public: RGWAsyncRemoveObj(const DoutPrefixProvider *_dpp, RGWCoroutine *caller, RGWAioCompletionNotifier *cn, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, RGWBucketInfo& _bucket_info, const rgw_obj_key& _key, @@ -1193,7 +1193,7 @@ class RGWRemoveObjCR : public RGWSimpleCoroutine { const DoutPrefixProvider *dpp; CephContext *cct; RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; RGWBucketInfo bucket_info; @@ -1213,7 +1213,7 @@ class RGWRemoveObjCR : public RGWSimpleCoroutine { rgw_zone_set *zones_trace; public: - RGWRemoveObjCR(const DoutPrefixProvider *_dpp, RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWRemoveObjCR(const DoutPrefixProvider *_dpp, RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_zone_id& _source_zone, RGWBucketInfo& _bucket_info, const rgw_obj_key& _key, @@ -1270,7 +1270,7 @@ public: class RGWContinuousLeaseCR : public RGWCoroutine { RGWAsyncRadosProcessor *async_rados; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const rgw_raw_obj obj; @@ -1286,7 +1286,7 @@ class RGWContinuousLeaseCR : public RGWCoroutine { bool aborted{false}; public: - RGWContinuousLeaseCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, + RGWContinuousLeaseCR(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, const rgw_raw_obj& _obj, const string& _lock_name, int _interval, RGWCoroutine *_caller) : RGWCoroutine(_store->ctx()), async_rados(_async_rados), store(_store), @@ -1316,7 +1316,7 @@ public: }; class RGWRadosTimelogAddCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; list entries; string oid; @@ -1324,7 +1324,7 @@ class RGWRadosTimelogAddCR : public RGWSimpleCoroutine { boost::intrusive_ptr cn; public: - RGWRadosTimelogAddCR(rgw::sal::RadosStore *_store, const string& _oid, + RGWRadosTimelogAddCR(rgw::sal::RadosStore* _store, const string& _oid, const cls_log_entry& entry); int send_request() override; @@ -1332,7 +1332,7 @@ public: }; class RGWRadosTimelogTrimCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; boost::intrusive_ptr cn; protected: std::string oid; @@ -1342,7 +1342,7 @@ class RGWRadosTimelogTrimCR : public RGWSimpleCoroutine { std::string to_marker; public: - RGWRadosTimelogTrimCR(rgw::sal::RadosStore *store, const std::string& oid, + RGWRadosTimelogTrimCR(rgw::sal::RadosStore* store, const std::string& oid, const real_time& start_time, const real_time& end_time, const std::string& from_marker, const std::string& to_marker); @@ -1358,13 +1358,13 @@ class RGWSyncLogTrimCR : public RGWRadosTimelogTrimCR { public: static constexpr const char* max_marker = "99999999"; - RGWSyncLogTrimCR(rgw::sal::RadosStore *store, const std::string& oid, + RGWSyncLogTrimCR(rgw::sal::RadosStore* store, const std::string& oid, const std::string& to_marker, std::string *last_trim_marker); int request_complete() override; }; class RGWAsyncStatObj : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWBucketInfo bucket_info; rgw_obj obj; uint64_t *psize; @@ -1374,7 +1374,7 @@ class RGWAsyncStatObj : public RGWAsyncRadosRequest { protected: int _send_request() override; public: - RGWAsyncStatObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *store, + RGWAsyncStatObj(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* store, const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize = nullptr, real_time *pmtime = nullptr, uint64_t *pepoch = nullptr, RGWObjVersionTracker *objv_tracker = nullptr) @@ -1383,7 +1383,7 @@ public: }; class RGWStatObjCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWAsyncRadosProcessor *async_rados; RGWBucketInfo bucket_info; rgw_obj obj; @@ -1393,7 +1393,7 @@ class RGWStatObjCR : public RGWSimpleCoroutine { RGWObjVersionTracker *objv_tracker; RGWAsyncStatObj *req = nullptr; public: - RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RadosStore *store, + RGWStatObjCR(RGWAsyncRadosProcessor *async_rados, rgw::sal::RadosStore* store, const RGWBucketInfo& _bucket_info, const rgw_obj& obj, uint64_t *psize = nullptr, real_time* pmtime = nullptr, uint64_t *pepoch = nullptr, RGWObjVersionTracker *objv_tracker = nullptr); @@ -1408,7 +1408,7 @@ class RGWStatObjCR : public RGWSimpleCoroutine { /// coroutine wrapper for IoCtx::aio_notify() class RGWRadosNotifyCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const rgw_raw_obj obj; bufferlist request; const uint64_t timeout_ms; @@ -1417,7 +1417,7 @@ class RGWRadosNotifyCR : public RGWSimpleCoroutine { boost::intrusive_ptr cn; public: - RGWRadosNotifyCR(rgw::sal::RadosStore *store, const rgw_raw_obj& obj, + RGWRadosNotifyCR(rgw::sal::RadosStore* store, const rgw_raw_obj& obj, bufferlist& request, uint64_t timeout_ms, bufferlist *response); diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index ba8018820f3..f7905c9cf77 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -467,7 +467,7 @@ class RGWInitDataSyncStatusCoroutine : public RGWCoroutine { static constexpr uint32_t lock_duration = 30; RGWDataSyncCtx *sc; RGWDataSyncEnv *sync_env; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const rgw_pool& pool; const uint32_t num_shards; @@ -589,7 +589,7 @@ public: }; RGWRemoteDataLog::RGWRemoteDataLog(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, RGWAsyncRadosProcessor *async_rados) : RGWCoroutinesManager(store->ctx(), store->getRados()->get_cr_registry()), dpp(dpp), store(store), @@ -783,7 +783,7 @@ class RGWListBucketIndexesCR : public RGWCoroutine { RGWDataSyncCtx *sc; RGWDataSyncEnv *sync_env; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_data_sync_status *sync_status; int num_shards; @@ -926,7 +926,7 @@ public: sync_marker(_marker), tn(_tn) {} - RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override { + RGWCoroutine* store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override { sync_marker.marker = new_marker; sync_marker.pos = index_pos; sync_marker.timestamp = timestamp; @@ -2967,7 +2967,7 @@ int RGWReadBucketPipeSyncStatusCoroutine::operate() class RGWReadRecoveringBucketShardsCoroutine : public RGWCoroutine { RGWDataSyncCtx *sc; RGWDataSyncEnv *sync_env; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const int shard_id; int max_entries; @@ -3034,7 +3034,7 @@ int RGWReadRecoveringBucketShardsCoroutine::operate() class RGWReadPendingBucketShardsCoroutine : public RGWCoroutine { RGWDataSyncCtx *sc; RGWDataSyncEnv *sync_env; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const int shard_id; int max_entries; @@ -3146,7 +3146,7 @@ RGWCoroutine *RGWRemoteBucketManager::read_sync_status_cr(int num, rgw_bucket_sh return new RGWReadBucketPipeSyncStatusCoroutine(&sc, sync_pairs[num], sync_status, nullptr); } -RGWBucketPipeSyncStatusManager::RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore *_store, +RGWBucketPipeSyncStatusManager::RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore* _store, std::optional _source_zone, std::optional _source_bucket, const rgw_bucket& _dest_bucket) : store(_store), @@ -3355,7 +3355,7 @@ public: sync_marker(_marker), tn(std::move(tn)), objv_tracker(objv_tracker) {} - RGWCoroutine *store_marker(const rgw_obj_key& new_marker, uint64_t index_pos, const real_time& timestamp) override { + RGWCoroutine* store_marker(const rgw_obj_key& new_marker, uint64_t index_pos, const real_time& timestamp) override { sync_marker.position = new_marker; sync_marker.count = index_pos; @@ -3457,7 +3457,7 @@ public: stable_timestamp(stable_timestamp) {} - RGWCoroutine *store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override { + RGWCoroutine* store_marker(const string& new_marker, uint64_t index_pos, const real_time& timestamp) override { sync_marker.position = new_marker; sync_marker.timestamp = timestamp; @@ -4953,7 +4953,7 @@ int rgw_read_remote_bilog_info(RGWRESTConn* conn, class RGWCollectBucketSyncStatusCR : public RGWShardCollectCR { static constexpr int max_concurrent_shards = 16; - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWDataSyncCtx *const sc; RGWDataSyncEnv *const env; RGWBucketInfo source_bucket_info; @@ -4969,7 +4969,7 @@ class RGWCollectBucketSyncStatusCR : public RGWShardCollectCR { Vector::iterator i, end; public: - RGWCollectBucketSyncStatusCR(rgw::sal::RadosStore *store, RGWDataSyncCtx *sc, + RGWCollectBucketSyncStatusCR(rgw::sal::RadosStore* store, RGWDataSyncCtx *sc, const RGWBucketInfo& source_bucket_info, const RGWBucketInfo& dest_bucket_info, Vector *status) @@ -5008,7 +5008,7 @@ class RGWCollectBucketSyncStatusCR : public RGWShardCollectCR { }; int rgw_bucket_sync_status(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const rgw_sync_bucket_pipe& pipe, const RGWBucketInfo& dest_bucket_info, const RGWBucketInfo *psource_bucket_info, diff --git a/src/rgw/rgw_data_sync.h b/src/rgw/rgw_data_sync.h index fbdfc0d086f..42b97b7b9ce 100644 --- a/src/rgw/rgw_data_sync.h +++ b/src/rgw/rgw_data_sync.h @@ -298,7 +298,7 @@ class RGWServices; struct RGWDataSyncEnv { const DoutPrefixProvider *dpp{nullptr}; CephContext *cct{nullptr}; - rgw::sal::RadosStore *store{nullptr}; + rgw::sal::RadosStore* store{nullptr}; RGWServices *svc{nullptr}; RGWAsyncRadosProcessor *async_rados{nullptr}; RGWHTTPManager *http_manager{nullptr}; @@ -309,7 +309,7 @@ struct RGWDataSyncEnv { RGWDataSyncEnv() {} - void init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore *_store, RGWServices *_svc, + void init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore* _store, RGWServices *_svc, RGWAsyncRadosProcessor *_async_rados, RGWHTTPManager *_http_manager, RGWSyncErrorLogger *_error_logger, RGWSyncTraceManager *_sync_tracer, RGWSyncModuleInstanceRef& _sync_module, @@ -351,7 +351,7 @@ class RGWRados; class RGWRemoteDataLog : public RGWCoroutinesManager { const DoutPrefixProvider *dpp; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; CephContext *cct; RGWCoroutinesManagerRegistry *cr_registry; RGWAsyncRadosProcessor *async_rados; @@ -369,7 +369,7 @@ class RGWRemoteDataLog : public RGWCoroutinesManager { public: RGWRemoteDataLog(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados); int init(const rgw_zone_id& _source_zone, RGWRESTConn *_conn, RGWSyncErrorLogger *_error_logger, RGWSyncTraceManager *_sync_tracer, RGWSyncModuleInstanceRef& module, @@ -389,7 +389,7 @@ public: }; class RGWDataSyncStatusManager : public DoutPrefixProvider { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw_zone_id source_zone; RGWRESTConn *conn; @@ -407,12 +407,12 @@ class RGWDataSyncStatusManager : public DoutPrefixProvider { int num_shards; public: - RGWDataSyncStatusManager(rgw::sal::RadosStore *_store, RGWAsyncRadosProcessor *async_rados, + RGWDataSyncStatusManager(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados, const rgw_zone_id& _source_zone, PerfCounters* counters) : store(_store), source_zone(_source_zone), conn(NULL), error_logger(NULL), sync_module(nullptr), counters(counters), source_log(this, store, async_rados), num_shards(0) {} - RGWDataSyncStatusManager(rgw::sal::RadosStore *_store, RGWAsyncRadosProcessor *async_rados, + RGWDataSyncStatusManager(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados, const rgw_zone_id& _source_zone, PerfCounters* counters, const RGWSyncModuleInstanceRef& _sync_module) : store(_store), source_zone(_source_zone), conn(NULL), error_logger(NULL), @@ -620,7 +620,7 @@ int rgw_read_remote_bilog_info(RGWRESTConn* conn, optional_yield y); class RGWBucketPipeSyncStatusManager : public DoutPrefixProvider { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWDataSyncEnv sync_env; @@ -648,7 +648,7 @@ class RGWBucketPipeSyncStatusManager : public DoutPrefixProvider { int num_shards; public: - RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore *_store, + RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore* _store, std::optional _source_zone, std::optional _source_bucket, const rgw_bucket& dest_bucket); @@ -675,7 +675,7 @@ public: /// read the sync status of all bucket shards from the given source zone int rgw_bucket_sync_status(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const rgw_sync_bucket_pipe& pipe, const RGWBucketInfo& dest_bucket_info, const RGWBucketInfo *psource_bucket_info, diff --git a/src/rgw/rgw_frontend.h b/src/rgw/rgw_frontend.h index ec9c6b3db51..c767a613189 100644 --- a/src/rgw/rgw_frontend.h +++ b/src/rgw/rgw_frontend.h @@ -289,7 +289,7 @@ class RGWFrontendPauser : public RGWRealmReloader::Pauser { if (pauser) pauser->pause(); } - void resume(rgw::sal::Store *store) override { + void resume(rgw::sal::Store* store) override { /* Initialize the registry of auth strategies which will coordinate * the dynamic reconfiguration. */ auto auth_registry = \ diff --git a/src/rgw/rgw_lc.cc b/src/rgw/rgw_lc.cc index d35093e1658..572e51986d6 100644 --- a/src/rgw/rgw_lc.cc +++ b/src/rgw/rgw_lc.cc @@ -239,7 +239,7 @@ void *RGWLC::LCWorker::entry() { return NULL; } -void RGWLC::initialize(CephContext *_cct, rgw::sal::Store *_store) { +void RGWLC::initialize(CephContext *_cct, rgw::sal::Store* _store) { cct = _cct; store = _store; sal_lc = store->get_lifecycle(); @@ -416,7 +416,7 @@ static bool pass_object_lock_check(rgw::sal::Store* store, rgw::sal::Object* obj } class LCObjsLister { - rgw::sal::Store *store; + rgw::sal::Store* store; rgw::sal::Bucket* bucket; rgw::sal::Bucket::ListParams list_params; rgw::sal::Bucket::ListResults list_results; @@ -426,7 +426,7 @@ class LCObjsLister { int64_t delay_ms; public: - LCObjsLister(rgw::sal::Store *_store, rgw::sal::Bucket* _bucket) : + LCObjsLister(rgw::sal::Store* _store, rgw::sal::Bucket* _bucket) : store(_store), bucket(_bucket) { list_params.list_versions = bucket->versioned(); list_params.allow_unordered = true; @@ -508,12 +508,12 @@ struct op_env { using LCWorker = RGWLC::LCWorker; lc_op op; - rgw::sal::Store *store; + rgw::sal::Store* store; LCWorker* worker; rgw::sal::Bucket* bucket; LCObjsLister& ol; - op_env(lc_op& _op, rgw::sal::Store *_store, LCWorker* _worker, + op_env(lc_op& _op, rgw::sal::Store* _store, LCWorker* _worker, rgw::sal::Bucket* _bucket, LCObjsLister& _ol) : op(_op), store(_store), worker(_worker), bucket(_bucket), ol(_ol) {} @@ -529,7 +529,7 @@ struct lc_op_ctx { boost::optional next_key_name; ceph::real_time effective_mtime; - rgw::sal::Store *store; + rgw::sal::Store* store; rgw::sal::Bucket* bucket; lc_op& op; // ok--refers to expanded env.op LCObjsLister& ol; diff --git a/src/rgw/rgw_lc.h b/src/rgw/rgw_lc.h index d7abb3ba892..4bcac3cd49d 100644 --- a/src/rgw/rgw_lc.h +++ b/src/rgw/rgw_lc.h @@ -461,7 +461,7 @@ WRITE_CLASS_ENCODER(RGWLifecycleConfiguration) class RGWLC : public DoutPrefixProvider { CephContext *cct; - rgw::sal::Store *store; + rgw::sal::Store* store; std::unique_ptr sal_lc; int max_objs{0}; string *obj_names{nullptr}; @@ -508,7 +508,7 @@ public: RGWLC() : cct(nullptr), store(nullptr) {} ~RGWLC(); - void initialize(CephContext *_cct, rgw::sal::Store *_store); + void initialize(CephContext *_cct, rgw::sal::Store* _store); void finalize(); int process(LCWorker* worker, bool once); @@ -533,7 +533,7 @@ public: const rgw::sal::Attrs& bucket_attrs); CephContext *get_cct() const override { return cct; } - rgw::sal::Lifecycle *get_lc() const { return sal_lc.get(); } + rgw::sal::Lifecycle* get_lc() const { return sal_lc.get(); } unsigned get_subsys() const; std::ostream& gen_prefix(std::ostream& out) const; @@ -546,7 +546,7 @@ public: namespace rgw::lc { -int fix_lc_shard_entry(rgw::sal::Store *store, +int fix_lc_shard_entry(rgw::sal::Store* store, rgw::sal::Lifecycle* sal_lc, rgw::sal::Bucket* bucket); diff --git a/src/rgw/rgw_lib.h b/src/rgw/rgw_lib.h index 0474a772539..d7c6a632179 100644 --- a/src/rgw/rgw_lib.h +++ b/src/rgw/rgw_lib.h @@ -121,7 +121,7 @@ namespace rgw { RGWHandler_Lib() {} ~RGWHandler_Lib() override {} - static int init_from_header(rgw::sal::Store *store, + static int init_from_header(rgw::sal::Store* store, struct req_state *s); }; /* RGWHandler_Lib */ diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 364e347a6e8..adbbc8358cb 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -88,7 +88,7 @@ string render_log_object_name(const string& format, /* usage logger */ class UsageLogger { CephContext *cct; - rgw::sal::Store *store; + rgw::sal::Store* store; map usage_map; ceph::mutex lock = ceph::make_mutex("UsageLogger"); int32_t num_entries; @@ -111,7 +111,7 @@ class UsageLogger { } public: - UsageLogger(CephContext *_cct, rgw::sal::Store *_store) : cct(_cct), store(_store), num_entries(0), timer(cct, timer_lock) { + UsageLogger(CephContext *_cct, rgw::sal::Store* _store) : cct(_cct), store(_store), num_entries(0), timer(cct, timer_lock) { timer.init(); std::lock_guard l{timer_lock}; set_timer(); @@ -171,7 +171,7 @@ public: static UsageLogger *usage_logger = NULL; -void rgw_log_usage_init(CephContext *cct, rgw::sal::Store *store) +void rgw_log_usage_init(CephContext *cct, rgw::sal::Store* store) { usage_logger = new UsageLogger(cct, store); } @@ -328,7 +328,7 @@ void OpsLogSocket::log(struct rgw_log_entry& entry) append_output(bl); } -int rgw_log_op(rgw::sal::Store *store, RGWREST* const rest, struct req_state *s, +int rgw_log_op(rgw::sal::Store* store, RGWREST* const rest, struct req_state *s, const string& op_name, OpsLogSocket *olog) { struct rgw_log_entry entry; diff --git a/src/rgw/rgw_main.cc b/src/rgw/rgw_main.cc index 5e6f073aff2..e947f5541b3 100644 --- a/src/rgw/rgw_main.cc +++ b/src/rgw/rgw_main.cc @@ -332,7 +332,7 @@ int radosgw_Main(int argc, const char **argv) #endif const DoutPrefix dp(cct.get(), dout_subsys, "rgw main: "); - rgw::sal::Store *store = + rgw::sal::Store* store = StoreManager::get_storage(&dp, g_ceph_context, "rados", g_conf()->rgw_enable_gc_threads, diff --git a/src/rgw/rgw_multi.cc b/src/rgw/rgw_multi.cc index 5ae812c1f12..d66514f2d82 100644 --- a/src/rgw/rgw_multi.cc +++ b/src/rgw/rgw_multi.cc @@ -196,7 +196,7 @@ int list_multipart_parts(struct req_state *s, } int abort_multipart_upload(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, CephContext *cct, + rgw::sal::Store* store, CephContext *cct, RGWObjectCtx *obj_ctx, rgw::sal::Bucket* bucket, RGWMPObj& mp_obj) { @@ -312,7 +312,7 @@ int list_bucket_multiparts(const DoutPrefixProvider *dpp, } int abort_bucket_multiparts(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, CephContext *cct, + rgw::sal::Store* store, CephContext *cct, rgw::sal::Bucket* bucket, string& prefix, string& delim) { constexpr int max = 1000; diff --git a/src/rgw/rgw_multi.h b/src/rgw/rgw_multi.h index daffd4dda71..ca4b8817095 100644 --- a/src/rgw/rgw_multi.h +++ b/src/rgw/rgw_multi.h @@ -123,7 +123,7 @@ extern int list_multipart_parts(struct req_state *s, int *next_marker, bool *truncated, bool assume_unsorted = false); -extern int abort_multipart_upload(const DoutPrefixProvider *dpp, rgw::sal::Store *store, +extern int abort_multipart_upload(const DoutPrefixProvider *dpp, rgw::sal::Store* store, CephContext *cct, RGWObjectCtx *obj_ctx, rgw::sal::Bucket* bucket, RGWMPObj& mp_obj); @@ -137,7 +137,7 @@ extern int list_bucket_multiparts(const DoutPrefixProvider *dpp, map *common_prefixes, bool *is_truncated); extern int abort_bucket_multiparts(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, CephContext *cct, + rgw::sal::Store* store, CephContext *cct, rgw::sal::Bucket* bucket, string& prefix, string& delim); #endif diff --git a/src/rgw/rgw_object_expirer.cc b/src/rgw/rgw_object_expirer.cc index 5a92b5cc17f..19d1ac460b3 100644 --- a/src/rgw/rgw_object_expirer.cc +++ b/src/rgw/rgw_object_expirer.cc @@ -32,13 +32,13 @@ #define dout_subsys ceph_subsys_rgw -static rgw::sal::Store *store = NULL; +static rgw::sal::Store* store = NULL; class StoreDestructor { - rgw::sal::Store *store; + rgw::sal::Store* store; public: - explicit StoreDestructor(rgw::sal::Store *_s) : store(_s) {} + explicit StoreDestructor(rgw::sal::Store* _s) : store(_s) {} ~StoreDestructor() { if (store) { StoreManager::close_storage(store); diff --git a/src/rgw/rgw_object_expirer_core.h b/src/rgw/rgw_object_expirer_core.h index d9a017c9da4..a2ec4250cb4 100644 --- a/src/rgw/rgw_object_expirer_core.h +++ b/src/rgw/rgw_object_expirer_core.h @@ -70,7 +70,7 @@ public: class RGWObjectExpirer { protected: - rgw::sal::Store *store; + rgw::sal::Store* store; RGWObjExpStore exp_store; class OEWorker : public Thread, public DoutPrefixProvider { @@ -98,7 +98,7 @@ protected: std::atomic down_flag = { false }; public: - explicit RGWObjectExpirer(rgw::sal::Store *_store) + explicit RGWObjectExpirer(rgw::sal::Store* _store) : store(_store), exp_store(_store->ctx(), static_cast(store)->svc()->rados, store->get_zone()), worker(NULL) { diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 97a7216bdac..b35f865be18 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -211,7 +211,7 @@ static int get_user_policy_from_attr(CephContext * const cct, */ int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, CephContext *cct, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWBucketInfo& bucket_info, map& bucket_attrs, RGWAccessControlPolicy *policy, @@ -238,7 +238,7 @@ int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, static int get_obj_policy_from_attr(const DoutPrefixProvider *dpp, CephContext *cct, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWObjectCtx& obj_ctx, RGWBucketInfo& bucket_info, map& bucket_attrs, @@ -412,7 +412,7 @@ static int get_multipart_info(const DoutPrefixProvider *dpp, struct req_state *s } static int read_bucket_policy(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, struct req_state *s, RGWBucketInfo& bucket_info, map& bucket_attrs, @@ -439,7 +439,7 @@ static int read_bucket_policy(const DoutPrefixProvider *dpp, } static int read_obj_policy(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, struct req_state *s, RGWBucketInfo& bucket_info, map& bucket_attrs, @@ -710,7 +710,7 @@ int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* st * only_bucket: If true, reads the bucket ACL rather than the object ACL. * Returns: 0 on success, -ERR# otherwise. */ -int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store *store, +int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store, struct req_state *s, bool prefetch_data, optional_yield y) { int ret = 0; @@ -1791,7 +1791,7 @@ int RGWGetObj::handle_user_manifest(const char *prefix, optional_yield y) boost::optional* bucket_policy; RGWBucketInfo bucket_info; std::unique_ptr ubucket; - rgw::sal::Bucket *pbucket = NULL; + rgw::sal::Bucket* pbucket = NULL; int r = 0; if (bucket_name.compare(s->bucket->get_name()) != 0) { @@ -7468,7 +7468,7 @@ RGWHandler::~RGWHandler() { } -int RGWHandler::init(rgw::sal::Store *_store, +int RGWHandler::init(rgw::sal::Store* _store, struct req_state *_s, rgw::io::BasicClient *cio) { diff --git a/src/rgw/rgw_op.h b/src/rgw/rgw_op.h index c793173df41..3de1b5d3b34 100644 --- a/src/rgw/rgw_op.h +++ b/src/rgw/rgw_op.h @@ -76,7 +76,7 @@ class StrategyRegistry; int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, CephContext *cct, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWBucketInfo& bucket_info, map& bucket_attrs, RGWAccessControlPolicy *policy, @@ -172,7 +172,7 @@ class RGWOp : public DoutPrefixProvider { protected: struct req_state *s; RGWHandler *dialect_handler; - rgw::sal::Store *store; + rgw::sal::Store* store; RGWCORSConfiguration bucket_cors; bool cors_exist; RGWQuotaInfo bucket_quota; @@ -229,7 +229,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, struct req_state *s, RGWHandler *dialect_handler) { this->store = store; this->s = s; this->dialect_handler = dialect_handler; @@ -594,11 +594,11 @@ public: unsigned int num_unfound; std::list failures; - rgw::sal::Store * const store; + rgw::sal::Store* const store; req_state * const s; public: - Deleter(const DoutPrefixProvider* dpp, rgw::sal::Store * const str, req_state * const s) + Deleter(const DoutPrefixProvider* dpp, rgw::sal::Store* const str, req_state * const s) : dpp(dpp), num_deleted(0), num_unfound(0), @@ -920,7 +920,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, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); } virtual int get_params(optional_yield y) = 0; @@ -1093,7 +1093,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, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); policy.set_ctx(s->cct); relaxed_region_enforcement = @@ -1246,7 +1246,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, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); policy.set_ctx(s->cct); } @@ -1318,7 +1318,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, struct 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, struct 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, struct 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, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); policy.set_ctx(s->cct); } @@ -1546,7 +1546,7 @@ public: 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, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); dest_policy.set_ctx(s->cct); } @@ -1599,7 +1599,7 @@ public: void pre_exec() override; void execute(optional_yield y) override; - virtual int get_policy_from_state(rgw::sal::Store *store, struct req_state *s, stringstream& ss) { return 0; } + virtual int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, 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"; } @@ -1636,7 +1636,7 @@ public: } ~RGWPutLC() override {} - void init(rgw::sal::Store *store, struct req_state *s, RGWHandler *dialect_handler) override { + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *dialect_handler) override { #define COOKIE_LEN 16 char buf[COOKIE_LEN + 1]; @@ -1649,7 +1649,7 @@ public: void pre_exec() override; void execute(optional_yield y) override; -// virtual int get_policy_from_state(RGWRados *store, struct req_state *s, stringstream& ss) { return 0; } +// virtual int get_policy_from_state(RGWRados* store, struct req_state *s, 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"; } @@ -1784,7 +1784,7 @@ protected: public: RGWInitMultipart() {} - void init(rgw::sal::Store *store, struct req_state *s, RGWHandler *h) override { + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); policy.set_ctx(s->cct); } @@ -1854,7 +1854,7 @@ public: truncated = false; } - void init(rgw::sal::Store *store, struct req_state *s, RGWHandler *h) override { + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); policy = RGWAccessControlPolicy(s->cct); } @@ -1901,7 +1901,7 @@ public: default_max = 0; } - void init(rgw::sal::Store *store, struct req_state *s, RGWHandler *h) override { + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); max_uploads = default_max; } @@ -2012,7 +2012,7 @@ public: extern int rgw_build_bucket_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store, struct req_state* s, optional_yield y); -extern int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store *store, +extern int rgw_build_object_policies(const DoutPrefixProvider *dpp, rgw::sal::Store* store, struct req_state *s, bool prefetch_data, optional_yield y); extern void rgw_build_iam_environment(rgw::sal::Store* store, struct req_state* s); @@ -2483,7 +2483,7 @@ protected: public: RGWGetClusterStat() {} - void init(rgw::sal::Store *store, struct req_state *s, RGWHandler *h) override { + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *h) override { RGWOp::init(store, s, h); } int verify_permission(optional_yield) override {return 0;} diff --git a/src/rgw/rgw_orphan.h b/src/rgw/rgw_orphan.h index e94bdfa003c..0756d31a034 100644 --- a/src/rgw/rgw_orphan.h +++ b/src/rgw/rgw_orphan.h @@ -123,13 +123,13 @@ struct RGWOrphanSearchState { WRITE_CLASS_ENCODER(RGWOrphanSearchState) class RGWOrphanStore { - rgw::sal::Store *store; + rgw::sal::Store* store; librados::IoCtx ioctx; string oid; public: - explicit RGWOrphanStore(rgw::sal::Store *_store) : store(_store), oid(RGW_ORPHAN_INDEX_OID) {} + explicit RGWOrphanStore(rgw::sal::Store* _store) : store(_store), oid(RGW_ORPHAN_INDEX_OID) {} librados::IoCtx& get_ioctx() { return ioctx; } @@ -147,7 +147,7 @@ public: class RGWOrphanSearch { - rgw::sal::Store *store; + rgw::sal::Store* store; RGWOrphanStore orphan_store; @@ -185,7 +185,7 @@ class RGWOrphanSearch { int remove_index(map& index); public: - RGWOrphanSearch(rgw::sal::Store *_store, int _max_ios, uint64_t _stale_secs) : store(_store), orphan_store(store), max_concurrent_ios(_max_ios), stale_secs(_stale_secs) {} + RGWOrphanSearch(rgw::sal::Store* _store, int _max_ios, uint64_t _stale_secs) : store(_store), orphan_store(store), max_concurrent_ios(_max_ios), stale_secs(_stale_secs) {} int save_state() { RGWOrphanSearchState state; diff --git a/src/rgw/rgw_os_lib.cc b/src/rgw/rgw_os_lib.cc index f6e205a4124..379f4a911a4 100644 --- a/src/rgw/rgw_os_lib.cc +++ b/src/rgw/rgw_os_lib.cc @@ -11,7 +11,7 @@ namespace rgw { /* static */ - int RGWHandler_Lib::init_from_header(rgw::sal::Store *store, + int RGWHandler_Lib::init_from_header(rgw::sal::Store* store, struct req_state *s) { string req; diff --git a/src/rgw/rgw_period_pusher.cc b/src/rgw/rgw_period_pusher.cc index e728787ad5b..b94b9cc243d 100644 --- a/src/rgw/rgw_period_pusher.cc +++ b/src/rgw/rgw_period_pusher.cc @@ -170,7 +170,7 @@ RGWPeriodPusher::RGWPeriodPusher(rgw::sal::Store* store, // always send out the current period on startup RGWPeriod period; // XXX dang - int r = period.init(cct, static_cast(store)->svc()->sysobj, realm_id, y, realm.get_name()); + int r = period.init(cct, static_cast(store)->svc()->sysobj, realm_id, y, realm.get_name()); if (r < 0) { lderr(cct) << "failed to load period for realm " << realm_id << dendl; return; diff --git a/src/rgw/rgw_process.h b/src/rgw/rgw_process.h index 1fce4d39c1b..a6c040f37b6 100644 --- a/src/rgw/rgw_process.h +++ b/src/rgw/rgw_process.h @@ -32,7 +32,7 @@ namespace rgw::dmclock { } struct RGWProcessEnv { - rgw::sal::Store *store; + rgw::sal::Store* store; RGWREST *rest; OpsLogSocket *olog; int port; diff --git a/src/rgw/rgw_pubsub.cc b/src/rgw/rgw_pubsub.cc index 05cf52e3d4d..96a52488639 100644 --- a/src/rgw/rgw_pubsub.cc +++ b/src/rgw/rgw_pubsub.cc @@ -541,7 +541,7 @@ int RGWPubSub::Bucket::create_notification(const string& topic_name, const rgw:: int RGWPubSub::Bucket::create_notification(const string& topic_name,const rgw::notify::EventTypeList& events, OptionalFilter s3_filter, const std::string& notif_name, optional_yield y) { rgw_pubsub_topic_subs topic_info; - rgw::sal::RadosStore *store = ps->store; + rgw::sal::RadosStore* store = ps->store; int ret = ps->get_topic(topic_name, &topic_info); if (ret < 0) { @@ -584,7 +584,7 @@ int RGWPubSub::Bucket::create_notification(const string& topic_name,const rgw::n int RGWPubSub::Bucket::remove_notification(const string& topic_name, optional_yield y) { rgw_pubsub_topic_subs topic_info; - rgw::sal::RadosStore *store = ps->store; + rgw::sal::RadosStore* store = ps->store; int ret = ps->get_topic(topic_name, &topic_info); if (ret < 0) { @@ -753,7 +753,7 @@ int RGWPubSub::Sub::subscribe(const string& topic, const rgw_pubsub_sub_dest& de { RGWObjVersionTracker objv_tracker; rgw_pubsub_topics topics; - rgw::sal::RadosStore *store = ps->store; + rgw::sal::RadosStore* store = ps->store; int ret = ps->read_topics(&topics, &objv_tracker); if (ret < 0) { @@ -797,7 +797,7 @@ int RGWPubSub::Sub::unsubscribe(const string& _topic, optional_yield y) { string topic = _topic; RGWObjVersionTracker sobjv_tracker; - rgw::sal::RadosStore *store = ps->store; + rgw::sal::RadosStore* store = ps->store; if (topic.empty()) { rgw_pubsub_sub_config sub_conf; @@ -919,7 +919,7 @@ int RGWPubSub::SubWithEvents::list_events(const DoutPrefixProvider *d template int RGWPubSub::SubWithEvents::remove_event(const DoutPrefixProvider *dpp, const string& event_id) { - rgw::sal::RadosStore *store = ps->store; + rgw::sal::RadosStore* store = ps->store; rgw_pubsub_sub_config sub_conf; int ret = get_conf(&sub_conf); if (ret < 0) { diff --git a/src/rgw/rgw_pubsub.h b/src/rgw/rgw_pubsub.h index d8a6bdd3635..617b7e93d9d 100644 --- a/src/rgw/rgw_pubsub.h +++ b/src/rgw/rgw_pubsub.h @@ -593,7 +593,7 @@ class RGWPubSub { friend class Bucket; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const std::string tenant; RGWSysObjectCtx obj_ctx; @@ -626,7 +626,7 @@ class RGWPubSub RGWObjVersionTracker* objv_tracker, optional_yield y); public: - RGWPubSub(rgw::sal::RadosStore *_store, const std::string& tenant); + RGWPubSub(rgw::sal::RadosStore* _store, const std::string& tenant); class Bucket { friend class RGWPubSub; diff --git a/src/rgw/rgw_putobj_processor.h b/src/rgw/rgw_putobj_processor.h index 658ecb3fb8b..5d450b098de 100644 --- a/src/rgw/rgw_putobj_processor.h +++ b/src/rgw/rgw_putobj_processor.h @@ -79,7 +79,7 @@ class HeadObjectProcessor : public ObjectProcessor { class ManifestObjectProcessor : public HeadObjectProcessor, public StripeGenerator { protected: - rgw::sal::Store *const store; + rgw::sal::Store* const store; rgw::sal::Bucket* bucket; rgw_placement_rule tail_placement_rule; rgw_user owner; @@ -97,7 +97,7 @@ class ManifestObjectProcessor : public HeadObjectProcessor, int next(uint64_t offset, uint64_t *stripe_size) override; public: - ManifestObjectProcessor(Aio *aio, rgw::sal::Store *store, + ManifestObjectProcessor(Aio *aio, rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_placement_rule *ptail_placement_rule, const rgw_user& owner, RGWObjectCtx& obj_ctx, @@ -139,7 +139,7 @@ class AtomicObjectProcessor : public ManifestObjectProcessor { int process_first_chunk(bufferlist&& data, DataProcessor **processor) override; public: - AtomicObjectProcessor(Aio *aio, rgw::sal::Store *store, + AtomicObjectProcessor(Aio *aio, rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_placement_rule *ptail_placement_rule, const rgw_user& owner, @@ -184,7 +184,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor { // prepare the head stripe and manifest int prepare_head(); public: - MultipartObjectProcessor(Aio *aio, rgw::sal::Store *store, + MultipartObjectProcessor(Aio *aio, rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_placement_rule *ptail_placement_rule, const rgw_user& owner, RGWObjectCtx& obj_ctx, @@ -227,7 +227,7 @@ class MultipartObjectProcessor : public ManifestObjectProcessor { int process_first_chunk(bufferlist&& data, DataProcessor **processor) override; public: - AppendObjectProcessor(Aio *aio, rgw::sal::Store *store, + AppendObjectProcessor(Aio *aio, rgw::sal::Store* store, rgw::sal::Bucket* bucket, const rgw_placement_rule *ptail_placement_rule, const rgw_user& owner, RGWObjectCtx& obj_ctx, diff --git a/src/rgw/rgw_quota.cc b/src/rgw/rgw_quota.cc index b137852bb33..e8cfa07d4ab 100644 --- a/src/rgw/rgw_quota.cc +++ b/src/rgw/rgw_quota.cc @@ -45,7 +45,7 @@ struct RGWQuotaCacheStats { template class RGWQuotaCache { protected: - rgw::sal::Store *store; + rgw::sal::Store* store; lru_map stats_map; RefCountedWaitObject *async_refcount; @@ -74,7 +74,7 @@ protected: virtual void data_modified(const rgw_user& user, rgw_bucket& bucket) {} public: - RGWQuotaCache(rgw::sal::Store *_store, int size) : store(_store), stats_map(size) { + RGWQuotaCache(rgw::sal::Store* _store, int size) : store(_store), stats_map(size) { async_refcount = new RefCountedWaitObject; } virtual ~RGWQuotaCache() { @@ -93,10 +93,10 @@ public: class AsyncRefreshHandler { protected: - rgw::sal::Store *store; + rgw::sal::Store* store; RGWQuotaCache *cache; public: - AsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache *_cache) : store(_store), cache(_cache) {} + AsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache *_cache) : store(_store), cache(_cache) {} virtual ~AsyncRefreshHandler() {} virtual int init_fetch() = 0; @@ -281,7 +281,7 @@ class BucketAsyncRefreshHandler : public RGWQuotaCache::AsyncRefresh public RGWGetBucketStats_CB { rgw_user user; public: - BucketAsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache *_cache, + BucketAsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache *_cache, const rgw_user& _user, const rgw_bucket& _bucket) : RGWQuotaCache::AsyncRefreshHandler(_store, _cache), RGWGetBucketStats_CB(_bucket), user(_user) {} @@ -353,7 +353,7 @@ protected: int fetch_stats_from_storage(const rgw_user& user, const rgw_bucket& bucket, RGWStorageStats& stats, optional_yield y, const DoutPrefixProvider *dpp) override; public: - explicit RGWBucketStatsCache(rgw::sal::Store *_store) : RGWQuotaCache(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) { + explicit RGWBucketStatsCache(rgw::sal::Store* _store) : RGWQuotaCache(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) { } AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, const rgw_bucket& bucket) override { @@ -400,7 +400,7 @@ class UserAsyncRefreshHandler : public RGWQuotaCache::AsyncRefreshHand public RGWGetUserStats_CB { rgw_bucket bucket; public: - UserAsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache *_cache, + UserAsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache *_cache, const rgw_user& _user, const rgw_bucket& _bucket) : RGWQuotaCache::AsyncRefreshHandler(_store, _cache), RGWGetUserStats_CB(_user), @@ -574,7 +574,7 @@ protected: } public: - RGWUserStatsCache(rgw::sal::Store *_store, bool quota_threads) + RGWUserStatsCache(rgw::sal::Store* _store, bool quota_threads) : RGWQuotaCache(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) { if (quota_threads) { @@ -891,7 +891,7 @@ const RGWQuotaInfoApplier& RGWQuotaInfoApplier::get_instance( class RGWQuotaHandlerImpl : public RGWQuotaHandler { - rgw::sal::Store *store; + rgw::sal::Store* store; RGWBucketStatsCache bucket_stats_cache; RGWUserStatsCache user_stats_cache; @@ -925,7 +925,7 @@ class RGWQuotaHandlerImpl : public RGWQuotaHandler { return 0; } public: - RGWQuotaHandlerImpl(rgw::sal::Store *_store, bool quota_threads) : store(_store), + RGWQuotaHandlerImpl(rgw::sal::Store* _store, bool quota_threads) : store(_store), bucket_stats_cache(_store), user_stats_cache(_store, quota_threads) {} @@ -998,7 +998,7 @@ public: }; -RGWQuotaHandler *RGWQuotaHandler::generate_handler(rgw::sal::Store *store, bool quota_threads) +RGWQuotaHandler *RGWQuotaHandler::generate_handler(rgw::sal::Store* store, bool quota_threads) { return new RGWQuotaHandlerImpl(store, quota_threads); } diff --git a/src/rgw/rgw_quota.h b/src/rgw/rgw_quota.h index 7aaf4f555c0..271cf1ead6a 100644 --- a/src/rgw/rgw_quota.h +++ b/src/rgw/rgw_quota.h @@ -115,7 +115,7 @@ public: virtual void update_stats(const rgw_user& bucket_owner, rgw_bucket& bucket, int obj_delta, uint64_t added_bytes, uint64_t removed_bytes) = 0; - static RGWQuotaHandler *generate_handler(rgw::sal::Store *store, bool quota_threads); + static RGWQuotaHandler *generate_handler(rgw::sal::Store* store, bool quota_threads); static void free_handler(RGWQuotaHandler *handler); }; diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 0b43c729f99..3d11536cdbf 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -292,7 +292,7 @@ void RGWObjVersionTracker::generate_new_write_ver(CephContext *cct) } class RGWMetaNotifierManager : public RGWCoroutinesManager { - RGWRados *store; + RGWRados* store; RGWHTTPManager http_manager; public: @@ -319,7 +319,7 @@ public: }; class RGWDataNotifierManager : public RGWCoroutinesManager { - RGWRados *store; + RGWRados* store; RGWHTTPManager http_manager; public: @@ -497,7 +497,7 @@ class RGWMetaSyncProcessorThread : public RGWSyncProcessorThread sync.stop(); } public: - RGWMetaSyncProcessorThread(rgw::sal::RadosStore *_store, RGWAsyncRadosProcessor *async_rados) + RGWMetaSyncProcessorThread(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados) : RGWSyncProcessorThread(_store->getRados(), "meta-sync"), sync(_store, async_rados) {} void wakeup_sync_shards(set& shard_ids) { @@ -540,7 +540,7 @@ class RGWDataSyncProcessorThread : public RGWSyncProcessorThread sync.stop(); } public: - RGWDataSyncProcessorThread(rgw::sal::RadosStore *_store, RGWAsyncRadosProcessor *async_rados, + RGWDataSyncProcessorThread(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados, const RGWZone* source_zone) : RGWSyncProcessorThread(_store->getRados(), "data-sync"), counters(sync_counters::build(store->ctx(), std::string("data-sync-from-") + source_zone->name)), @@ -579,7 +579,7 @@ public: class RGWSyncLogTrimThread : public RGWSyncProcessorThread, DoutPrefixProvider { RGWCoroutinesManager crs; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; rgw::BucketTrimManager *bucket_trim; RGWHTTPManager http; const utime_t trim_interval; @@ -587,7 +587,7 @@ class RGWSyncLogTrimThread : public RGWSyncProcessorThread, DoutPrefixProvider uint64_t interval_msec() override { return 0; } void stop_process() override { crs.stop(); } public: - RGWSyncLogTrimThread(rgw::sal::RadosStore *store, rgw::BucketTrimManager *bucket_trim, + RGWSyncLogTrimThread(rgw::sal::RadosStore* store, rgw::BucketTrimManager *bucket_trim, int interval) : RGWSyncProcessorThread(store->getRados(), "sync-log-trim"), crs(store->ctx(), store->getRados()->get_cr_registry()), store(store), diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 6ab89b4fdbe..a1d0c719800 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -224,20 +224,20 @@ public: }; class RGWObjectCtx { - rgw::sal::Store *store; + rgw::sal::Store* store; ceph::shared_mutex lock = ceph::make_shared_mutex("RGWObjectCtx"); void *s{nullptr}; std::map objs_state; public: - explicit RGWObjectCtx(rgw::sal::Store *_store) : store(_store) {} - explicit RGWObjectCtx(rgw::sal::Store *_store, void *_s) : store(_store), s(_s) {} + explicit RGWObjectCtx(rgw::sal::Store* _store) : store(_store) {} + explicit RGWObjectCtx(rgw::sal::Store* _store, void *_s) : store(_store), s(_s) {} void *get_private() { return s; } - rgw::sal::Store *get_store() { + rgw::sal::Store* get_store() { return store; } @@ -400,7 +400,7 @@ class RGWRados ceph::mutex lock = ceph::make_mutex("rados_timer_lock"); SafeTimer *timer; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWGC *gc; RGWLC *lc; RGWObjectExpirer *obj_expirer; @@ -545,7 +545,7 @@ public: void set_context(CephContext *_cct) { cct = _cct; } - void set_store(rgw::sal::RadosStore *_store) { + void set_store(rgw::sal::RadosStore* _store) { store = _store; } diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index 5740927b487..4c8af6ab522 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -59,7 +59,7 @@ const std::initializer_list RGWBucketReshard::reshard_primes = { }; class BucketReshardShard { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const RGWBucketInfo& bucket_info; int num_shard; const rgw::bucket_index_layout_generation& idx_layout; @@ -103,7 +103,7 @@ class BucketReshardShard { public: BucketReshardShard(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *_store, const RGWBucketInfo& _bucket_info, + rgw::sal::RadosStore* _store, const RGWBucketInfo& _bucket_info, int _num_shard, const rgw::bucket_index_layout_generation& _idx_layout, deque& _completions) : store(_store), bucket_info(_bucket_info), idx_layout(_idx_layout), bs(store->getRados()), @@ -183,7 +183,7 @@ public: class BucketReshardManager { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; const RGWBucketInfo& target_bucket_info; deque completions; int num_target_shards; @@ -191,7 +191,7 @@ class BucketReshardManager { public: BucketReshardManager(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, const RGWBucketInfo& _target_bucket_info, int _num_target_shards) : store(_store), target_bucket_info(_target_bucket_info), @@ -250,7 +250,7 @@ public: } }; // class BucketReshardManager -RGWBucketReshard::RGWBucketReshard(rgw::sal::RadosStore *_store, +RGWBucketReshard::RGWBucketReshard(rgw::sal::RadosStore* _store, const RGWBucketInfo& _bucket_info, const map& _bucket_attrs, RGWBucketReshardLock* _outer_reshard_lock) : @@ -327,7 +327,7 @@ int RGWBucketReshard::clear_index_shard_reshard_status(rgw::sal::RadosStore* sto return 0; } -static int create_new_bucket_instance(rgw::sal::RadosStore *store, +static int create_new_bucket_instance(rgw::sal::RadosStore* store, int new_num_shards, const RGWBucketInfo& bucket_info, map& attrs, @@ -383,7 +383,7 @@ int RGWBucketReshard::cancel() class BucketInfoReshardUpdate { const DoutPrefixProvider *dpp; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWBucketInfo& bucket_info; std::map bucket_attrs; @@ -401,7 +401,7 @@ class BucketInfoReshardUpdate public: BucketInfoReshardUpdate(const DoutPrefixProvider *_dpp, - rgw::sal::RadosStore *_store, + rgw::sal::RadosStore* _store, RGWBucketInfo& _bucket_info, map& _bucket_attrs, const string& new_bucket_id) : diff --git a/src/rgw/rgw_reshard.h b/src/rgw/rgw_reshard.h index 7803d9c9073..3c4a984b417 100644 --- a/src/rgw/rgw_reshard.h +++ b/src/rgw/rgw_reshard.h @@ -73,7 +73,7 @@ public: private: - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWBucketInfo bucket_info; std::map bucket_attrs; @@ -98,7 +98,7 @@ public: // pass nullptr for the final parameter if no outer reshard lock to // manage - RGWBucketReshard(rgw::sal::RadosStore *_store, + RGWBucketReshard(rgw::sal::RadosStore* _store, const RGWBucketInfo& _bucket_info, const std::map& _bucket_attrs, RGWBucketReshardLock* _outer_reshard_lock); @@ -194,7 +194,7 @@ public: using Clock = ceph::coarse_mono_clock; private: - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; string lock_name; rados::cls::lock::Lock instance_lock; int num_logshards; diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc index bfca9d4df91..d12f7f4d6a5 100644 --- a/src/rgw/rgw_rest.cc +++ b/src/rgw/rgw_rest.cc @@ -2271,7 +2271,7 @@ int RGWREST::preprocess(struct req_state *s, rgw::io::BasicClient* cio) } RGWHandler_REST* RGWREST::get_handler( - rgw::sal::Store * const store, + rgw::sal::Store* const store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix, diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h index cd1a30693db..6849fb443cb 100644 --- a/src/rgw/rgw_rest.h +++ b/src/rgw/rgw_rest.h @@ -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, struct req_state *s, RGWHandler *h) override { RGWGetObj::init(store, s, h); sent_header = false; } @@ -504,7 +504,7 @@ protected: RGWRESTFlusher flusher; public: - void init(rgw::sal::Store *store, struct req_state *s, + void init(rgw::sal::Store* store, struct req_state *s, RGWHandler *dialect_handler) override { RGWOp::init(store, s, dialect_handler); flusher.init(s, this); @@ -597,7 +597,7 @@ public: } virtual RGWHandler_REST* get_handler( - rgw::sal::Store *store, + rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix @@ -629,7 +629,7 @@ class RGWREST { static int preprocess(struct req_state *s, rgw::io::BasicClient* rio); public: RGWREST() {} - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state *s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix, diff --git a/src/rgw/rgw_rest_bucket.h b/src/rgw/rgw_rest_bucket.h index a81df513c10..e22fc0576ae 100644 --- a/src/rgw/rgw_rest_bucket.h +++ b/src/rgw/rgw_rest_bucket.h @@ -27,7 +27,7 @@ public: RGWRESTMgr_Bucket() = default; ~RGWRESTMgr_Bucket() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override { diff --git a/src/rgw/rgw_rest_config.h b/src/rgw/rgw_rest_config.h index b3ea740d27c..f79f811dd53 100644 --- a/src/rgw/rgw_rest_config.h +++ b/src/rgw/rgw_rest_config.h @@ -79,7 +79,7 @@ public: RGWRESTMgr_Config() = default; ~RGWRESTMgr_Config() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *, + RGWHandler_REST* get_handler(rgw::sal::Store* , struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override { diff --git a/src/rgw/rgw_rest_iam.cc b/src/rgw/rgw_rest_iam.cc index 6f16d7d2a83..49ceb58fa03 100644 --- a/src/rgw/rgw_rest_iam.cc +++ b/src/rgw/rgw_rest_iam.cc @@ -82,7 +82,7 @@ RGWOp *RGWHandler_REST_IAM::op_post() return nullptr; } -int RGWHandler_REST_IAM::init(rgw::sal::Store *store, +int RGWHandler_REST_IAM::init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) { @@ -144,7 +144,7 @@ int RGWHandler_REST_IAM::init_from_header(struct req_state* s, } RGWHandler_REST* -RGWRESTMgr_IAM::get_handler(rgw::sal::Store *store, +RGWRESTMgr_IAM::get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) diff --git a/src/rgw/rgw_rest_iam.h b/src/rgw/rgw_rest_iam.h index 7b85781d7c1..4d3b6b0af3d 100644 --- a/src/rgw/rgw_rest_iam.h +++ b/src/rgw/rgw_rest_iam.h @@ -22,7 +22,7 @@ public: post_body(post_body) {} ~RGWHandler_REST_IAM() override = default; - int init(rgw::sal::Store *store, + int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override; int authorize(const DoutPrefixProvider* dpp, optional_yield y) override; @@ -40,7 +40,7 @@ public: return this; } - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry&, const std::string&) override; diff --git a/src/rgw/rgw_rest_log.h b/src/rgw/rgw_rest_log.h index 447e9f06fe3..58d8b563cd2 100644 --- a/src/rgw/rgw_rest_log.h +++ b/src/rgw/rgw_rest_log.h @@ -303,7 +303,7 @@ public: RGWRESTMgr_Log() = default; ~RGWRESTMgr_Log() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state* const, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefixs) override { diff --git a/src/rgw/rgw_rest_metadata.h b/src/rgw/rgw_rest_metadata.h index f880767b320..13691ac3a20 100644 --- a/src/rgw/rgw_rest_metadata.h +++ b/src/rgw/rgw_rest_metadata.h @@ -98,7 +98,7 @@ public: RGWRESTMgr_Metadata() = default; ~RGWRESTMgr_Metadata() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override { diff --git a/src/rgw/rgw_rest_realm.cc b/src/rgw/rgw_rest_realm.cc index 9ea547a86dc..469855df472 100644 --- a/src/rgw/rgw_rest_realm.cc +++ b/src/rgw/rgw_rest_realm.cc @@ -248,7 +248,7 @@ class RGWHandler_Period : public RGWHandler_Auth_S3 { class RGWRESTMgr_Period : public RGWRESTMgr { public: - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override { @@ -365,7 +365,7 @@ RGWRESTMgr_Realm::RGWRESTMgr_Realm() } RGWHandler_REST* -RGWRESTMgr_Realm::get_handler(rgw::sal::Store *store, +RGWRESTMgr_Realm::get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) diff --git a/src/rgw/rgw_rest_realm.h b/src/rgw/rgw_rest_realm.h index a6aa7892a01..7800f91f896 100644 --- a/src/rgw/rgw_rest_realm.h +++ b/src/rgw/rgw_rest_realm.h @@ -9,7 +9,7 @@ class RGWRESTMgr_Realm : public RGWRESTMgr { public: RGWRESTMgr_Realm(); - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override; diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index da4928328b0..41579f26bc7 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -926,7 +926,7 @@ struct ReplicationConfiguration { } }; - set get_zone_ids_from_names(rgw::sal::Store *store, + set get_zone_ids_from_names(rgw::sal::Store* store, const vector& zone_names) const { set ids; @@ -940,7 +940,7 @@ struct ReplicationConfiguration { return ids; } - vector get_zone_names_from_ids(rgw::sal::Store *store, + vector get_zone_names_from_ids(rgw::sal::Store* store, const set& zone_ids) const { vector names; @@ -1010,7 +1010,7 @@ struct ReplicationConfiguration { return true; } - int to_sync_policy_pipe(req_state *s, rgw::sal::Store *store, + int to_sync_policy_pipe(req_state *s, rgw::sal::Store* store, rgw_sync_bucket_pipes *pipe, bool *enabled) const { if (!is_valid(s->cct)) { @@ -1061,7 +1061,7 @@ struct ReplicationConfiguration { return 0; } - void from_sync_policy_pipe(rgw::sal::Store *store, + void from_sync_policy_pipe(rgw::sal::Store* store, const rgw_sync_bucket_pipes& pipe, bool enabled) { id = pipe.id; @@ -1114,7 +1114,7 @@ struct ReplicationConfiguration { encode_xml("Rule", rules, f); } - int to_sync_policy_groups(req_state *s, rgw::sal::Store *store, + int to_sync_policy_groups(req_state *s, rgw::sal::Store* store, vector *result) const { result->resize(2); @@ -1144,7 +1144,7 @@ struct ReplicationConfiguration { return 0; } - void from_sync_policy_group(rgw::sal::Store *store, + void from_sync_policy_group(rgw::sal::Store* store, const rgw_sync_policy_group& group) { bool enabled = (group.status == rgw_sync_policy_group::Status::ENABLED); @@ -2166,7 +2166,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(struct req_state *s, rgw::sal::Store* store, RGWAccessControlPolicy_S3& s3policy, ACLOwner& owner) { @@ -3326,7 +3326,7 @@ int RGWPutACLs_ObjStore_S3::get_params(optional_yield y) return ret; } -int RGWPutACLs_ObjStore_S3::get_policy_from_state(rgw::sal::Store *store, +int RGWPutACLs_ObjStore_S3::get_policy_from_state(rgw::sal::Store* store, struct req_state *s, stringstream& ss) { @@ -4538,7 +4538,7 @@ RGWOp *RGWHandler_REST_Obj_S3::op_options() return new RGWOptionsCORS_ObjStore_S3; } -int RGWHandler_REST_S3::init_from_header(rgw::sal::Store *store, +int RGWHandler_REST_S3::init_from_header(rgw::sal::Store* store, struct req_state* s, int default_formatter, bool configurable_format) @@ -4614,7 +4614,7 @@ int RGWHandler_REST_S3::init_from_header(rgw::sal::Store *store, return 0; } -static int verify_mfa(rgw::sal::Store *store, RGWUserInfo *user, +static int verify_mfa(rgw::sal::Store* store, RGWUserInfo *user, const string& mfa_str, bool *verified, const DoutPrefixProvider *dpp, optional_yield y) { vector params; @@ -4685,7 +4685,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, struct req_state *s, rgw::io::BasicClient *cio) { int ret; @@ -4817,7 +4817,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, struct req_state *state, rgw::io::BasicClient *cio) { int ret = RGWHandler_REST_S3::init_from_header(store, state, RGW_FORMAT_JSON, true); @@ -4827,7 +4827,7 @@ int RGWHandler_Auth_S3::init(rgw::sal::Store *store, struct req_state *state, return RGWHandler_REST::init(store, state, cio); } -RGWHandler_REST* RGWRESTMgr_S3::get_handler(rgw::sal::Store *store, +RGWHandler_REST* RGWRESTMgr_S3::get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) @@ -4895,7 +4895,7 @@ bool RGWHandler_REST_S3Website::web_dir() const { return state->exists; } -int RGWHandler_REST_S3Website::init(rgw::sal::Store *store, req_state *s, +int RGWHandler_REST_S3Website::init(rgw::sal::Store* store, req_state *s, rgw::io::BasicClient* cio) { // save the original object name before retarget() replaces it with the diff --git a/src/rgw/rgw_rest_s3.h b/src/rgw/rgw_rest_s3.h index e1ea8959dfc..40f843b4ea5 100644 --- a/src/rgw/rgw_rest_s3.h +++ b/src/rgw/rgw_rest_s3.h @@ -355,7 +355,7 @@ public: RGWPutACLs_ObjStore_S3() {} ~RGWPutACLs_ObjStore_S3() override {} - int get_policy_from_state(rgw::sal::Store *store, struct req_state *s, stringstream& ss) override; + int get_policy_from_state(rgw::sal::Store* store, struct req_state *s, stringstream& ss) override; void send_response() override; int get_params(optional_yield y) override; }; @@ -591,7 +591,7 @@ public: class RGW_Auth_S3 { public: static int authorize(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, const rgw::auth::StrategyRegistry& auth_registry, struct req_state *s, optional_yield y); }; @@ -611,7 +611,7 @@ public: static int validate_bucket_name(const string& bucket); static int validate_object_name(const string& bucket); - int init(rgw::sal::Store *store, + int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override; int authorize(const DoutPrefixProvider *dpp, optional_yield y) override { @@ -625,7 +625,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, struct req_state *s, int default_formatter, bool configurable_format); explicit RGWHandler_REST_S3(const rgw::auth::StrategyRegistry& auth_registry) : RGWHandler_REST(), @@ -633,7 +633,7 @@ public: } ~RGWHandler_REST_S3() override = default; - int init(rgw::sal::Store *store, + int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override; int authorize(const DoutPrefixProvider *dpp, optional_yield y) override; @@ -765,7 +765,7 @@ public: ~RGWRESTMgr_S3() override = default; - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state* s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; diff --git a/src/rgw/rgw_rest_s3website.h b/src/rgw/rgw_rest_s3website.h index 49db63d3c89..295f2b98cd2 100644 --- a/src/rgw/rgw_rest_s3website.h +++ b/src/rgw/rgw_rest_s3website.h @@ -40,7 +40,7 @@ public: using RGWHandler_REST_S3::RGWHandler_REST_S3; ~RGWHandler_REST_S3Website() override = default; - int init(rgw::sal::Store *store, req_state *s, rgw::io::BasicClient* cio) override; + int init(rgw::sal::Store* store, req_state *s, rgw::io::BasicClient* cio) override; int error_handler(int err_no, string *error_content, optional_yield y) override; }; diff --git a/src/rgw/rgw_rest_sts.cc b/src/rgw/rgw_rest_sts.cc index 52544b8f055..baebc867dd5 100644 --- a/src/rgw/rgw_rest_sts.cc +++ b/src/rgw/rgw_rest_sts.cc @@ -582,7 +582,7 @@ void RGWSTSAssumeRole::execute(optional_yield y) } int RGW_Auth_STS::authorize(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, const rgw::auth::StrategyRegistry& auth_registry, struct req_state *s, optional_yield y) { @@ -628,7 +628,7 @@ RGWOp *RGWHandler_REST_STS::op_post() return nullptr; } -int RGWHandler_REST_STS::init(rgw::sal::Store *store, +int RGWHandler_REST_STS::init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) { @@ -693,7 +693,7 @@ int RGWHandler_REST_STS::init_from_header(struct req_state* s, } RGWHandler_REST* -RGWRESTMgr_STS::get_handler(rgw::sal::Store *store, +RGWRESTMgr_STS::get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) diff --git a/src/rgw/rgw_rest_sts.h b/src/rgw/rgw_rest_sts.h index 7ffc1da00af..12834d89e57 100644 --- a/src/rgw/rgw_rest_sts.h +++ b/src/rgw/rgw_rest_sts.h @@ -171,7 +171,7 @@ public: class RGW_Auth_STS { public: static int authorize(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, const rgw::auth::StrategyRegistry& auth_registry, struct req_state *s, optional_yield y); }; @@ -191,7 +191,7 @@ public: post_body(post_body) {} ~RGWHandler_REST_STS() override = default; - int init(rgw::sal::Store *store, + int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override; int authorize(const DoutPrefixProvider* dpp, optional_yield y) override; @@ -209,7 +209,7 @@ public: return this; } - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry&, const std::string&) override; diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index 5708945f7a1..d5f3a93d8cc 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -584,7 +584,7 @@ void RGWStatBucket_ObjStore_SWIFT::send_response() } static int get_swift_container_settings(req_state * const s, - rgw::sal::Store * const store, + rgw::sal::Store* const store, RGWAccessControlPolicy * const policy, bool * const has_policy, uint32_t * rw_mask, @@ -1040,8 +1040,8 @@ void RGWPutObj_ObjStore_SWIFT::send_response() } static int get_swift_account_settings(req_state * const s, - rgw::sal::Store * const store, - RGWAccessControlPolicy_SWIFTAcct * const policy, + rgw::sal::Store* const store, + RGWAccessControlPolicy_SWIFTAcct* const policy, bool * const has_policy) { *has_policy = false; diff --git a/src/rgw/rgw_rest_swift.h b/src/rgw/rgw_rest_swift.h index 3c85cbb0958..ffc84ed6e3f 100644 --- a/src/rgw/rgw_rest_swift.h +++ b/src/rgw/rgw_rest_swift.h @@ -395,7 +395,7 @@ public: int validate_bucket_name(const string& bucket); - int init(rgw::sal::Store *store, struct req_state *s, rgw::io::BasicClient *cio) override; + int init(rgw::sal::Store* store, struct req_state *s, rgw::io::BasicClient *cio) override; int authorize(const DoutPrefixProvider *dpp, optional_yield y) override; int postauth_init(optional_yield y) override; @@ -502,7 +502,7 @@ public: RGWRESTMgr_SWIFT() = default; ~RGWRESTMgr_SWIFT() override = default; - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state *s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; @@ -574,7 +574,7 @@ public: RGWRESTMgr_SWIFT_CrossDomain() = default; ~RGWRESTMgr_SWIFT_CrossDomain() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry&, const std::string&) override { @@ -631,7 +631,7 @@ public: RGWRESTMgr_SWIFT_HealthCheck() = default; ~RGWRESTMgr_SWIFT_HealthCheck() override = default; - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry&, const std::string&) override { @@ -678,7 +678,7 @@ public: RGWRESTMgr_SWIFT_Info() = default; ~RGWRESTMgr_SWIFT_Info() override = default; - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state* s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; diff --git a/src/rgw/rgw_rest_user.h b/src/rgw/rgw_rest_user.h index 5ecd61db8de..d3e3e1627bb 100644 --- a/src/rgw/rgw_rest_user.h +++ b/src/rgw/rgw_rest_user.h @@ -27,7 +27,7 @@ public: RGWRESTMgr_User() = default; ~RGWRESTMgr_User() override = default; - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry& auth_registry, const std::string&) override { diff --git a/src/rgw/rgw_role.cc b/src/rgw/rgw_role.cc index 8a67f06ac22..c076524ea58 100644 --- a/src/rgw/rgw_role.cc +++ b/src/rgw/rgw_role.cc @@ -425,7 +425,7 @@ void RGWRole::update_trust_policy(string& trust_policy) } int RGWRole::get_roles_by_path_prefix(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, CephContext *cct, const string& path_prefix, const string& tenant, diff --git a/src/rgw/rgw_role.h b/src/rgw/rgw_role.h index c8a6ebea966..5b6e7034cf2 100644 --- a/src/rgw/rgw_role.h +++ b/src/rgw/rgw_role.h @@ -158,7 +158,7 @@ public: static const string& get_info_oid_prefix(); static const string& get_path_oid_prefix(); static int get_roles_by_path_prefix(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, CephContext *cct, const string& path_prefix, const string& tenant, diff --git a/src/rgw/rgw_sal.cc b/src/rgw/rgw_sal.cc index 13585c55cff..2105e547fed 100644 --- a/src/rgw/rgw_sal.cc +++ b/src/rgw/rgw_sal.cc @@ -30,12 +30,12 @@ extern "C" { extern rgw::sal::Store* newStore(void); } -rgw::sal::Store *StoreManager::init_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache) +rgw::sal::Store* StoreManager::init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache) { - rgw::sal::Store *store = nullptr; + rgw::sal::Store* store = nullptr; if (svc.compare("rados") == 0) { store = newStore(); - RGWRados *rados = static_cast(store)->getRados(); + RGWRados* rados = static_cast(store)->getRados(); if ((*rados).set_use_cache(use_cache) .set_run_gc_thread(use_gc_thread) @@ -51,12 +51,12 @@ rgw::sal::Store *StoreManager::init_storage_provider(const DoutPrefixProvider *d return store; } -rgw::sal::Store *StoreManager::init_raw_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc) +rgw::sal::Store* StoreManager::init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc) { - rgw::sal::Store *store = nullptr; + rgw::sal::Store* store = nullptr; if (svc.compare("rados") == 0) { store = newStore(); - RGWRados *rados = static_cast(store)->getRados(); + RGWRados* rados = static_cast(store)->getRados(); rados->set_context(cct); @@ -75,7 +75,7 @@ rgw::sal::Store *StoreManager::init_raw_storage_provider(const DoutPrefixProvide return store; } -void StoreManager::close_storage(rgw::sal::Store *store) +void StoreManager::close_storage(rgw::sal::Store* store) { if (!store) return; diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h index 19d2687a8dd..e2b23cdb5ca 100644 --- a/src/rgw/rgw_sal.h +++ b/src/rgw/rgw_sal.h @@ -67,12 +67,12 @@ struct RGWClusterStat { class RGWGetBucketStats_CB : public RefCountedObject { protected: rgw_bucket bucket; - map *stats; + map* stats; public: explicit RGWGetBucketStats_CB(const rgw_bucket& _bucket) : bucket(_bucket), stats(NULL) {} ~RGWGetBucketStats_CB() override {} virtual void handle_response(int r) = 0; - virtual void set_response(map *_stats) { + virtual void set_response(map* _stats) { stats = _stats; } }; @@ -132,34 +132,34 @@ class Store { /* This one does not query the cluster for info */ virtual std::unique_ptr get_user(const rgw_user& u) = 0; /* These three do query the cluster for info */ - virtual int get_user_by_access_key(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y, std::unique_ptr* user) = 0; - virtual int get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr* user) = 0; - virtual int get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) = 0; + virtual int get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr* user) = 0; + virtual int get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr* user) = 0; + virtual int get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) = 0; virtual std::unique_ptr get_object(const rgw_obj_key& k) = 0; - virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) = 0; + virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) = 0; virtual int get_bucket(User* u, const RGWBucketInfo& i, std::unique_ptr* bucket) = 0; - virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const std::string& tenant, const std::string& name, std::unique_ptr* bucket, optional_yield y) = 0; - virtual int create_bucket(const DoutPrefixProvider *dpp, + virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const std::string& tenant, const std::string& name, std::unique_ptr* bucket, optional_yield y) = 0; + virtual int create_bucket(const DoutPrefixProvider* dpp, User& u, const rgw_bucket& b, const std::string& zonegroup_id, rgw_placement_rule& placement_rule, std::string& swift_ver_location, - const RGWQuotaInfo * pquota_info, + const RGWQuotaInfo* pquota_info, const RGWAccessControlPolicy& policy, Attrs& attrs, RGWBucketInfo& info, obj_version& ep_objv, bool exclusive, bool obj_lock_enabled, - bool *existed, + bool* existed, req_info& req_info, std::unique_ptr* bucket, optional_yield y) = 0; virtual bool is_meta_master() = 0; - virtual int forward_request_to_master(User* user, obj_version *objv, - bufferlist& in_data, JSONParser *jp, req_info& info, + virtual int forward_request_to_master(User* user, obj_version* objv, + bufferlist& in_data, JSONParser* jp, req_info& info, optional_yield y) = 0; - virtual int defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, Bucket* bucket, Object* obj, + virtual int defer_gc(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Bucket* bucket, Object* obj, optional_yield y) = 0; virtual Zone* get_zone() = 0; virtual std::string zone_unique_id(uint64_t unique_num) = 0; @@ -169,15 +169,15 @@ class Store { virtual std::unique_ptr get_completions(void) = 0; virtual std::unique_ptr get_notification(rgw::sal::Object* obj, struct req_state* s, rgw::notify::EventType event_type) = 0; virtual std::unique_ptr get_gc_chain(rgw::sal::Object* obj) = 0; - virtual std::unique_ptr get_writer(Aio *aio, rgw::sal::Bucket* bucket, + virtual std::unique_ptr get_writer(Aio* aio, rgw::sal::Bucket* bucket, RGWObjectCtx& obj_ctx, std::unique_ptr _head_obj, - const DoutPrefixProvider *dpp, optional_yield y) = 0; + const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual RGWLC* get_rgwlc(void) = 0; virtual RGWCoroutinesManagerRegistry* get_cr_registry() = 0; virtual int delete_raw_obj(const rgw_raw_obj& obj) = 0; virtual int delete_raw_obj_aio(const rgw_raw_obj& obj, Completions* aio) = 0; virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) = 0; - virtual int get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) = 0; + virtual int get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) = 0; virtual int log_usage(map& usage_info) = 0; virtual int log_op(string& oid, bufferlist& bl) = 0; @@ -186,48 +186,48 @@ class Store { virtual void get_quota(RGWQuotaInfo& bucket_quota, RGWQuotaInfo& user_quota) = 0; virtual int list_raw_objects(const rgw_pool& pool, const string& prefix_filter, int max, RGWListRawObjsCtx& ctx, std::list& oids, - bool *is_truncated) = 0; - virtual int set_buckets_enabled(const DoutPrefixProvider *dpp, vector& buckets, bool enabled) = 0; + bool* is_truncated) = 0; + virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector& buckets, bool enabled) = 0; virtual uint64_t get_new_req_id() = 0; - virtual int get_sync_policy_handler(const DoutPrefixProvider *dpp, + virtual int get_sync_policy_handler(const DoutPrefixProvider* dpp, std::optional zone, std::optional bucket, - RGWBucketSyncPolicyHandlerRef *phandler, + RGWBucketSyncPolicyHandlerRef* phandler, optional_yield y) = 0; virtual RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone) = 0; virtual void wakeup_meta_sync_shards(set& shard_ids) = 0; virtual void wakeup_data_sync_shards(const rgw_zone_id& source_zone, map >& shard_ids) = 0; virtual int clear_usage() = 0; virtual int read_all_usage(uint64_t start_epoch, uint64_t end_epoch, - uint32_t max_entries, bool *is_truncated, + uint32_t max_entries, bool* is_truncated, RGWUsageIter& usage_iter, map& usage) = 0; virtual int trim_all_usage(uint64_t start_epoch, uint64_t end_epoch) = 0; - virtual int get_config_key_val(string name, bufferlist *bl) = 0; + virtual int get_config_key_val(string name, bufferlist* bl) = 0; virtual int put_system_obj(const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive, - RGWObjVersionTracker *objv_tracker, real_time set_mtime, - optional_yield y, map *pattrs = nullptr) = 0; - virtual int get_system_obj(const DoutPrefixProvider *dpp, + RGWObjVersionTracker* objv_tracker, real_time set_mtime, + optional_yield y, map* pattrs = nullptr) = 0; + virtual int get_system_obj(const DoutPrefixProvider* dpp, const rgw_pool& pool, const string& key, bufferlist& bl, - RGWObjVersionTracker *objv_tracker, real_time *pmtime, - optional_yield y, map *pattrs = nullptr, - rgw_cache_entry_info *cache_info = nullptr, + RGWObjVersionTracker* objv_tracker, real_time* pmtime, + optional_yield y, map* pattrs = nullptr, + rgw_cache_entry_info* cache_info = nullptr, boost::optional refresh_version = boost::none) = 0; virtual int delete_system_obj(const rgw_pool& pool, const string& oid, - RGWObjVersionTracker *objv_tracker, optional_yield y) = 0; + RGWObjVersionTracker* objv_tracker, optional_yield y) = 0; virtual int meta_list_keys_init(const string& section, const string& marker, void** phandle) = 0; virtual int meta_list_keys_next(void* handle, int max, list& keys, bool* truncated) = 0; virtual void meta_list_keys_complete(void* handle) = 0; - virtual std::string meta_get_marker(void *handle) = 0; - virtual int meta_remove(const DoutPrefixProvider *dpp, string& metadata_key, optional_yield y) = 0; + virtual std::string meta_get_marker(void* handle) = 0; + virtual int meta_remove(const DoutPrefixProvider* dpp, string& metadata_key, optional_yield y) = 0; virtual const RGWSyncModuleInstanceRef& get_sync_module() = 0; virtual std::string get_host_id() = 0; virtual void finalize(void) = 0; - virtual CephContext *ctx(void) = 0; + virtual CephContext* ctx(void) = 0; // get the location of where lua packages are installed virtual const std::string& get_luarocks_path() const = 0; @@ -248,7 +248,7 @@ class User { virtual ~User() = default; virtual std::unique_ptr clone() = 0; - virtual int list_buckets(const DoutPrefixProvider *dpp, + virtual int list_buckets(const DoutPrefixProvider* dpp, const std::string& marker, const std::string& end_marker, uint64_t max, bool need_stats, BucketList& buckets, optional_yield y) = 0; @@ -267,22 +267,22 @@ class User { const RGWUserCaps& get_caps() const { return info.caps; } static bool empty(User* u) { return (!u || u->info.user_id.id.empty()); } static bool empty(std::unique_ptr& u) { return (!u || u->info.user_id.id.empty()); } - virtual int read_attrs(const DoutPrefixProvider *dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker = nullptr) = 0; + virtual int read_attrs(const DoutPrefixProvider* dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker = nullptr) = 0; virtual int read_stats(optional_yield y, RGWStorageStats* stats, - ceph::real_time *last_stats_sync = nullptr, - ceph::real_time *last_stats_update = nullptr) = 0; - virtual int read_stats_async(RGWGetUserStats_CB *cb) = 0; + ceph::real_time* last_stats_sync = nullptr, + ceph::real_time* last_stats_update = nullptr) = 0; + virtual int read_stats_async(RGWGetUserStats_CB* cb) = 0; virtual int complete_flush_stats(optional_yield y) = 0; virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries, - bool *is_truncated, RGWUsageIter& usage_iter, + bool* is_truncated, RGWUsageIter& usage_iter, map& usage) = 0; virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) = 0; virtual RGWObjVersionTracker& get_version_tracker() { return objv_tracker; } /* Placeholders */ - virtual int load_by_id(const DoutPrefixProvider *dpp, optional_yield y) = 0; - virtual int store_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::PutParams& params = {}) = 0; - virtual int remove_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::RemoveParams& params = {}) = 0; + virtual int load_by_id(const DoutPrefixProvider* dpp, optional_yield y) = 0; + virtual int store_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::PutParams& params = {}) = 0; + virtual int remove_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::RemoveParams& params = {}) = 0; /* dang temporary; will be removed when User is complete */ RGWUserInfo& get_info() { return info; } @@ -325,7 +325,7 @@ class Bucket { rgw_obj_key end_marker; std::string ns; bool enforce_ns{true}; - RGWAccessListFilter *filter{nullptr}; + RGWAccessListFilter* filter{nullptr}; bool list_versions{false}; bool allow_unordered{false}; int shard_id{RGW_NO_SHARD}; @@ -366,46 +366,46 @@ class Bucket { virtual ~Bucket() = default; virtual std::unique_ptr get_object(const rgw_obj_key& key) = 0; - virtual int list(const DoutPrefixProvider *dpp, ListParams&, int, ListResults&, optional_yield y) = 0; + virtual int list(const DoutPrefixProvider* dpp, ListParams&, int, ListResults&, optional_yield y) = 0; virtual Object* create_object(const rgw_obj_key& key /* Attributes */) = 0; virtual Attrs& get_attrs(void) { return attrs; } virtual int set_attrs(Attrs a) { attrs = a; return 0; } - virtual int remove_bucket(const DoutPrefixProvider *dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) = 0; + virtual int remove_bucket(const DoutPrefixProvider* dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) = 0; virtual RGWAccessControlPolicy& get_acl(void) = 0; - virtual int set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy& acl, optional_yield y) = 0; - virtual int get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y) = 0; + virtual int set_acl(const DoutPrefixProvider* dpp, RGWAccessControlPolicy& acl, optional_yield y) = 0; + virtual int get_bucket_info(const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual int get_bucket_stats(int shard_id, - std::string *bucket_ver, std::string *master_ver, + std::string* bucket_ver, std::string* master_ver, std::map& stats, - std::string *max_marker = nullptr, - bool *syncstopped = nullptr) = 0; - virtual int get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB *ctx) = 0; - virtual int read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y) = 0; + std::string* max_marker = nullptr, + bool* syncstopped = nullptr) = 0; + virtual int get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB* ctx) = 0; + virtual int read_bucket_stats(const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual int sync_user_stats(optional_yield y) = 0; - virtual int update_container_stats(const DoutPrefixProvider *dpp) = 0; - virtual int check_bucket_shards(const DoutPrefixProvider *dpp) = 0; - virtual int link(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint = true, RGWObjVersionTracker* objv = nullptr) = 0; - virtual int unlink(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint = true) = 0; - virtual int chown(const DoutPrefixProvider *dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker = nullptr) = 0; - virtual int put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time mtime) = 0; - virtual int remove_entrypoint(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) = 0; - virtual int remove_instance_info(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) = 0; + virtual int update_container_stats(const DoutPrefixProvider* dpp) = 0; + virtual int check_bucket_shards(const DoutPrefixProvider* dpp) = 0; + virtual int link(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint = true, RGWObjVersionTracker* objv = nullptr) = 0; + virtual int unlink(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint = true) = 0; + virtual int chown(const DoutPrefixProvider* dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker = nullptr) = 0; + virtual int put_instance_info(const DoutPrefixProvider* dpp, bool exclusive, ceph::real_time mtime) = 0; + virtual int remove_entrypoint(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) = 0; + virtual int remove_instance_info(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) = 0; virtual bool is_owner(User* user) = 0; virtual User* get_owner(void) { return owner; }; virtual ACLOwner get_acl_owner(void) { return ACLOwner(info.owner); }; - virtual int check_empty(const DoutPrefixProvider *dpp, optional_yield y) = 0; + virtual int check_empty(const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual int check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size, optional_yield y, bool check_size_only = false) = 0; - virtual int set_instance_attrs(const DoutPrefixProvider *dpp, Attrs& attrs, optional_yield y) = 0; - virtual int try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime) = 0; + virtual int set_instance_attrs(const DoutPrefixProvider* dpp, Attrs& attrs, optional_yield y) = 0; + virtual int try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime) = 0; virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries, - bool *is_truncated, RGWUsageIter& usage_iter, + bool* is_truncated, RGWUsageIter& usage_iter, map& usage) = 0; virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) = 0; virtual int remove_objs_from_index(std::list& objs_to_unlink) = 0; virtual int check_index(std::map& existing_stats, std::map& calculated_stats) = 0; virtual int rebuild_index() = 0; virtual int set_tag_timeout(uint64_t timeout) = 0; - virtual int purge_instance(const DoutPrefixProvider *dpp) = 0; + virtual int purge_instance(const DoutPrefixProvider* dpp) = 0; bool empty() const { return info.bucket.name.empty(); } const std::string& get_name() const { return info.bucket.name; } @@ -423,7 +423,7 @@ class Bucket { bool versioned() { return info.versioned(); } bool versioning_enabled() { return info.versioning_enabled(); } - void convert(cls_user_bucket_entry *b) const { + void convert(cls_user_bucket_entry* b) const { ent.convert(b); } @@ -516,15 +516,15 @@ class Object { struct ReadOp { struct Params { - const ceph::real_time *mod_ptr{nullptr}; - const ceph::real_time *unmod_ptr{nullptr}; + const ceph::real_time* mod_ptr{nullptr}; + const ceph::real_time* unmod_ptr{nullptr}; bool high_precision_time{false}; uint32_t mod_zone_id{0}; uint64_t mod_pg_ver{0}; - const char *if_match{nullptr}; - const char *if_nomatch{nullptr}; - ceph::real_time *lastmod{nullptr}; - rgw_obj *target_obj{nullptr}; // XXX dang remove? + const char* if_match{nullptr}; + const char* if_nomatch{nullptr}; + ceph::real_time* lastmod{nullptr}; + rgw_obj* target_obj{nullptr}; // XXX dang remove? } params; struct Result { @@ -535,11 +535,11 @@ class Object { virtual ~ReadOp() = default; - virtual int prepare(optional_yield y, const DoutPrefixProvider *dpp) = 0; - virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp) = 0; - virtual int iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) = 0; - virtual int get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y) = 0; - virtual int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y) = 0; + virtual int prepare(optional_yield y, const DoutPrefixProvider* dpp) = 0; + virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider* dpp) = 0; + virtual int iterate(const DoutPrefixProvider* dpp, int64_t ofs, int64_t end, RGWGetDataCB* cb, optional_yield y) = 0; + virtual int get_manifest(const DoutPrefixProvider* dpp, RGWObjManifest **pmanifest, optional_yield y) = 0; + virtual int get_attr(const DoutPrefixProvider* dpp, const char* name, bufferlist& dest, optional_yield y) = 0; }; struct WriteOp { @@ -571,8 +571,8 @@ class Object { virtual ~WriteOp() = default; virtual int prepare(optional_yield y) = 0; - virtual int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y) = 0; - //virtual int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive) = 0; + virtual int write_meta(const DoutPrefixProvider* dpp, uint64_t size, uint64_t accounted_size, optional_yield y) = 0; + //virtual int write_data(const char* data, uint64_t ofs, uint64_t len, bool exclusive) = 0; }; struct DeleteOp { @@ -583,12 +583,12 @@ class Object { uint64_t olh_epoch{0}; string marker_version_id; uint32_t bilog_flags{0}; - list *remove_objs{nullptr}; + list* remove_objs{nullptr}; ceph::real_time expiration_time; ceph::real_time unmod_since; ceph::real_time mtime; bool high_precision_time{false}; - rgw_zone_set *zones_trace{nullptr}; + rgw_zone_set* zones_trace{nullptr}; bool abortmp{false}; uint64_t parts_accounted_size{0}; } params; @@ -600,7 +600,7 @@ class Object { virtual ~DeleteOp() = default; - virtual int delete_obj(const DoutPrefixProvider *dpp, optional_yield y) = 0; + virtual int delete_obj(const DoutPrefixProvider* dpp, optional_yield y) = 0; }; struct StatOp { @@ -640,38 +640,38 @@ class Object { virtual ~Object() = default; - virtual int delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ctx, optional_yield y) = 0; - virtual int delete_obj_aio(const DoutPrefixProvider *dpp, RGWObjState *astate, Completions* aio, + virtual int delete_object(const DoutPrefixProvider* dpp, RGWObjectCtx* obj_ctx, optional_yield y) = 0; + virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio, bool keep_index_consistent, optional_yield y) = 0; virtual int copy_object(RGWObjectCtx& obj_ctx, User* user, - req_info *info, const rgw_zone_id& source_zone, + req_info* info, const rgw_zone_id& source_zone, rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket, rgw::sal::Bucket* src_bucket, const rgw_placement_rule& dest_placement, - ceph::real_time *src_mtime, ceph::real_time *mtime, - const ceph::real_time *mod_ptr, const ceph::real_time *unmod_ptr, + ceph::real_time* src_mtime, ceph::real_time* mtime, + const ceph::real_time* mod_ptr, const ceph::real_time* unmod_ptr, bool high_precision_time, - const char *if_match, const char *if_nomatch, + const char* if_match, const char* if_nomatch, AttrsMod attrs_mod, bool copy_if_newer, Attrs& attrs, RGWObjCategory category, uint64_t olh_epoch, boost::optional delete_at, - string *version_id, string *tag, string *etag, - void (*progress_cb)(off_t, void *), void *progress_data, - const DoutPrefixProvider *dpp, optional_yield y) = 0; + string* version_id, string* tag, string* etag, + void (*progress_cb)(off_t, void *), void* progress_data, + const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual RGWAccessControlPolicy& get_acl(void) = 0; virtual int set_acl(const RGWAccessControlPolicy& acl) = 0; - virtual void set_atomic(RGWObjectCtx *rctx) const = 0; - virtual void set_prefetch_data(RGWObjectCtx *rctx) = 0; + virtual void set_atomic(RGWObjectCtx* rctx) const = 0; + virtual void set_prefetch_data(RGWObjectCtx* rctx) = 0; bool empty() const { return key.empty(); } const std::string &get_name() const { return key.name; } - virtual int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWObjState **state, optional_yield y, bool follow_olh = false) = 0; - virtual int set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) = 0; - virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj = NULL) = 0; - virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp) = 0; - virtual int delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y) = 0; - virtual int copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, Object* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider *dpp, optional_yield y) = 0; + virtual int get_obj_state(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, RGWObjState **state, optional_yield y, bool follow_olh = false) = 0; + virtual int set_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) = 0; + virtual int get_obj_attrs(RGWObjectCtx* rctx, optional_yield y, const DoutPrefixProvider* dpp, rgw_obj* target_obj = NULL) = 0; + virtual int modify_obj_attrs(RGWObjectCtx* rctx, const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp) = 0; + virtual int delete_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, const char* attr_name, optional_yield y) = 0; + virtual int copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, Object* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider* dpp, optional_yield y) = 0; virtual bool is_expired() = 0; virtual void gen_rand_obj_instance_name() = 0; virtual void raw_obj_to_obj(const rgw_raw_obj& raw_obj) = 0; @@ -682,13 +682,13 @@ class Object { const rgw_placement_rule& placement_rule, const real_time& mtime, uint64_t olh_epoch, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) = 0; - virtual int get_max_chunk_size(const DoutPrefixProvider *dpp, + virtual int get_max_chunk_size(const DoutPrefixProvider* dpp, rgw_placement_rule placement_rule, uint64_t* max_chunk_size, uint64_t* alignment = nullptr) = 0; - virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t *max_size) = 0; + virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t* max_size) = 0; virtual bool placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2) = 0; Attrs& get_attrs(void) { return attrs; } @@ -717,9 +717,9 @@ class Object { /* Swift versioning */ virtual int swift_versioning_restore(RGWObjectCtx* obj_ctx, bool& restored, /* out */ - const DoutPrefixProvider *dpp) = 0; + const DoutPrefixProvider* dpp) = 0; virtual int swift_versioning_copy(RGWObjectCtx* obj_ctx, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) = 0; /* OPs */ @@ -730,13 +730,13 @@ class Object { /* OMAP */ virtual int omap_get_vals(const string& marker, uint64_t count, - std::map *m, - bool *pmore, optional_yield y) = 0; - virtual int omap_get_all(std::map *m, + std::map* m, + bool* pmore, optional_yield y) = 0; + virtual int omap_get_all(std::map* m, optional_yield y) = 0; virtual int omap_get_vals_by_keys(const std::string& oid, const std::set& keys, - Attrs *vals) = 0; + Attrs* vals) = 0; virtual int omap_set_val_by_key(const std::string& key, bufferlist& val, bool must_exist, optional_yield y) = 0; @@ -838,7 +838,7 @@ protected: virtual ~Notification() = default; virtual int publish_reserve(RGWObjTags* obj_tags = nullptr) = 0; - virtual int publish_commit(const DoutPrefixProvider *dpp, uint64_t size, + virtual int publish_commit(const DoutPrefixProvider* dpp, uint64_t size, const ceph::real_time& mtime, const std::string& etag) = 0; }; @@ -859,19 +859,19 @@ using RawObjSet = std::set; class Writer : public rgw::putobj::DataProcessor { protected: - Aio *const aio; + Aio* const aio; rgw::sal::Bucket* bucket; RGWObjectCtx& obj_ctx; std::unique_ptr head_obj; RawObjSet written; // set of written objects for deletion - const DoutPrefixProvider *dpp; + const DoutPrefixProvider* dpp; optional_yield y; public: - Writer(Aio *aio, + Writer(Aio* aio, rgw::sal::Bucket* bucket, RGWObjectCtx& obj_ctx, std::unique_ptr _head_obj, - const DoutPrefixProvider *dpp, optional_yield y) + const DoutPrefixProvider* dpp, optional_yield y) : aio(aio), bucket(bucket), obj_ctx(obj_ctx), head_obj(std::move(_head_obj)), dpp(dpp), y(y) {} @@ -907,7 +907,7 @@ class Zone { virtual const RGWRealm& get_realm() = 0; virtual const std::string& get_name() const = 0; virtual bool is_writeable() = 0; - virtual bool get_redirect_endpoint(string *endpoint) = 0; + virtual bool get_redirect_endpoint(string* endpoint) = 0; virtual bool has_zonegroup_api(const std::string& api) const = 0; virtual const string& get_current_period_id() = 0; }; @@ -917,18 +917,18 @@ class Zone { class StoreManager { public: StoreManager() {} - static rgw::sal::Store *get_storage(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, + static rgw::sal::Store* get_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_cache = true) { - rgw::sal::Store *store = init_storage_provider(dpp, cct, svc, use_gc_thread, use_lc_thread, + rgw::sal::Store* store = init_storage_provider(dpp, cct, svc, use_gc_thread, use_lc_thread, quota_threads, run_sync_thread, run_reshard_thread, use_cache); return store; } - static rgw::sal::Store *get_raw_storage(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc) { - rgw::sal::Store *store = init_raw_storage_provider(dpp, cct, svc); + static rgw::sal::Store* get_raw_storage(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc) { + rgw::sal::Store* store = init_raw_storage_provider(dpp, cct, svc); return store; } - static rgw::sal::Store *init_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache); - static rgw::sal::Store *init_raw_storage_provider(const DoutPrefixProvider *dpp, CephContext *cct, const std::string svc); - static void close_storage(rgw::sal::Store *store); + static rgw::sal::Store* init_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc, bool use_gc_thread, bool use_lc_thread, bool quota_threads, bool run_sync_thread, bool run_reshard_thread, bool use_metadata_cache); + static rgw::sal::Store* init_raw_storage_provider(const DoutPrefixProvider* dpp, CephContext* cct, const std::string svc); + static void close_storage(rgw::sal::Store* store); }; diff --git a/src/rgw/rgw_sal_rados.cc b/src/rgw/rgw_sal_rados.cc index 415c6718b78..4b200b77d03 100644 --- a/src/rgw/rgw_sal_rados.cc +++ b/src/rgw/rgw_sal_rados.cc @@ -46,9 +46,9 @@ namespace rgw::sal { -static int decode_policy(CephContext *cct, +static int decode_policy(CephContext* cct, bufferlist& bl, - RGWAccessControlPolicy *policy) + RGWAccessControlPolicy* policy) { auto iter = bl.cbegin(); try { @@ -59,18 +59,18 @@ static int decode_policy(CephContext *cct, } if (cct->_conf->subsys.should_gather()) { ldout(cct, 15) << __func__ << " Read AccessControlPolicy"; - RGWAccessControlPolicy_S3 *s3policy = static_cast(policy); + RGWAccessControlPolicy_S3* s3policy = static_cast(policy); s3policy->to_xml(*_dout); *_dout << dendl; } return 0; } -static int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, - RadosStore *store, +static int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider* dpp, + RadosStore* store, User& user, Attrs& bucket_attrs, - RGWAccessControlPolicy *policy, + RGWAccessControlPolicy* policy, optional_yield y) { auto aiter = bucket_attrs.find(RGW_ATTR_ACL); @@ -91,7 +91,7 @@ static int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp, return 0; } -static int process_completed(const AioResultList& completed, RawObjSet *written) +static int process_completed(const AioResultList& completed, RawObjSet* written) { std::optional error; for (auto& r : completed) { @@ -108,7 +108,7 @@ int RadosCompletions::drain() { int ret = 0; while (!handles.empty()) { - librados::AioCompletion *handle = handles.front(); + librados::AioCompletion* handle = handles.front(); handles.pop_front(); handle->wait_for_complete(); int r = handle->get_return_value(); @@ -120,7 +120,7 @@ int RadosCompletions::drain() return ret; } -int RadosUser::list_buckets(const DoutPrefixProvider *dpp, const string& marker, +int RadosUser::list_buckets(const DoutPrefixProvider* dpp, const string& marker, const string& end_marker, uint64_t max, bool need_stats, BucketList &buckets, optional_yield y) { @@ -148,19 +148,19 @@ Bucket* RadosUser::create_bucket(rgw_bucket& bucket, return NULL; } -int RadosUser::read_attrs(const DoutPrefixProvider *dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker) +int RadosUser::read_attrs(const DoutPrefixProvider* dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker) { return store->ctl()->user->get_attrs_by_uid(dpp, get_id(), uattrs, y, tracker); } int RadosUser::read_stats(optional_yield y, RGWStorageStats* stats, - ceph::real_time *last_stats_sync, - ceph::real_time *last_stats_update) + ceph::real_time* last_stats_sync, + ceph::real_time* last_stats_update) { return store->ctl()->user->read_stats(get_id(), stats, y, last_stats_sync, last_stats_update); } -int RadosUser::read_stats_async(RGWGetUserStats_CB *cb) +int RadosUser::read_stats_async(RGWGetUserStats_CB* cb) { return store->ctl()->user->read_stats_async(get_id(), cb); } @@ -171,7 +171,7 @@ int RadosUser::complete_flush_stats(optional_yield y) } int RadosUser::read_usage(uint64_t start_epoch, uint64_t end_epoch, - uint32_t max_entries, bool *is_truncated, + uint32_t max_entries, bool* is_truncated, RGWUsageIter& usage_iter, map& usage) { @@ -188,28 +188,28 @@ int RadosUser::trim_usage(uint64_t start_epoch, uint64_t end_epoch) return store->getRados()->trim_usage(get_id(), bucket_name, start_epoch, end_epoch); } -int RadosUser::load_by_id(const DoutPrefixProvider *dpp, optional_yield y) +int RadosUser::load_by_id(const DoutPrefixProvider* dpp, optional_yield y) { return store->ctl()->user->get_info_by_uid(dpp, info.user_id, &info, y, RGWUserCtl::GetParams().set_objv_tracker(&objv_tracker)); } -int RadosUser::store_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::PutParams& params) +int RadosUser::store_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::PutParams& params) { return store->ctl()->user->store_info(dpp, info, y, params); } -int RadosUser::remove_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::RemoveParams& params) +int RadosUser::remove_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::RemoveParams& params) { return store->ctl()->user->remove_info(dpp, info, y, params); } /* Placeholder */ -Object *RadosBucket::create_object(const rgw_obj_key &key) +Object* RadosBucket::create_object(const rgw_obj_key &key) { return nullptr; } -int RadosBucket::remove_bucket(const DoutPrefixProvider *dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) +int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) { int ret; @@ -302,7 +302,7 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider *dpp, bool delete_childr return ret; } -int RadosBucket::get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y) +int RadosBucket::get_bucket_info(const DoutPrefixProvider* dpp, optional_yield y) { auto obj_ctx = store->svc()->sysobj->init_obj_ctx(); int ret; @@ -331,19 +331,19 @@ int RadosBucket::get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y } int RadosBucket::get_bucket_stats(int shard_id, - std::string *bucket_ver, std::string *master_ver, + std::string* bucket_ver, std::string* master_ver, std::map& stats, - std::string *max_marker, bool *syncstopped) + std::string* max_marker, bool* syncstopped) { return store->getRados()->get_bucket_stats(info, shard_id, bucket_ver, master_ver, stats, max_marker, syncstopped); } -int RadosBucket::get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB *ctx) +int RadosBucket::get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB* ctx) { return store->getRados()->get_bucket_stats_async(get_info(), shard_id, ctx); } -int RadosBucket::read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y) +int RadosBucket::read_bucket_stats(const DoutPrefixProvider* dpp, optional_yield y) { int ret = store->ctl()->bucket->read_bucket_stats(info.bucket, &ent, y, dpp); info.placement_rule = ent.placement_rule; @@ -355,7 +355,7 @@ int RadosBucket::sync_user_stats(optional_yield y) return store->ctl()->bucket->sync_user_stats(owner->get_id(), info, y); } -int RadosBucket::update_container_stats(const DoutPrefixProvider *dpp) +int RadosBucket::update_container_stats(const DoutPrefixProvider* dpp) { int ret; map m; @@ -383,12 +383,12 @@ int RadosBucket::update_container_stats(const DoutPrefixProvider *dpp) return 0; } -int RadosBucket::check_bucket_shards(const DoutPrefixProvider *dpp) +int RadosBucket::check_bucket_shards(const DoutPrefixProvider* dpp) { return store->getRados()->check_bucket_shards(info, info.bucket, get_count(), dpp); } -int RadosBucket::link(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint, RGWObjVersionTracker* objv) +int RadosBucket::link(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint, RGWObjVersionTracker* objv) { RGWBucketEntryPoint ep; ep.bucket = info.bucket; @@ -410,12 +410,12 @@ int RadosBucket::link(const DoutPrefixProvider *dpp, User* new_user, optional_yi return r; } -int RadosBucket::unlink(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint) +int RadosBucket::unlink(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint) { return store->ctl()->bucket->unlink_bucket(new_user->get_id(), info.bucket, y, dpp, update_entrypoint); } -int RadosBucket::chown(const DoutPrefixProvider *dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker) +int RadosBucket::chown(const DoutPrefixProvider* dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker) { string obj_marker; @@ -426,20 +426,20 @@ int RadosBucket::chown(const DoutPrefixProvider *dpp, User* new_user, User* old_ old_user->get_display_name(), *marker, y, dpp); } -int RadosBucket::put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time _mtime) +int RadosBucket::put_instance_info(const DoutPrefixProvider* dpp, bool exclusive, ceph::real_time _mtime) { mtime = _mtime; return store->getRados()->put_bucket_instance_info(info, exclusive, mtime, &attrs, dpp); } -int RadosBucket::remove_entrypoint(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) +int RadosBucket::remove_entrypoint(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) { return store->ctl()->bucket->remove_bucket_entrypoint_info(get_key(), y, dpp, RGWBucketCtl::Bucket::RemoveParams() .set_objv_tracker(objv)); } -int RadosBucket::remove_instance_info(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) +int RadosBucket::remove_instance_info(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) { return store->ctl()->bucket->remove_bucket_instance_info(get_key(), info, y, dpp, RGWBucketCtl::BucketInstance::RemoveParams() @@ -452,7 +452,7 @@ bool RadosBucket::is_owner(User* user) return (info.owner.compare(user->get_id()) == 0); } -int RadosBucket::check_empty(const DoutPrefixProvider *dpp, optional_yield y) +int RadosBucket::check_empty(const DoutPrefixProvider* dpp, optional_yield y) { return store->getRados()->check_bucket_empty(dpp, info, y); } @@ -464,19 +464,19 @@ int RadosBucket::check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quot user_quota, bucket_quota, obj_size, y, check_size_only); } -int RadosBucket::set_instance_attrs(const DoutPrefixProvider *dpp, Attrs& attrs, optional_yield y) +int RadosBucket::set_instance_attrs(const DoutPrefixProvider* dpp, Attrs& attrs, optional_yield y) { return store->ctl()->bucket->set_bucket_instance_attrs(get_info(), attrs, &get_info().objv_tracker, y, dpp); } -int RadosBucket::try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime) +int RadosBucket::try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime) { return store->getRados()->try_refresh_bucket_info(info, pmtime, dpp, &attrs); } int RadosBucket::read_usage(uint64_t start_epoch, uint64_t end_epoch, - uint32_t max_entries, bool *is_truncated, + uint32_t max_entries, bool* is_truncated, RGWUsageIter& usage_iter, map& usage) { @@ -510,7 +510,7 @@ int RadosBucket::set_tag_timeout(uint64_t timeout) return store->getRados()->cls_obj_set_bucket_tag_timeout(info, timeout); } -int RadosBucket::purge_instance(const DoutPrefixProvider *dpp) +int RadosBucket::purge_instance(const DoutPrefixProvider* dpp) { int max_shards = (info.layout.current_index.layout.normal.num_shards > 0 ? info.layout.current_index.layout.normal.num_shards : 1); for (int i = 0; i < max_shards; i++) { @@ -532,7 +532,7 @@ int RadosBucket::purge_instance(const DoutPrefixProvider *dpp) return 0; } -int RadosBucket::set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy &acl, optional_yield y) +int RadosBucket::set_acl(const DoutPrefixProvider* dpp, RGWAccessControlPolicy &acl, optional_yield y) { bufferlist aclbl; @@ -547,7 +547,7 @@ std::unique_ptr RadosBucket::get_object(const rgw_obj_key& k) return std::unique_ptr(new RadosObject(this->store, k, this)); } -int RadosBucket::list(const DoutPrefixProvider *dpp, ListParams& params, int max, ListResults& results, optional_yield y) +int RadosBucket::list(const DoutPrefixProvider* dpp, ListParams& params, int max, ListResults& results, optional_yield y) { RGWRados::Bucket target(store->getRados(), get_info()); if (params.shard_id >= 0) { @@ -580,10 +580,10 @@ std::unique_ptr RadosStore::get_user(const rgw_user &u) return std::unique_ptr(new RadosUser(this, u)); } -int RadosStore::get_user_by_access_key(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y, std::unique_ptr* user) +int RadosStore::get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr* user) { RGWUserInfo uinfo; - User *u; + User* u; RGWObjVersionTracker objv_tracker; int r = ctl()->user->get_info_by_access_key(dpp, key, &uinfo, y, RGWUserCtl::GetParams().set_objv_tracker(&objv_tracker)); @@ -600,10 +600,10 @@ int RadosStore::get_user_by_access_key(const DoutPrefixProvider *dpp, const std: return 0; } -int RadosStore::get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr* user) +int RadosStore::get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr* user) { RGWUserInfo uinfo; - User *u; + User* u; RGWObjVersionTracker objv_tracker; int r = ctl()->user->get_info_by_email(dpp, email, &uinfo, y, RGWUserCtl::GetParams().set_objv_tracker(&objv_tracker)); @@ -620,10 +620,10 @@ int RadosStore::get_user_by_email(const DoutPrefixProvider *dpp, const std::stri return 0; } -int RadosStore::get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) +int RadosStore::get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) { RGWUserInfo uinfo; - User *u; + User* u; RGWObjVersionTracker objv_tracker; int r = ctl()->user->get_info_by_swift(dpp, user_str, &uinfo, y, RGWUserCtl::GetParams().set_objv_tracker(&objv_tracker)); @@ -645,7 +645,7 @@ std::unique_ptr RadosStore::get_object(const rgw_obj_key& k) return std::unique_ptr(new RadosObject(this, k)); } -int RadosStore::get_bucket(const DoutPrefixProvider *dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) +int RadosStore::get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) { int ret; Bucket* bp; @@ -672,7 +672,7 @@ int RadosStore::get_bucket(User* u, const RGWBucketInfo& i, std::unique_ptr* bucket, optional_yield y) +int RadosStore::get_bucket(const DoutPrefixProvider* dpp, User* u, const std::string& tenant, const std::string& name, std::unique_ptr* bucket, optional_yield y) { rgw_bucket b; @@ -682,7 +682,7 @@ int RadosStore::get_bucket(const DoutPrefixProvider *dpp, User* u, const std::st return get_bucket(dpp, u, b, bucket, y); } -int RadosStore::create_bucket(const DoutPrefixProvider *dpp, +int RadosStore::create_bucket(const DoutPrefixProvider* dpp, User& u, const rgw_bucket& b, const string& zonegroup_id, rgw_placement_rule& placement_rule, @@ -694,7 +694,7 @@ int RadosStore::create_bucket(const DoutPrefixProvider *dpp, obj_version& ep_objv, bool exclusive, bool obj_lock_enabled, - bool *existed, + bool* existed, req_info& req_info, std::unique_ptr* bucket_out, optional_yield y) @@ -702,11 +702,11 @@ int RadosStore::create_bucket(const DoutPrefixProvider *dpp, int ret; bufferlist in_data; RGWBucketInfo master_info; - rgw_bucket *pmaster_bucket; - uint32_t *pmaster_num_shards; + rgw_bucket* pmaster_bucket; + uint32_t* pmaster_num_shards; real_time creation_time; std::unique_ptr bucket; - obj_version objv, *pobjv = NULL; + obj_version objv,* pobjv = NULL; /* If it exists, look it up; otherwise create it */ ret = get_bucket(dpp, &u, b, &bucket, y); @@ -804,9 +804,9 @@ bool RadosStore::is_meta_master() return svc()->zone->is_meta_master(); } -int RadosStore::forward_request_to_master(User* user, obj_version *objv, +int RadosStore::forward_request_to_master(User* user, obj_version* objv, bufferlist& in_data, - JSONParser *jp, req_info& info, + JSONParser* jp, req_info& info, optional_yield y) { if (is_meta_master()) { @@ -837,7 +837,7 @@ int RadosStore::forward_request_to_master(User* user, obj_version *objv, return 0; } -int RadosStore::defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, Bucket* bucket, Object* obj, optional_yield y) +int RadosStore::defer_gc(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Bucket* bucket, Object* obj, optional_yield y) { return rados->defer_gc(dpp, rctx, bucket->get_info(), obj->get_obj(), y); } @@ -891,9 +891,9 @@ std::unique_ptr RadosStore::get_gc_chain(rgw::sal::Object* obj) return std::unique_ptr(new RadosGCChain(this, obj)); } -std::unique_ptr RadosStore::get_writer(Aio *aio, rgw::sal::Bucket* bucket, +std::unique_ptr RadosStore::get_writer(Aio* aio, rgw::sal::Bucket* bucket, RGWObjectCtx& obj_ctx, std::unique_ptr _head_obj, - const DoutPrefixProvider *dpp, optional_yield y) + const DoutPrefixProvider* dpp, optional_yield y) { return std::unique_ptr(new RadosWriter(aio, this, bucket, obj_ctx, std::move(_head_obj), dpp, y)); } @@ -905,7 +905,7 @@ int RadosStore::delete_raw_obj(const rgw_raw_obj& obj) int RadosStore::delete_raw_obj_aio(const rgw_raw_obj& obj, Completions* aio) { - RadosCompletions *raio = static_cast(aio); + RadosCompletions* raio = static_cast(aio); return rados->delete_raw_obj_aio(obj, raio->handles); } @@ -915,7 +915,7 @@ void RadosStore::get_raw_obj(const rgw_placement_rule& placement_rule, const rgw rados->obj_to_raw(placement_rule, obj, raw_obj); } -int RadosStore::get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) +int RadosStore::get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) { return rados->get_max_chunk_size(obj.pool, chunk_size, dpp); } @@ -955,20 +955,20 @@ void RadosStore::get_quota(RGWQuotaInfo& bucket_quota, RGWQuotaInfo& user_quota) int RadosStore::list_raw_objects(const rgw_pool& pool, const string& prefix_filter, int max, RGWListRawObjsCtx& ctx, list& oids, - bool *is_truncated) + bool* is_truncated) { return rados->list_raw_objects(pool, prefix_filter, max, ctx, oids, is_truncated); } -int RadosStore::set_buckets_enabled(const DoutPrefixProvider *dpp, vector& buckets, bool enabled) +int RadosStore::set_buckets_enabled(const DoutPrefixProvider* dpp, vector& buckets, bool enabled) { return rados->set_buckets_enabled(buckets, enabled, dpp); } -int RadosStore::get_sync_policy_handler(const DoutPrefixProvider *dpp, +int RadosStore::get_sync_policy_handler(const DoutPrefixProvider* dpp, std::optional zone, std::optional bucket, - RGWBucketSyncPolicyHandlerRef *phandler, + RGWBucketSyncPolicyHandlerRef* phandler, optional_yield y) { return ctl()->bucket->get_sync_policy_handler(zone, bucket, phandler, y, dpp); @@ -980,7 +980,7 @@ RGWDataSyncStatusManager* RadosStore::get_data_sync_manager(const rgw_zone_id& s } int RadosStore::read_all_usage(uint64_t start_epoch, uint64_t end_epoch, - uint32_t max_entries, bool *is_truncated, + uint32_t max_entries, bool* is_truncated, RGWUsageIter& usage_iter, map& usage) { @@ -999,26 +999,26 @@ int RadosStore::trim_all_usage(uint64_t start_epoch, uint64_t end_epoch) return rados->trim_usage(uid, bucket_name, start_epoch, end_epoch); } -int RadosStore::get_config_key_val(string name, bufferlist *bl) +int RadosStore::get_config_key_val(string name, bufferlist* bl) { return svc()->config_key->get(name, true, bl); } int RadosStore::put_system_obj(const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive, - RGWObjVersionTracker *objv_tracker, real_time set_mtime, - optional_yield y, map *pattrs) + RGWObjVersionTracker* objv_tracker, real_time set_mtime, + optional_yield y, map* pattrs) { auto obj_ctx = svc()->sysobj->init_obj_ctx(); return rgw_put_system_obj(obj_ctx, pool, oid, data, exclusive, objv_tracker, set_mtime, y, pattrs); } -int RadosStore::get_system_obj(const DoutPrefixProvider *dpp, +int RadosStore::get_system_obj(const DoutPrefixProvider* dpp, const rgw_pool& pool, const string& key, bufferlist& bl, - RGWObjVersionTracker *objv_tracker, real_time *pmtime, - optional_yield y, map *pattrs, - rgw_cache_entry_info *cache_info, + RGWObjVersionTracker* objv_tracker, real_time* pmtime, + optional_yield y, map* pattrs, + rgw_cache_entry_info* cache_info, boost::optional refresh_version) { auto obj_ctx = svc()->sysobj->init_obj_ctx(); @@ -1026,7 +1026,7 @@ int RadosStore::get_system_obj(const DoutPrefixProvider *dpp, } int RadosStore::delete_system_obj(const rgw_pool& pool, const string& oid, - RGWObjVersionTracker *objv_tracker, optional_yield y) + RGWObjVersionTracker* objv_tracker, optional_yield y) { return rgw_delete_system_obj(svc()->sysobj, pool, oid, objv_tracker, y); } @@ -1051,7 +1051,7 @@ std::string RadosStore::meta_get_marker(void* handle) return ctl()->meta.mgr->get_marker(handle); } -int RadosStore::meta_remove(const DoutPrefixProvider *dpp, string& metadata_key, optional_yield y) +int RadosStore::meta_remove(const DoutPrefixProvider* dpp, string& metadata_key, optional_yield y) { return ctl()->meta.mgr->remove(metadata_key, y, dpp); } @@ -1062,7 +1062,7 @@ void RadosStore::finalize(void) rados->finalize(); } -int RadosStore::get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx *ioctx) +int RadosStore::get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, librados::IoCtx* ioctx) { return rados->get_obj_head_ioctx(bucket_info, obj, ioctx); } @@ -1089,12 +1089,12 @@ int Object::range_to_ofs(uint64_t obj_size, int64_t &ofs, int64_t &end) return 0; } -int RadosObject::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWObjState **state, optional_yield y, bool follow_olh) +int RadosObject::get_obj_state(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, RGWObjState **state, optional_yield y, bool follow_olh) { return store->getRados()->get_obj_state(dpp, rctx, bucket->get_info(), get_obj(), state, follow_olh, y); } -int RadosObject::read_attrs(const DoutPrefixProvider *dpp, RGWRados::Object::Read &read_op, optional_yield y, rgw_obj *target_obj) +int RadosObject::read_attrs(const DoutPrefixProvider* dpp, RGWRados::Object::Read &read_op, optional_yield y, rgw_obj* target_obj) { read_op.params.attrs = &attrs; read_op.params.target_obj = target_obj; @@ -1104,7 +1104,7 @@ int RadosObject::read_attrs(const DoutPrefixProvider *dpp, RGWRados::Object::Rea return read_op.prepare(y, dpp); } -int RadosObject::set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj) +int RadosObject::set_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj) { Attrs empty; rgw_obj target = get_obj(); @@ -1120,7 +1120,7 @@ int RadosObject::set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx y); } -int RadosObject::get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj) +int RadosObject::get_obj_attrs(RGWObjectCtx* rctx, optional_yield y, const DoutPrefixProvider* dpp, rgw_obj* target_obj) { RGWRados::Object op_target(store->getRados(), bucket->get_info(), *rctx, get_obj()); RGWRados::Object::Read read_op(&op_target); @@ -1128,7 +1128,7 @@ int RadosObject::get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutP return read_attrs(dpp, read_op, y, target_obj); } -int RadosObject::modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp) +int RadosObject::modify_obj_attrs(RGWObjectCtx* rctx, const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp) { rgw_obj target = get_obj(); int r = get_obj_attrs(rctx, y, dpp, &target); @@ -1140,7 +1140,7 @@ int RadosObject::modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, buf return set_obj_attrs(dpp, rctx, &attrs, nullptr, y, &target); } -int RadosObject::delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y) +int RadosObject::delete_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, const char* attr_name, optional_yield y) { Attrs rmattr; bufferlist bl; @@ -1154,7 +1154,7 @@ int RadosObject::copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, Object* dest_obj, uint16_t olh_epoch, std::string* petag, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) { Attrs attrset; @@ -1176,13 +1176,13 @@ int RadosObject::copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, real_time(), NULL, dpp, y); } -void RadosObject::set_atomic(RGWObjectCtx *rctx) const +void RadosObject::set_atomic(RGWObjectCtx* rctx) const { rgw_obj obj = get_obj(); store->getRados()->set_atomic(rctx, obj); } -void RadosObject::set_prefetch_data(RGWObjectCtx *rctx) +void RadosObject::set_prefetch_data(RGWObjectCtx* rctx) { rgw_obj obj = get_obj(); store->getRados()->set_prefetch_data(rctx, obj); @@ -1227,7 +1227,7 @@ void RadosObject::get_raw_obj(rgw_raw_obj* raw_obj) int RadosObject::omap_get_vals(const string& marker, uint64_t count, std::map *m, - bool *pmore, optional_yield y) + bool* pmore, optional_yield y) { auto obj_ctx = store->svc()->sysobj->init_obj_ctx(); rgw_raw_obj raw_obj; @@ -1250,7 +1250,7 @@ int RadosObject::omap_get_all(std::map *m, int RadosObject::omap_get_vals_by_keys(const std::string& oid, const std::set& keys, - Attrs *vals) + Attrs* vals) { int ret; rgw_raw_obj head_obj; @@ -1290,19 +1290,19 @@ int RadosObject::transition(RGWObjectCtx& rctx, const rgw_placement_rule& placement_rule, const real_time& mtime, uint64_t olh_epoch, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) { return store->getRados()->transition_obj(rctx, bucket, *this, placement_rule, mtime, olh_epoch, dpp, y); } -int RadosObject::get_max_chunk_size(const DoutPrefixProvider *dpp, rgw_placement_rule placement_rule, uint64_t *max_chunk_size, uint64_t *alignment) +int RadosObject::get_max_chunk_size(const DoutPrefixProvider* dpp, rgw_placement_rule placement_rule, uint64_t* max_chunk_size, uint64_t* alignment) { return store->getRados()->get_max_chunk_size(placement_rule, get_obj(), max_chunk_size, dpp, alignment); } void RadosObject::get_max_aligned_size(uint64_t size, uint64_t alignment, - uint64_t *max_size) + uint64_t* max_size) { store->getRados()->get_max_aligned_size(size, alignment, max_size); } @@ -1327,7 +1327,7 @@ bool RadosObject::placement_rules_match(rgw_placement_rule& r1, rgw_placement_ru return p1 == p2; } -std::unique_ptr RadosObject::get_read_op(RGWObjectCtx *ctx) +std::unique_ptr RadosObject::get_read_op(RGWObjectCtx* ctx) { return std::unique_ptr(new RadosObject::RadosReadOp(this, ctx)); } @@ -1342,7 +1342,7 @@ RadosObject::RadosReadOp::RadosReadOp(RadosObject *_source, RGWObjectCtx *_rctx) parent_op(&op_target) { } -int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider *dpp) +int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider* dpp) { uint64_t obj_size; @@ -1369,23 +1369,23 @@ int RadosObject::RadosReadOp::prepare(optional_yield y, const DoutPrefixProvider return ret; } -int RadosObject::RadosReadOp::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp) +int RadosObject::RadosReadOp::read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider* dpp) { return parent_op.read(ofs, end, bl, y, dpp); } -int RadosObject::RadosReadOp::get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, +int RadosObject::RadosReadOp::get_manifest(const DoutPrefixProvider* dpp, RGWObjManifest **pmanifest, optional_yield y) { return op_target.get_manifest(dpp, pmanifest, y); } -int RadosObject::RadosReadOp::get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y) +int RadosObject::RadosReadOp::get_attr(const DoutPrefixProvider* dpp, const char* name, bufferlist& dest, optional_yield y) { return parent_op.get_attr(dpp, name, dest, y); } -std::unique_ptr RadosObject::get_delete_op(RGWObjectCtx *ctx) +std::unique_ptr RadosObject::get_delete_op(RGWObjectCtx* ctx) { return std::unique_ptr(new RadosObject::RadosDeleteOp(this, ctx)); } @@ -1400,7 +1400,7 @@ RadosObject::RadosDeleteOp::RadosDeleteOp(RadosObject *_source, RGWObjectCtx *_r parent_op(&op_target) { } -int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider *dpp, optional_yield y) +int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider* dpp, optional_yield y) { parent_op.params.bucket_owner = params.bucket_owner.get_id(); parent_op.params.versioning_status = params.versioning_status; @@ -1427,7 +1427,7 @@ int RadosObject::RadosDeleteOp::delete_obj(const DoutPrefixProvider *dpp, option return ret; } -int RadosObject::delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ctx, optional_yield y) +int RadosObject::delete_object(const DoutPrefixProvider* dpp, RGWObjectCtx* obj_ctx, optional_yield y) { RGWRados::Object del_target(store->getRados(), bucket->get_info(), *obj_ctx, get_obj()); RGWRados::Object::Delete del_op(&del_target); @@ -1438,7 +1438,7 @@ int RadosObject::delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ return del_op.delete_obj(y, dpp); } -int RadosObject::delete_obj_aio(const DoutPrefixProvider *dpp, RGWObjState *astate, +int RadosObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio, bool keep_index_consistent, optional_yield y) { @@ -1448,7 +1448,7 @@ int RadosObject::delete_obj_aio(const DoutPrefixProvider *dpp, RGWObjState *asta raio->handles, keep_index_consistent, y); } -std::unique_ptr RadosObject::get_stat_op(RGWObjectCtx *ctx) +std::unique_ptr RadosObject::get_stat_op(RGWObjectCtx* ctx) { return std::unique_ptr(new RadosObject::RadosStatOp(this, ctx)); } @@ -1491,31 +1491,31 @@ int RadosObject::RadosStatOp::wait() int RadosObject::copy_object(RGWObjectCtx& obj_ctx, User* user, - req_info *info, + req_info* info, const rgw_zone_id& source_zone, rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket, rgw::sal::Bucket* src_bucket, const rgw_placement_rule& dest_placement, - ceph::real_time *src_mtime, - ceph::real_time *mtime, - const ceph::real_time *mod_ptr, - const ceph::real_time *unmod_ptr, + ceph::real_time* src_mtime, + ceph::real_time* mtime, + const ceph::real_time* mod_ptr, + const ceph::real_time* unmod_ptr, bool high_precision_time, - const char *if_match, - const char *if_nomatch, + const char* if_match, + const char* if_nomatch, AttrsMod attrs_mod, bool copy_if_newer, Attrs& attrs, RGWObjCategory category, uint64_t olh_epoch, boost::optional delete_at, - string *version_id, - string *tag, - string *etag, + string* version_id, + string* tag, + string* etag, void (*progress_cb)(off_t, void *), - void *progress_data, - const DoutPrefixProvider *dpp, + void* progress_data, + const DoutPrefixProvider* dpp, optional_yield y) { return store->getRados()->copy_obj(obj_ctx, @@ -1549,7 +1549,7 @@ int RadosObject::copy_object(RGWObjectCtx& obj_ctx, y); } -int RadosObject::RadosReadOp::iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) +int RadosObject::RadosReadOp::iterate(const DoutPrefixProvider* dpp, int64_t ofs, int64_t end, RGWGetDataCB* cb, optional_yield y) { return parent_op.iterate(dpp, ofs, end, cb, y); } @@ -1596,7 +1596,7 @@ int RadosObject::RadosWriteOp::prepare(optional_yield y) return 0; } -int RadosObject::RadosWriteOp::write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y) +int RadosObject::RadosWriteOp::write_meta(const DoutPrefixProvider* dpp, uint64_t size, uint64_t accounted_size, optional_yield y) { int ret = parent_op.write_meta(dpp, size, accounted_size, *params.attrs, y); params.canceled = parent_op.meta.canceled; @@ -1606,7 +1606,7 @@ int RadosObject::RadosWriteOp::write_meta(const DoutPrefixProvider *dpp, uint64_ int RadosObject::swift_versioning_restore(RGWObjectCtx* obj_ctx, bool& restored, - const DoutPrefixProvider *dpp) + const DoutPrefixProvider* dpp) { return store->getRados()->swift_versioning_restore(*obj_ctx, bucket->get_owner()->get_id(), @@ -1617,7 +1617,7 @@ int RadosObject::swift_versioning_restore(RGWObjectCtx* obj_ctx, } int RadosObject::swift_versioning_copy(RGWObjectCtx* obj_ctx, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) { return store->getRados()->swift_versioning_copy(*obj_ctx, @@ -1764,7 +1764,7 @@ int RadosNotification::publish_reserve(RGWObjTags* obj_tags) return rgw::notify::publish_reserve(event_type, res, obj_tags); } -int RadosNotification::publish_commit(const DoutPrefixProvider *dpp, uint64_t size, +int RadosNotification::publish_commit(const DoutPrefixProvider* dpp, uint64_t size, const ceph::real_time& mtime, const std::string& etag) { return rgw::notify::publish_commit(obj, size, mtime, etag, event_type, res, dpp); @@ -1914,7 +1914,7 @@ bool RadosZone::is_writeable() return store->svc()->zone->zone_is_writeable(); } -bool RadosZone::get_redirect_endpoint(std::string *endpoint) +bool RadosZone::get_redirect_endpoint(std::string* endpoint) { return store->svc()->zone->get_redirect_zone_endpoint(endpoint); } @@ -1933,11 +1933,11 @@ const string& RadosZone::get_current_period_id() extern "C" { -void *newStore(void) +void* newStore(void) { - rgw::sal::RadosStore *store = new rgw::sal::RadosStore(); + rgw::sal::RadosStore* store = new rgw::sal::RadosStore(); if (store) { - RGWRados *rados = new RGWRados(); + RGWRados* rados = new RGWRados(); if (!rados) { delete store; store = nullptr; diff --git a/src/rgw/rgw_sal_rados.h b/src/rgw/rgw_sal_rados.h index e4498005cb4..7119d878662 100644 --- a/src/rgw/rgw_sal_rados.h +++ b/src/rgw/rgw_sal_rados.h @@ -34,7 +34,7 @@ class RadosCompletions : public Completions { class RadosUser : public User { private: - RadosStore *store; + RadosStore* store; public: RadosUser(RadosStore *_st, const rgw_user& _u) : User(_u), store(_st) { } @@ -46,32 +46,32 @@ class RadosUser : public User { virtual std::unique_ptr clone() override { return std::unique_ptr(new RadosUser(*this)); } - int list_buckets(const DoutPrefixProvider *dpp, const std::string& marker, const std::string& end_marker, + int list_buckets(const DoutPrefixProvider* dpp, const std::string& marker, const std::string& end_marker, uint64_t max, bool need_stats, BucketList& buckets, optional_yield y) override; virtual Bucket* create_bucket(rgw_bucket& bucket, ceph::real_time creation_time) override; - virtual int read_attrs(const DoutPrefixProvider *dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker) override; + virtual int read_attrs(const DoutPrefixProvider* dpp, optional_yield y, Attrs* uattrs, RGWObjVersionTracker* tracker) override; virtual int read_stats(optional_yield y, RGWStorageStats* stats, - ceph::real_time *last_stats_sync = nullptr, - ceph::real_time *last_stats_update = nullptr) override; - virtual int read_stats_async(RGWGetUserStats_CB *cb) override; + ceph::real_time* last_stats_sync = nullptr, + ceph::real_time* last_stats_update = nullptr) override; + virtual int read_stats_async(RGWGetUserStats_CB* cb) override; virtual int complete_flush_stats(optional_yield y) override; virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries, - bool *is_truncated, RGWUsageIter& usage_iter, + bool* is_truncated, RGWUsageIter& usage_iter, map& usage) override; virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) override; /* Placeholders */ - virtual int load_by_id(const DoutPrefixProvider *dpp, optional_yield y) override; - virtual int store_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::PutParams& params = {}) override; - virtual int remove_info(const DoutPrefixProvider *dpp, optional_yield y, const RGWUserCtl::RemoveParams& params = {}) override; + virtual int load_by_id(const DoutPrefixProvider* dpp, optional_yield y) override; + virtual int store_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::PutParams& params = {}) override; + virtual int remove_info(const DoutPrefixProvider* dpp, optional_yield y, const RGWUserCtl::RemoveParams& params = {}) override; friend class RadosBucket; }; class RadosObject : public Object { private: - RadosStore *store; + RadosStore* store; RGWAccessControlPolicy acls; public: @@ -86,11 +86,11 @@ class RadosObject : public Object { public: RadosReadOp(RadosObject *_source, RGWObjectCtx *_rctx); - virtual int prepare(optional_yield y, const DoutPrefixProvider *dpp) override; - virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider *dpp) override; - virtual int iterate(const DoutPrefixProvider *dpp, int64_t ofs, int64_t end, RGWGetDataCB *cb, optional_yield y) override; - virtual int get_manifest(const DoutPrefixProvider *dpp, RGWObjManifest **pmanifest, optional_yield y) override; - virtual int get_attr(const DoutPrefixProvider *dpp, const char *name, bufferlist& dest, optional_yield y) override; + virtual int prepare(optional_yield y, const DoutPrefixProvider* dpp) override; + virtual int read(int64_t ofs, int64_t end, bufferlist& bl, optional_yield y, const DoutPrefixProvider* dpp) override; + virtual int iterate(const DoutPrefixProvider* dpp, int64_t ofs, int64_t end, RGWGetDataCB* cb, optional_yield y) override; + virtual int get_manifest(const DoutPrefixProvider* dpp, RGWObjManifest **pmanifest, optional_yield y) override; + virtual int get_attr(const DoutPrefixProvider* dpp, const char* name, bufferlist& dest, optional_yield y) override; }; struct RadosWriteOp : public WriteOp { @@ -104,8 +104,8 @@ class RadosObject : public Object { RadosWriteOp(RadosObject* _source, RGWObjectCtx* _rctx); virtual int prepare(optional_yield y) override; - virtual int write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size, optional_yield y) override; - //virtual int write_data(const char *data, uint64_t ofs, uint64_t len, bool exclusive) override; + virtual int write_meta(const DoutPrefixProvider* dpp, uint64_t size, uint64_t accounted_size, optional_yield y) override; + //virtual int write_data(const char* data, uint64_t ofs, uint64_t len, bool exclusive) override; }; struct RadosDeleteOp : public DeleteOp { @@ -118,7 +118,7 @@ class RadosObject : public Object { public: RadosDeleteOp(RadosObject* _source, RGWObjectCtx* _rctx); - virtual int delete_obj(const DoutPrefixProvider *dpp, optional_yield y) override; + virtual int delete_obj(const DoutPrefixProvider* dpp, optional_yield y) override; }; struct RadosStatOp : public StatOp { @@ -149,35 +149,35 @@ class RadosObject : public Object { } RadosObject(RadosObject& _o) = default; - virtual int delete_object(const DoutPrefixProvider *dpp, RGWObjectCtx* obj_ctx, optional_yield y) override; - virtual int delete_obj_aio(const DoutPrefixProvider *dpp, RGWObjState *astate, Completions* aio, + virtual int delete_object(const DoutPrefixProvider* dpp, RGWObjectCtx* obj_ctx, optional_yield y) override; + virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio, bool keep_index_consistent, optional_yield y) override; virtual int copy_object(RGWObjectCtx& obj_ctx, User* user, - req_info *info, const rgw_zone_id& source_zone, + req_info* info, const rgw_zone_id& source_zone, rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket, rgw::sal::Bucket* src_bucket, const rgw_placement_rule& dest_placement, - ceph::real_time *src_mtime, ceph::real_time *mtime, - const ceph::real_time *mod_ptr, const ceph::real_time *unmod_ptr, + ceph::real_time* src_mtime, ceph::real_time* mtime, + const ceph::real_time* mod_ptr, const ceph::real_time* unmod_ptr, bool high_precision_time, - const char *if_match, const char *if_nomatch, + const char* if_match, const char* if_nomatch, AttrsMod attrs_mod, bool copy_if_newer, Attrs& attrs, RGWObjCategory category, uint64_t olh_epoch, boost::optional delete_at, - string *version_id, string *tag, string *etag, - void (*progress_cb)(off_t, void *), void *progress_data, - const DoutPrefixProvider *dpp, optional_yield y) override; + string* version_id, string* tag, string* etag, + void (*progress_cb)(off_t, void *), void* progress_data, + const DoutPrefixProvider* dpp, optional_yield y) override; virtual RGWAccessControlPolicy& get_acl(void) override { return acls; } virtual int set_acl(const RGWAccessControlPolicy& acl) override { acls = acl; return 0; } - virtual void set_atomic(RGWObjectCtx *rctx) const override; - virtual void set_prefetch_data(RGWObjectCtx *rctx) override; - - virtual int get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWObjState **state, optional_yield y, bool follow_olh = true) override; - virtual int set_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) override; - virtual int get_obj_attrs(RGWObjectCtx *rctx, optional_yield y, const DoutPrefixProvider *dpp, rgw_obj* target_obj = NULL) override; - virtual int modify_obj_attrs(RGWObjectCtx *rctx, const char *attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider *dpp) override; - virtual int delete_obj_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, const char *attr_name, optional_yield y) override; - virtual int copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, Object* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider *dpp, optional_yield y) override; + virtual void set_atomic(RGWObjectCtx* rctx) const override; + virtual void set_prefetch_data(RGWObjectCtx* rctx) override; + + virtual int get_obj_state(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, RGWObjState **state, optional_yield y, bool follow_olh = true) override; + virtual int set_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Attrs* setattrs, Attrs* delattrs, optional_yield y, rgw_obj* target_obj = NULL) override; + virtual int get_obj_attrs(RGWObjectCtx* rctx, optional_yield y, const DoutPrefixProvider* dpp, rgw_obj* target_obj = NULL) override; + virtual int modify_obj_attrs(RGWObjectCtx* rctx, const char* attr_name, bufferlist& attr_val, optional_yield y, const DoutPrefixProvider* dpp) override; + virtual int delete_obj_attrs(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, const char* attr_name, optional_yield y) override; + virtual int copy_obj_data(RGWObjectCtx& rctx, Bucket* dest_bucket, Object* dest_obj, uint16_t olh_epoch, std::string* petag, const DoutPrefixProvider* dpp, optional_yield y) override; virtual bool is_expired() override; virtual void gen_rand_obj_instance_name() override; virtual void raw_obj_to_obj(const rgw_raw_obj& raw_obj) override; @@ -191,21 +191,21 @@ class RadosObject : public Object { const rgw_placement_rule& placement_rule, const real_time& mtime, uint64_t olh_epoch, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) override; - virtual int get_max_chunk_size(const DoutPrefixProvider *dpp, + virtual int get_max_chunk_size(const DoutPrefixProvider* dpp, rgw_placement_rule placement_rule, - uint64_t *max_chunk_size, - uint64_t *alignment = nullptr) override; - virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t *max_size) override; + uint64_t* max_chunk_size, + uint64_t* alignment = nullptr) override; + virtual void get_max_aligned_size(uint64_t size, uint64_t alignment, uint64_t* max_size) override; virtual bool placement_rules_match(rgw_placement_rule& r1, rgw_placement_rule& r2) override; /* Swift versioning */ virtual int swift_versioning_restore(RGWObjectCtx* obj_ctx, bool& restored, - const DoutPrefixProvider *dpp) override; + const DoutPrefixProvider* dpp) override; virtual int swift_versioning_copy(RGWObjectCtx* obj_ctx, - const DoutPrefixProvider *dpp, + const DoutPrefixProvider* dpp, optional_yield y) override; /* OPs */ @@ -217,22 +217,22 @@ class RadosObject : public Object { /* OMAP */ virtual int omap_get_vals(const string& marker, uint64_t count, std::map *m, - bool *pmore, optional_yield y) override; + bool* pmore, optional_yield y) override; virtual int omap_get_all(std::map *m, optional_yield y) override; virtual int omap_get_vals_by_keys(const std::string& oid, const std::set& keys, - Attrs *vals) override; + Attrs* vals) override; virtual int omap_set_val_by_key(const std::string& key, bufferlist& val, bool must_exist, optional_yield y) override; private: - int read_attrs(const DoutPrefixProvider *dpp, RGWRados::Object::Read &read_op, optional_yield y, rgw_obj *target_obj = nullptr); + int read_attrs(const DoutPrefixProvider* dpp, RGWRados::Object::Read &read_op, optional_yield y, rgw_obj* target_obj = nullptr); }; class RadosBucket : public Bucket { private: - RadosStore *store; + RadosStore* store; RGWAccessControlPolicy acls; public: @@ -286,42 +286,42 @@ class RadosBucket : public Bucket { ~RadosBucket() { } virtual std::unique_ptr get_object(const rgw_obj_key& k) override; - virtual int list(const DoutPrefixProvider *dpp, ListParams&, int, ListResults&, optional_yield y) override; + virtual int list(const DoutPrefixProvider* dpp, ListParams&, int, ListResults&, optional_yield y) override; Object* create_object(const rgw_obj_key& key /* Attributes */) override; - virtual int remove_bucket(const DoutPrefixProvider *dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) override; + virtual int remove_bucket(const DoutPrefixProvider* dpp, bool delete_children, std::string prefix, std::string delimiter, bool forward_to_master, req_info* req_info, optional_yield y) override; virtual RGWAccessControlPolicy& get_acl(void) override { return acls; } - virtual int set_acl(const DoutPrefixProvider *dpp, RGWAccessControlPolicy& acl, optional_yield y) override; - virtual int get_bucket_info(const DoutPrefixProvider *dpp, optional_yield y) override; + virtual int set_acl(const DoutPrefixProvider* dpp, RGWAccessControlPolicy& acl, optional_yield y) override; + virtual int get_bucket_info(const DoutPrefixProvider* dpp, optional_yield y) override; virtual int get_bucket_stats(int shard_id, - std::string *bucket_ver, std::string *master_ver, + std::string* bucket_ver, std::string* master_ver, std::map& stats, - std::string *max_marker = nullptr, - bool *syncstopped = nullptr) override; - virtual int get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB *ctx) override; - virtual int read_bucket_stats(const DoutPrefixProvider *dpp, optional_yield y) override; + std::string* max_marker = nullptr, + bool* syncstopped = nullptr) override; + virtual int get_bucket_stats_async(int shard_id, RGWGetBucketStats_CB* ctx) override; + virtual int read_bucket_stats(const DoutPrefixProvider* dpp, optional_yield y) override; virtual int sync_user_stats(optional_yield y) override; - virtual int update_container_stats(const DoutPrefixProvider *dpp) override; - virtual int check_bucket_shards(const DoutPrefixProvider *dpp) override; - virtual int link(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint, RGWObjVersionTracker* objv) override; - virtual int unlink(const DoutPrefixProvider *dpp, User* new_user, optional_yield y, bool update_entrypoint = true) override; - virtual int chown(const DoutPrefixProvider *dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker = nullptr) override; - virtual int put_instance_info(const DoutPrefixProvider *dpp, bool exclusive, ceph::real_time mtime) override; - virtual int remove_entrypoint(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) override; - virtual int remove_instance_info(const DoutPrefixProvider *dpp, RGWObjVersionTracker* objv, optional_yield y) override; + virtual int update_container_stats(const DoutPrefixProvider* dpp) override; + virtual int check_bucket_shards(const DoutPrefixProvider* dpp) override; + virtual int link(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint, RGWObjVersionTracker* objv) override; + virtual int unlink(const DoutPrefixProvider* dpp, User* new_user, optional_yield y, bool update_entrypoint = true) override; + virtual int chown(const DoutPrefixProvider* dpp, User* new_user, User* old_user, optional_yield y, const std::string* marker = nullptr) override; + virtual int put_instance_info(const DoutPrefixProvider* dpp, bool exclusive, ceph::real_time mtime) override; + virtual int remove_entrypoint(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) override; + virtual int remove_instance_info(const DoutPrefixProvider* dpp, RGWObjVersionTracker* objv, optional_yield y) override; virtual bool is_owner(User* user) override; - virtual int check_empty(const DoutPrefixProvider *dpp, optional_yield y) override; + virtual int check_empty(const DoutPrefixProvider* dpp, optional_yield y) override; virtual int check_quota(RGWQuotaInfo& user_quota, RGWQuotaInfo& bucket_quota, uint64_t obj_size, optional_yield y, bool check_size_only = false) override; - virtual int set_instance_attrs(const DoutPrefixProvider *dpp, Attrs& attrs, optional_yield y) override; - virtual int try_refresh_info(const DoutPrefixProvider *dpp, ceph::real_time *pmtime) override; + virtual int set_instance_attrs(const DoutPrefixProvider* dpp, Attrs& attrs, optional_yield y) override; + virtual int try_refresh_info(const DoutPrefixProvider* dpp, ceph::real_time* pmtime) override; virtual int read_usage(uint64_t start_epoch, uint64_t end_epoch, uint32_t max_entries, - bool *is_truncated, RGWUsageIter& usage_iter, + bool* is_truncated, RGWUsageIter& usage_iter, map& usage) override; virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) override; virtual int remove_objs_from_index(std::list& objs_to_unlink) override; virtual int check_index(std::map& existing_stats, std::map& calculated_stats) override; virtual int rebuild_index() override; virtual int set_tag_timeout(uint64_t timeout) override; - virtual int purge_instance(const DoutPrefixProvider *dpp) override; + virtual int purge_instance(const DoutPrefixProvider* dpp) override; virtual std::unique_ptr clone() override { return std::make_unique(*this); } @@ -343,15 +343,15 @@ class RadosZone : public Zone { virtual const RGWRealm& get_realm() override; virtual const std::string& get_name() const override; virtual bool is_writeable() override; - virtual bool get_redirect_endpoint(string *endpoint) override; + virtual bool get_redirect_endpoint(string* endpoint) override; virtual bool has_zonegroup_api(const std::string& api) const override; virtual const string& get_current_period_id() override; }; class RadosStore : public Store { private: - RGWRados *rados; - RGWUserCtl *user_ctl; + RGWRados* rados; + RGWUserCtl* user_ctl; std::string luarocks_path; RadosZone zone; @@ -364,14 +364,14 @@ class RadosStore : public Store { } virtual std::unique_ptr get_user(const rgw_user& u) override; - virtual int get_user_by_access_key(const DoutPrefixProvider *dpp, const std::string& key, optional_yield y, std::unique_ptr* user) override; - virtual int get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr* user) override; - virtual int get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) override; + virtual int get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr* user) override; + virtual int get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr* user) override; + virtual int get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr* user) override; virtual std::unique_ptr get_object(const rgw_obj_key& k) override; - virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) override; + virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr* bucket, optional_yield y) override; virtual int get_bucket(User* u, const RGWBucketInfo& i, std::unique_ptr* bucket) override; - virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const std::string& tenant, const std::string&name, std::unique_ptr* bucket, optional_yield y) override; - virtual int create_bucket(const DoutPrefixProvider *dpp, + virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const std::string& tenant, const std::string&name, std::unique_ptr* bucket, optional_yield y) override; + virtual int create_bucket(const DoutPrefixProvider* dpp, User& u, const rgw_bucket& b, const std::string& zonegroup_id, rgw_placement_rule& placement_rule, @@ -383,15 +383,15 @@ class RadosStore : public Store { obj_version& ep_objv, bool exclusive, bool obj_lock_enabled, - bool *existed, + bool* existed, req_info& req_info, std::unique_ptr* bucket, optional_yield y) override; virtual bool is_meta_master() override; - virtual int forward_request_to_master(User* user, obj_version *objv, - bufferlist& in_data, JSONParser *jp, req_info& info, + virtual int forward_request_to_master(User* user, obj_version* objv, + bufferlist& in_data, JSONParser* jp, req_info& info, optional_yield y) override; - virtual int defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, Bucket* bucket, Object* obj, + virtual int defer_gc(const DoutPrefixProvider* dpp, RGWObjectCtx* rctx, Bucket* bucket, Object* obj, optional_yield y) override; virtual Zone* get_zone() { return &zone; } virtual std::string zone_unique_id(uint64_t unique_num) override; @@ -401,15 +401,15 @@ class RadosStore : public Store { virtual std::unique_ptr get_completions(void) override; virtual std::unique_ptr get_notification(rgw::sal::Object* obj, struct req_state* s, rgw::notify::EventType event_type) override; virtual std::unique_ptr get_gc_chain(rgw::sal::Object* obj) override; - virtual std::unique_ptr get_writer(Aio *aio, rgw::sal::Bucket* bucket, + virtual std::unique_ptr get_writer(Aio* aio, rgw::sal::Bucket* bucket, RGWObjectCtx& obj_ctx, std::unique_ptr _head_obj, - const DoutPrefixProvider *dpp, optional_yield y) override; + const DoutPrefixProvider* dpp, optional_yield y) override; virtual RGWLC* get_rgwlc(void) override { return rados->get_lc(); } virtual RGWCoroutinesManagerRegistry* get_cr_registry() override { return rados->get_cr_registry(); } virtual int delete_raw_obj(const rgw_raw_obj& obj) override; virtual int delete_raw_obj_aio(const rgw_raw_obj& obj, Completions* aio) override; virtual void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj) override; - virtual int get_raw_chunk_size(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) override; + virtual int get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size) override; virtual int log_usage(map& usage_info) override; virtual int log_op(string& oid, bufferlist& bl) override; @@ -418,49 +418,49 @@ class RadosStore : public Store { virtual void get_quota(RGWQuotaInfo& bucket_quota, RGWQuotaInfo& user_quota) override; virtual int list_raw_objects(const rgw_pool& pool, const string& prefix_filter, int max, RGWListRawObjsCtx& ctx, std::list& oids, - bool *is_truncated) override; - virtual int set_buckets_enabled(const DoutPrefixProvider *dpp, vector& buckets, bool enabled) override; + bool* is_truncated) override; + virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector& buckets, bool enabled) override; virtual uint64_t get_new_req_id() override { return rados->get_new_req_id(); } - virtual int get_sync_policy_handler(const DoutPrefixProvider *dpp, + virtual int get_sync_policy_handler(const DoutPrefixProvider* dpp, std::optional zone, std::optional bucket, - RGWBucketSyncPolicyHandlerRef *phandler, + RGWBucketSyncPolicyHandlerRef* phandler, optional_yield y) override; virtual RGWDataSyncStatusManager* get_data_sync_manager(const rgw_zone_id& source_zone) override; virtual void wakeup_meta_sync_shards(set& shard_ids) override { rados->wakeup_meta_sync_shards(shard_ids); } virtual void wakeup_data_sync_shards(const rgw_zone_id& source_zone, map >& shard_ids) override { rados->wakeup_data_sync_shards(source_zone, shard_ids); } virtual int clear_usage() override { return rados->clear_usage(); } virtual int read_all_usage(uint64_t start_epoch, uint64_t end_epoch, - uint32_t max_entries, bool *is_truncated, + uint32_t max_entries, bool* is_truncated, RGWUsageIter& usage_iter, map& usage) override; virtual int trim_all_usage(uint64_t start_epoch, uint64_t end_epoch) override; - virtual int get_config_key_val(string name, bufferlist *bl) override; + virtual int get_config_key_val(string name, bufferlist* bl) override; virtual int put_system_obj(const rgw_pool& pool, const string& oid, bufferlist& data, bool exclusive, - RGWObjVersionTracker *objv_tracker, real_time set_mtime, + RGWObjVersionTracker* objv_tracker, real_time set_mtime, optional_yield y, map *pattrs = nullptr) override; - virtual int get_system_obj(const DoutPrefixProvider *dpp, + virtual int get_system_obj(const DoutPrefixProvider* dpp, const rgw_pool& pool, const string& key, bufferlist& bl, - RGWObjVersionTracker *objv_tracker, real_time *pmtime, + RGWObjVersionTracker* objv_tracker, real_time* pmtime, optional_yield y, map *pattrs = nullptr, - rgw_cache_entry_info *cache_info = nullptr, + rgw_cache_entry_info* cache_info = nullptr, boost::optional refresh_version = boost::none) override; virtual int delete_system_obj(const rgw_pool& pool, const string& oid, - RGWObjVersionTracker *objv_tracker, optional_yield y) override; + RGWObjVersionTracker* objv_tracker, optional_yield y) override; virtual int meta_list_keys_init(const string& section, const string& marker, void** phandle) override; virtual int meta_list_keys_next(void* handle, int max, list& keys, bool* truncated) override; virtual void meta_list_keys_complete(void* handle) override; - virtual std::string meta_get_marker(void *handle) override; - virtual int meta_remove(const DoutPrefixProvider *dpp, string& metadata_key, optional_yield y) override; + virtual std::string meta_get_marker(void* handle) override; + virtual int meta_remove(const DoutPrefixProvider* dpp, string& metadata_key, optional_yield y) override; virtual const RGWSyncModuleInstanceRef& get_sync_module() { return rados->get_sync_module(); } virtual std::string get_host_id() { return rados->host_id; } virtual void finalize(void) override; - virtual CephContext *ctx(void) override { return rados->ctx(); } + virtual CephContext* ctx(void) override { return rados->ctx(); } virtual const std::string& get_luarocks_path() const override { return luarocks_path; @@ -472,15 +472,15 @@ class RadosStore : public Store { /* Unique to RadosStore */ int get_obj_head_ioctx(const RGWBucketInfo& bucket_info, const rgw_obj& obj, - librados::IoCtx *ioctx); + librados::IoCtx* ioctx); void setRados(RGWRados * st) { rados = st; } - RGWRados *getRados(void) { return rados; } + RGWRados* getRados(void) { return rados; } - RGWServices *svc() { return &rados->svc; } - const RGWServices *svc() const { return &rados->svc; } - RGWCtl *ctl() { return &rados->ctl; } - const RGWCtl *ctl() const { return &rados->ctl; } + RGWServices* svc() { return &rados->svc; } + const RGWServices* svc() const { return &rados->svc; } + RGWCtl* ctl() { return &rados->ctl; } + const RGWCtl* ctl() const { return &rados->ctl; } void setUserCtl(RGWUserCtl *_ctl) { user_ctl = _ctl; } }; @@ -539,7 +539,7 @@ class RadosNotification : public Notification { ~RadosNotification() = default; virtual int publish_reserve(RGWObjTags* obj_tags = nullptr) override; - virtual int publish_commit(const DoutPrefixProvider *dpp, uint64_t size, + virtual int publish_commit(const DoutPrefixProvider* dpp, uint64_t size, const ceph::real_time& mtime, const std::string& etag) override; }; @@ -562,10 +562,10 @@ class RadosWriter : public Writer { RGWSI_RADOS::Obj stripe_obj; // current stripe object public: - RadosWriter(Aio *aio, rgw::sal::RadosStore* _store, + RadosWriter(Aio* aio, rgw::sal::RadosStore* _store, rgw::sal::Bucket* bucket, RGWObjectCtx& obj_ctx, std::unique_ptr _head_obj, - const DoutPrefixProvider *dpp, optional_yield y) + const DoutPrefixProvider* dpp, optional_yield y) : Writer(aio, bucket, obj_ctx, std::move(_head_obj), dpp, y), store(_store) {} diff --git a/src/rgw/rgw_sts.cc b/src/rgw/rgw_sts.cc index 4e411ea4d4c..b4a2c4a28c0 100644 --- a/src/rgw/rgw_sts.cc +++ b/src/rgw/rgw_sts.cc @@ -152,7 +152,7 @@ void AssumedRoleUser::dump(Formatter *f) const } int AssumedRoleUser::generateAssumedRoleUser(CephContext* cct, - rgw::sal::Store *store, + rgw::sal::Store* store, const string& roleId, const rgw::ARN& roleArn, const string& roleSessionName) diff --git a/src/rgw/rgw_sts.h b/src/rgw/rgw_sts.h index a683c9314ab..19c00c3e572 100644 --- a/src/rgw/rgw_sts.h +++ b/src/rgw/rgw_sts.h @@ -112,7 +112,7 @@ class AssumedRoleUser { string assumeRoleId; public: int generateAssumedRoleUser( CephContext* cct, - rgw::sal::Store *store, + rgw::sal::Store* store, const string& roleId, const rgw::ARN& roleArn, const string& roleSessionName); @@ -225,14 +225,14 @@ using AssumeRoleWithWebIdentityResponse = struct AssumeRoleWithWebIdentityRespon class STSService { CephContext* cct; - rgw::sal::Store *store; + rgw::sal::Store* store; rgw_user user_id; RGWRole role; rgw::auth::Identity* identity; int storeARN(const DoutPrefixProvider *dpp, string& arn, optional_yield y); public: STSService() = default; - STSService(CephContext* cct, rgw::sal::Store *store, rgw_user user_id, + STSService(CephContext* cct, rgw::sal::Store* store, rgw_user user_id, rgw::auth::Identity* identity) : cct(cct), store(store), user_id(user_id), identity(identity) {} std::tuple getRoleInfo(const DoutPrefixProvider *dpp, const string& arn, optional_yield y); diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 73a205ba5dd..e1e7b84b1fe 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -744,7 +744,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, struct req_state *state, rgw::io::BasicClient *cio) { state->dialect = "swift-auth"; diff --git a/src/rgw/rgw_swift_auth.h b/src/rgw/rgw_swift_auth.h index 090d02ff280..13dc1b63a56 100644 --- a/src/rgw/rgw_swift_auth.h +++ b/src/rgw/rgw_swift_auth.h @@ -315,7 +315,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, struct 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; } @@ -335,7 +335,7 @@ public: return this; } - RGWHandler_REST* get_handler(rgw::sal::Store *store, + RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state*, const rgw::auth::StrategyRegistry&, const std::string&) override { diff --git a/src/rgw/rgw_sync.cc b/src/rgw/rgw_sync.cc index 8b721d982bf..3a5c059a2da 100644 --- a/src/rgw/rgw_sync.cc +++ b/src/rgw/rgw_sync.cc @@ -40,7 +40,7 @@ static string mdlog_sync_status_oid = "mdlog.sync-status"; static string mdlog_sync_status_shard_prefix = "mdlog.sync-status.shard"; static string mdlog_sync_full_sync_index_prefix = "meta.full-sync.index"; -RGWSyncErrorLogger::RGWSyncErrorLogger(rgw::sal::RadosStore *_store, const string &oid_prefix, int _num_shards) : store(_store), num_shards(_num_shards) { +RGWSyncErrorLogger::RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const string &oid_prefix, int _num_shards) : store(_store), num_shards(_num_shards) { for (int i = 0; i < num_shards; i++) { oids.push_back(get_shard_oid(oid_prefix, i)); } @@ -364,7 +364,7 @@ std::ostream& RGWMetaSyncStatusManager::gen_prefix(std::ostream& out) const return out << "meta sync: "; } -void RGWMetaSyncEnv::init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore *_store, RGWRESTConn *_conn, +void RGWMetaSyncEnv::init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore* _store, RGWRESTConn *_conn, RGWAsyncRadosProcessor *_async_rados, RGWHTTPManager *_http_manager, RGWSyncErrorLogger *_error_logger, RGWSyncTraceManager *_sync_tracer) { dpp = _dpp; @@ -391,7 +391,7 @@ string RGWMetaSyncEnv::shard_obj_name(int shard_id) } class RGWAsyncReadMDLogEntries : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWMetadataLog *mdlog; int shard_id; int max_entries; @@ -416,7 +416,7 @@ public: list entries; bool truncated; - RGWAsyncReadMDLogEntries(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncReadMDLogEntries(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, RGWMetadataLog* mdlog, int _shard_id, std::string _marker, int _max_entries) : RGWAsyncRadosRequest(caller, cn), store(_store), mdlog(mdlog), @@ -651,7 +651,7 @@ public: set_status("acquiring sync lock"); uint32_t lock_duration = cct->_conf->rgw_sync_lease_period; string lock_name = "sync_lock"; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; lease_cr.reset(new RGWContinuousLeaseCR(sync_env->async_rados, store, rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()), lock_name, lock_duration, this)); @@ -668,7 +668,7 @@ public: } yield { set_status("writing sync status"); - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; call(new RGWSimpleRadosWriteCR(sync_env->async_rados, store->svc()->sysobj, rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()), status)); @@ -698,7 +698,7 @@ public: RGWMetadataLogInfo& info = shards_info[i]; marker.next_step_marker = info.marker; marker.timestamp = info.last_update; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; spawn(new RGWSimpleRadosWriteCR(sync_env->async_rados, store->svc()->sysobj, rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->shard_obj_name(i)), @@ -708,7 +708,7 @@ public: yield { set_status("changing sync state: build full sync maps"); status.state = rgw_meta_sync_info::StateBuildingFullSyncMaps; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; call(new RGWSimpleRadosWriteCR(sync_env->async_rados, store->svc()->sysobj, rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()), status)); @@ -952,7 +952,7 @@ public: tn->log(20, SSTR("list metadata: section=" << *sections_iter << " key=" << *iter)); string s = *sections_iter + ":" + *iter; int shard_id; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; int ret = store->ctl()->meta.mgr->get_shard_id(*sections_iter, *iter, &shard_id); if (ret < 0) { tn->log(0, SSTR("ERROR: could not determine shard id for " << *sections_iter << ":" << *iter)); @@ -1080,7 +1080,7 @@ public: }; class RGWAsyncMetaStoreEntry : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; string raw_key; bufferlist bl; const DoutPrefixProvider *dpp; @@ -1094,7 +1094,7 @@ protected: return 0; } public: - RGWAsyncMetaStoreEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncMetaStoreEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, const string& _raw_key, bufferlist& _bl, const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(_store), @@ -1135,7 +1135,7 @@ public: }; class RGWAsyncMetaRemoveEntry : public RGWAsyncRadosRequest { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; string raw_key; const DoutPrefixProvider *dpp; protected: @@ -1148,7 +1148,7 @@ protected: return 0; } public: - RGWAsyncMetaRemoveEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore *_store, + RGWAsyncMetaRemoveEntry(RGWCoroutine *caller, RGWAioCompletionNotifier *cn, rgw::sal::RadosStore* _store, const string& _raw_key, const DoutPrefixProvider *dpp) : RGWAsyncRadosRequest(caller, cn), store(_store), raw_key(_raw_key), dpp(dpp) {} }; @@ -1235,7 +1235,7 @@ public: ldpp_dout(sync_env->dpp, 20) << __func__ << "(): updating marker marker_oid=" << marker_oid << " marker=" << new_marker << " realm_epoch=" << sync_marker.realm_epoch << dendl; tn->log(20, SSTR("new marker=" << new_marker)); - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; return new RGWSimpleRadosWriteCR(sync_env->async_rados, store->svc()->sysobj, rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, marker_oid), @@ -1556,7 +1556,7 @@ public: yield { uint32_t lock_duration = cct->_conf->rgw_sync_lease_period; string lock_name = "sync_lock"; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; lease_cr.reset(new RGWContinuousLeaseCR(sync_env->async_rados, store, rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)), lock_name, lock_duration, this)); @@ -1702,7 +1702,7 @@ public: yield { uint32_t lock_duration = cct->_conf->rgw_sync_lease_period; string lock_name = "sync_lock"; - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; lease_cr.reset( new RGWContinuousLeaseCR(sync_env->async_rados, store, rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)), lock_name, lock_duration, this)); @@ -1891,7 +1891,7 @@ public: } RGWCoroutine *alloc_finisher_cr() override { - rgw::sal::RadosStore *store = sync_env->store; + rgw::sal::RadosStore* store = sync_env->store; return new RGWSimpleRadosReadCR(sync_env->async_rados, store->svc()->sysobj, rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)), &sync_marker); diff --git a/src/rgw/rgw_sync.h b/src/rgw/rgw_sync.h index d118ac6d54a..52badfdd06e 100644 --- a/src/rgw/rgw_sync.h +++ b/src/rgw/rgw_sync.h @@ -70,14 +70,14 @@ class RGWRESTConn; class RGWSyncTraceManager; class RGWSyncErrorLogger { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; vector oids; int num_shards; std::atomic counter = { 0 }; public: - RGWSyncErrorLogger(rgw::sal::RadosStore *_store, const string &oid_prefix, int _num_shards); + RGWSyncErrorLogger(rgw::sal::RadosStore* _store, const string &oid_prefix, int _num_shards); RGWCoroutine *log_error_cr(const string& source_zone, const string& section, const string& name, uint32_t error_code, const string& message); static string get_shard_oid(const string& oid_prefix, int shard_id); @@ -175,7 +175,7 @@ public: struct RGWMetaSyncEnv { const DoutPrefixProvider *dpp; CephContext *cct{nullptr}; - rgw::sal::RadosStore *store{nullptr}; + rgw::sal::RadosStore* store{nullptr}; RGWRESTConn *conn{nullptr}; RGWAsyncRadosProcessor *async_rados{nullptr}; RGWHTTPManager *http_manager{nullptr}; @@ -184,7 +184,7 @@ struct RGWMetaSyncEnv { RGWMetaSyncEnv() {} - void init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore *_store, RGWRESTConn *_conn, + void init(const DoutPrefixProvider *_dpp, CephContext *_cct, rgw::sal::RadosStore* _store, RGWRESTConn *_conn, RGWAsyncRadosProcessor *_async_rados, RGWHTTPManager *_http_manager, RGWSyncErrorLogger *_error_logger, RGWSyncTraceManager *_sync_tracer); @@ -194,7 +194,7 @@ struct RGWMetaSyncEnv { class RGWRemoteMetaLog : public RGWCoroutinesManager { const DoutPrefixProvider *dpp; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWRESTConn *conn; RGWAsyncRadosProcessor *async_rados; @@ -217,7 +217,7 @@ class RGWRemoteMetaLog : public RGWCoroutinesManager { RGWSyncTraceNodeRef tn; public: - RGWRemoteMetaLog(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *_store, + RGWRemoteMetaLog(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados, RGWMetaSyncStatusManager *_sm) : RGWCoroutinesManager(_store->ctx(), _store->getRados()->get_cr_registry()), @@ -245,7 +245,7 @@ public: }; class RGWMetaSyncStatusManager : public DoutPrefixProvider { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; librados::IoCtx ioctx; RGWRemoteMetaLog master_log; @@ -271,7 +271,7 @@ class RGWMetaSyncStatusManager : public DoutPrefixProvider { vector clone_markers; public: - RGWMetaSyncStatusManager(rgw::sal::RadosStore *_store, RGWAsyncRadosProcessor *async_rados) + RGWMetaSyncStatusManager(rgw::sal::RadosStore* _store, RGWAsyncRadosProcessor *async_rados) : store(_store), master_log(this, store, async_rados, this) {} int init(); diff --git a/src/rgw/rgw_sync_checkpoint.cc b/src/rgw/rgw_sync_checkpoint.cc index a66858a5864..58ff89c35d2 100644 --- a/src/rgw/rgw_sync_checkpoint.cc +++ b/src/rgw/rgw_sync_checkpoint.cc @@ -82,7 +82,7 @@ std::ostream& operator<<(std::ostream& out, const BucketIndexShardsManager& rhs) } int bucket_source_sync_checkpoint(const DoutPrefixProvider* dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const RGWBucketInfo& bucket_info, const RGWBucketInfo& source_bucket_info, const rgw_sync_bucket_pipe& pipe, @@ -146,7 +146,7 @@ int source_bilog_markers(RGWSI_Zone* zone_svc, } // anonymous namespace int rgw_bucket_sync_checkpoint(const DoutPrefixProvider* dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const RGWBucketSyncPolicyHandler& policy, const RGWBucketInfo& info, std::optional opt_source_zone, diff --git a/src/rgw/rgw_sync_checkpoint.h b/src/rgw/rgw_sync_checkpoint.h index c4c55954dab..28df68d8860 100644 --- a/src/rgw/rgw_sync_checkpoint.h +++ b/src/rgw/rgw_sync_checkpoint.h @@ -26,7 +26,7 @@ class RGWBucketSyncPolicyHandler; // poll the bucket's sync status until it's caught up against all sync sources int rgw_bucket_sync_checkpoint(const DoutPrefixProvider* dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, const RGWBucketSyncPolicyHandler& policy, const RGWBucketInfo& info, std::optional opt_source_zone, diff --git a/src/rgw/rgw_sync_module_es_rest.cc b/src/rgw/rgw_sync_module_es_rest.cc index 794e262821d..b14c26986dc 100644 --- a/src/rgw/rgw_sync_module_es_rest.cc +++ b/src/rgw/rgw_sync_module_es_rest.cc @@ -401,7 +401,7 @@ public: }; -RGWHandler_REST* RGWRESTMgr_MDSearch_S3::get_handler(rgw::sal::Store *store, +RGWHandler_REST* RGWRESTMgr_MDSearch_S3::get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) diff --git a/src/rgw/rgw_sync_module_es_rest.h b/src/rgw/rgw_sync_module_es_rest.h index d7448b14a1e..9224ffe4022 100644 --- a/src/rgw/rgw_sync_module_es_rest.h +++ b/src/rgw/rgw_sync_module_es_rest.h @@ -11,7 +11,7 @@ class RGWRESTMgr_MDSearch_S3 : public RGWRESTMgr { public: explicit RGWRESTMgr_MDSearch_S3() {} - RGWHandler_REST *get_handler(rgw::sal::Store *store, + RGWHandler_REST *get_handler(rgw::sal::Store* store, struct req_state* s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; diff --git a/src/rgw/rgw_sync_module_pubsub_rest.cc b/src/rgw/rgw_sync_module_pubsub_rest.cc index 2fb67ccc5a4..ec819fbacb1 100644 --- a/src/rgw/rgw_sync_module_pubsub_rest.cc +++ b/src/rgw/rgw_sync_module_pubsub_rest.cc @@ -496,7 +496,7 @@ public: }; // factory for ceph specific PubSub REST handlers -RGWHandler_REST* RGWRESTMgr_PubSub::get_handler(rgw::sal::Store *store, +RGWHandler_REST* RGWRESTMgr_PubSub::get_handler(rgw::sal::Store* store, struct req_state* const s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) diff --git a/src/rgw/rgw_sync_module_pubsub_rest.h b/src/rgw/rgw_sync_module_pubsub_rest.h index c091ea5a59d..32335f69486 100644 --- a/src/rgw/rgw_sync_module_pubsub_rest.h +++ b/src/rgw/rgw_sync_module_pubsub_rest.h @@ -7,7 +7,7 @@ class RGWRESTMgr_PubSub : public RGWRESTMgr { public: - virtual RGWHandler_REST* get_handler(rgw::sal::Store *store, + virtual RGWHandler_REST* get_handler(rgw::sal::Store* store, struct req_state* s, const rgw::auth::StrategyRegistry& auth_registry, const std::string& frontend_prefix) override; diff --git a/src/rgw/rgw_tools.cc b/src/rgw/rgw_tools.cc index 94fd8e7eb14..1fadedf4e4c 100644 --- a/src/rgw/rgw_tools.cc +++ b/src/rgw/rgw_tools.cc @@ -409,7 +409,7 @@ void rgw_filter_attrset(map& unfiltered_attrset, const strin } } -RGWDataAccess::RGWDataAccess(rgw::sal::Store *_store) : store(_store) +RGWDataAccess::RGWDataAccess(rgw::sal::Store* _store) : store(_store) { } @@ -466,7 +466,7 @@ int RGWDataAccess::Object::put(bufferlist& data, const DoutPrefixProvider *dpp, optional_yield y) { - rgw::sal::Store *store = sd->store; + rgw::sal::Store* store = sd->store; CephContext *cct = store->ctx(); string tag; diff --git a/src/rgw/rgw_tools.h b/src/rgw/rgw_tools.h index d231e74aec3..8222c52008a 100644 --- a/src/rgw/rgw_tools.h +++ b/src/rgw/rgw_tools.h @@ -142,10 +142,10 @@ using RGWMD5Etag = RGWEtag; class RGWDataAccess { - rgw::sal::Store *store; + rgw::sal::Store* store; public: - RGWDataAccess(rgw::sal::Store *_store); + RGWDataAccess(rgw::sal::Store* _store); class Object; class Bucket; diff --git a/src/rgw/rgw_torrent.cc b/src/rgw/rgw_torrent.cc index 0129516635a..7d6ea13272f 100644 --- a/src/rgw/rgw_torrent.cc +++ b/src/rgw/rgw_torrent.cc @@ -37,7 +37,7 @@ seed::~seed() store = NULL; } -void seed::init(struct req_state *p_req, rgw::sal::Store *p_store) +void seed::init(struct req_state *p_req, rgw::sal::Store* p_store) { s = p_req; store = p_store; diff --git a/src/rgw/rgw_torrent.h b/src/rgw/rgw_torrent.h index 747134ca798..a3837e5ad4f 100644 --- a/src/rgw/rgw_torrent.h +++ b/src/rgw/rgw_torrent.h @@ -108,7 +108,7 @@ private: bufferlist bl; // bufflist ready to send struct req_state *s{nullptr}; - rgw::sal::Store *store{nullptr}; + rgw::sal::Store* store{nullptr}; SHA1 h; TorrentBencode dencode; @@ -117,7 +117,7 @@ public: ~seed(); int get_params(); - void init(struct req_state *p_req, rgw::sal::Store *p_store); + void init(struct 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, diff --git a/src/rgw/rgw_trim_bilog.cc b/src/rgw/rgw_trim_bilog.cc index 723df14c4b2..b939f561daa 100644 --- a/src/rgw/rgw_trim_bilog.cc +++ b/src/rgw/rgw_trim_bilog.cc @@ -238,7 +238,7 @@ void TrimComplete::Handler::handle(bufferlist::const_iterator& input, /// rados watcher for bucket trim notifications class BucketTrimWatcher : public librados::WatchCtx2 { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const rgw_raw_obj& obj; rgw_rados_ref ref; uint64_t handle{0}; @@ -247,7 +247,7 @@ class BucketTrimWatcher : public librados::WatchCtx2 { boost::container::flat_map handlers; public: - BucketTrimWatcher(rgw::sal::RadosStore *store, const rgw_raw_obj& obj, + BucketTrimWatcher(rgw::sal::RadosStore* store, const rgw_raw_obj& obj, TrimCounters::Server *counters) : store(store), obj(obj) { handlers.emplace(NotifyTrimCounters, new TrimCounters::Handler(counters)); @@ -381,12 +381,12 @@ int take_min_status(CephContext *cct, Iter first, Iter last, /// concurrent requests class BucketTrimShardCollectCR : public RGWShardCollectCR { static constexpr int MAX_CONCURRENT_SHARDS = 16; - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const RGWBucketInfo& bucket_info; const std::vector& markers; //< shard markers to trim size_t i{0}; //< index of current shard marker public: - BucketTrimShardCollectCR(rgw::sal::RadosStore *store, const RGWBucketInfo& bucket_info, + BucketTrimShardCollectCR(rgw::sal::RadosStore* store, const RGWBucketInfo& bucket_info, const std::vector& markers) : RGWShardCollectCR(store->ctx(), MAX_CONCURRENT_SHARDS), store(store), bucket_info(bucket_info), markers(markers) @@ -415,7 +415,7 @@ bool BucketTrimShardCollectCR::spawn_next() /// trim the bilog of all of the given bucket instance's shards class BucketTrimInstanceCR : public RGWCoroutine { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWHTTPManager *const http; BucketTrimObserver *const observer; std::string bucket_instance; @@ -433,7 +433,7 @@ class BucketTrimInstanceCR : public RGWCoroutine { std::vector min_markers; //< min marker per shard public: - BucketTrimInstanceCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + BucketTrimInstanceCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, BucketTrimObserver *observer, const std::string& bucket_instance, const DoutPrefixProvider *dpp) @@ -567,14 +567,14 @@ int BucketTrimInstanceCR::operate() /// trim each bucket instance while limiting the number of concurrent operations class BucketTrimInstanceCollectCR : public RGWShardCollectCR { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWHTTPManager *const http; BucketTrimObserver *const observer; std::vector::const_iterator bucket; std::vector::const_iterator end; const DoutPrefixProvider *dpp; public: - BucketTrimInstanceCollectCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + BucketTrimInstanceCollectCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, BucketTrimObserver *observer, const std::vector& buckets, int max_concurrent, @@ -771,7 +771,7 @@ class MetadataListCR : public RGWSimpleCoroutine { }; class BucketTrimCR : public RGWCoroutine { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWHTTPManager *const http; const BucketTrimConfig& config; BucketTrimObserver *const observer; @@ -787,7 +787,7 @@ class BucketTrimCR : public RGWCoroutine { static const std::string section; //< metadata section for bucket instances public: - BucketTrimCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + BucketTrimCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, const BucketTrimConfig& config, BucketTrimObserver *observer, const rgw_raw_obj& obj, const DoutPrefixProvider *dpp) : RGWCoroutine(store->ctx()), store(store), http(http), config(config), @@ -935,7 +935,7 @@ int BucketTrimCR::operate() } class BucketTrimPollCR : public RGWCoroutine { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWHTTPManager *const http; const BucketTrimConfig& config; BucketTrimObserver *const observer; @@ -945,7 +945,7 @@ class BucketTrimPollCR : public RGWCoroutine { const DoutPrefixProvider *dpp; public: - BucketTrimPollCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + BucketTrimPollCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, const BucketTrimConfig& config, BucketTrimObserver *observer, const rgw_raw_obj& obj, const DoutPrefixProvider *dpp) @@ -1060,7 +1060,7 @@ void configure_bucket_trim(CephContext *cct, BucketTrimConfig& config) class BucketTrimManager::Impl : public TrimCounters::Server, public BucketTrimObserver { public: - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const BucketTrimConfig config; const rgw_raw_obj status_obj; @@ -1079,7 +1079,7 @@ class BucketTrimManager::Impl : public TrimCounters::Server, /// protect data shared between data sync, trim, and watch/notify threads std::mutex mutex; - Impl(rgw::sal::RadosStore *store, const BucketTrimConfig& config) + Impl(rgw::sal::RadosStore* store, const BucketTrimConfig& config) : store(store), config(config), status_obj(store->get_zone()->get_params().log_pool, BucketTrimStatus::oid), counter(config.counter_size), @@ -1117,7 +1117,7 @@ class BucketTrimManager::Impl : public TrimCounters::Server, } }; -BucketTrimManager::BucketTrimManager(rgw::sal::RadosStore *store, +BucketTrimManager::BucketTrimManager(rgw::sal::RadosStore* store, const BucketTrimConfig& config) : impl(new Impl(store, config)) { diff --git a/src/rgw/rgw_trim_datalog.cc b/src/rgw/rgw_trim_datalog.cc index 61f54d08984..5677b563337 100644 --- a/src/rgw/rgw_trim_datalog.cc +++ b/src/rgw/rgw_trim_datalog.cc @@ -26,7 +26,7 @@ namespace { class DatalogTrimImplCR : public RGWSimpleCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; boost::intrusive_ptr cn; int shard; std::string marker; @@ -95,7 +95,7 @@ void take_min_markers(IterIn first, IterIn last, IterOut dest) class DataLogTrimCR : public RGWCoroutine { using TrimCR = DatalogTrimImplCR; - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWHTTPManager *http; const int num_shards; const std::string& zone_id; //< my zone id @@ -105,7 +105,7 @@ class DataLogTrimCR : public RGWCoroutine { int ret{0}; public: - DataLogTrimCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + DataLogTrimCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, std::vector& last_trim) : RGWCoroutine(store->ctx()), store(store), http(http), num_shards(num_shards), @@ -180,7 +180,7 @@ int DataLogTrimCR::operate() return 0; } -RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RadosStore *store, +RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, std::vector& markers) @@ -189,7 +189,7 @@ RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RadosStore *store, } class DataLogTrimPollCR : public RGWCoroutine { - rgw::sal::RadosStore *store; + rgw::sal::RadosStore* store; RGWHTTPManager *http; const int num_shards; const utime_t interval; //< polling interval @@ -198,7 +198,7 @@ class DataLogTrimPollCR : public RGWCoroutine { std::vector last_trim; //< last trimmed marker per shard public: - DataLogTrimPollCR(rgw::sal::RadosStore *store, RGWHTTPManager *http, + DataLogTrimPollCR(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval) : RGWCoroutine(store->ctx()), store(store), http(http), num_shards(num_shards), interval(interval), @@ -241,7 +241,7 @@ int DataLogTrimPollCR::operate() return 0; } -RGWCoroutine* create_data_log_trim_cr(rgw::sal::RadosStore *store, +RGWCoroutine* create_data_log_trim_cr(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval) { diff --git a/src/rgw/rgw_trim_datalog.h b/src/rgw/rgw_trim_datalog.h index 818f975e022..d0b6779a8f7 100644 --- a/src/rgw/rgw_trim_datalog.h +++ b/src/rgw/rgw_trim_datalog.h @@ -15,12 +15,12 @@ namespace rgw { namespace sal { } } // DataLogTrimCR factory function -extern RGWCoroutine* create_data_log_trim_cr(rgw::sal::RadosStore *store, +extern RGWCoroutine* create_data_log_trim_cr(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval); // factory function for datalog trim via radosgw-admin -RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RadosStore *store, +RGWCoroutine* create_admin_data_log_trim_cr(rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, std::vector& markers); diff --git a/src/rgw/rgw_trim_mdlog.cc b/src/rgw/rgw_trim_mdlog.cc index 30e28c9b8be..61ce1d99d7a 100644 --- a/src/rgw/rgw_trim_mdlog.cc +++ b/src/rgw/rgw_trim_mdlog.cc @@ -22,7 +22,7 @@ /// purge all log shards for the given mdlog class PurgeLogShardsCR : public RGWShardCollectCR { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const RGWMetadataLog* mdlog; const int num_shards; rgw_raw_obj obj; @@ -31,7 +31,7 @@ class PurgeLogShardsCR : public RGWShardCollectCR { static constexpr int max_concurrent = 16; public: - PurgeLogShardsCR(rgw::sal::RadosStore *store, const RGWMetadataLog* mdlog, + PurgeLogShardsCR(rgw::sal::RadosStore* store, const RGWMetadataLog* mdlog, const rgw_pool& pool, int num_shards) : RGWShardCollectCR(store->ctx(), max_concurrent), store(store), mdlog(mdlog), num_shards(num_shards), obj(pool, "") @@ -55,7 +55,7 @@ class PurgePeriodLogsCR : public RGWCoroutine { RGWSI_Zone *zone; RGWSI_MDLog *mdlog; } svc; - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWMetadataManager *const metadata; RGWObjVersionTracker objv; Cursor cursor; @@ -63,7 +63,7 @@ class PurgePeriodLogsCR : public RGWCoroutine { epoch_t *last_trim_epoch; //< update last trim on success public: - PurgePeriodLogsCR(rgw::sal::RadosStore *store, epoch_t realm_epoch, epoch_t *last_trim) + PurgePeriodLogsCR(rgw::sal::RadosStore* store, epoch_t realm_epoch, epoch_t *last_trim) : RGWCoroutine(store->ctx()), store(store), metadata(store->ctl()->meta.mgr), realm_epoch(realm_epoch), last_trim_epoch(last_trim) { svc.zone = store->svc()->zone; @@ -136,7 +136,7 @@ using connection_map = std::map>; /// construct a RGWRESTConn for each zone in the realm template -connection_map make_peer_connections(rgw::sal::RadosStore *store, +connection_map make_peer_connections(rgw::sal::RadosStore* store, const Zonegroups& zonegroups) { connection_map connections; @@ -202,14 +202,14 @@ int take_min_status(CephContext *cct, Iter first, Iter last, struct TrimEnv { const DoutPrefixProvider *dpp; - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; RGWHTTPManager *const http; int num_shards; const rgw_zone_id& zone; Cursor current; //< cursor to current period epoch_t last_trim_epoch{0}; //< epoch of last mdlog that was purged - TrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, int num_shards) + TrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) : dpp(dpp), store(store), http(http), num_shards(num_shards), zone(store->svc()->zone->zone_id()), current(store->svc()->mdlog->get_period_history()->get_current()) @@ -222,7 +222,7 @@ struct MasterTrimEnv : public TrimEnv { /// last trim marker for each shard, only applies to current period's mdlog std::vector last_trim_markers; - MasterTrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, int num_shards) + MasterTrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) : TrimEnv(dpp, store, http, num_shards), last_trim_markers(num_shards) { @@ -237,7 +237,7 @@ struct PeerTrimEnv : public TrimEnv { /// last trim timestamp for each shard, only applies to current period's mdlog std::vector last_trim_timestamps; - PeerTrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, int num_shards) + PeerTrimEnv(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) : TrimEnv(dpp, store, http, num_shards), last_trim_timestamps(num_shards) {} @@ -600,7 +600,7 @@ int MetaPeerTrimCR::operate() } class MetaTrimPollCR : public RGWCoroutine { - rgw::sal::RadosStore *const store; + rgw::sal::RadosStore* const store; const utime_t interval; //< polling interval const rgw_raw_obj obj; const std::string name{"meta_trim"}; //< lock name @@ -611,7 +611,7 @@ class MetaTrimPollCR : public RGWCoroutine { virtual RGWCoroutine* alloc_cr() = 0; public: - MetaTrimPollCR(rgw::sal::RadosStore *store, utime_t interval) + MetaTrimPollCR(rgw::sal::RadosStore* store, utime_t interval) : RGWCoroutine(store->ctx()), store(store), interval(interval), obj(store->svc()->zone->get_zone_params().log_pool, RGWMetadataLogHistory::oid), cookie(RGWSimpleRadosLockCR::gen_random_cookie(cct)) @@ -656,7 +656,7 @@ class MetaMasterTrimPollCR : public MetaTrimPollCR { return new MetaMasterTrimCR(env); } public: - MetaMasterTrimPollCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, + MetaMasterTrimPollCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval) : MetaTrimPollCR(store, interval), env(dpp, store, http, num_shards) @@ -669,14 +669,14 @@ class MetaPeerTrimPollCR : public MetaTrimPollCR { return new MetaPeerTrimCR(env); } public: - MetaPeerTrimPollCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, + MetaPeerTrimPollCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval) : MetaTrimPollCR(store, interval), env(dpp, store, http, num_shards) {} }; -RGWCoroutine* create_meta_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, +RGWCoroutine* create_meta_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval) { if (store->svc()->zone->is_meta_master()) { @@ -687,20 +687,20 @@ RGWCoroutine* create_meta_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::R struct MetaMasterAdminTrimCR : private MasterTrimEnv, public MetaMasterTrimCR { - MetaMasterAdminTrimCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, int num_shards) + MetaMasterAdminTrimCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) : MasterTrimEnv(dpp, store, http, num_shards), MetaMasterTrimCR(*static_cast(this)) {} }; struct MetaPeerAdminTrimCR : private PeerTrimEnv, public MetaPeerTrimCR { - MetaPeerAdminTrimCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, RGWHTTPManager *http, int num_shards) + MetaPeerAdminTrimCR(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) : PeerTrimEnv(dpp, store, http, num_shards), MetaPeerTrimCR(*static_cast(this)) {} }; -RGWCoroutine* create_admin_meta_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RadosStore *store, +RGWCoroutine* create_admin_meta_log_trim_cr(const DoutPrefixProvider *dpp, rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards) { diff --git a/src/rgw/rgw_trim_mdlog.h b/src/rgw/rgw_trim_mdlog.h index 2efe4c6ebad..1dba8612bd3 100644 --- a/src/rgw/rgw_trim_mdlog.h +++ b/src/rgw/rgw_trim_mdlog.h @@ -14,12 +14,12 @@ namespace rgw { namespace sal { // MetaLogTrimCR factory function RGWCoroutine* create_meta_log_trim_cr(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards, utime_t interval); // factory function for mdlog trim via radosgw-admin RGWCoroutine* create_admin_meta_log_trim_cr(const DoutPrefixProvider *dpp, - rgw::sal::RadosStore *store, + rgw::sal::RadosStore* store, RGWHTTPManager *http, int num_shards); diff --git a/src/rgw/rgw_usage.h b/src/rgw/rgw_usage.h index 46842f175aa..5ffec449db3 100644 --- a/src/rgw/rgw_usage.h +++ b/src/rgw/rgw_usage.h @@ -23,11 +23,11 @@ public: bool show_log_sum, std::map *categories, RGWFormatterFlusher& flusher); - static int trim(const DoutPrefixProvider *dpp, rgw::sal::Store *store, + static int trim(const DoutPrefixProvider *dpp, rgw::sal::Store* store, rgw::sal::User* user , rgw::sal::Bucket* bucket, uint64_t start_epoch, uint64_t end_epoch); - static int clear(rgw::sal::Store *store); + static int clear(rgw::sal::Store* store); }; diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 1ea82b41736..0c46d9fb836 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -95,7 +95,7 @@ int rgw_user_sync_all_stats(const DoutPrefixProvider *dpp, rgw::sal::Store* stor } int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, rgw::sal::User* user, map& buckets_usage_map, optional_yield y) @@ -1420,7 +1420,7 @@ RGWUser::RGWUser() : caps(this), keys(this), subusers(this) init_default(); } -int RGWUser::init(const DoutPrefixProvider *dpp, rgw::sal::Store *storage, +int RGWUser::init(const DoutPrefixProvider *dpp, rgw::sal::Store* storage, RGWUserAdminOpState& op_state, optional_yield y) { init_default(); @@ -1444,7 +1444,7 @@ void RGWUser::init_default() clear_populated(); } -int RGWUser::init_storage(rgw::sal::Store *storage) +int RGWUser::init_storage(rgw::sal::Store* storage) { if (!storage) { return -EINVAL; @@ -2243,7 +2243,7 @@ int RGWUser::list(RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher) return 0; } -int RGWUserAdminOp_User::list(rgw::sal::Store *store, RGWUserAdminOpState& op_state, +int RGWUserAdminOp_User::list(rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher) { RGWUser user; @@ -2260,7 +2260,7 @@ int RGWUserAdminOp_User::list(rgw::sal::Store *store, RGWUserAdminOpState& op_st } int RGWUserAdminOp_User::info(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, RGWUserAdminOpState& op_state, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { @@ -2312,7 +2312,7 @@ int RGWUserAdminOp_User::info(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_User::create(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { @@ -2346,7 +2346,7 @@ int RGWUserAdminOp_User::create(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_User::modify(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { @@ -2379,7 +2379,7 @@ int RGWUserAdminOp_User::modify(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_User::remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, RGWUserAdminOpState& op_state, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { RGWUserInfo info; @@ -2397,7 +2397,7 @@ int RGWUserAdminOp_User::remove(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Subuser::create(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) @@ -2432,7 +2432,7 @@ int RGWUserAdminOp_Subuser::create(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Subuser::modify(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, RGWUserAdminOpState& op_state, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { RGWUserInfo info; @@ -2465,7 +2465,7 @@ int RGWUserAdminOp_Subuser::modify(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Subuser::remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) @@ -2488,7 +2488,7 @@ int RGWUserAdminOp_Subuser::remove(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Key::create(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, RGWUserAdminOpState& op_state, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { @@ -2529,7 +2529,7 @@ int RGWUserAdminOp_Key::create(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Key::remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) @@ -2552,7 +2552,7 @@ int RGWUserAdminOp_Key::remove(const DoutPrefixProvider *dpp, } int RGWUserAdminOp_Caps::add(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { @@ -2587,7 +2587,7 @@ int RGWUserAdminOp_Caps::add(const DoutPrefixProvider *dpp, int RGWUserAdminOp_Caps::remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y) { diff --git a/src/rgw/rgw_user.h b/src/rgw/rgw_user.h index efa61bf7cfe..505c95b1413 100644 --- a/src/rgw/rgw_user.h +++ b/src/rgw/rgw_user.h @@ -414,7 +414,7 @@ class RGWAccessKeyPool std::map key_type_map; rgw_user user_id; - rgw::sal::Store *store{nullptr}; + rgw::sal::Store* store{nullptr}; map *swift_keys{nullptr}; map *access_keys{nullptr}; @@ -467,7 +467,7 @@ class RGWSubUserPool RGWUser *user{nullptr}; rgw_user user_id; - rgw::sal::Store *store{nullptr}; + rgw::sal::Store* store{nullptr}; bool subusers_allowed{false}; map *subuser_map{nullptr}; @@ -529,7 +529,7 @@ class RGWUser private: RGWUserInfo old_info; - rgw::sal::Store *store{nullptr}; + rgw::sal::Store* store{nullptr}; rgw_user user_id; bool info_stored{false}; @@ -555,14 +555,14 @@ private: public: RGWUser(); - int init(const DoutPrefixProvider *dpp, rgw::sal::Store *storage, RGWUserAdminOpState& op_state, + int init(const DoutPrefixProvider *dpp, rgw::sal::Store* storage, RGWUserAdminOpState& op_state, optional_yield y); - int init_storage(rgw::sal::Store *storage); + int init_storage(rgw::sal::Store* storage); int init(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state, optional_yield y); int init_members(RGWUserAdminOpState& op_state); - rgw::sal::Store *get_store() { return store; } + rgw::sal::Store* get_store() { return store; } /* API Contracted Members */ RGWUserCapPool caps; @@ -601,24 +601,24 @@ public: class RGWUserAdminOp_User { public: - static int list(rgw::sal::Store *store, + static int list(rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher); static int info(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int create(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int modify(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); - static int remove(const DoutPrefixProvider *dpp, rgw::sal::Store *store, + static int remove(const DoutPrefixProvider *dpp, rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); }; @@ -626,17 +626,17 @@ class RGWUserAdminOp_Subuser { public: static int create(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int modify(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); }; @@ -644,12 +644,12 @@ public: class RGWUserAdminOp_Key { public: - static int create(const DoutPrefixProvider *dpp, rgw::sal::Store *store, + static int create(const DoutPrefixProvider *dpp, rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); }; @@ -658,12 +658,12 @@ class RGWUserAdminOp_Caps { public: static int add(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); static int remove(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWUserAdminOpState& op_state, RGWFormatterFlusher& flusher, optional_yield y); }; diff --git a/src/rgw/rgw_zone.cc b/src/rgw/rgw_zone.cc index 5cd71e28c32..54088c45d77 100644 --- a/src/rgw/rgw_zone.cc +++ b/src/rgw/rgw_zone.cc @@ -1359,7 +1359,7 @@ void RGWPeriod::fork() realm_epoch++; } -static int read_sync_status(rgw::sal::RadosStore *store, rgw_meta_sync_status *sync_status) +static int read_sync_status(rgw::sal::RadosStore* store, rgw_meta_sync_status *sync_status) { // initialize a sync status manager to read the status RGWMetaSyncStatusManager mgr(store, store->svc()->rados->get_async_processor()); @@ -1372,7 +1372,7 @@ static int read_sync_status(rgw::sal::RadosStore *store, rgw_meta_sync_status *s return r; } -int RGWPeriod::update_sync_status(rgw::sal::Store *store, /* for now */ +int RGWPeriod::update_sync_status(rgw::sal::Store* store, /* for now */ const RGWPeriod ¤t_period, std::ostream& error_stream, bool force_if_stale) @@ -1423,7 +1423,7 @@ int RGWPeriod::update_sync_status(rgw::sal::Store *store, /* for now */ } int RGWPeriod::commit(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWRealm& realm, const RGWPeriod& current_period, std::ostream& error_stream, optional_yield y, bool force_if_stale) diff --git a/src/rgw/rgw_zone.h b/src/rgw/rgw_zone.h index b412f3fe35c..8f80c054a01 100644 --- a/src/rgw/rgw_zone.h +++ b/src/rgw/rgw_zone.h @@ -1070,7 +1070,7 @@ class RGWPeriod const std::string get_period_oid_prefix() const; // gather the metadata sync status for each shard; only for use on master zone - int update_sync_status(rgw::sal::Store *store, + int update_sync_status(rgw::sal::Store* store, const RGWPeriod ¤t_period, std::ostream& error_stream, bool force_if_stale); @@ -1166,7 +1166,7 @@ public: // commit a staging period; only for use on master zone int commit(const DoutPrefixProvider *dpp, - rgw::sal::Store *store, + rgw::sal::Store* store, RGWRealm& realm, const RGWPeriod ¤t_period, std::ostream& error_stream, optional_yield y, bool force_if_stale = false);