lvolstore: Modify vbdev_lvol to use io_unit size instead of page size

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

Reviewed-on: https://review.gerrithub.io/425357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Piotr Pelplinski 2018-09-12 09:54:32 +02:00 committed by Jim Harris
parent be2d2c76cf
commit fbb599288f

View File

@ -951,7 +951,7 @@ _create_lvol_disk(struct spdk_lvol *lvol, bool destroy)
bdev->name = lvol->unique_id;
bdev->product_name = "Logical Volume";
bdev->blocklen = spdk_bs_get_page_size(lvol->lvol_store->blobstore);
bdev->blocklen = spdk_bs_get_io_unit_size(lvol->lvol_store->blobstore);
total_size = spdk_blob_get_num_clusters(lvol->blob) *
spdk_bs_get_cluster_size(lvol->lvol_store->blobstore);
assert((total_size % bdev->blocklen) == 0);