Commit c57bf804 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

nvme: Do not construct the namespace object on ns_create



Wait until the namespace is attached, where it does this operation
again. As of this commit it doesn't really matter because it is just
filling in some values in a structure and if it does it twice it's not a
problem. But later when we only allocate active namespaces, we do not
want to allocate the namespace twice.

Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Change-Id: Ie28653b178975d1ca80bf71ca6b5095224f1c5d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10026


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarEugene Kochetov <ekochetov@yandex.ru>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 93708637
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -4588,11 +4588,6 @@ spdk_nvme_ctrlr_create_ns(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_ns_dat

	assert(nsid > 0);

	res = nvme_ctrlr_construct_namespace(ctrlr, nsid);
	if (res) {
		return 0;
	}

	/* Return the namespace ID that was created */
	return nsid;
}