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

Merged
merged 2 commits into from Nov 9, 2016

Projects

None yet

3 participants

@xiexingguo
Contributor

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
ifed01 Nov 8, 2016 Contributor

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

@xiexingguo
xiexingguo Nov 9, 2016 Contributor

Ah, I missed that. Thanks, Igor.

@@ -7892,20 +7906,6 @@ int BlueStore::_do_alloc_write(
dblob.extents.push_back(e);
}
- // checksum
@ifed01
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>
aa7b9a8
@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>
6fa3f39
@xiexingguo
Contributor

@liewegas Fixed.

@ifed01
ifed01 approved these changes Nov 9, 2016 View changes

LGTM

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

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@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