]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: track and limit the number of namespaces per subsystem
authorChristoph Hellwig <hch@lst.de>
Sun, 13 May 2018 17:00:13 +0000 (19:00 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 27 Jul 2018 17:13:01 +0000 (19:13 +0200)
commitc77eb8e463f82e8c48306c94654d6124a8593016
treebc15ed260d3d74b37c81dff0a78ed417fffda1be
parent0cd1d60a6c3bca7eba40feb7595ac82d4019ebc0
nvmet: track and limit the number of namespaces per subsystem

TP 4004 introduces a new 'Maximum Number of Allocated Namespaces' field
in the Identify controller data to help the host size resources.  Put
an upper limit on the supported namespaces to be able to support this
value as supporting 32-bits worth of namespaces would lead to very
large buffers.  The limit is completely arbitrary at this point.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h