bdev_xnvme: Remove duplicate invocation of bdev_xnvme_destruct
Fix for the issue 2803. Reporting an error when deleting xnvme bdev. bdev_xnvme_destruct gets invoked from the fn_table->destruct prior to the xnvme_bdev_unregister_cb while deleting the xnvme bdev. Hence removed the duplicate invocation of bdev_xnvme_destruct in the function xnvme_bdev_unregister_cb. Additionally, fixed the hang issue when the bdev_xnvme_delete gets called multiple times for a xnvme bdev. Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com> Change-Id: Ie36a84987ace20d324b7a139ca67fd60bf46e25b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16144 Reviewed-by: Ye Chen <yex.chen@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
415fa16403
commit
d093a9fb85
@ -428,7 +428,6 @@ xnvme_bdev_unregister_cb(void *arg, int bdeverrno)
|
||||
{
|
||||
struct delete_xnvme_bdev_ctx *ctx = arg;
|
||||
|
||||
bdev_xnvme_destruct(ctx->xnvme);
|
||||
ctx->cb_fn(ctx->cb_arg, bdeverrno);
|
||||
free(ctx);
|
||||
}
|
||||
|
@ -120,6 +120,7 @@ rpc_bdev_xnvme_delete(struct spdk_jsonrpc_request *request,
|
||||
bdev = spdk_bdev_desc_get_bdev(desc);
|
||||
spdk_bdev_close(desc);
|
||||
} else {
|
||||
spdk_jsonrpc_send_error_response(request, -ENODEV, spdk_strerror(ENODEV));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user