lib/bdev_malloc: add support for the write_zeroes I/O type
Change-Id: Id66d773ff66a9cd1da6cf2515b3fe765cd8edbd6 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/373971 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
8d70322aa8
commit
0b6b572f7d
@ -320,6 +320,15 @@ static int _bdev_malloc_submit_request(struct spdk_io_channel *ch, struct spdk_b
|
||||
(struct malloc_task *)bdev_io->driver_ctx,
|
||||
bdev_io->u.unmap.offset,
|
||||
bdev_io->u.unmap.len);
|
||||
|
||||
case SPDK_BDEV_IO_TYPE_WRITE_ZEROES:
|
||||
/* bdev_malloc_unmap is implemented with a call to mem_cpy_fill which zeroes out all of the requested bytes. */
|
||||
return bdev_malloc_unmap((struct malloc_disk *)bdev_io->bdev->ctxt,
|
||||
ch,
|
||||
(struct malloc_task *)bdev_io->driver_ctx,
|
||||
bdev_io->u.write.offset,
|
||||
bdev_io->u.write.len);
|
||||
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@ -342,6 +351,7 @@ bdev_malloc_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
|
||||
case SPDK_BDEV_IO_TYPE_FLUSH:
|
||||
case SPDK_BDEV_IO_TYPE_RESET:
|
||||
case SPDK_BDEV_IO_TYPE_UNMAP:
|
||||
case SPDK_BDEV_IO_TYPE_WRITE_ZEROES:
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user