lib/nbd: check if nbd is registered when start

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ie6918e442724020e2be8f98cab971e1126ebb20a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8033
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
MengjinWu 2021-05-25 14:55:41 +08:00 committed by Tomasz Zawadzki
parent 67cf3e1c0a
commit 628c230de4

View File

@ -1148,7 +1148,7 @@ spdk_nbd_start(const char *bdev_name, const char *nbd_path,
TAILQ_INIT(&nbd->executed_io_list); TAILQ_INIT(&nbd->executed_io_list);
/* Add nbd_disk to the end of disk list */ /* Add nbd_disk to the end of disk list */
nbd_disk_register(ctx->nbd); rc = nbd_disk_register(ctx->nbd);
if (rc != 0) { if (rc != 0) {
goto err; goto err;
} }