RGWObjState *astate = nullptr;
RGWObjManifest* manifest = nullptr;
- RGWObjectCtx rctx(this->driver);
- r = get_obj_state(dpp, &rctx, bucket_info, obj, &astate, &manifest, false, y);
+ RGWObjectCtx octx(this->driver);
+ r = get_obj_state(dpp, &octx, bucket_info, obj, &astate, &manifest, false, y);
if (r < 0)
return r;
handler, y);
}
-int RGWRados::Object::Write::_do_write_meta(const DoutPrefixProvider *dpp,
- uint64_t size, uint64_t accounted_size,
+int RGWRados::Object::Write::_do_write_meta(uint64_t size, uint64_t accounted_size,
map<string, bufferlist>& attrs,
bool assume_noent, bool modify_tail,
- void *_index_op, optional_yield y)
+ void *_index_op, const req_context& rctx)
{
RGWRados::Bucket::UpdateIndex *index_op = static_cast<RGWRados::Bucket::UpdateIndex *>(_index_op);
RGWRados *store = target->get_store();
RGWObjState *state;
RGWObjManifest *manifest = nullptr;
- int r = target->get_state(dpp, &state, &manifest, false, y, assume_noent);
+ int r = target->get_state(rctx.dpp, &state, &manifest, false, rctx.y, assume_noent);
if (r < 0)
return r;
rgw_obj& obj = target->get_obj();
if (obj.get_oid().empty()) {
- ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: " << __func__ << "(): cannot write object with empty name" << dendl;
return -EIO;
}
rgw_rados_ref ref;
- r = store->get_obj_head_ref(dpp, target->get_meta_placement_rule(), obj, &ref);
+ r = store->get_obj_head_ref(rctx.dpp, target->get_meta_placement_rule(), obj, &ref);
if (r < 0)
return r;
if (!ptag && !index_op->get_optag()->empty()) {
ptag = index_op->get_optag();
}
- r = target->prepare_atomic_modification(dpp, op, reset_obj, ptag, meta.if_match, meta.if_nomatch, false, modify_tail, y);
+ r = target->prepare_atomic_modification(rctx.dpp, op, reset_obj, ptag, meta.if_match, meta.if_nomatch, false, modify_tail, rctx.y);
if (r < 0)
return r;
if (!index_op->is_prepared()) {
tracepoint(rgw_rados, prepare_enter, req_id.c_str());
- r = index_op->prepare(dpp, CLS_RGW_OP_ADD, &state->write_tag, y);
+ r = index_op->prepare(rctx.dpp, CLS_RGW_OP_ADD, &state->write_tag, rctx.y);
tracepoint(rgw_rados, prepare_exit, req_id.c_str());
if (r < 0)
return r;
auto& ioctx = ref.pool.ioctx();
tracepoint(rgw_rados, operate_enter, req_id.c_str());
- r = rgw_rados_operate(dpp, ref.pool.ioctx(), ref.obj.oid, &op, y);
+ r = rgw_rados_operate(rctx.dpp, ref.pool.ioctx(), ref.obj.oid, &op, rctx.y);
tracepoint(rgw_rados, operate_exit, req_id.c_str());
if (r < 0) { /* we can expect to get -ECANCELED if object was replaced under,
or -ENOENT if was removed, or -EEXIST if it did not exist
epoch = ioctx.get_last_version();
poolid = ioctx.get_id();
- r = target->complete_atomic_modification(dpp, y);
+ r = target->complete_atomic_modification(rctx.dpp, rctx.y);
if (r < 0) {
- ldpp_dout(dpp, 0) << "ERROR: complete_atomic_modification returned r=" << r << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: complete_atomic_modification returned r=" << r << dendl;
}
tracepoint(rgw_rados, complete_enter, req_id.c_str());
- r = index_op->complete(dpp, poolid, epoch, size, accounted_size,
+ r = index_op->complete(rctx.dpp, poolid, epoch, size, accounted_size,
meta.set_mtime, etag, content_type,
storage_class, &acl_bl,
- meta.category, meta.remove_objs, y,
+ meta.category, meta.remove_objs, rctx.y,
meta.user_data, meta.appendable);
tracepoint(rgw_rados, complete_exit, req_id.c_str());
if (r < 0)
state = NULL;
if (versioned_op && meta.olh_epoch) {
- r = store->set_olh(dpp, target->get_ctx(), target->get_bucket_info(), obj, false, NULL, *meta.olh_epoch, real_time(), false, y, meta.zones_trace);
+ r = store->set_olh(rctx.dpp, target->get_ctx(), target->get_bucket_info(), obj, false, NULL, *meta.olh_epoch, real_time(), false, rctx.y, meta.zones_trace);
if (r < 0) {
return r;
}
rgw_obj_index_key obj_key;
obj.key.get_index_key(&obj_key);
- r = store->obj_expirer->hint_add(dpp, meta.delete_at, obj.bucket.tenant, obj.bucket.name,
+ r = store->obj_expirer->hint_add(rctx.dpp, meta.delete_at, obj.bucket.tenant, obj.bucket.name,
obj.bucket.bucket_id, obj_key);
if (r < 0) {
- ldpp_dout(dpp, 0) << "ERROR: objexp_hint_add() returned r=" << r << ", object will not get removed" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: objexp_hint_add() returned r=" << r << ", object will not get removed" << dendl;
/* ignoring error, nothing we can do at this point */
}
}
return 0;
done_cancel:
- int ret = index_op->cancel(dpp, meta.remove_objs, y);
+ int ret = index_op->cancel(rctx.dpp, meta.remove_objs, rctx.y);
if (ret < 0) {
- ldpp_dout(dpp, 0) << "ERROR: index_op.cancel() returned ret=" << ret << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: index_op.cancel() returned ret=" << ret << dendl;
}
meta.canceled = true;
return r;
}
-int RGWRados::Object::Write::write_meta(const DoutPrefixProvider *dpp, uint64_t size, uint64_t accounted_size,
- map<string, bufferlist>& attrs, optional_yield y)
+int RGWRados::Object::Write::write_meta(uint64_t size, uint64_t accounted_size,
+ map<string, bufferlist>& attrs, const req_context& rctx)
{
RGWBucketInfo& bucket_info = target->get_bucket_info();
bool assume_noent = (meta.if_match == NULL && meta.if_nomatch == NULL);
int r;
if (assume_noent) {
- r = _do_write_meta(dpp, size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
+ r = _do_write_meta(size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, rctx);
if (r == -EEXIST) {
assume_noent = false;
}
}
if (!assume_noent) {
- r = _do_write_meta(dpp, size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, y);
+ r = _do_write_meta(size, accounted_size, attrs, assume_noent, meta.modify_tail, (void *)&index_op, rctx);
}
return r;
}
int RGWRados::rewrite_obj(RGWBucketInfo& dest_bucket_info, const rgw_obj& obj, const DoutPrefixProvider *dpp, optional_yield y)
{
- RGWObjectCtx rctx(this->driver);
+ RGWObjectCtx octx(this->driver);
rgw::sal::Attrs attrset;
uint64_t obj_size;
ceph::real_time mtime;
- RGWRados::Object op_target(this, dest_bucket_info, rctx, obj);
+ RGWRados::Object op_target(this, dest_bucket_info, octx, obj);
RGWRados::Object::Read read_op(&op_target);
read_op.params.attrs = &attrset;
attrset.erase(RGW_ATTR_TAIL_TAG);
attrset.erase(RGW_ATTR_STORAGE_CLASS);
- return copy_obj_data(rctx, dest_bucket_info, dest_bucket_info.placement_rule,
+ return copy_obj_data(octx, dest_bucket_info, dest_bucket_info.placement_rule,
read_op, obj_size - 1, obj, NULL, mtime,
attrset, 0, real_time(), NULL, dpp, y);
}
string *petag,
void (*progress_cb)(off_t, void *),
void *progress_data,
- const DoutPrefixProvider *dpp,
- RGWFetchObjFilter *filter, optional_yield y,
+ const req_context& rctx,
+ RGWFetchObjFilter *filter,
bool stat_follow_olh,
const rgw_obj& stat_dest_obj,
const rgw_zone_set_entry& source_trace_entry,
using namespace rgw::putobj;
AtomicObjectProcessor processor(&aio, this, dest_bucket_info, nullptr,
user_id, obj_ctx, dest_obj, olh_epoch,
- tag, dpp, y);
+ tag, rctx.dpp, rctx.y);
RGWRESTConn *conn;
auto& zone_conn_map = svc.zone->get_zone_conn_map();
auto& zonegroup_conn_map = svc.zone->get_zonegroup_conn_map();
} else {
map<string, RGWRESTConn *>::iterator iter = zonegroup_conn_map.find(src_bucket_info->zonegroup);
if (iter == zonegroup_conn_map.end()) {
- ldpp_dout(dpp, 0) << "could not find zonegroup connection to zonegroup: " << source_zone << dendl;
+ ldpp_dout(rctx.dpp, 0) << "could not find zonegroup connection to zonegroup: " << source_zone << dendl;
return -ENOENT;
}
conn = iter->second;
} else {
auto iter = zone_conn_map.find(source_zone);
if (iter == zone_conn_map.end()) {
- ldpp_dout(dpp, 0) << "could not find zone connection to zone: " << source_zone << dendl;
+ ldpp_dout(rctx.dpp, 0) << "could not find zone connection to zone: " << source_zone << dendl;
return -ENOENT;
}
conn = iter->second;
std::optional<rgw_user> override_owner;
- RGWRadosPutObj cb(dpp, cct, plugin, compressor, &processor, progress_cb, progress_data,
+ RGWRadosPutObj cb(rctx.dpp, cct, plugin, compressor, &processor, progress_cb, progress_data,
[&](map<string, bufferlist>& obj_attrs) {
const rgw_placement_rule *ptail_rule;
&override_owner,
&ptail_rule);
if (ret < 0) {
- ldpp_dout(dpp, 5) << "Aborting fetch: source object filter returned ret=" << ret << dendl;
+ ldpp_dout(rctx.dpp, 5) << "Aborting fetch: source object filter returned ret=" << ret << dendl;
return ret;
}
if (compression_type != "none") {
plugin = Compressor::create(cct, compression_type);
if (!plugin) {
- ldpp_dout(dpp, 1) << "Cannot load plugin for compression type "
+ ldpp_dout(rctx.dpp, 1) << "Cannot load plugin for compression type "
<< compression_type << dendl;
}
}
- ret = processor.prepare(y);
+ ret = processor.prepare(rctx.y);
if (ret < 0) {
return ret;
}
if (copy_if_newer) {
/* need to get mtime for destination */
- ret = get_obj_state(dpp, &obj_ctx, dest_bucket_info, stat_dest_obj, &dest_state, &manifest, stat_follow_olh, y);
+ ret = get_obj_state(rctx.dpp, &obj_ctx, dest_bucket_info, stat_dest_obj, &dest_state, &manifest, stat_follow_olh, rctx.y);
if (ret < 0)
goto set_err_state;
static constexpr bool sync_manifest = true;
static constexpr bool skip_decrypt = true;
static constexpr bool sync_cloudtiered = true;
- ret = conn->get_obj(dpp, user_id, info, src_obj, pmod, unmod_ptr,
+ ret = conn->get_obj(rctx.dpp, user_id, info, src_obj, pmod, unmod_ptr,
dest_mtime_weight.zone_short_id, dest_mtime_weight.pg_ver,
prepend_meta, get_op, rgwx_stat,
sync_manifest, skip_decrypt, &dst_zone_trace,
}
ret = conn->complete_request(in_stream_req, &etag, &set_mtime,
- &expected_size, nullptr, nullptr, y);
+ &expected_size, nullptr, nullptr, rctx.y);
if (ret < 0) {
goto set_err_state;
}
}
if (cb.get_data_len() != expected_size) {
ret = -EIO;
- ldpp_dout(dpp, 0) << "ERROR: object truncated during fetching, expected "
+ ldpp_dout(rctx.dpp, 0) << "ERROR: object truncated during fetching, expected "
<< expected_size << " bytes but received " << cb.get_data_len() << dendl;
goto set_err_state;
}
auto& obj_attrs = cb.get_attrs();
RGWUserInfo owner_info;
- if (ctl.user->get_info_by_uid(dpp, *override_owner, &owner_info, y) < 0) {
- ldpp_dout(dpp, 10) << "owner info does not exist" << dendl;
+ if (ctl.user->get_info_by_uid(rctx.dpp, *override_owner, &owner_info, rctx.y) < 0) {
+ ldpp_dout(rctx.dpp, 10) << "owner info does not exist" << dendl;
return -EINVAL;
}
auto aiter = obj_attrs.find(RGW_ATTR_ACL);
if (aiter == obj_attrs.end()) {
- ldpp_dout(dpp, 0) << "WARNING: " << __func__ << "(): object doesn't have ACL attribute, setting default ACLs" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "WARNING: " << __func__ << "(): object doesn't have ACL attribute, setting default ACLs" << dendl;
acl.create_default(owner_info.user_id, owner_info.display_name);
} else {
auto iter = aiter->second.cbegin();
try {
acl.decode(iter);
} catch (buffer::error& err) {
- ldpp_dout(dpp, 0) << "ERROR: " << __func__ << "(): could not decode policy, caught buffer::error" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: " << __func__ << "(): could not decode policy, caught buffer::error" << dendl;
return -EIO;
}
}
try {
decode(delete_at, iter->second);
} catch (buffer::error& err) {
- ldpp_dout(dpp, 0) << "ERROR: failed to decode delete_at field in intra zone copy" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: failed to decode delete_at field in intra zone copy" << dendl;
}
}
}
try {
decode(pg_ver, iter);
} catch (buffer::error& err) {
- ldpp_dout(dpp, 0) << "ERROR: failed to decode pg ver attribute, ignoring" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: failed to decode pg ver attribute, ignoring" << dendl;
/* non critical error */
}
}
if (verifier_etag != trimmed_etag) {
ret = -EIO;
- ldpp_dout(dpp, 0) << "ERROR: source and destination objects don't match. Expected etag:"
+ ldpp_dout(rctx.dpp, 0) << "ERROR: source and destination objects don't match. Expected etag:"
<< trimmed_etag << " Computed etag:" << verifier_etag << dendl;
goto set_err_state;
}
bool canceled = false;
ret = processor.complete(cb.get_data_len(), etag, mtime, set_mtime,
attrs, delete_at, nullptr, nullptr, nullptr,
- zones_trace, &canceled, y);
+ zones_trace, &canceled, rctx);
if (ret < 0) {
goto set_err_state;
}
if (copy_if_newer && canceled) {
- ldpp_dout(dpp, 20) << "raced with another write of obj: " << dest_obj << dendl;
+ ldpp_dout(rctx.dpp, 20) << "raced with another write of obj: " << dest_obj << dendl;
obj_ctx.invalidate(dest_obj); /* object was overwritten */
- ret = get_obj_state(dpp, &obj_ctx, dest_bucket_info, stat_dest_obj, &dest_state, &manifest, stat_follow_olh, y);
+ ret = get_obj_state(rctx.dpp, &obj_ctx, dest_bucket_info, stat_dest_obj, &dest_state, &manifest, stat_follow_olh, rctx.y);
if (ret < 0) {
- ldpp_dout(dpp, 0) << "ERROR: " << __func__ << ": get_err_state() returned ret=" << ret << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: " << __func__ << ": get_err_state() returned ret=" << ret << dendl;
goto set_err_state;
}
dest_mtime_weight.init(dest_state);
dest_mtime_weight.high_precision = high_precision_time;
if (!dest_state->exists ||
dest_mtime_weight < set_mtime_weight) {
- ldpp_dout(dpp, 20) << "retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
+ ldpp_dout(rctx.dpp, 20) << "retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
continue;
} else {
- ldpp_dout(dpp, 20) << "not retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
+ ldpp_dout(rctx.dpp, 20) << "not retrying writing object mtime=" << set_mtime << " dest_state->mtime=" << dest_state->mtime << " dest_state->exists=" << dest_state->exists << dendl;
}
}
break;
}
if (i == MAX_COMPLETE_RETRY) {
- ldpp_dout(dpp, 0) << "ERROR: retried object completion too many times, something is wrong!" << dendl;
+ ldpp_dout(rctx.dpp, 0) << "ERROR: retried object completion too many times, something is wrong!" << dendl;
ret = -EIO;
goto set_err_state;
}
// for OP_LINK_OLH to call set_olh() with a real olh_epoch
if (olh_epoch && *olh_epoch > 0) {
constexpr bool log_data_change = true;
- ret = set_olh(dpp, obj_ctx, dest_bucket_info, dest_obj, false, nullptr,
- *olh_epoch, real_time(), false, y, zones_trace, log_data_change);
+ ret = set_olh(rctx.dpp, obj_ctx, dest_bucket_info, dest_obj, false, nullptr,
+ *olh_epoch, real_time(), false, rctx.y, zones_trace, log_data_change);
} else {
// we already have the latest copy
ret = 0;
if (remote_src || !source_zone.empty()) {
rgw_zone_set_entry source_trace_entry{source_zone.id, std::nullopt};
+ const req_context rctx{dpp, y, nullptr};
return fetch_remote_obj(obj_ctx, user_id, info, source_zone,
dest_obj, src_obj, dest_bucket_info, &src_bucket_info,
dest_placement, src_mtime, mtime, mod_ptr,
unmod_ptr, high_precision_time,
if_match, if_nomatch, attrs_mod, copy_if_newer, attrs, category,
- olh_epoch, delete_at, ptag, petag, progress_cb, progress_data, dpp,
- nullptr /* filter */, y, stat_follow_olh, stat_dest_obj, source_trace_entry);
+ olh_epoch, delete_at, ptag, petag, progress_cb, progress_data, rctx,
+ nullptr /* filter */, stat_follow_olh, stat_dest_obj, source_trace_entry);
}
map<string, bufferlist> src_attrs;
append_rand_alpha(cct, tag, tag, 32);
}
+ const req_context rctx{dpp, y, nullptr};
std::unique_ptr<rgw::Aio> aio;
rgw::AioResultList all_results;
if (!copy_itself) {
write_op.meta.delete_at = delete_at;
write_op.meta.modify_tail = !copy_itself;
- ret = write_op.write_meta(dpp, obj_size, astate->accounted_size, attrs, y);
+ ret = write_op.write_meta(obj_size, astate->accounted_size, attrs, rctx);
if (ret < 0) {
goto done_ret;
}
accounted_size = compressed ? cs_info.orig_size : ofs;
}
+ const req_context rctx{dpp, y, nullptr};
return processor.complete(accounted_size, etag, mtime, set_mtime, attrs, delete_at,
- nullptr, nullptr, nullptr, nullptr, nullptr, y);
+ nullptr, nullptr, nullptr, nullptr, nullptr, rctx);
}
int RGWRados::transition_obj(RGWObjectCtx& obj_ctx,
return r;
}
-int RGWRados::defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y)
+int RGWRados::defer_gc(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBucketInfo& bucket_info, const rgw_obj& obj, optional_yield y)
{
std::string oid, key;
get_obj_bucket_and_oid_loc(obj, oid, key);
- if (!rctx)
+ if (!octx)
return 0;
RGWObjState *state = NULL;
RGWObjManifest *manifest = nullptr;
- int r = get_obj_state(dpp, rctx, bucket_info, obj, &state, &manifest, false, y);
+ int r = get_obj_state(dpp, octx, bucket_info, obj, &state, &manifest, false, y);
if (r < 0)
return r;
return 0;
}
-int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx,
+int RGWRados::get_obj_state_impl(const DoutPrefixProvider *dpp, RGWObjectCtx *octx,
RGWBucketInfo& bucket_info, const rgw_obj& obj,
RGWObjState **state, RGWObjManifest** manifest,
bool follow_olh, optional_yield y, bool assume_noent)
bool need_follow_olh = follow_olh && obj.key.instance.empty();
*manifest = nullptr;
- RGWObjStateManifest *sm = rctx->get_state(obj);
+ RGWObjStateManifest *sm = octx->get_state(obj);
RGWObjState *s = &(sm->state);
- ldpp_dout(dpp, 20) << "get_obj_state: rctx=" << (void *)rctx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
+ ldpp_dout(dpp, 20) << "get_obj_state: octx=" << (void *)octx << " obj=" << obj << " state=" << (void *)s << " s->prefetch_data=" << s->prefetch_data << dendl;
*state = s;
if (sm->manifest) {
*manifest = &(*sm->manifest);
}
if (s->has_attrs) {
if (s->is_olh && need_follow_olh) {
- return get_olh_target_state(dpp, *rctx, bucket_info, obj, s, state, manifest, y);
+ return get_olh_target_state(dpp, *octx, bucket_info, obj, s, state, manifest, y);
}
return 0;
}
ldpp_dout(dpp, 20) << __func__ << ": setting s->olh_tag to " << string(s->olh_tag.c_str(), s->olh_tag.length()) << dendl;
if (need_follow_olh) {
- return get_olh_target_state(dpp, *rctx, bucket_info, obj, s, state, manifest, y);
+ return get_olh_target_state(dpp, *octx, bucket_info, obj, s, state, manifest, y);
} else if (obj.key.have_null_instance() && !sm->manifest) {
// read null version, and the head object only have olh info
s->exists = false;
return 0;
}
-int RGWRados::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *rctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, RGWObjManifest** manifest,
+int RGWRados::get_obj_state(const DoutPrefixProvider *dpp, RGWObjectCtx *octx, RGWBucketInfo& bucket_info, const rgw_obj& obj, RGWObjState **state, RGWObjManifest** manifest,
bool follow_olh, optional_yield y, bool assume_noent)
{
int ret;
do {
- ret = get_obj_state_impl(dpp, rctx, bucket_info, obj, state, manifest, follow_olh, y, assume_noent);
+ ret = get_obj_state_impl(dpp, octx, bucket_info, obj, state, manifest, follow_olh, y, assume_noent);
} while (ret == -EAGAIN);
return ret;
return 0;
}
-int RGWRados::append_atomic_test(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx,
+int RGWRados::append_atomic_test(const DoutPrefixProvider *dpp, RGWObjectCtx* octx,
RGWBucketInfo& bucket_info, const rgw_obj& obj,
ObjectOperation& op, RGWObjState **pstate,
RGWObjManifest** pmanifest, optional_yield y)
{
- if (!rctx)
+ if (!octx)
return 0;
- int r = get_obj_state(dpp, rctx, bucket_info, obj, pstate, pmanifest, false, y);
+ int r = get_obj_state(dpp, octx, bucket_info, obj, pstate, pmanifest, false, y);
if (r < 0)
return r;
* bl: the contents of the attr
* Returns: 0 on success, -ERR# otherwise.
*/
-int RGWRados::set_attr(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWBucketInfo& bucket_info, const rgw_obj& obj, const char *name, bufferlist& bl, optional_yield y)
+int RGWRados::set_attr(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBucketInfo& bucket_info, const rgw_obj& obj, const char *name, bufferlist& bl, optional_yield y)
{
map<string, bufferlist> attrs;
attrs[name] = bl;
- return set_attrs(dpp, rctx, bucket_info, obj, attrs, NULL, y);
+ return set_attrs(dpp, octx, bucket_info, obj, attrs, NULL, y);
}
-int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* rctx, RGWBucketInfo& bucket_info, const rgw_obj& src_obj,
+int RGWRados::set_attrs(const DoutPrefixProvider *dpp, RGWObjectCtx* octx, RGWBucketInfo& bucket_info, const rgw_obj& src_obj,
map<string, bufferlist>& attrs,
map<string, bufferlist>* rmattrs,
optional_yield y,
RGWObjState *state = NULL;
RGWObjManifest *manifest = nullptr;
- r = append_atomic_test(dpp, rctx, bucket_info, obj, op, &state, &manifest, y);
+ r = append_atomic_test(dpp, octx, bucket_info, obj, op, &state, &manifest, y);
if (r < 0)
return r;
RGWObjState *astate = NULL;
RGWObjManifest *manifest = nullptr;
- RGWObjectCtx rctx(this->driver);
- int r = get_obj_state(dpp, &rctx, bucket_info, obj, &astate, &manifest, false, y);
+ RGWObjectCtx octx(this->driver);
+ int r = get_obj_state(dpp, &octx, bucket_info, obj, &astate, &manifest, false, y);
if (r < 0)
return r;