7f0f1acedf
This adds support for multiple namespaces by introducing a new 'nvme-ns' device model. The nvme device creates a bus named from the device name ('id'). The nvme-ns devices then connect to this and registers themselves with the nvme device. This changes how an nvme device is created. Example with two namespaces: -drive file=nvme0n1.img,if=none,id=disk1 -drive file=nvme0n2.img,if=none,id=disk2 -device nvme,serial=deadbeef,id=nvme0 -device nvme-ns,drive=disk1,bus=nvme0,nsid=1 -device nvme-ns,drive=disk2,bus=nvme0,nsid=2 The drive property is kept on the nvme device to keep the change backward compatible, but the property is now optional. Specifying a drive for the nvme device will always create the namespace with nsid 1. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Minwoo Im <minwoo.im.dev@gmail.com> |
||
---|---|---|
.. | ||
dataplane | ||
block.c | ||
cdrom.c | ||
ecc.c | ||
fdc.c | ||
hd-geometry.c | ||
Kconfig | ||
m25p80.c | ||
meson.build | ||
nand.c | ||
nvme-ns.c | ||
nvme-ns.h | ||
nvme.c | ||
nvme.h | ||
onenand.c | ||
pflash_cfi01.c | ||
pflash_cfi02.c | ||
swim.c | ||
tc58128.c | ||
trace-events | ||
trace.h | ||
vhost-user-blk.c | ||
virtio-blk.c | ||
xen_blkif.h | ||
xen-block.c |