bdev/nvme: zero out the referred discovery trid
If the trid is not zeroed out, trid.trstring might contain garbage value, which means that nvme_probe_internal() might not populate it based on trtype and will use that garbage value to get a transport, leading to the following failure: ``` nvme.c: 834:nvme_probe_internal: *ERROR*: NVMe trtype 3 () not available ``` Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I56bc6502d285ee5ce094184e00d3297f6332e8c0 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12680 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
5c2b5fc14b
commit
623105bb09
@ -4962,7 +4962,7 @@ discovery_log_page_cb(void *cb_arg, int rc, const struct spdk_nvme_cpl *cpl,
|
||||
new_entry = &log_page->entries[i];
|
||||
if (new_entry->subtype == SPDK_NVMF_SUBTYPE_DISCOVERY) {
|
||||
struct discovery_entry_ctx *new_ctx;
|
||||
struct spdk_nvme_transport_id trid;
|
||||
struct spdk_nvme_transport_id trid = {};
|
||||
|
||||
build_trid_from_log_page_entry(&trid, new_entry);
|
||||
new_ctx = create_discovery_entry_ctx(ctx, &trid);
|
||||
|
Loading…
Reference in New Issue
Block a user