Skip to content
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

librados: fix several flaws introduced by the enumeration_objects API #7156

Merged
merged 4 commits into from Jan 13, 2016

Conversation

xiexingguo
Copy link
Member

No description provided.

Otherwise we may risk of executing the callback twice, which is fatal.

Fixes: ceph#14299
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Fixes: ceph#14300
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Fixes: ceph#14301
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@jcsp
Copy link
Contributor

jcsp commented Jan 8, 2016

The enumerate fixes look good to me

@liewegas
Copy link
Member

liewegas commented Jan 8, 2016

These all look good except for the race condition fix. Can you drop that patch from this series?

Instead, I think we should call the g_conf->should_gather(...) helper so that we can avoid taking the locks and calling the _dump* methods entirely if the log level is low. As things currently stand, we are iterating over all those maps even if nothing is logged/printed, which is a waste of CPU. Adding the proper locking is making that even more expensive.

Thanks!

@liewegas liewegas self-assigned this Jan 8, 2016
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
liewegas added a commit that referenced this pull request Jan 13, 2016
librados: fix several flaws introduced by the enumeration_objects API

Reviewed-by: John Spray <jspray@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit eeceff1 into ceph:master Jan 13, 2016
@xiexingguo xiexingguo deleted the xxg-wip-14299 branch January 13, 2016 13:32
@ghost ghost changed the title Objecter: fix several flaws introduced by the enumeration_objects API librados: fix several flaws introduced by the enumeration_objects API Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants