test/nvme/reset: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated. Change-Id: I4959aedbf0ae641cc8f4ade2da8929157b5e501d Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459559 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
9622c1cbec
commit
b3ece61f4d
@ -170,10 +170,10 @@ submit_single_io(struct ns_worker_ctx *ns_ctx)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
task->buf = spdk_dma_zmalloc(g_io_size_bytes, 0x200, NULL);
|
||||
task->buf = spdk_zmalloc(g_io_size_bytes, 0x200, NULL, SPDK_ENV_LCORE_ID_ANY, SPDK_MALLOC_DMA);
|
||||
if (!task->buf) {
|
||||
spdk_dma_free(task->buf);
|
||||
fprintf(stderr, "task->buf spdk_dma_zmalloc failed\n");
|
||||
spdk_free(task->buf);
|
||||
fprintf(stderr, "task->buf spdk_zmalloc failed\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ task_complete(struct reset_task *task, const struct spdk_nvme_cpl *completion)
|
||||
ns_ctx->io_completed++;
|
||||
}
|
||||
|
||||
spdk_dma_free(task->buf);
|
||||
spdk_free(task->buf);
|
||||
spdk_mempool_put(task_pool, task);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user