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: dedup omap_head, reuse nid instead #12275

Merged
merged 3 commits into from Dec 5, 2016

Conversation

xiexingguo
Copy link
Member

This is faster and save us some memory as well as space.

Signed-off-by: xie xingguo xie.xingguo@zte.com.cn

@@ -667,7 +667,7 @@ struct bluestore_onode_t {
uint64_t nid = 0; ///< numeric id (locally unique)
uint64_t size = 0; ///< object size
map<string, bufferptr> attrs; ///< attrs
uint64_t omap_head = 0; ///< id for omap root node
uint8_t omap_head_exist = 0; ///< true if omap truly used
Copy link
Member

Choose a reason for hiding this comment

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

how about uint8_t flags = 0;
and
enum {
FLAG_OMAP = 1;
};
and teh usual test_flag, set_flag, clear_flag helpers, plus a has_omap() helper?

@xiexingguo xiexingguo force-pushed the xxg-wip-bluestore-1202 branch 3 times, most recently from f37203a to 610d794 Compare December 5, 2016 04:44
This is faster and save us some memory as well as space.

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

done.

which is optimal.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@liewegas liewegas added this to the kraken milestone Dec 5, 2016
@liewegas liewegas merged commit 7b1293e into ceph:master Dec 5, 2016
@xiexingguo xiexingguo deleted the xxg-wip-bluestore-1202 branch December 6, 2016 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants