]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: set csum order based on alloc hints
authorSage Weil <sage@redhat.com>
Wed, 23 Nov 2016 22:41:44 +0000 (17:41 -0500)
committerSage Weil <sage@redhat.com>
Wed, 23 Nov 2016 22:41:44 +0000 (17:41 -0500)
If the users hints that this object is sequentially read and written we
can use a larger csum order.

Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index ace6ee33560ddb6aa01d6e84ef1eb414990f5ef1..31075d4969b9e48565bc10ca6bdeb0d93ae08e95 100644 (file)
@@ -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",