]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix lockdep false positive
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 23 Mar 2016 22:24:17 +0000 (15:24 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 24 Mar 2016 22:10:25 +0000 (15:10 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_data_sync.cc
src/rgw/rgw_sync.h

index 24756de8fc6298f7d4c31c66267a95322d6dfabb..6d73b73549115cb56fef003f56e2be6823446677 100644 (file)
@@ -1239,17 +1239,16 @@ public:
 
       yield {
         if  ((rgw_data_sync_info::SyncState)sync_status.sync_info.state == rgw_data_sync_info::StateSync) {
-          case rgw_data_sync_info::StateSync:
-            for (map<uint32_t, rgw_data_sync_marker>::iterator iter = sync_status.sync_markers.begin();
-                 iter != sync_status.sync_markers.end(); ++iter) {
-              RGWDataSyncShardControlCR *cr = new RGWDataSyncShardControlCR(sync_env, sync_env->store->get_zone_params().log_pool,
-                                                        iter->first, iter->second);
-              cr->get();
-              shard_crs_lock.Lock();
-              shard_crs[iter->first] = cr;
-              shard_crs_lock.Unlock();
-              spawn(cr, true);
-            }
+          for (map<uint32_t, rgw_data_sync_marker>::iterator iter = sync_status.sync_markers.begin();
+               iter != sync_status.sync_markers.end(); ++iter) {
+            RGWDataSyncShardControlCR *cr = new RGWDataSyncShardControlCR(sync_env, sync_env->store->get_zone_params().log_pool,
+                                                                          iter->first, iter->second);
+            cr->get();
+            shard_crs_lock.Lock();
+            shard_crs[iter->first] = cr;
+            shard_crs_lock.Unlock();
+            spawn(cr, true);
+          }
         }
       }
 
index 679f91c6dbb27292ecf4665c227154a648f98dbd..dcb3a4ee329f474df83f135bdc1886c2ed89e95a 100644 (file)
@@ -5,6 +5,7 @@
 #include "rgw_http_client.h"
 #include "rgw_meta_sync_status.h"
 
+#include "include/stringify.h"
 #include "common/RWLock.h"
 
 #define ERROR_LOGGER_SHARDS 32
@@ -142,7 +143,7 @@ protected:
   }
 
 public:
-  RGWBackoffControlCR(CephContext *_cct, bool _exit_on_error) : RGWCoroutine(_cct), cr(NULL), lock("RGWBackoffControlCR::lock"),
+  RGWBackoffControlCR(CephContext *_cct, bool _exit_on_error) : RGWCoroutine(_cct), cr(NULL), lock("RGWBackoffControlCR::lock:" + stringify(this)),
                                                                 reset_backoff(false), exit_on_error(_exit_on_error) {
   }