bdev/malloc: remove bdev_malloc_(reset|flush)
The only thing these functions were doing was completing the IO, so it could just be inlined. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I5fbd9df763dd68953b1bda9c7752c57ef9ee5dd6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10804 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0a49fbd241
commit
0f0c16a76a
@ -225,23 +225,6 @@ bdev_malloc_unmap(struct malloc_disk *mdisk,
|
||||
byte_count, malloc_done, task);
|
||||
}
|
||||
|
||||
static int64_t
|
||||
bdev_malloc_flush(struct malloc_disk *mdisk, struct malloc_task *task,
|
||||
uint64_t offset, uint64_t nbytes)
|
||||
{
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(task), SPDK_BDEV_IO_STATUS_SUCCESS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
bdev_malloc_reset(struct malloc_disk *mdisk, struct malloc_task *task)
|
||||
{
|
||||
spdk_bdev_io_complete(spdk_bdev_io_from_ctx(task), SPDK_BDEV_IO_STATUS_SUCCESS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _bdev_malloc_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io)
|
||||
{
|
||||
struct malloc_channel *mch = spdk_io_channel_get_ctx(ch);
|
||||
@ -279,14 +262,12 @@ static int _bdev_malloc_submit_request(struct spdk_io_channel *ch, struct spdk_b
|
||||
return 0;
|
||||
|
||||
case SPDK_BDEV_IO_TYPE_RESET:
|
||||
return bdev_malloc_reset((struct malloc_disk *)bdev_io->bdev->ctxt,
|
||||
(struct malloc_task *)bdev_io->driver_ctx);
|
||||
spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_SUCCESS);
|
||||
return 0;
|
||||
|
||||
case SPDK_BDEV_IO_TYPE_FLUSH:
|
||||
return bdev_malloc_flush((struct malloc_disk *)bdev_io->bdev->ctxt,
|
||||
(struct malloc_task *)bdev_io->driver_ctx,
|
||||
bdev_io->u.bdev.offset_blocks * block_size,
|
||||
bdev_io->u.bdev.num_blocks * block_size);
|
||||
spdk_bdev_io_complete(bdev_io, SPDK_BDEV_IO_STATUS_SUCCESS);
|
||||
return 0;
|
||||
|
||||
case SPDK_BDEV_IO_TYPE_UNMAP:
|
||||
return bdev_malloc_unmap((struct malloc_disk *)bdev_io->bdev->ctxt,
|
||||
|
Loading…
Reference in New Issue
Block a user