}
-int RGWMetadataLog::add_entry(RGWRados *store, RGWMetadataHandler *handler, const string& section, const string& key, bufferlist& bl) {
+int RGWMetadataLog::add_entry(RGWMetadataHandler *handler, const string& section, const string& key, bufferlist& bl) {
if (!store->need_to_log_metadata())
return 0;
return store->time_log_add(oid, now, section, key, bl);
}
-int RGWMetadataLog::get_log_shard_id(RGWRados *store, RGWMetadataHandler *handler, const string& section, const string& key)
+int RGWMetadataLog::get_log_shard_id(RGWMetadataHandler *handler, const string& section, const string& key)
{
string oid;
return shard_id;
}
-int RGWMetadataLog::store_entries_in_shard(RGWRados *store, list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion)
+int RGWMetadataLog::store_entries_in_shard(list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion)
{
string oid;
int RGWMetadataManager::store_md_log_entries(list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion)
{
- return md_log->store_entries_in_shard(store, entries, shard_id, completion);
+ return md_log->store_entries_in_shard(entries, shard_id, completion);
}
int RGWMetadataManager::register_handler(RGWMetadataHandler *handler)
bufferlist logbl;
::encode(log_data, logbl);
- int ret = md_log->add_entry(store, handler, section, key, logbl);
+ int ret = md_log->add_entry(handler, section, key, logbl);
if (ret < 0)
return ret;
bufferlist logbl;
::encode(log_data, logbl);
- int r = md_log->add_entry(store, handler, section, key, logbl);
+ int r = md_log->add_entry(handler, section, key, logbl);
if (ret < 0)
return ret;
public:
RGWMetadataLog(CephContext *_cct, RGWRados *_store) : cct(_cct), store(_store), prefix(META_LOG_OBJ_PREFIX), lock("RGWMetaLog::lock") {}
- int add_entry(RGWRados *store, RGWMetadataHandler *handler, const string& section, const string& key, bufferlist& bl);
- int get_log_shard_id(RGWRados *store, RGWMetadataHandler *handler, const string& section, const string& key);
- int store_entries_in_shard(RGWRados *store, list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
+ int add_entry(RGWMetadataHandler *handler, const string& section, const string& key, bufferlist& bl);
+ int get_log_shard_id(RGWMetadataHandler *handler, const string& section, const string& key);
+ int store_entries_in_shard(list<cls_log_entry>& entries, int shard_id, librados::AioCompletion *completion);
struct LogListCtx {
int cur_shard;
return -EINVAL;
}
- *shard_id = md_log->get_log_shard_id(store, handler, section, key);
+ *shard_id = md_log->get_log_shard_id(handler, section, key);
return 0;
}