Skip to content

Commit

Permalink
cls/rgw: input parameters are const
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Nov 19, 2021
1 parent b5b0068 commit a69389a
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
38 changes: 19 additions & 19 deletions src/cls/rgw/cls_rgw_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ void cls_rgw_bucket_update_stats(librados::ObjectWriteOperation& o,
o.exec(RGW_CLASS, RGW_BUCKET_UPDATE_STATS, in);
}

void cls_rgw_bucket_prepare_op(ObjectWriteOperation& o, RGWModifyOp op, string& tag,
void cls_rgw_bucket_prepare_op(ObjectWriteOperation& o, RGWModifyOp op, const string& tag,
const cls_rgw_obj_key& key, const string& locator, bool log_op,
uint16_t bilog_flags, rgw_zone_set& zones_trace)
uint16_t bilog_flags, const rgw_zone_set& zones_trace)
{
rgw_cls_obj_prepare_op call;
call.op = op;
Expand All @@ -280,13 +280,13 @@ void cls_rgw_bucket_prepare_op(ObjectWriteOperation& o, RGWModifyOp op, string&
o.exec(RGW_CLASS, RGW_BUCKET_PREPARE_OP, in);
}

void cls_rgw_bucket_complete_op(ObjectWriteOperation& o, RGWModifyOp op, string& tag,
rgw_bucket_entry_ver& ver,
void cls_rgw_bucket_complete_op(ObjectWriteOperation& o, RGWModifyOp op, const string& tag,
const rgw_bucket_entry_ver& ver,
const cls_rgw_obj_key& key,
rgw_bucket_dir_entry_meta& dir_meta,
list<cls_rgw_obj_key> *remove_objs, bool log_op,
const rgw_bucket_dir_entry_meta& dir_meta,
const list<cls_rgw_obj_key> *remove_objs, bool log_op,
uint16_t bilog_flags,
rgw_zone_set *zones_trace)
const rgw_zone_set *zones_trace)
{

bufferlist in;
Expand Down Expand Up @@ -416,7 +416,7 @@ void cls_rgw_obj_check_mtime(librados::ObjectOperation& o, const real_time& mtim
}

int cls_rgw_bi_get(librados::IoCtx& io_ctx, const string oid,
BIIndexType index_type, cls_rgw_obj_key& key,
BIIndexType index_type, const cls_rgw_obj_key& key,
rgw_cls_bi_entry *entry)
{
bufferlist in, out;
Expand All @@ -441,7 +441,7 @@ int cls_rgw_bi_get(librados::IoCtx& io_ctx, const string oid,
return 0;
}

int cls_rgw_bi_put(librados::IoCtx& io_ctx, const string oid, rgw_cls_bi_entry& entry)
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const string oid, const rgw_cls_bi_entry& entry)
{
bufferlist in, out;
rgw_cls_bi_put_op call;
Expand All @@ -454,7 +454,7 @@ int cls_rgw_bi_put(librados::IoCtx& io_ctx, const string oid, rgw_cls_bi_entry&
return 0;
}

void cls_rgw_bi_put(ObjectWriteOperation& op, const string oid, rgw_cls_bi_entry& entry)
void cls_rgw_bi_put(ObjectWriteOperation& op, const string oid, const rgw_cls_bi_entry& entry)
{
bufferlist in, out;
rgw_cls_bi_put_op call;
Expand Down Expand Up @@ -495,9 +495,9 @@ int cls_rgw_bi_list(librados::IoCtx& io_ctx, const std::string& oid,
}

int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid,
const cls_rgw_obj_key& key, bufferlist& olh_tag,
bool delete_marker, const string& op_tag, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, rgw_zone_set& zones_trace)
const cls_rgw_obj_key& key, const bufferlist& olh_tag,
bool delete_marker, const string& op_tag, const rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, const rgw_zone_set& zones_trace)
{
librados::ObjectWriteOperation op;
cls_rgw_bucket_link_olh(op, key, olh_tag, delete_marker, op_tag, meta,
Expand All @@ -509,14 +509,14 @@ int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid,


void cls_rgw_bucket_link_olh(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& key,
bufferlist& olh_tag, bool delete_marker,
const string& op_tag, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, rgw_zone_set& zones_trace)
const bufferlist& olh_tag, bool delete_marker,
const string& op_tag, const rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, const rgw_zone_set& zones_trace)
{
bufferlist in, out;
rgw_cls_link_olh_op call;
call.key = key;
call.olh_tag = string(olh_tag.c_str(), olh_tag.length());
call.olh_tag = olh_tag.to_str();
call.op_tag = op_tag;
call.delete_marker = delete_marker;
if (meta) {
Expand All @@ -533,7 +533,7 @@ void cls_rgw_bucket_link_olh(librados::ObjectWriteOperation& op, const cls_rgw_o

int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const string& oid,
const cls_rgw_obj_key& key, const string& op_tag,
const string& olh_tag, uint64_t olh_epoch, bool log_op, rgw_zone_set& zones_trace)
const string& olh_tag, uint64_t olh_epoch, bool log_op, const rgw_zone_set& zones_trace)
{
librados::ObjectWriteOperation op;
cls_rgw_bucket_unlink_instance(op, key, op_tag, olh_tag, olh_epoch, log_op, zones_trace);
Expand All @@ -546,7 +546,7 @@ int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const string& oid,

void cls_rgw_bucket_unlink_instance(librados::ObjectWriteOperation& op,
const cls_rgw_obj_key& key, const string& op_tag,
const string& olh_tag, uint64_t olh_epoch, bool log_op, rgw_zone_set& zones_trace)
const string& olh_tag, uint64_t olh_epoch, bool log_op, const rgw_zone_set& zones_trace)
{
bufferlist in, out;
rgw_cls_unlink_instance_op call;
Expand Down
36 changes: 18 additions & 18 deletions src/cls/rgw/cls_rgw_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -344,39 +344,39 @@ void cls_rgw_bucket_update_stats(librados::ObjectWriteOperation& o,
bool absolute,
const std::map<RGWObjCategory, rgw_bucket_category_stats>& stats);

void cls_rgw_bucket_prepare_op(librados::ObjectWriteOperation& o, RGWModifyOp op, std::string& tag,
void cls_rgw_bucket_prepare_op(librados::ObjectWriteOperation& o, RGWModifyOp op, const std::string& tag,
const cls_rgw_obj_key& key, const std::string& locator, bool log_op,
uint16_t bilog_op, rgw_zone_set& zones_trace);
uint16_t bilog_op, const rgw_zone_set& zones_trace);

void cls_rgw_bucket_complete_op(librados::ObjectWriteOperation& o, RGWModifyOp op, std::string& tag,
rgw_bucket_entry_ver& ver,
void cls_rgw_bucket_complete_op(librados::ObjectWriteOperation& o, RGWModifyOp op, const std::string& tag,
const rgw_bucket_entry_ver& ver,
const cls_rgw_obj_key& key,
rgw_bucket_dir_entry_meta& dir_meta,
std::list<cls_rgw_obj_key> *remove_objs, bool log_op,
uint16_t bilog_op, rgw_zone_set *zones_trace);
const rgw_bucket_dir_entry_meta& dir_meta,
const std::list<cls_rgw_obj_key> *remove_objs, bool log_op,
uint16_t bilog_op, const rgw_zone_set *zones_trace);

void cls_rgw_remove_obj(librados::ObjectWriteOperation& o, std::list<std::string>& keep_attr_prefixes);
void cls_rgw_obj_store_pg_ver(librados::ObjectWriteOperation& o, const std::string& attr);
void cls_rgw_obj_check_attrs_prefix(librados::ObjectOperation& o, const std::string& prefix, bool fail_if_exist);
void cls_rgw_obj_check_mtime(librados::ObjectOperation& o, const ceph::real_time& mtime, bool high_precision_time, RGWCheckMTimeType type);

int cls_rgw_bi_get(librados::IoCtx& io_ctx, const std::string oid,
BIIndexType index_type, cls_rgw_obj_key& key,
BIIndexType index_type, const cls_rgw_obj_key& key,
rgw_cls_bi_entry *entry);
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const std::string oid, rgw_cls_bi_entry& entry);
void cls_rgw_bi_put(librados::ObjectWriteOperation& op, const std::string oid, rgw_cls_bi_entry& entry);
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const std::string oid, const rgw_cls_bi_entry& entry);
void cls_rgw_bi_put(librados::ObjectWriteOperation& op, const std::string oid, const rgw_cls_bi_entry& entry);
int cls_rgw_bi_list(librados::IoCtx& io_ctx, const std::string& oid,
const std::string& name, const std::string& marker, uint32_t max,
std::list<rgw_cls_bi_entry> *entries, bool *is_truncated);


void cls_rgw_bucket_link_olh(librados::ObjectWriteOperation& op,
const cls_rgw_obj_key& key, ceph::buffer::list& olh_tag,
bool delete_marker, const std::string& op_tag, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, rgw_zone_set& zones_trace);
const cls_rgw_obj_key& key, const ceph::buffer::list& olh_tag,
bool delete_marker, const std::string& op_tag, const rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, const rgw_zone_set& zones_trace);
void cls_rgw_bucket_unlink_instance(librados::ObjectWriteOperation& op,
const cls_rgw_obj_key& key, const std::string& op_tag,
const std::string& olh_tag, uint64_t olh_epoch, bool log_op, rgw_zone_set& zones_trace);
const std::string& olh_tag, uint64_t olh_epoch, bool log_op, const rgw_zone_set& zones_trace);
void cls_rgw_get_olh_log(librados::ObjectReadOperation& op, const cls_rgw_obj_key& olh, uint64_t ver_marker, const std::string& olh_tag, rgw_cls_read_olh_log_ret& log_ret, int& op_ret);
void cls_rgw_trim_olh_log(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& olh, uint64_t ver, const std::string& olh_tag);
void cls_rgw_clear_olh(librados::ObjectWriteOperation& op, const cls_rgw_obj_key& olh, const std::string& olh_tag);
Expand All @@ -385,12 +385,12 @@ void cls_rgw_clear_olh(librados::ObjectWriteOperation& op, const cls_rgw_obj_key
// rgw_rados_operate() should be called after the overloads w/o calls to io_ctx.operate()
#ifndef CLS_CLIENT_HIDE_IOCTX
int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const std::string& oid,
const cls_rgw_obj_key& key, ceph::buffer::list& olh_tag,
bool delete_marker, const std::string& op_tag, rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, rgw_zone_set& zones_trace);
const cls_rgw_obj_key& key, const ceph::buffer::list& olh_tag,
bool delete_marker, const std::string& op_tag, const rgw_bucket_dir_entry_meta *meta,
uint64_t olh_epoch, ceph::real_time unmod_since, bool high_precision_time, bool log_op, const rgw_zone_set& zones_trace);
int cls_rgw_bucket_unlink_instance(librados::IoCtx& io_ctx, const std::string& oid,
const cls_rgw_obj_key& key, const std::string& op_tag,
const std::string& olh_tag, uint64_t olh_epoch, bool log_op, rgw_zone_set& zones_trace);
const std::string& olh_tag, uint64_t olh_epoch, bool log_op, const rgw_zone_set& zones_trace);
int cls_rgw_get_olh_log(librados::IoCtx& io_ctx, std::string& oid, const cls_rgw_obj_key& olh, uint64_t ver_marker,
const std::string& olh_tag, rgw_cls_read_olh_log_ret& log_ret);
int cls_rgw_clear_olh(librados::IoCtx& io_ctx, std::string& oid, const cls_rgw_obj_key& olh, const std::string& olh_tag);
Expand Down

0 comments on commit a69389a

Please sign in to comment.