vbdev_lvol: set optimal_io_boundary to cluster size

This patch sets optimal_io_boundary to cluster size, so that splitting
happens in bdev layer rather than blobstore layer.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I0230cb4a188d605845a709e9c3c9061e822ef0f5

Reviewed-on: https://review.gerrithub.io/428065
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Piotr Pelplinski 2018-10-04 16:59:54 +02:00 committed by Ben Walker
parent acca82acf2
commit 36cc61388c

View File

@ -958,6 +958,8 @@ _create_lvol_disk(struct spdk_lvol *lvol, bool destroy)
bdev->blockcnt = total_size / bdev->blocklen;
bdev->uuid = lvol->uuid;
bdev->need_aligned_buffer = lvs_bdev->bdev->need_aligned_buffer;
bdev->split_on_optimal_io_boundary = true;
bdev->optimal_io_boundary = spdk_bs_get_cluster_size(lvol->lvol_store->blobstore) / bdev->blocklen;
bdev->ctxt = lvol;
bdev->fn_table = &vbdev_lvol_fn_table;