bdev/compress: adjust vol parms
There were some TODO items in here that were incorrect if using an underlying block device that had a 4K block size. The values here will set the compress vol LBA size to match that of the underlying lvol but the backing IO unit size, the min size that reduce will use to perform backing device IO is set to 4K as smaller than this makes little sense given chunk size is currently at 16K. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Ic6a9421a25d947ae7d4dce190d6599eec1d4a05a Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458703 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
5cffa4a988
commit
5d55704d66
@ -56,12 +56,8 @@
|
||||
#define DEFAULT_WINDOW_SIZE 15
|
||||
#define MAX_MBUFS_PER_OP 16
|
||||
#define CHUNK_SIZE (1024 * 16)
|
||||
|
||||
#define COMP_BDEV_NAME "compress"
|
||||
|
||||
#define DEV_CHUNK_SZ (16 * 1024)
|
||||
#define DEV_LBA_SZ 512
|
||||
#define DEV_BACKING_IO_SZ (4 * 1024)
|
||||
#define BACKING_IO_SZ (4 * 1024)
|
||||
|
||||
/* To add support for new device types, follow the examples of the following...
|
||||
* Note that the string names are defined by the DPDK PMD in question so be
|
||||
@ -1097,10 +1093,9 @@ _prepare_for_load_init(struct spdk_bdev *bdev)
|
||||
meta_ctx->backing_dev.blocklen = bdev->blocklen;
|
||||
meta_ctx->backing_dev.blockcnt = bdev->blockcnt;
|
||||
|
||||
/* TODO, configurable chunk size & logical block size */
|
||||
meta_ctx->params.chunk_size = DEV_CHUNK_SZ;
|
||||
meta_ctx->params.logical_block_size = DEV_LBA_SZ;
|
||||
meta_ctx->params.backing_io_unit_size = DEV_BACKING_IO_SZ;
|
||||
meta_ctx->params.chunk_size = CHUNK_SIZE;
|
||||
meta_ctx->params.logical_block_size = bdev->blocklen;
|
||||
meta_ctx->params.backing_io_unit_size = BACKING_IO_SZ;
|
||||
return meta_ctx;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user