Skip to content
Snippets Groups Projects
Commit 94d8d6d1 authored by Minwoo Im's avatar Minwoo Im Committed by Klaus Jensen
Browse files

hw/block/nvme: support allocated namespace type


From NVMe spec 1.4b "6.1.5. NSID and Namespace Relationships" defines
valid namespace types:

	- Unallocated: Not exists in the NVMe subsystem
	- Allocated: Exists in the NVMe subsystem
	- Inactive: Not attached to the controller
	- Active: Attached to the controller

This patch added support for allocated, but not attached namespace type:

	!nvme_ns(n, nsid) && nvme_subsys_ns(n->subsys, nsid)

nvme_ns() returns attached namespace instance of the given controller
and nvme_subsys_ns() returns allocated namespace instance in the
subsystem.

Signed-off-by: default avatarMinwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Tested-by: default avatarKlaus Jensen <k.jensen@samsung.com>
Signed-off-by: default avatarKlaus Jensen <k.jensen@samsung.com>
parent 92cad003
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment