int append_atomic_test(const DoutPrefixProvider *dpp, RGWBucketInfo& bucket_info, rgw::sal::Object* obj,
librados::ObjectOperation& op, RGWObjState **state,
RGWObjManifest** pmanifest, optional_yield y);
-
+
int update_placement_map();
int store_bucket_info(RGWBucketInfo& info, std::map<std::string, bufferlist> *pattrs, RGWObjVersionTracker *objv_tracker, bool exclusive);
rgw_obj obj;
rgw_raw_obj head_obj;
} state;
-
+
struct ConditionParams {
const ceph::real_time *mod_ptr;
const ceph::real_time *unmod_ptr;
uint64_t mod_pg_ver;
const char *if_match;
const char *if_nomatch;
-
- ConditionParams() :
+
+ ConditionParams() :
mod_ptr(NULL), unmod_ptr(NULL), high_precision_time(false), mod_zone_id(0), mod_pg_ver(0),
if_match(NULL), if_nomatch(NULL) {}
} conds;
struct Write {
RGWRados::Object *target;
-
+
struct MetaParams {
ceph::real_time *mtime;
std::map<std::string, bufferlist>* rmattrs;
DeleteResult() : delete_marker(false) {}
} result;
-
+
explicit Delete(RGWRados::Object *_target) : target(_target) {}
int delete_obj(optional_yield y, const DoutPrefixProvider *dpp);
void set_bilog_flags(uint16_t flags) {
bilog_flags = flags;
}
-
+
void set_zones_trace(rgw_zone_set *_zones_trace) {
zones_trace = _zones_trace;
}
const rgw_user& user, /* in */
rgw::sal::Bucket* bucket, /* in */
rgw::sal::Object* obj, /* in */
- const DoutPrefixProvider *dpp, /* in/out */
- optional_yield y); /* in */
+ const DoutPrefixProvider *dpp, /* in/out */
+ optional_yield y); /* in */
int swift_versioning_restore(RGWObjectCtx& obj_ctx, /* in/out */
const rgw_user& user, /* in */
rgw::sal::Bucket* bucket, /* in */
rgw::sal::Object* obj, /* in */
bool& restored, /* out */
- const DoutPrefixProvider *dpp); /* in/out */
+ const DoutPrefixProvider *dpp); /* in/out */
int copy_obj_to_remote_dest(const DoutPrefixProvider *dpp,
RGWObjState *astate,
std::map<std::string, bufferlist>& src_attrs,
std::string *petag,
const DoutPrefixProvider *dpp,
optional_yield y);
-
+
int transition_obj(RGWObjectCtx& obj_ctx,
rgw::sal::Bucket* bucket,
rgw::sal::Object& obj,
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
+ * License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
- *
+ *
*/
#pragma once
virtual int send() = 0;
virtual int write(bufferlist& data, bool *need_retry) = 0; /* reentrant */
virtual int drain_writes(bool *need_retry) = 0; /* reentrant */
-
+
virtual ~RGWStreamWriteResourceCRF() = default;
};
RGWFileHandle::FHCache fh_cache;
RGWFileHandle::FhLRU fh_lru;
-
+
std::string uid; // should match user.user_id, iiuc
std::unique_ptr<rgw::sal::User> user;
const uint32_t flags = RGWFileHandle::FLAG_NONE) {
using std::get;
- // cast int32_t(RGWFileHandle::FLAG_NONE) due to strictness of Clang
+ // cast int32_t(RGWFileHandle::FLAG_NONE) due to strictness of Clang
// the cast transfers a lvalue into a rvalue in the ctor
// check the commit message for the full details
LookupFHResult fhr { nullptr, uint32_t(RGWFileHandle::FLAG_NONE) };
const uint32_t flags = RGWFileHandle::FLAG_NONE) {
using std::get;
- // cast int32_t(RGWFileHandle::FLAG_NONE) due to strictness of Clang
+ // cast int32_t(RGWFileHandle::FLAG_NONE) due to strictness of Clang
// the cast transfers a lvalue into a rvalue in the ctor
// check the commit message for the full details
LookupFHResult fhr { nullptr, uint32_t(RGWFileHandle::FLAG_NONE) };
MkObjResult create(RGWFileHandle* parent, const char *name, struct stat *st,
uint32_t mask, uint32_t flags);
-
- MkObjResult symlink(RGWFileHandle* parent, const char *name,
+
+ MkObjResult symlink(RGWFileHandle* parent, const char *name,
const char *link_path, struct stat *st, uint32_t mask, uint32_t flags);
MkObjResult mkdir(RGWFileHandle* parent, const char *name, struct stat *st,
RGWLoadGenFrontend(RGWProcessEnv& pe, RGWFrontendConfig *_conf)
: RGWProcessFrontend(pe, _conf) {}
- CephContext *get_cct() const {
+ CephContext *get_cct() const {
return env.driver->ctx();
}
public:
RGWIOProvider() {}
- virtual ~RGWIOProvider() = default;
+ virtual ~RGWIOProvider() = default;
void assign_io(RGWIOIDProvider& io_id_provider, int io_type = -1);
rgw_io_id get_io_id(int io_type) {
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
// publish a message over a connection that was already created
// and pass a callback that will be invoked (async) when broker confirms
// receiving the message
-int publish_with_confirm(connection_ptr_t& conn,
+int publish_with_confirm(connection_ptr_t& conn,
const std::string& topic,
const std::string& message,
reply_callback_t cb);
// number of connections
size_t get_connection_count();
-
+
// return the number of messages that were sent
// to broker, but were not yet acked/nacked/timedout
size_t get_inflight();
public:
~RGWPauser() override = default;
-
+
void add_pauser(Pauser* pauser) {
pausers.push_back(pauser);
}
const real_time& end_time, const std::string& marker,
void **handle);
void complete_list_entries(void *handle);
- int list_entries(const DoutPrefixProvider *dpp,
+ int list_entries(const DoutPrefixProvider *dpp,
void *handle,
int max_entries,
std::list<cls_log_entry>& entries,
obj_version read_version;
obj_version write_version;
RGWMDLogStatus status;
-
+
RGWMetadataLogData() : status(MDLOG_STATUS_UNKNOWN) {}
void encode(bufferlist& bl) const;
}
}
-int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
+int rgw_op_get_bucket_policy_from_attr(const DoutPrefixProvider *dpp,
CephContext *cct,
rgw::sal::Driver* driver,
RGWBucketInfo& bucket_info,
return 0;
}
- // get lua script to run as a "get object" filter
- int get_lua_filter(std::unique_ptr<RGWGetObj_Filter>* filter,
+ // get lua script to run as a "get object" filter
+ int get_lua_filter(std::unique_ptr<RGWGetObj_Filter>* filter,
RGWGetObj_Filter* cb);
dmc::client_id dmclock_client() override { return dmc::client_id::data; }
boost::optional<std::pair<std::string, rgw_obj_key>>
parse_path(const std::string_view& path);
-
+
std::pair<std::string, std::string>
handle_upload_path(req_state *s);
class RGWListBucket : public RGWOp {
protected:
std::string prefix;
- rgw_obj_key marker;
- rgw_obj_key next_marker;
+ rgw_obj_key marker;
+ rgw_obj_key next_marker;
rgw_obj_key end_marker;
std::string max_keys;
std::string delimiter;
return 0;
}
- // get lua script to run as a "put object" filter
- int get_lua_filter(std::unique_ptr<rgw::sal::DataProcessor>* filter,
+ // get lua script to run as a "put object" filter
+ int get_lua_filter(std::unique_ptr<rgw::sal::DataProcessor>* filter,
rgw::sal::DataProcessor* cb);
int get_data_cb(bufferlist& bl, off_t bl_ofs, off_t bl_len);
class RGWGetLC : public RGWOp {
protected:
-
+
public:
RGWGetLC() { }
~RGWGetLC() override { }
class RGWDeleteMultiObj : public RGWOp {
/**
* Handles the deletion of an individual object and uses
- * set_partial_response to record the outcome.
+ * set_partial_response to record the outcome.
*/
void handle_individual_object(const rgw_obj_key& o,
optional_yield y,
boost::asio::deadline_timer *formatter_flush_cond);
-
+
/**
* When the request is being executed in a coroutine, performs
* the actual formatter flushing and is responsible for the
* termination condition (when when all partial object responses
* have been sent). Note that the formatter flushing must be handled
- * on the coroutine that invokes the execute method vs. the
+ * on the coroutine that invokes the execute method vs. the
* coroutines that are spawned to handle individual objects because
* the flush logic uses a yield context that was captured
* and saved on the req_state vs. one that is passed on the stack.
{
if (delete_at == boost::none) {
return;
- }
+ }
bufferlist delatbl;
encode(*delete_at, delatbl);
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
+ * License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
- *
+ *
*/
#pragma once
void dump(Formatter *f) const;
};
WRITE_CLASS_ENCODER(RGWOrphanSearchStage)
-
+
struct RGWOrphanSearchInfo {
std::string job_name;
rgw_pool pool;
std::string& bucket_name,
rgw_obj_key& obj_key,
std::set<std::string>& obj_oids);
- int pop_and_handle_stat_op(const DoutPrefixProvider *dpp,
+ int pop_and_handle_stat_op(const DoutPrefixProvider *dpp,
RGWObjectCtx& obj_ctx,
std::deque<RGWRados::Object::Stat>& ops);
include_rgw_obj_name(false)
{}
- int process_bucket(const DoutPrefixProvider *dpp,
+ int process_bucket(const DoutPrefixProvider *dpp,
const std::string& bucket_instance_id,
const std::string& prefix,
const std::set<rgw_obj_key>& entries_filter);
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
#pragma once
+
#include "include/common_fwd.h"
extern PerfCounters *perfcounter;
ceph::make_timespan(g_conf()->rgw_op_thread_suicide_timeout),
&m_tp) {
}
-
+
virtual ~RGWProcess() = default;
const RGWProcessEnv& get_env() const { return env; }
rgw::flight::FlightStore* flight_store;
#endif
};
-
+
class RGWGetBucketTags_ObjStore : public RGWGetBucketTags {
public:
RGWGetBucketTags_ObjStore() = default;
- virtual ~RGWGetBucketTags_ObjStore() = default;
+ virtual ~RGWGetBucketTags_ObjStore() = default;
};
class RGWPutBucketTags_ObjStore: public RGWPutBucketTags {
public:
RGWPutBucketTags_ObjStore() = default;
- virtual ~RGWPutBucketTags_ObjStore() = default;
+ virtual ~RGWPutBucketTags_ObjStore() = default;
};
class RGWGetBucketReplication_ObjStore : public RGWGetBucketReplication {
class RGWPutBucketReplication_ObjStore: public RGWPutBucketReplication {
public:
RGWPutBucketReplication_ObjStore() = default;
- virtual ~RGWPutBucketReplication_ObjStore() = default;
+ virtual ~RGWPutBucketReplication_ObjStore() = default;
};
class RGWDeleteBucketReplication_ObjStore: public RGWDeleteBucketReplication {
public:
RGWDeleteBucketReplication_ObjStore() = default;
- virtual ~RGWDeleteBucketReplication_ObjStore() = default;
+ virtual ~RGWDeleteBucketReplication_ObjStore() = default;
};
class RGWListBuckets_ObjStore : public RGWListBuckets {
std::optional<RGWRESTGenerateHTTPHeaders> headers_gen;
RGWEnv new_env;
req_info new_info;
-
+
protected:
std::optional<std::string> api_name;
HostStyle host_style;
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
#include <string_view>
#include <boost/container/static_vector.hpp>
-#include <boost/crc.hpp>
+#include <boost/crc.hpp>
#include "common/sstring.hh"
#include "rgw_op.h"
int get_session_token(const DoutPrefixProvider* dpp, const std::string_view& session_token,
STS::SessionToken& token) const;
- result_t authenticate(const DoutPrefixProvider* dpp,
+ result_t authenticate(const DoutPrefixProvider* dpp,
const std::string_view& access_key_id,
const std::string_view& signature,
const std::string_view& session_token,
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
+ * License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
- *
+ *
*/
#pragma once
-
+
#include "rgw_rest_s3.h"
class RGWHandler_REST_S3Website : public RGWHandler_REST_S3 {
std::string get_role_name(const string& role_arn) const;
std::string get_cert_url(const std::string& iss, const DoutPrefixProvider *dpp,optional_yield y) const;
-
+
std::tuple<boost::optional<WebTokenEngine::token_t>, boost::optional<WebTokenEngine::principal_tags_t>>
get_from_jwt(const DoutPrefixProvider* dpp, const std::string& token, const req_state* const s, optional_yield y) const;
public:
RGWRESTMgr_STS() = default;
~RGWRESTMgr_STS() override = default;
-
+
RGWRESTMgr *get_resource_mgr(req_state* const s,
const std::string& uri,
std::string* const out_uri) override {
rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) = 0;
/** No-req_state variant (e.g., rgwlc) */
virtual std::unique_ptr<Notification> get_notification(
- const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj,
+ const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj,
rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket, std::string& _user_id, std::string& _user_tenant,
std::string& _req_id, optional_yield y) = 0;
DBStore* store;
RGWRealm *realm{nullptr};
DBZoneGroup *zonegroup{nullptr};
- RGWZone *zone_public_config{nullptr}; /* external zone params, e.g., entrypoints, log flags, etc. */
+ RGWZone *zone_public_config{nullptr}; /* external zone params, e.g., entrypoints, log flags, etc. */
RGWZoneParams *zone_params{nullptr}; /* internal zone params, e.g., rados pools */
RGWPeriod *current_period{nullptr};
* MultipartUpload::Init - create head object of meta obj (src_obj_name + "." + upload_id)
* [ Meta object stores all the parts upload info]
* MultipartWriter::process - create all data/tail objects with obj_name same as
- * meta obj (so that they can all be identified & deleted
+ * meta obj (so that they can all be identified & deleted
* during abort)
* MultipartUpload::Abort - Just delete meta obj .. that will indirectly delete all the
* uploads associated with that upload id / meta obj so far.
int64_t end, RGWGetDataCB* cb,
optional_yield y) override;
- virtual int get_attr(const DoutPrefixProvider* dpp, const char* name, bufferlist& dest, optional_yield y) override;
+ virtual int get_attr(const DoutPrefixProvider* dpp, const char* name, bufferlist& dest, optional_yield y) override;
};
struct DBDeleteOp : public DeleteOp {
rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket,
std::string& _user_id, std::string& _user_tenant, std::string& _req_id,
optional_yield y) override;
-
+
virtual RGWLC* get_rgwlc(void) override;
virtual RGWCoroutinesManagerRegistry* get_cr_registry() override { return NULL; }
virtual int log_usage(const DoutPrefixProvider *dpp, std::map<rgw_user_bucket, RGWUsageBatch>& usage_info) override;
rgw::notify::EventType event_type, optional_yield y,
const std::string* object_name=nullptr) override;
virtual std::unique_ptr<Notification> get_notification(
- const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj,
+ const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj,
+
rgw::notify::EventType event_type, rgw::sal::Bucket* _bucket,
std::string& _user_id, std::string& _user_tenant,
std::string& _req_id, optional_yield y) override;
const TempURLApplier::Factory* const apl_factory;
/* Helper methods. */
- void get_owner_info(const DoutPrefixProvider* dpp,
+ void get_owner_info(const DoutPrefixProvider* dpp,
const req_state* s,
RGWUserInfo& owner_info,
optional_yield y) const;
};
WRITE_CLASS_ENCODER(rgw_sync_pipe_source_params)
-struct rgw_sync_pipe_dest_params {
+struct rgw_sync_pipe_dest_params {
std::optional<rgw_sync_pipe_acl_translation> acl_translation;
std::optional<std::string> storage_class;
void bencode_end(bufferlist& bl) { bl.append('e'); }
//single values
- void bencode(int value, bufferlist& bl)
+ void bencode(int value, bufferlist& bl)
{
bl.append('i');
char info[100] = { 0 };
}
//single values
- void bencode(const std::string& str, bufferlist& bl)
+ void bencode(const std::string& str, bufferlist& bl)
{
bencode_key(str, bl);
}
//dictionary elements
- void bencode(const std::string& key, int value, bufferlist& bl)
+ void bencode(const std::string& key, int value, bufferlist& bl)
{
bencode_key(key, bl);
bencode(value, bl);
}
//dictionary elements
- void bencode(const std::string& key, const std::string& value, bufferlist& bl)
+ void bencode(const std::string& key, const std::string& value, bufferlist& bl)
{
bencode_key(key, bl);
bencode(value, bl);
}
//key len
- void bencode_key(const std::string& key, bufferlist& bl)
+ void bencode_key(const std::string& key, bufferlist& bl)
{
int len = key.length();
- char info[100] = { 0 };
+ char info[100] = { 0 };
sprintf(info, "%d:", len);
bl.append(info, strlen(info));
- bl.append(key.c_str(), len);
+ bl.append(key.c_str(), len);
}
};
uint64_t &total_len,
ceph::bufferlist &bl_data,
rgw_obj &obj);
-
+
off_t get_data_len();
bool get_flag();
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab ft=cpp
/*
*
* This is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
- * License version 2.1, as published by the Free Software
+ * License version 2.1, as published by the Free Software
* Foundation. See file COPYING.
- *
+ *
*/
#pragma once
protected:
// if objects are created while parsing, this should be implemented in the derived class
// and be a factory for creating the classes derived from XMLObj
- // note that not all sub-tags has to be constructed here, any such tag which is not
+ // note that not all sub-tags has to be constructed here, any such tag which is not
// constructed will be lazily created when decode_xml() is invoked on it
//
// note that in case of different tags sharing the same name at different levels