From: Casey Bodley Date: Thu, 28 Jan 2016 19:53:58 +0000 (-0500) Subject: rgw: remove unneeded RGWRados arg for RGWMetadataLog X-Git-Tag: v10.1.0~354^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1999c57d8cbbe07d684caa49ca5b2d0b5f7b4442;p=ceph.git rgw: remove unneeded RGWRados arg for RGWMetadataLog Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_metadata.cc b/src/rgw/rgw_metadata.cc index 97a5a5ce0e2c..11e83771e251 100644 --- a/src/rgw/rgw_metadata.cc +++ b/src/rgw/rgw_metadata.cc @@ -86,7 +86,7 @@ void RGWMetadataLogData::decode_json(JSONObj *obj) { } -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; @@ -102,7 +102,7 @@ int RGWMetadataLog::add_entry(RGWRados *store, RGWMetadataHandler *handler, cons 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; @@ -115,7 +115,7 @@ int RGWMetadataLog::get_log_shard_id(RGWRados *store, RGWMetadataHandler *handle return shard_id; } -int RGWMetadataLog::store_entries_in_shard(RGWRados *store, list& entries, int shard_id, librados::AioCompletion *completion) +int RGWMetadataLog::store_entries_in_shard(list& entries, int shard_id, librados::AioCompletion *completion) { string oid; @@ -373,7 +373,7 @@ RGWMetadataManager::~RGWMetadataManager() int RGWMetadataManager::store_md_log_entries(list& 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) @@ -663,7 +663,7 @@ int RGWMetadataManager::pre_modify(RGWMetadataHandler *handler, string& section, 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; @@ -681,7 +681,7 @@ int RGWMetadataManager::post_modify(RGWMetadataHandler *handler, const string& s 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; diff --git a/src/rgw/rgw_metadata.h b/src/rgw/rgw_metadata.h index 58b1f3922cc9..16c26f476ced 100644 --- a/src/rgw/rgw_metadata.h +++ b/src/rgw/rgw_metadata.h @@ -156,9 +156,9 @@ class RGWMetadataLog { 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& 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& entries, int shard_id, librados::AioCompletion *completion); struct LogListCtx { int cur_shard; @@ -270,7 +270,7 @@ public: 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; }