From: Sage Weil Date: Wed, 23 Nov 2016 22:41:44 +0000 (-0500) Subject: os/bluestore: set csum order based on alloc hints X-Git-Tag: v11.1.0~127^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ae772b8d0d9fc0186759b9e2051633ff1127b2b0;p=ceph.git os/bluestore: set csum order based on alloc hints If the users hints that this object is sequentially read and written we can use a larger csum order. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index ace6ee33560dd..31075d4969b9e 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -8049,7 +8049,8 @@ int BlueStore::_do_write( CEPH_OSD_ALLOC_HINT_FLAG_APPEND_ONLY)) && (alloc_hints & CEPH_OSD_ALLOC_HINT_FLAG_RANDOM_WRITE) == 0) { dout(20) << __func__ << " will prefer large blob and csum sizes" << dendl; - wctx.csum_order = min_alloc_size_order; + wctx.csum_order = std::max(min_alloc_size_order, + (size_t)ctzl(o->onode.expected_write_size)); if (wctx.compress) { wctx.target_blob_size = select_option( "compression_max_blob_size",