-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rgw: fix lockdep false positive #8284
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1239,17 +1239,16 @@ class RGWDataSyncCR : public RGWCoroutine { | |
|
||
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(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why was this removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oritwas this line shouldn't have been there.. there's no switch statement, it only compiles because the reenter/yield expand into a switch statement. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it looks like this used to be a switch statement that changed to an if on the line above. i assume the compiler didn't complain about the leftover |
||
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); | ||
} | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: cant we use auto here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@theanalyst yes we can, but this is just indentation fix (and removed extra line), so I wouldn't go into changing it just now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, no issues