blobfs: align rw buffer to lba of device underneath

Previously the alignment was to 4k due to page size of blobstore being minmal
size to write to blobs. Now that io_unit is used, alignment can be changed to that.

Change-Id: Ib48182e299dad9d9587ae20b97afe683d53933cb
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/425788
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Tomasz Zawadzki 2018-09-17 05:22:59 -04:00 committed by Jim Harris
parent 4dc0ef6f45
commit c34d149139

View File

@ -1666,7 +1666,7 @@ __readwrite(struct spdk_file *file, struct spdk_io_channel *_channel,
args->op.rw.blocklen = lba_size;
pin_buf_length = num_lba * lba_size;
args->op.rw.pin_buf = spdk_dma_malloc(pin_buf_length, 4096, NULL);
args->op.rw.pin_buf = spdk_dma_malloc(pin_buf_length, lba_size, NULL);
if (args->op.rw.pin_buf == NULL) {
SPDK_DEBUGLOG(SPDK_LOG_BLOBFS, "Failed to allocate buf for: file=%s offset=%jx length=%jx\n",
file->name, offset, length);