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<rgw::sal::User> user = store->get_user(uid);
#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 {
}
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();
}
}
-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)
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());
}
/// search for a matching zone/zonegroup id and return a connection if found
-static boost::optional<RGWRESTConn> get_remote_conn(rgw::sal::RadosStore *store,
+static boost::optional<RGWRESTConn> get_remote_conn(rgw::sal::RadosStore* store,
const RGWZoneGroup& zonegroup,
const std::string& remote)
{
}
/// search each zonegroup for a connection
-static boost::optional<RGWRESTConn> get_remote_conn(rgw::sal::RadosStore *store,
+static boost::optional<RGWRESTConn> get_remote_conn(rgw::sal::RadosStore* store,
const RGWPeriodMap& period_map,
const std::string& remote)
{
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,
return 0;
}
-static int bucket_sync_info(rgw::sal::RadosStore *store, const RGWBucketInfo& info,
+static int bucket_sync_info(rgw::sal::RadosStore* store, const RGWBucketInfo& info,
std::ostream& out)
{
const RGWRealm& realm = store->get_zone()->get_realm();
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<rgw_bucket>& opt_source_bucket,
std::ostream& out)
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,
// 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;
}
class RGWLibAdmin
{
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
boost::intrusive_ptr<CephContext> cct;
public:
map<string, string> 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();
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;
};
}
}
-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)
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);
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)
*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) {
}
-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;
/* 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());
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());
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;
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);
}
-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;
}
-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;
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)
{
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;
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);
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,
return 0;
}
-int RGWBucketAdminOp::limit_check(rgw::sal::Store *store,
+int RGWBucketAdminOp::limit_check(rgw::sal::Store* store,
RGWBucketAdminOpState& op_state,
const std::list<std::string>& user_ids,
RGWFormatterFlusher& flusher, optional_yield y,
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,
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;
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<rgw::sal::Bucket> bucket;
int ret = store->get_bucket(nullptr, bucket_info, &bucket);
}
using bucket_instance_ls = std::vector<RGWBucketInfo>;
-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<std::string>& lst,
bucket_instance_ls& stale_instances,
const DoutPrefixProvider *dpp)
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::function<void(const bucket_instance_ls&,
return 0;
}
-int RGWBucketAdminOp::list_stale_instances(rgw::sal::Store *store,
+int RGWBucketAdminOp::list_stale_instances(rgw::sal::Store* store,
RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
const DoutPrefixProvider *dpp)
}
-int RGWBucketAdminOp::clear_stale_instances(rgw::sal::Store *store,
+int RGWBucketAdminOp::clear_stale_instances(rgw::sal::Store* store,
RGWBucketAdminOpState& op_state,
RGWFormatterFlusher& flusher,
const DoutPrefixProvider *dpp)
{
auto process_f = [dpp](const bucket_instance_ls& lst,
Formatter *formatter,
- rgw::sal::Store *store){
+ rgw::sal::Store* store){
for (const auto &binfo: lst) {
int ret = purge_bucket_instance(store, binfo, dpp);
if (ret == 0){
return process_stale_instances(store, op_state, flusher, dpp, process_f);
}
-static int fix_single_bucket_lc(rgw::sal::Store *store,
+static int fix_single_bucket_lc(rgw::sal::Store* store,
const std::string& tenant_name,
const std::string& bucket_name,
const DoutPrefixProvider *dpp)
formatter->close_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,
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)
}
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)
{
}
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)
{
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)
}
// 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)
{
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;
class RGWBucket
{
RGWUserBuckets buckets;
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWAccessHandle handle;
std::unique_ptr<rgw::sal::Bucket> bucket;
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,
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<std::string>& 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 {
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);
}
-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<string>(_store->ctx()), async_rados(_async_rados),
store(_store), obj(_obj), going_down(false), num_pending_entries(0), window_size(_window_size), total_entries(0)
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),
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),
{
}
-RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(rgw::sal::RadosStore *_store,
+RGWRadosSetOmapKeysCR::RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store,
const rgw_raw_obj& _obj,
map<string, bufferlist>& _entries) : RGWSimpleCoroutine(_store->ctx()),
store(_store),
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,
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,
return r;
}
-RGWRadosRemoveOmapKeysCR::RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore *_store,
+RGWRadosRemoveOmapKeysCR::RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore* _store,
const rgw_raw_obj& _obj,
const set<string>& _keys) : RGWSimpleCoroutine(_store->ctx()),
store(_store),
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)
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,
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()),
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,
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)
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,
}
-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{},
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)
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),
template <class P>
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:
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),
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),
template <class P, class R>
class RGWSimpleAsyncCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
P params;
std::shared_ptr<R> result;
const DoutPrefixProvider *dpp;
class Request : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
P params;
std::shared_ptr<R> result;
const DoutPrefixProvider *dpp;
public:
Request(RGWCoroutine *caller,
RGWAioCompletionNotifier *cn,
- rgw::sal::RadosStore *_store,
+ rgw::sal::RadosStore* _store,
const P& _params,
std::shared_ptr<R>& _result,
const DoutPrefixProvider *_dpp) : RGWAsyncRadosRequest(caller, cn),
public:
RGWSimpleAsyncCR(RGWAsyncRadosProcessor *_async_rados,
- rgw::sal::RadosStore *_store,
+ rgw::sal::RadosStore* _store,
const P& _params,
std::shared_ptr<R>& _result,
const DoutPrefixProvider *_dpp) : RGWSimpleCoroutine(_store->ctx()),
class RGWGenericAsyncCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
public:
};
class RGWAsyncLockSystemObj : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_raw_obj obj;
string lock_name;
string cookie;
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;
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);
};
};
class RGWRadosSetOmapKeysCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
map<string, bufferlist> entries;
rgw_rados_ref ref;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
public:
- RGWRadosSetOmapKeysCR(rgw::sal::RadosStore *_store,
+ RGWRadosSetOmapKeysCR(rgw::sal::RadosStore* _store,
const rgw_raw_obj& _obj,
map<string, bufferlist>& _entries);
};
using ResultPtr = std::shared_ptr<Result>;
- 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);
int request_complete() override;
private:
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_raw_obj obj;
string marker;
int max_entries;
};
using ResultPtr = std::shared_ptr<Result>;
- 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);
int request_complete() override;
private:
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_raw_obj obj;
string marker;
int max_entries;
};
class RGWRadosRemoveOmapKeysCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_rados_ref ref;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
public:
- RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore *_store,
+ RGWRadosRemoveOmapKeysCR(rgw::sal::RadosStore* _store,
const rgw_raw_obj& _obj,
const set<string>& _keys);
};
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<RGWAioCompletionNotifier> 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;
class RGWSimpleRadosLockCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
string lock_name;
string cookie;
uint32_t duration;
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,
class RGWSimpleRadosUnlockCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
string lock_name;
string cookie;
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);
class RGWOmapAppend : public RGWConsumerCR<string> {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_raw_obj obj;
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;
class RGWShardedOmapCRManager {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWCoroutine *op;
int num_shards;
vector<RGWOmapAppend *> shards;
public:
- RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore *_store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const string& oid_prefix)
+ RGWShardedOmapCRManager(RGWAsyncRadosProcessor *_async_rados, rgw::sal::RadosStore* _store, RGWCoroutine *_op, int _num_shards, const rgw_pool& pool, const string& oid_prefix)
: async_rados(_async_rados),
store(_store), op(_op), num_shards(_num_shards) {
shards.reserve(num_shards);
};
class RGWAsyncGetBucketInstanceInfo : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_bucket bucket;
const DoutPrefixProvider *dpp;
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) {}
class RGWGetBucketInstanceInfoCR : public RGWSimpleCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_bucket bucket;
RGWBucketInfo *bucket_info;
map<string, bufferlist> *pattrs;
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<string, bufferlist> *_pattrs, const DoutPrefixProvider *dpp)
: RGWSimpleCoroutine(_store->ctx()), async_rados(_async_rados), store(_store),
std::string end_marker;
boost::intrusive_ptr<RGWAioCompletionNotifier> 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);
};
class RGWAsyncFetchRemoteObj : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
std::optional<rgw_user> user_id;
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<rgw_user>& _user_id,
const rgw_bucket& _src_bucket,
class RGWFetchRemoteObjCR : public RGWSimpleCoroutine {
CephContext *cct;
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
std::optional<rgw_user> user_id;
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<rgw_user> _user_id,
const rgw_bucket& _src_bucket,
};
class RGWAsyncStatRemoteObj : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
rgw_bucket src_bucket;
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,
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;
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,
class RGWAsyncRemoveObj : public RGWAsyncRadosRequest {
const DoutPrefixProvider *dpp;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
RGWBucketInfo bucket_info;
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,
const DoutPrefixProvider *dpp;
CephContext *cct;
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
RGWBucketInfo bucket_info;
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,
class RGWContinuousLeaseCR : public RGWCoroutine {
RGWAsyncRadosProcessor *async_rados;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
const rgw_raw_obj obj;
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),
};
class RGWRadosTimelogAddCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
list<cls_log_entry> entries;
string oid;
boost::intrusive_ptr<RGWAioCompletionNotifier> 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;
};
class RGWRadosTimelogTrimCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
protected:
std::string oid;
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);
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;
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)
};
class RGWStatObjCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWAsyncRadosProcessor *async_rados;
RGWBucketInfo bucket_info;
rgw_obj obj;
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);
/// 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;
boost::intrusive_ptr<RGWAioCompletionNotifier> 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);
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;
};
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),
RGWDataSyncCtx *sc;
RGWDataSyncEnv *sync_env;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_data_sync_status *sync_status;
int num_shards;
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;
class RGWReadRecoveringBucketShardsCoroutine : public RGWCoroutine {
RGWDataSyncCtx *sc;
RGWDataSyncEnv *sync_env;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
const int shard_id;
int max_entries;
class RGWReadPendingBucketShardsCoroutine : public RGWCoroutine {
RGWDataSyncCtx *sc;
RGWDataSyncEnv *sync_env;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
const int shard_id;
int max_entries;
return new RGWReadBucketPipeSyncStatusCoroutine(&sc, sync_pairs[num], sync_status, nullptr);
}
-RGWBucketPipeSyncStatusManager::RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore *_store,
+RGWBucketPipeSyncStatusManager::RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore* _store,
std::optional<rgw_zone_id> _source_zone,
std::optional<rgw_bucket> _source_bucket,
const rgw_bucket& _dest_bucket) : store(_store),
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;
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;
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;
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)
};
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,
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};
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,
class RGWRemoteDataLog : public RGWCoroutinesManager {
const DoutPrefixProvider *dpp;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
CephContext *cct;
RGWCoroutinesManagerRegistry *cr_registry;
RGWAsyncRadosProcessor *async_rados;
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,
};
class RGWDataSyncStatusManager : public DoutPrefixProvider {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
rgw_zone_id source_zone;
RGWRESTConn *conn;
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),
optional_yield y);
class RGWBucketPipeSyncStatusManager : public DoutPrefixProvider {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWDataSyncEnv sync_env;
int num_shards;
public:
- RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore *_store,
+ RGWBucketPipeSyncStatusManager(rgw::sal::RadosStore* _store,
std::optional<rgw_zone_id> _source_zone,
std::optional<rgw_bucket> _source_bucket,
const rgw_bucket& dest_bucket);
/// 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,
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 = \
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();
}
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;
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;
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) {}
boost::optional<std::string> 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;
class RGWLC : public DoutPrefixProvider {
CephContext *cct;
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
std::unique_ptr<rgw::sal::Lifecycle> sal_lc;
int max_objs{0};
string *obj_names{nullptr};
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);
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;
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);
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 */
/* usage logger */
class UsageLogger {
CephContext *cct;
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
map<rgw_user_bucket, RGWUsageBatch> usage_map;
ceph::mutex lock = ceph::make_mutex("UsageLogger");
int32_t num_entries;
}
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();
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);
}
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;
#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,
}
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)
{
}
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;
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);
map<string, bool> *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
#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);
class RGWObjectExpirer {
protected:
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWObjExpStore exp_store;
class OEWorker : public Thread, public DoutPrefixProvider {
std::atomic<bool> down_flag = { false };
public:
- explicit RGWObjectExpirer(rgw::sal::Store *_store)
+ explicit RGWObjectExpirer(rgw::sal::Store* _store)
: store(_store),
exp_store(_store->ctx(), static_cast<rgw::sal::RadosStore*>(store)->svc()->rados, store->get_zone()),
worker(NULL) {
*/
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<string, bufferlist>& bucket_attrs,
RGWAccessControlPolicy *policy,
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<string, bufferlist>& bucket_attrs,
}
static int read_bucket_policy(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
struct req_state *s,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
}
static int read_obj_policy(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
struct req_state *s,
RGWBucketInfo& bucket_info,
map<string, bufferlist>& bucket_attrs,
* 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;
boost::optional<Policy>* bucket_policy;
RGWBucketInfo bucket_info;
std::unique_ptr<rgw::sal::Bucket> ubucket;
- rgw::sal::Bucket *pbucket = NULL;
+ rgw::sal::Bucket* pbucket = NULL;
int r = 0;
if (bucket_name.compare(s->bucket->get_name()) != 0) {
{
}
-int RGWHandler::init(rgw::sal::Store *_store,
+int RGWHandler::init(rgw::sal::Store* _store,
struct req_state *_s,
rgw::io::BasicClient *cio)
{
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<string, bufferlist>& bucket_attrs,
RGWAccessControlPolicy *policy,
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;
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;
unsigned int num_unfound;
std::list<fail_desc_t> 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),
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;
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 =
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);
}
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);
}
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);
}
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);
}
: 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);
}
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);
}
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"; }
}
~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];
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"; }
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);
}
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);
}
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;
}
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);
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;}
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; }
class RGWOrphanSearch {
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWOrphanStore orphan_store;
int remove_index(map<int, string>& index);
public:
- RGWOrphanSearch(rgw::sal::Store *_store, int _max_ios, uint64_t _stale_secs) : store(_store), orphan_store(store), max_concurrent_ios(_max_ios), stale_secs(_stale_secs) {}
+ 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;
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;
// always send out the current period on startup
RGWPeriod period;
// XXX dang
- int r = period.init(cct, static_cast<rgw::sal::RadosStore *>(store)->svc()->sysobj, realm_id, y, realm.get_name());
+ int r = period.init(cct, static_cast<rgw::sal::RadosStore* >(store)->svc()->sysobj, realm_id, y, realm.get_name());
if (r < 0) {
lderr(cct) << "failed to load period for realm " << realm_id << dendl;
return;
}
struct RGWProcessEnv {
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWREST *rest;
OpsLogSocket *olog;
int port;
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) {
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) {
{
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) {
{
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;
template<typename EventType>
int RGWPubSub::SubWithEvents<EventType>::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) {
{
friend class Bucket;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
const std::string tenant;
RGWSysObjectCtx obj_ctx;
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;
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;
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,
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,
// 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,
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,
template<class T>
class RGWQuotaCache {
protected:
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
lru_map<T, RGWQuotaCacheStats> stats_map;
RefCountedWaitObject *async_refcount;
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() {
class AsyncRefreshHandler {
protected:
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWQuotaCache<T> *cache;
public:
- AsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache<T> *_cache) : store(_store), cache(_cache) {}
+ AsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache<T> *_cache) : store(_store), cache(_cache) {}
virtual ~AsyncRefreshHandler() {}
virtual int init_fetch() = 0;
public RGWGetBucketStats_CB {
rgw_user user;
public:
- BucketAsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache<rgw_bucket> *_cache,
+ BucketAsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache<rgw_bucket> *_cache,
const rgw_user& _user, const rgw_bucket& _bucket) :
RGWQuotaCache<rgw_bucket>::AsyncRefreshHandler(_store, _cache),
RGWGetBucketStats_CB(_bucket), user(_user) {}
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<rgw_bucket>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) {
+ explicit RGWBucketStatsCache(rgw::sal::Store* _store) : RGWQuotaCache<rgw_bucket>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size) {
}
AsyncRefreshHandler *allocate_refresh_handler(const rgw_user& user, const rgw_bucket& bucket) override {
public RGWGetUserStats_CB {
rgw_bucket bucket;
public:
- UserAsyncRefreshHandler(rgw::sal::Store *_store, RGWQuotaCache<rgw_user> *_cache,
+ UserAsyncRefreshHandler(rgw::sal::Store* _store, RGWQuotaCache<rgw_user> *_cache,
const rgw_user& _user, const rgw_bucket& _bucket) :
RGWQuotaCache<rgw_user>::AsyncRefreshHandler(_store, _cache),
RGWGetUserStats_CB(_user),
}
public:
- RGWUserStatsCache(rgw::sal::Store *_store, bool quota_threads)
+ RGWUserStatsCache(rgw::sal::Store* _store, bool quota_threads)
: RGWQuotaCache<rgw_user>(_store, _store->ctx()->_conf->rgw_bucket_quota_cache_size)
{
if (quota_threads) {
class RGWQuotaHandlerImpl : public RGWQuotaHandler {
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
RGWBucketStatsCache bucket_stats_cache;
RGWUserStatsCache user_stats_cache;
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) {}
};
-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);
}
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);
};
}
class RGWMetaNotifierManager : public RGWCoroutinesManager {
- RGWRados *store;
+ RGWRados* store;
RGWHTTPManager http_manager;
public:
};
class RGWDataNotifierManager : public RGWCoroutinesManager {
- RGWRados *store;
+ RGWRados* store;
RGWHTTPManager http_manager;
public:
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<int>& shard_ids) {
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)),
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;
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),
};
class RGWObjectCtx {
- rgw::sal::Store *store;
+ rgw::sal::Store* store;
ceph::shared_mutex lock = ceph::make_shared_mutex("RGWObjectCtx");
void *s{nullptr};
std::map<rgw_obj, RGWObjState> 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;
}
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;
void set_context(CephContext *_cct) {
cct = _cct;
}
- void set_store(rgw::sal::RadosStore *_store) {
+ void set_store(rgw::sal::RadosStore* _store) {
store = _store;
}
};
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;
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<librados::AioCompletion *>& _completions) :
store(_store), bucket_info(_bucket_info), idx_layout(_idx_layout), bs(store->getRados()),
class BucketReshardManager {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
const RGWBucketInfo& target_bucket_info;
deque<librados::AioCompletion *> completions;
int num_target_shards;
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),
}
}; // class BucketReshardManager
-RGWBucketReshard::RGWBucketReshard(rgw::sal::RadosStore *_store,
+RGWBucketReshard::RGWBucketReshard(rgw::sal::RadosStore* _store,
const RGWBucketInfo& _bucket_info,
const map<string, bufferlist>& _bucket_attrs,
RGWBucketReshardLock* _outer_reshard_lock) :
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<string, bufferlist>& attrs,
class BucketInfoReshardUpdate
{
const DoutPrefixProvider *dpp;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWBucketInfo& bucket_info;
std::map<string, bufferlist> bucket_attrs;
public:
BucketInfoReshardUpdate(const DoutPrefixProvider *_dpp,
- rgw::sal::RadosStore *_store,
+ rgw::sal::RadosStore* _store,
RGWBucketInfo& _bucket_info,
map<string, bufferlist>& _bucket_attrs,
const string& new_bucket_id) :
private:
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWBucketInfo bucket_info;
std::map<string, bufferlist> bucket_attrs;
// 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<string, bufferlist>& _bucket_attrs,
RGWBucketReshardLock* _outer_reshard_lock);
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;
}
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,
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;
}
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);
}
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
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,
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 {
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 {
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)
{
}
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)
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;
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;
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 {
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 {
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 {
}
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&)
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;
}
};
- set<rgw_zone_id> get_zone_ids_from_names(rgw::sal::Store *store,
+ set<rgw_zone_id> get_zone_ids_from_names(rgw::sal::Store* store,
const vector<string>& zone_names) const {
set<rgw_zone_id> ids;
return ids;
}
- vector<string> get_zone_names_from_ids(rgw::sal::Store *store,
+ vector<string> get_zone_names_from_ids(rgw::sal::Store* store,
const set<rgw_zone_id>& zone_ids) const {
vector<string> names;
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)) {
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;
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<rgw_sync_policy_group> *result) const {
result->resize(2);
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);
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)
{
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)
{
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)
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<string> params;
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;
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);
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)
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
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;
};
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);
};
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 {
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(),
}
~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;
~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;
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;
};
}
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)
{
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)
{
}
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)
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);
};
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;
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;
}
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,
}
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;
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;
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;
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 {
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 {
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;
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 {
}
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,
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,
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<rgw::sal::RadosStore *>(store)->getRados();
+ RGWRados* rados = static_cast<rgw::sal::RadosStore* >(store)->getRados();
if ((*rados).set_use_cache(use_cache)
.set_run_gc_thread(use_gc_thread)
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<rgw::sal::RadosStore *>(store)->getRados();
+ RGWRados* rados = static_cast<rgw::sal::RadosStore* >(store)->getRados();
rados->set_context(cct);
return store;
}
-void StoreManager::close_storage(rgw::sal::Store *store)
+void StoreManager::close_storage(rgw::sal::Store* store)
{
if (!store)
return;
class RGWGetBucketStats_CB : public RefCountedObject {
protected:
rgw_bucket bucket;
- map<RGWObjCategory, RGWStorageStats> *stats;
+ map<RGWObjCategory, RGWStorageStats>* stats;
public:
explicit RGWGetBucketStats_CB(const rgw_bucket& _bucket) : bucket(_bucket), stats(NULL) {}
~RGWGetBucketStats_CB() override {}
virtual void handle_response(int r) = 0;
- virtual void set_response(map<RGWObjCategory, RGWStorageStats> *_stats) {
+ virtual void set_response(map<RGWObjCategory, RGWStorageStats>* _stats) {
stats = _stats;
}
};
/* This one does not query the cluster for info */
virtual std::unique_ptr<User> 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>* user) = 0;
- virtual int get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user) = 0;
- virtual int get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user) = 0;
+ virtual int get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr<User>* user) = 0;
+ virtual int get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user) = 0;
+ virtual int get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user) = 0;
virtual std::unique_ptr<Object> 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>* bucket, optional_yield y) = 0;
+ virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr<Bucket>* bucket, optional_yield y) = 0;
virtual int get_bucket(User* u, const RGWBucketInfo& i, std::unique_ptr<Bucket>* bucket) = 0;
- virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const std::string& tenant, const std::string& name, std::unique_ptr<Bucket>* 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>* 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>* 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;
virtual std::unique_ptr<Completions> get_completions(void) = 0;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, struct req_state* s, rgw::notify::EventType event_type) = 0;
virtual std::unique_ptr<GCChain> get_gc_chain(rgw::sal::Object* obj) = 0;
- virtual std::unique_ptr<Writer> get_writer(Aio *aio, rgw::sal::Bucket* bucket,
+ virtual std::unique_ptr<Writer> get_writer(Aio* aio, rgw::sal::Bucket* bucket,
RGWObjectCtx& obj_ctx, std::unique_ptr<rgw::sal::Object> _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<rgw_user_bucket, RGWUsageBatch>& usage_info) = 0;
virtual int log_op(string& oid, bufferlist& bl) = 0;
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<string>& oids,
- bool *is_truncated) = 0;
- virtual int set_buckets_enabled(const DoutPrefixProvider *dpp, vector<rgw_bucket>& buckets, bool enabled) = 0;
+ bool* is_truncated) = 0;
+ virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector<rgw_bucket>& 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<rgw_zone_id> zone,
std::optional<rgw_bucket> 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<int>& shard_ids) = 0;
virtual void wakeup_data_sync_shards(const rgw_zone_id& source_zone, map<int, set<string> >& 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<rgw_user_bucket, rgw_usage_log_entry>& 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<string, bufferlist> *pattrs = nullptr) = 0;
- virtual int get_system_obj(const DoutPrefixProvider *dpp,
+ RGWObjVersionTracker* objv_tracker, real_time set_mtime,
+ optional_yield y, map<string, bufferlist>* 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<string, bufferlist> *pattrs = nullptr,
- rgw_cache_entry_info *cache_info = nullptr,
+ RGWObjVersionTracker* objv_tracker, real_time* pmtime,
+ optional_yield y, map<string, bufferlist>* pattrs = nullptr,
+ rgw_cache_entry_info* cache_info = nullptr,
boost::optional<obj_version> 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<string>& keys, bool* truncated) = 0;
virtual void meta_list_keys_complete(void* handle) = 0;
- virtual std::string meta_get_marker(void *handle) = 0;
- virtual int meta_remove(const DoutPrefixProvider *dpp, 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;
virtual ~User() = default;
virtual std::unique_ptr<User> 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;
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<User>& 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<rgw_user_bucket, rgw_usage_log_entry>& 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; }
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};
virtual ~Bucket() = default;
virtual std::unique_ptr<Object> 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<RGWObjCategory, RGWStorageStats>& 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<rgw_user_bucket, rgw_usage_log_entry>& usage) = 0;
virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) = 0;
virtual int remove_objs_from_index(std::list<rgw_obj_index_key>& objs_to_unlink) = 0;
virtual int check_index(std::map<RGWObjCategory, RGWStorageStats>& existing_stats, std::map<RGWObjCategory, RGWStorageStats>& 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; }
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);
}
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 {
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 {
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 {
uint64_t olh_epoch{0};
string marker_version_id;
uint32_t bilog_flags{0};
- list<rgw_obj_index_key> *remove_objs{nullptr};
+ list<rgw_obj_index_key>* 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;
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 {
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<ceph::real_time> 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;
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; }
/* 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 */
/* OMAP */
virtual int omap_get_vals(const string& marker, uint64_t count,
- std::map<string, bufferlist> *m,
- bool *pmore, optional_yield y) = 0;
- virtual int omap_get_all(std::map<string, bufferlist> *m,
+ std::map<string, bufferlist>* m,
+ bool* pmore, optional_yield y) = 0;
+ virtual int omap_get_all(std::map<string, bufferlist>* m,
optional_yield y) = 0;
virtual int omap_get_vals_by_keys(const std::string& oid,
const std::set<std::string>& 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;
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;
};
class Writer : public rgw::putobj::DataProcessor {
protected:
- Aio *const aio;
+ Aio* const aio;
rgw::sal::Bucket* bucket;
RGWObjectCtx& obj_ctx;
std::unique_ptr<rgw::sal::Object> 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<rgw::sal::Object> _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)
{}
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;
};
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);
};
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 {
}
if (cct->_conf->subsys.should_gather<ceph_subsys_rgw, 15>()) {
ldout(cct, 15) << __func__ << " Read AccessControlPolicy";
- RGWAccessControlPolicy_S3 *s3policy = static_cast<RGWAccessControlPolicy_S3 *>(policy);
+ RGWAccessControlPolicy_S3* s3policy = static_cast<RGWAccessControlPolicy_S3 *>(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);
return 0;
}
-static int process_completed(const AioResultList& completed, RawObjSet *written)
+static int process_completed(const AioResultList& completed, RawObjSet* written)
{
std::optional<int> error;
for (auto& r : completed) {
{
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();
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)
{
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);
}
}
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<rgw_user_bucket, rgw_usage_log_entry>& usage)
{
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;
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;
}
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<RGWObjCategory, RGWStorageStats>& 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;
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<std::string, RGWBucketEnt> m;
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;
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;
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()
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);
}
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<rgw_user_bucket, rgw_usage_log_entry>& usage)
{
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++) {
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;
return std::unique_ptr<Object>(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) {
return std::unique_ptr<User>(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>* user)
+int RadosStore::get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr<User>* 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));
return 0;
}
-int RadosStore::get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user)
+int RadosStore::get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* 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));
return 0;
}
-int RadosStore::get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user)
+int RadosStore::get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* 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));
return std::unique_ptr<Object>(new RadosObject(this, k));
}
-int RadosStore::get_bucket(const DoutPrefixProvider *dpp, User* u, const rgw_bucket& b, std::unique_ptr<Bucket>* bucket, optional_yield y)
+int RadosStore::get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr<Bucket>* bucket, optional_yield y)
{
int ret;
Bucket* bp;
return 0;
}
-int RadosStore::get_bucket(const DoutPrefixProvider *dpp, User* u, const std::string& tenant, const std::string& name, std::unique_ptr<Bucket>* 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>* bucket, optional_yield y)
{
rgw_bucket b;
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,
obj_version& ep_objv,
bool exclusive,
bool obj_lock_enabled,
- bool *existed,
+ bool* existed,
req_info& req_info,
std::unique_ptr<Bucket>* bucket_out,
optional_yield y)
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> 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);
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()) {
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);
}
return std::unique_ptr<GCChain>(new RadosGCChain(this, obj));
}
-std::unique_ptr<Writer> RadosStore::get_writer(Aio *aio, rgw::sal::Bucket* bucket,
+std::unique_ptr<Writer> RadosStore::get_writer(Aio* aio, rgw::sal::Bucket* bucket,
RGWObjectCtx& obj_ctx, std::unique_ptr<rgw::sal::Object> _head_obj,
- const DoutPrefixProvider *dpp, optional_yield y)
+ const DoutPrefixProvider* dpp, optional_yield y)
{
return std::unique_ptr<Writer>(new RadosWriter(aio, this, bucket, obj_ctx, std::move(_head_obj), dpp, y));
}
int RadosStore::delete_raw_obj_aio(const rgw_raw_obj& obj, Completions* aio)
{
- RadosCompletions *raio = static_cast<RadosCompletions*>(aio);
+ RadosCompletions* raio = static_cast<RadosCompletions*>(aio);
return rados->delete_raw_obj_aio(obj, raio->handles);
}
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);
}
int RadosStore::list_raw_objects(const rgw_pool& pool, const string& prefix_filter,
int max, RGWListRawObjsCtx& ctx, list<string>& 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<rgw_bucket>& buckets, bool enabled)
+int RadosStore::set_buckets_enabled(const DoutPrefixProvider* dpp, vector<rgw_bucket>& 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<rgw_zone_id> zone,
std::optional<rgw_bucket> bucket,
- RGWBucketSyncPolicyHandlerRef *phandler,
+ RGWBucketSyncPolicyHandlerRef* phandler,
optional_yield y)
{
return ctl()->bucket->get_sync_policy_handler(zone, bucket, phandler, y, dpp);
}
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<rgw_user_bucket, rgw_usage_log_entry>& usage)
{
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<string, bufferlist> *pattrs)
+ RGWObjVersionTracker* objv_tracker, real_time set_mtime,
+ optional_yield y, map<string, bufferlist>* 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<string, bufferlist> *pattrs,
- rgw_cache_entry_info *cache_info,
+ RGWObjVersionTracker* objv_tracker, real_time* pmtime,
+ optional_yield y, map<string, bufferlist>* pattrs,
+ rgw_cache_entry_info* cache_info,
boost::optional<obj_version> refresh_version)
{
auto obj_ctx = svc()->sysobj->init_obj_ctx();
}
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);
}
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);
}
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);
}
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;
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();
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);
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);
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;
Object* dest_obj,
uint16_t olh_epoch,
std::string* petag,
- const DoutPrefixProvider *dpp,
+ const DoutPrefixProvider* dpp,
optional_yield y)
{
Attrs attrset;
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);
int RadosObject::omap_get_vals(const string& marker, uint64_t count,
std::map<string, bufferlist> *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;
int RadosObject::omap_get_vals_by_keys(const std::string& oid,
const std::set<std::string>& keys,
- Attrs *vals)
+ Attrs* vals)
{
int ret;
rgw_raw_obj head_obj;
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);
}
return p1 == p2;
}
-std::unique_ptr<Object::ReadOp> RadosObject::get_read_op(RGWObjectCtx *ctx)
+std::unique_ptr<Object::ReadOp> RadosObject::get_read_op(RGWObjectCtx* ctx)
{
return std::unique_ptr<Object::ReadOp>(new RadosObject::RadosReadOp(this, ctx));
}
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;
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<Object::DeleteOp> RadosObject::get_delete_op(RGWObjectCtx *ctx)
+std::unique_ptr<Object::DeleteOp> RadosObject::get_delete_op(RGWObjectCtx* ctx)
{
return std::unique_ptr<Object::DeleteOp>(new RadosObject::RadosDeleteOp(this, ctx));
}
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;
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);
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)
{
raio->handles, keep_index_consistent, y);
}
-std::unique_ptr<Object::StatOp> RadosObject::get_stat_op(RGWObjectCtx *ctx)
+std::unique_ptr<Object::StatOp> RadosObject::get_stat_op(RGWObjectCtx* ctx)
{
return std::unique_ptr<Object::StatOp>(new RadosObject::RadosStatOp(this, ctx));
}
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<ceph::real_time> 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,
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);
}
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;
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(),
}
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,
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);
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);
}
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;
class RadosUser : public User {
private:
- RadosStore *store;
+ RadosStore* store;
public:
RadosUser(RadosStore *_st, const rgw_user& _u) : User(_u), store(_st) { }
virtual std::unique_ptr<User> clone() override {
return std::unique_ptr<User>(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<rgw_user_bucket, rgw_usage_log_entry>& 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:
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 {
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 {
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 {
}
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<ceph::real_time> 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;
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 */
/* OMAP */
virtual int omap_get_vals(const string& marker, uint64_t count,
std::map<string, bufferlist> *m,
- bool *pmore, optional_yield y) override;
+ bool* pmore, optional_yield y) override;
virtual int omap_get_all(std::map<string, bufferlist> *m,
optional_yield y) override;
virtual int omap_get_vals_by_keys(const std::string& oid,
const std::set<std::string>& 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:
~RadosBucket() { }
virtual std::unique_ptr<Object> 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<RGWObjCategory, RGWStorageStats>& 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<rgw_user_bucket, rgw_usage_log_entry>& usage) override;
virtual int trim_usage(uint64_t start_epoch, uint64_t end_epoch) override;
virtual int remove_objs_from_index(std::list<rgw_obj_index_key>& objs_to_unlink) override;
virtual int check_index(std::map<RGWObjCategory, RGWStorageStats>& existing_stats, std::map<RGWObjCategory, RGWStorageStats>& 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<Bucket> clone() override {
return std::make_unique<RadosBucket>(*this);
}
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;
}
virtual std::unique_ptr<User> 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>* user) override;
- virtual int get_user_by_email(const DoutPrefixProvider *dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user) override;
- virtual int get_user_by_swift(const DoutPrefixProvider *dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user) override;
+ virtual int get_user_by_access_key(const DoutPrefixProvider* dpp, const std::string& key, optional_yield y, std::unique_ptr<User>* user) override;
+ virtual int get_user_by_email(const DoutPrefixProvider* dpp, const std::string& email, optional_yield y, std::unique_ptr<User>* user) override;
+ virtual int get_user_by_swift(const DoutPrefixProvider* dpp, const std::string& user_str, optional_yield y, std::unique_ptr<User>* user) override;
virtual std::unique_ptr<Object> 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>* bucket, optional_yield y) override;
+ virtual int get_bucket(const DoutPrefixProvider* dpp, User* u, const rgw_bucket& b, std::unique_ptr<Bucket>* bucket, optional_yield y) override;
virtual int get_bucket(User* u, const RGWBucketInfo& i, std::unique_ptr<Bucket>* bucket) override;
- virtual int get_bucket(const DoutPrefixProvider *dpp, User* u, const std::string& tenant, const std::string&name, std::unique_ptr<Bucket>* 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>* 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,
obj_version& ep_objv,
bool exclusive,
bool obj_lock_enabled,
- bool *existed,
+ bool* existed,
req_info& req_info,
std::unique_ptr<Bucket>* 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;
virtual std::unique_ptr<Completions> get_completions(void) override;
virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, struct req_state* s, rgw::notify::EventType event_type) override;
virtual std::unique_ptr<GCChain> get_gc_chain(rgw::sal::Object* obj) override;
- virtual std::unique_ptr<Writer> get_writer(Aio *aio, rgw::sal::Bucket* bucket,
+ virtual std::unique_ptr<Writer> get_writer(Aio* aio, rgw::sal::Bucket* bucket,
RGWObjectCtx& obj_ctx, std::unique_ptr<rgw::sal::Object> _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<rgw_user_bucket, RGWUsageBatch>& usage_info) override;
virtual int log_op(string& oid, bufferlist& bl) override;
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<string>& oids,
- bool *is_truncated) override;
- virtual int set_buckets_enabled(const DoutPrefixProvider *dpp, vector<rgw_bucket>& buckets, bool enabled) override;
+ bool* is_truncated) override;
+ virtual int set_buckets_enabled(const DoutPrefixProvider* dpp, vector<rgw_bucket>& buckets, bool enabled) override;
virtual uint64_t get_new_req_id() override { return rados->get_new_req_id(); }
- virtual int get_sync_policy_handler(const DoutPrefixProvider *dpp,
+ virtual int get_sync_policy_handler(const DoutPrefixProvider* dpp,
std::optional<rgw_zone_id> zone,
std::optional<rgw_bucket> 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<int>& shard_ids) override { rados->wakeup_meta_sync_shards(shard_ids); }
virtual void wakeup_data_sync_shards(const rgw_zone_id& source_zone, map<int, set<string> >& 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<rgw_user_bucket, rgw_usage_log_entry>& 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<string, bufferlist> *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<string, bufferlist> *pattrs = nullptr,
- rgw_cache_entry_info *cache_info = nullptr,
+ rgw_cache_entry_info* cache_info = nullptr,
boost::optional<obj_version> 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<string>& keys, bool* truncated) override;
virtual void meta_list_keys_complete(void* handle) override;
- virtual std::string meta_get_marker(void *handle) override;
- virtual int meta_remove(const DoutPrefixProvider *dpp, 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;
/* 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; }
};
~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;
};
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<rgw::sal::Object> _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)
{}
}
int AssumedRoleUser::generateAssumedRoleUser(CephContext* cct,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
const string& roleId,
const rgw::ARN& roleArn,
const string& roleSessionName)
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);
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<int, RGWRole> getRoleInfo(const DoutPrefixProvider *dpp, const string& arn, optional_yield y);
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";
~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; }
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 {
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));
}
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;
}
class RGWAsyncReadMDLogEntries : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWMetadataLog *mdlog;
int shard_id;
int max_entries;
list<cls_log_entry> 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),
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));
}
yield {
set_status("writing sync status");
- rgw::sal::RadosStore *store = sync_env->store;
+ rgw::sal::RadosStore* store = sync_env->store;
call(new RGWSimpleRadosWriteCR<rgw_meta_sync_info>(sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()),
status));
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<rgw_meta_sync_marker>(sync_env->async_rados,
store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->shard_obj_name(i)),
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<rgw_meta_sync_info>(sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, sync_env->status_oid()),
status));
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));
};
class RGWAsyncMetaStoreEntry : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
string raw_key;
bufferlist bl;
const DoutPrefixProvider *dpp;
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),
};
class RGWAsyncMetaRemoveEntry : public RGWAsyncRadosRequest {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
string raw_key;
const DoutPrefixProvider *dpp;
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) {}
};
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<rgw_meta_sync_marker>(sync_env->async_rados,
store->svc()->sysobj,
rgw_raw_obj(store->svc()->zone->get_zone_params().log_pool, marker_oid),
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));
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));
}
RGWCoroutine *alloc_finisher_cr() override {
- rgw::sal::RadosStore *store = sync_env->store;
+ rgw::sal::RadosStore* store = sync_env->store;
return new RGWSimpleRadosReadCR<rgw_meta_sync_marker>(sync_env->async_rados, store->svc()->sysobj,
rgw_raw_obj(pool, sync_env->shard_obj_name(shard_id)),
&sync_marker);
class RGWSyncTraceManager;
class RGWSyncErrorLogger {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
vector<string> oids;
int num_shards;
std::atomic<int64_t> 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);
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};
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);
class RGWRemoteMetaLog : public RGWCoroutinesManager {
const DoutPrefixProvider *dpp;
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWRESTConn *conn;
RGWAsyncRadosProcessor *async_rados;
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()),
};
class RGWMetaSyncStatusManager : public DoutPrefixProvider {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
librados::IoCtx ioctx;
RGWRemoteMetaLog master_log;
vector<string> 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();
}
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,
} // 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<rgw_zone_id> opt_source_zone,
// 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<rgw_zone_id> opt_source_zone,
};
-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)
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;
};
// 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)
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;
}
}
-RGWDataAccess::RGWDataAccess(rgw::sal::Store *_store) : store(_store)
+RGWDataAccess::RGWDataAccess(rgw::sal::Store* _store) : store(_store)
{
}
const DoutPrefixProvider *dpp,
optional_yield y)
{
- rgw::sal::Store *store = sd->store;
+ rgw::sal::Store* store = sd->store;
CephContext *cct = store->ctx();
string tag;
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;
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;
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;
~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,
/// 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};
boost::container::flat_map<TrimNotifyType, HandlerPtr> 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));
/// 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<std::string>& 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<std::string>& markers)
: RGWShardCollectCR(store->ctx(), MAX_CONCURRENT_SHARDS),
store(store), bucket_info(bucket_info), markers(markers)
/// 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;
std::vector<std::string> 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)
/// 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<std::string>::const_iterator bucket;
std::vector<std::string>::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<std::string>& buckets,
int max_concurrent,
};
class BucketTrimCR : public RGWCoroutine {
- rgw::sal::RadosStore *const store;
+ rgw::sal::RadosStore* const store;
RGWHTTPManager *const http;
const BucketTrimConfig& config;
BucketTrimObserver *const observer;
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),
}
class BucketTrimPollCR : public RGWCoroutine {
- rgw::sal::RadosStore *const store;
+ rgw::sal::RadosStore* const store;
RGWHTTPManager *const http;
const BucketTrimConfig& config;
BucketTrimObserver *const observer;
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)
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;
/// 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),
}
};
-BucketTrimManager::BucketTrimManager(rgw::sal::RadosStore *store,
+BucketTrimManager::BucketTrimManager(rgw::sal::RadosStore* store,
const BucketTrimConfig& config)
: impl(new Impl(store, config))
{
namespace {
class DatalogTrimImplCR : public RGWSimpleCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
boost::intrusive_ptr<RGWAioCompletionNotifier> cn;
int shard;
std::string marker;
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
int ret{0};
public:
- DataLogTrimCR(rgw::sal::RadosStore *store, RGWHTTPManager *http,
+ DataLogTrimCR(rgw::sal::RadosStore* store, RGWHTTPManager *http,
int num_shards, std::vector<std::string>& last_trim)
: RGWCoroutine(store->ctx()), store(store), http(http),
num_shards(num_shards),
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<std::string>& markers)
}
class DataLogTrimPollCR : public RGWCoroutine {
- rgw::sal::RadosStore *store;
+ rgw::sal::RadosStore* store;
RGWHTTPManager *http;
const int num_shards;
const utime_t interval; //< polling interval
std::vector<std::string> 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),
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)
{
} }
// 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<std::string>& markers);
/// 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;
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, "")
RGWSI_Zone *zone;
RGWSI_MDLog *mdlog;
} svc;
- rgw::sal::RadosStore *const store;
+ rgw::sal::RadosStore* const store;
RGWMetadataManager *const metadata;
RGWObjVersionTracker objv;
Cursor cursor;
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;
/// construct a RGWRESTConn for each zone in the realm
template <typename Zonegroups>
-connection_map make_peer_connections(rgw::sal::RadosStore *store,
+connection_map make_peer_connections(rgw::sal::RadosStore* store,
const Zonegroups& zonegroups)
{
connection_map connections;
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())
/// last trim marker for each shard, only applies to current period's mdlog
std::vector<std::string> 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)
{
/// last trim timestamp for each shard, only applies to current period's mdlog
std::vector<ceph::real_time> 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)
{}
}
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
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))
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)
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()) {
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<MasterTrimEnv*>(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<PeerTrimEnv*>(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)
{
// 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);
bool show_log_sum,
std::map<std::string, bool> *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);
};
}
int rgw_user_get_all_buckets_stats(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
rgw::sal::User* user,
map<string, cls_user_bucket_entry>& buckets_usage_map,
optional_yield y)
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();
clear_populated();
}
-int RGWUser::init_storage(rgw::sal::Store *storage)
+int RGWUser::init_storage(rgw::sal::Store* storage)
{
if (!storage) {
return -EINVAL;
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;
}
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)
{
}
int RGWUserAdminOp_User::create(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
}
int RGWUserAdminOp_User::modify(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
}
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;
}
int RGWUserAdminOp_Subuser::create(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
}
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;
}
int RGWUserAdminOp_Subuser::remove(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
}
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)
{
}
int RGWUserAdminOp_Key::remove(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher,
optional_yield y)
}
int RGWUserAdminOp_Caps::add(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
int RGWUserAdminOp_Caps::remove(const DoutPrefixProvider *dpp,
- rgw::sal::Store *store,
+ rgw::sal::Store* store,
RGWUserAdminOpState& op_state,
RGWFormatterFlusher& flusher, optional_yield y)
{
std::map<std::string, int, ltstr_nocase> key_type_map;
rgw_user user_id;
- rgw::sal::Store *store{nullptr};
+ rgw::sal::Store* store{nullptr};
map<std::string, RGWAccessKey> *swift_keys{nullptr};
map<std::string, RGWAccessKey> *access_keys{nullptr};
RGWUser *user{nullptr};
rgw_user user_id;
- rgw::sal::Store *store{nullptr};
+ rgw::sal::Store* store{nullptr};
bool subusers_allowed{false};
map<string, RGWSubUser> *subuser_map{nullptr};
private:
RGWUserInfo old_info;
- rgw::sal::Store *store{nullptr};
+ rgw::sal::Store* store{nullptr};
rgw_user user_id;
bool info_stored{false};
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;
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);
};
{
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);
};
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);
};
{
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);
};
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());
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)
}
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)
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);
// 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);