return r;
}
+int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid, const cls_rgw_obj_key& key,
+ bool delete_marker, const string& op_tag)
+{
+ bufferlist in, out;
+ struct cls_rgw_link_olh_op call;
+ call.key = key;
+ call.op_tag = op_tag;
+ call.delete_marker = delete_marker;
+ ::encode(call, in);
+ int r = io_ctx.exec(oid, "rgw", "bucket_link_olh", in, out);
+ if (r < 0)
+ return r;
+
+ return 0;
+}
+
int cls_rgw_bucket_check_index_op(IoCtx& io_ctx, string& oid,
rgw_bucket_dir_header *existing_header,
rgw_bucket_dir_header *calculated_header)
const string& filter_prefix, uint32_t num_entries,
rgw_bucket_dir *dir, bool *is_truncated);
+int cls_rgw_bucket_link_olh(librados::IoCtx& io_ctx, const string& oid, const cls_rgw_obj_key& key,
+ bool delete_marker, const string& op_tag);
+
int cls_rgw_bucket_check_index_op(librados::IoCtx& io_ctx, string& oid,
rgw_bucket_dir_header *existing_header,
rgw_bucket_dir_header *calculated_header);
return 0;
}
+int RGWRados::bucket_index_link_olh(rgw_obj& obj_instance, bool delete_marker, const string& op_tag)
+{
+ rgw_rados_ref ref;
+ rgw_bucket bucket;
+ int r = get_obj_ref(obj_instance, &ref, &bucket);
+ if (r < 0) {
+ return r;
+ }
+
+ librados::IoCtx index_ctx;
+ string oid;
+
+ int ret = open_bucket_index(bucket, index_ctx, oid);
+ if (ret < 0) {
+ return ret;
+ }
+
+ cls_rgw_obj_key key(obj_instance.get_index_key_name(), obj_instance.get_instance());
+ ret = cls_rgw_bucket_link_olh(index_ctx, oid, key, delete_marker, op_tag);
+ if (ret < 0) {
+ return ret;
+ }
+
+ return 0;
+}
+
static void filter_attrset(map<string, bufferlist>& unfiltered_attrset, const string& check_prefix,
map<string, bufferlist> *attrset)
{
int obj_operate(rgw_obj& obj, librados::ObjectReadOperation *op);
int olh_init_modification(rgw_obj& obj, string *tag);
+ int bucket_index_link_olh(rgw_obj& obj_instance, bool delete_marker, const string& op_tag);
int follow_olh(map<string, bufferlist>& attrset, rgw_obj& target);
int get_olh(rgw_obj& obj, RGWOLHInfo *olh);