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

os/bluestore: cleanup bluestore_types #15680

Merged
merged 3 commits into from Jun 16, 2017

Conversation

xiexingguo
Copy link
Member

No description provided.

p += csum_data.length();
}

if (has_unused()) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not certain this will be faster.. the value in doing a conservative bound is that it mostly compiles down to nothing. Everything up until csum_data.length() is a constant and compiles into a single add instruction. This three conditional branches. And when we encode these the buffer is temporary (used to write to kv db and then thrown away).

Copy link
Member Author

Choose a reason for hiding this comment

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

dropped this one for now.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@@ -647,41 +649,30 @@ struct bluestore_blob_t {
b_len += b_off;
while (b_len) {
assert(p != extents.end());
if (!p->is_valid()) {
return false;
if ((require_allocated && !p->is_valid()) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

replace with if (require_allocated != p->is_valid()) ?

Copy link
Member Author

Choose a reason for hiding this comment

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

ahh, that's brilliant

…blob_t

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@tchaikov
Copy link
Contributor

@tchaikov tchaikov merged commit 791856d into ceph:master Jun 16, 2017
@xiexingguo
Copy link
Member Author

@tchaikov Thanks!

@xiexingguo xiexingguo deleted the wip-bluestore-20170614 branch June 16, 2017 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants