utime_t now = ceph_clock_now(cct);
return store->time_log_add(oid, now, section, key, bl);
}
+ int list_entries(RGWRados *store, string& section, string& key,
+ utime_t& from_time, utime_t& end_time,
+ list<cls_log_entry>& entries,
+ string& marker, bool *truncated) {
+ string oid;
+
+ store->shard_name(prefix, cct->_conf->rgw_md_log_max_shards, section, key, oid);
+ return store->time_log_list(oid, from_time, end_time, 0, entries, marker, truncated);
+ }
};
obj_version& RGWMetadataObject::get_version()
return r;
}
+int RGWRados::time_log_list(const string& oid, utime_t& start_time, utime_t& end_time,
+ int max_entries, list<cls_log_entry>& entries, string& marker, bool *truncated)
+{
+ librados::IoCtx io_ctx;
+
+ librados::ObjectReadOperation op;
+ cls_log_list(op, start_time, end_time, marker, max_entries, entries, &marker, truncated);
+
+ bufferlist obl;
+
+ int ret = io_ctx.operate(oid, &op, &obl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
int RGWRados::decode_policy(bufferlist& bl, ACLOwner *owner)
{
bufferlist::iterator i = bl.begin();
#include "rgw_common.h"
#include "cls/rgw/cls_rgw_types.h"
#include "cls/version/cls_version_types.h"
+#include "cls/log/cls_log_types.h"
#include "rgw_log.h"
#include "rgw_metadata.h"
void shard_name(const string& prefix, unsigned max_shards, string& key, string& name);
void shard_name(const string& prefix, unsigned max_shards, string& section, string& key, string& name);
int time_log_add(const string& oid, const utime_t& ut, string& section, string& key, bufferlist& bl);
+ int time_log_list(const string& oid, utime_t& start_time, utime_t& end_time,
+ int max_entries, list<cls_log_entry>& entries, string& marker, bool *truncated);
/// clean up/process any temporary objects older than given date[/time]
int remove_temp_objects(string date, string time);