os/bluestore: dedup omap_head, reuse nid instead #12275

Merged
merged 3 commits into from Dec 5, 2016

Projects

None yet

2 participants

@xiexingguo
Contributor

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

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

@xiexingguo xiexingguo added the bluestore label Dec 2, 2016
@liewegas liewegas was assigned by xiexingguo Dec 2, 2016
src/os/bluestore/bluestore_types.h
@@ -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
@liewegas
liewegas Dec 2, 2016 Member

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 added some commits Dec 2, 2016
@xiexingguo xiexingguo os/bluestore: dedup omap_head, reuse nid instead
This is faster and save us some memory as well as space.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
d68ee83
@xiexingguo xiexingguo os/bluestore: kill deprecated get_preferred_csum_order() method
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
4339b42
@xiexingguo
Contributor

done.

@xiexingguo xiexingguo os/bluestore: move empty-check of osr-queue out of loop
which is optimal.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
1fcef74
@liewegas liewegas added this to the kraken milestone Dec 5, 2016
@liewegas liewegas added the needs-qa label Dec 5, 2016
@liewegas liewegas merged commit 7b1293e into ceph:master Dec 5, 2016

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@xiexingguo xiexingguo deleted the xiexingguo:xxg-wip-bluestore-1202 branch Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment