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
Conversation
src/os/bluestore/bluestore_types.h
Outdated
p += csum_data.length(); | ||
} | ||
|
||
if (has_unused()) { |
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.
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).
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.
dropped this one for now.
a00dc38
to
ee0a1d2
Compare
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/bluestore_types.h
Outdated
@@ -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()) || |
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.
replace with if (require_allocated != p->is_valid()) ?
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.
ahh, that's brilliant
ee0a1d2
to
fb34a4b
Compare
…blob_t Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
http://pulpito.ceph.com/kchai-2017-06-15_17:39:27-rados-wip-kefu-testing---basic-smithi/ all issues are known ones. |
@tchaikov Thanks! |
No description provided.