return 0;
}
+void cls_rgw_bi_put(ObjectWriteOperation& op, const string oid, rgw_cls_bi_entry& entry)
+{
+ bufferlist in, out;
+ struct rgw_cls_bi_put_op call;
+ call.entry = entry;
+ ::encode(call, in);
+ op.exec("rgw", "bi_put", in);
+}
+
int cls_rgw_bi_list(librados::IoCtx& io_ctx, const string oid,
const string& name, const string& marker, uint32_t max,
list<rgw_cls_bi_entry> *entries, bool *is_truncated)
BIIndexType index_type, cls_rgw_obj_key& key,
rgw_cls_bi_entry *entry);
int cls_rgw_bi_put(librados::IoCtx& io_ctx, const string oid, rgw_cls_bi_entry& entry);
+void cls_rgw_bi_put(librados::ObjectWriteOperation& op, const string oid, rgw_cls_bi_entry& entry);
int cls_rgw_bi_list(librados::IoCtx& io_ctx, const string oid,
const string& name, const string& marker, uint32_t max,
list<rgw_cls_bi_entry> *entries, bool *is_truncated);
dump_bi_entry(data, type, f);
}
+void rgw_cls_bi_entry::get_key(cls_rgw_obj_key *key)
+{
+ bufferlist::iterator iter = data.begin();
+ switch (type) {
+ case PlainIdx:
+ case InstanceIdx:
+ {
+ rgw_bucket_dir_entry entry;
+ ::decode(entry, iter);
+ *key = entry.key;
+ }
+ break;
+ case OLHIdx:
+ {
+ rgw_bucket_olh_entry entry;
+ ::decode(entry, iter);
+ *key = entry.key;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
void rgw_bucket_olh_entry::dump(Formatter *f) const
{
encode_json("key", key, f);
void dump(Formatter *f) const;
void decode_json(JSONObj *obj, cls_rgw_obj_key *effective_key = NULL);
+
+ void get_key(cls_rgw_obj_key *key);
};
WRITE_CLASS_ENCODER(rgw_cls_bi_entry)