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: Ben Walker <benjamin.walker@intel.com> Change-Id: Ie28653b178975d1ca80bf71ca6b5095224f1c5d1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10026 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Eugene Kochetov <ekochetov@yandex.ru> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
937086379f
commit
c57bf80497
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user