]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ONLY improve code formatting in rgw_object_expirer_core.{cc,h}. 10330/head
authorRadoslaw Zarzynski <rzarzynski@mirantis.com>
Fri, 15 Jul 2016 15:18:23 +0000 (17:18 +0200)
committerRadoslaw Zarzynski <rzarzynski@mirantis.com>
Mon, 18 Jul 2016 13:00:07 +0000 (15:00 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
src/rgw/rgw_object_expirer_core.cc
src/rgw/rgw_object_expirer_core.h

index 3df3fb5469fe3f1af30ad75dbcb0e02708deb7bb..1480a29fd65b23d0451d0055699df0c9dec11852 100644 (file)
@@ -145,8 +145,8 @@ void RGWObjectExpirer::trim_chunk(const string& shard,
 }
 
 bool RGWObjectExpirer::process_single_shard(const string& shard,
-                                         const utime_t& last_run,
-                                         const utime_t& round_start)
+                                            const utime_t& last_run,
+                                            const utime_t& round_start)
 {
   string marker;
   string out_marker;
@@ -170,16 +170,18 @@ bool RGWObjectExpirer::process_single_shard(const string& shard,
     dout(5) << __func__ << "(): failed to acquire lock on " << shard << dendl;
     return false;
   }
+
   do {
     real_time rt_last = last_run.to_real_time();
     real_time rt_start = round_start.to_real_time();
 
     list<cls_timeindex_entry> entries;
     ret = store->objexp_hint_list(shard, rt_last, rt_start,
-                                      num_entries, marker, entries,
-                                      &out_marker, &truncated);
+                                  num_entries, marker, entries,
+                                  &out_marker, &truncated);
     if (ret < 0) {
-      ldout(cct, 10) << "cannot get removal hints from shard: " << shard << dendl;
+      ldout(cct, 10) << "cannot get removal hints from shard: " << shard
+                     << dendl;
       continue;
     }
 
@@ -204,11 +206,10 @@ bool RGWObjectExpirer::process_single_shard(const string& shard,
 }
 
 /* Returns true if all shards have been processed successfully. */
-bool RGWObjectExpirer::inspect_all_shards(const utime_t& last_run, const utime_t& round_start)
+bool RGWObjectExpirer::inspect_all_shards(const utime_t& last_run,
+                                          const utime_t& round_start)
 {
-  utime_t shard_marker;
-
-  CephContext *cct = store->ctx();
+  CephContext * const cct = store->ctx();
   int num_shards = cct->_conf->rgw_objexp_hints_num_shards;
   bool all_done = true;
 
index d4ca0ea45e33db2259b601588d9744c03a8b9979..f8170f38fed559a4ef4597c1c557340b5aee9a17 100644 (file)
@@ -41,9 +41,9 @@ class RGWObjectExpirer {
 protected:
   RGWRados *store;
 
-  int init_bucket_info(const string& tenant_name,
-                       const string& bucket_name,
-                       const string& bucket_id,
+  int init_bucket_info(const std::string& tenant_name,
+                       const std::string& bucket_name,
+                       const std::string& bucket_id,
                        RGWBucketInfo& bucket_info);
 
   class OEWorker : public Thread {
@@ -53,7 +53,13 @@ protected:
     Cond cond;
 
   public:
-    OEWorker(CephContext *_cct, RGWObjectExpirer *_oe) : cct(_cct), oe(_oe), lock("OEWorker") {}
+    OEWorker(CephContext * const cct,
+             RGWObjectExpirer * const oe)
+      : cct(cct),
+        oe(oe),
+        lock("OEWorker") {
+    }
+
     void *entry();
     void stop();
   };
@@ -63,15 +69,15 @@ protected:
 
 public:
   explicit RGWObjectExpirer(RGWRados *_store)
-    : store(_store)
-  {}
+    : store(_store) {
+  }
 
   int garbage_single_object(objexp_hint_entry& hint);
 
-  void garbage_chunk(list<cls_timeindex_entry>& entries,      /* in  */
+  void garbage_chunk(std::list<cls_timeindex_entry>& entries, /* in  */
                      bool& need_trim);                        /* out */
 
-  void trim_chunk(const string& shard,
+  void trim_chunk(const std::string& shard,
                   const utime_t& from,
                   const utime_t& to,
                   const string& from_marker,