os/bluestore: refactor _do_write(); move initializaiton of csum out of loop #11823

merged 2 commits into from Nov 9, 2016


None yet

3 participants


No description provided.

@xiexingguo xiexingguo added the bluestore label Nov 8, 2016
@liewegas liewegas was assigned by xiexingguo Nov 8, 2016
+ if (g_conf->bluestore_gc_merge_data) {
+ head_bl.claim_append(bl);
+ bl.swap(head_bl);
+ offset = gc_start_offset;
ifed01 Nov 8, 2016 Contributor

offset & length can be updated within this func hence must be passed via reference

xiexingguo Nov 9, 2016 Contributor

Ah, I missed that. Thanks, Igor.

@@ -7892,20 +7906,6 @@ int BlueStore::_do_alloc_write(
- // checksum
ifed01 Nov 8, 2016 Contributor

compression_required_ratio calculation above can be moved out of the loop too.

xiexingguo added some commits Nov 8, 2016
@xiexingguo xiexingguo os/bluestore: refactor _do_write()
By moving garbage collection logic into a separate method.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo xiexingguo os/bluestore: move selectiong of csum/crr out of for loop
We don't have to trace the csum/compression_required_ration option changing
at such a small granularity, which costs too much.

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

@liewegas Fixed.

ifed01 approved these changes Nov 9, 2016 View changes


@liewegas liewegas merged commit e1622bc into ceph:master Nov 9, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
default Build finished.
@xiexingguo xiexingguo deleted the xiexingguo:xxg-wip-bluestore-1108 branch Nov 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment