Commit 7bffdb2d authored by paul luse's avatar paul luse Committed by Jim Harris
Browse files

bdev/compress: fix size of compressed bdev



Needs to be based on the compressed vol size which is smaller
than the backing io device.

Fixes issue 763

Change-Id: I917c98e86a0755e503d5ba3d4b6c02e42f9ed709
Signed-off-by: default avatarpaul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452158


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent d05c5538
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1215,7 +1215,7 @@ vbdev_compress_claim(struct vbdev_compress *comp_bdev)
	comp_bdev->comp_bdev.split_on_optimal_io_boundary = true;

	comp_bdev->comp_bdev.blocklen = comp_bdev->base_bdev->blocklen;
	comp_bdev->comp_bdev.blockcnt = comp_bdev->base_bdev->blockcnt;
	comp_bdev->comp_bdev.blockcnt = comp_bdev->params.vol_size / comp_bdev->comp_bdev.blocklen;

	/* This is the context that is passed to us when the bdev
	 * layer calls in so we'll save our comp_bdev node here.