]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unneeded RGWRados arg for RGWMetadataLog
authorCasey Bodley <cbodley@redhat.com>
Thu, 28 Jan 2016 19:53:58 +0000 (14:53 -0500)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 18 Feb 2016 22:04:18 +0000 (14:04 -0800)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_metadata.cc
src/rgw/rgw_metadata.h

index 97a5a5ce0e2cfb26d9ddfb2f8a97beb243ece100..11e83771e2513957e682c91ec8d46de4df5ac4c7 100644 (file)
@@ -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<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;
 
@@ -373,7 +373,7 @@ RGWMetadataManager::~RGWMetadataManager()
 
 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)
@@ -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;
 
index 58b1f3922cc951370e6c488763be5d59d2082663..16c26f476ced463e8ad5e23cd3cf2f1c0156482e 100644 (file)
@@ -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<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;
@@ -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;
   }