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

osd: drop unused variables/methods #10559

Merged
merged 5 commits into from Aug 8, 2016

Conversation

xiexingguo
Copy link
Member

No description provided.

@xiexingguo
Copy link
Member Author

@athanatos More cleanups, please help to review. Thanks!

@@ -3572,7 +3567,7 @@ void OSD::handle_pg_peering_evt(
if (!pp->is_replicated() && role != pgid.shard)
role = -1;

PG *pg = _create_lock_pg(
pg = _create_lock_pg(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd spacing.

Basically we don't allow a transaction to get too big, e.g., to
avoid contiguously occupation of CPU.

We break and queue the transaction here whenever we have collected
osd_target_transaction_size temp objects.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
It is never used and I see no chance it will be used.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
When _have_pg() returns true, we drop the pg_map_lock
and pg->lock() simultaneously. So theoretically the
subsequent call to _lookup_lock_pg() can return NULL,
although the chance is rare.

Also, since we are going to call _lookup_lock_pg() anyway,
we can call it directly, thus the _have_pg() method is
totally unnecessary.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Hard code transaction size to be 300 is not good. Since we already
introduce osd_target_transaction_size for the same purpose, we can
use it directly here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@athanatos Fixed as you suggested. Please check again. Thanks!

For a better understanding since it can confuse newcommers.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@yuriw yuriw merged commit 9efb018 into ceph:master Aug 8, 2016
@xiexingguo xiexingguo deleted the xxg-wip-osd-2016-08-03 branch August 9, 2016 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants