nvme: export zoned namespaces without Zone Append support read-only
authorJavier González <javier.gonz@samsung.com>
Tue, 1 Dec 2020 12:02:21 +0000 (13:02 +0100)
committerChristoph Hellwig <hch@lst.de>
Tue, 1 Dec 2020 19:36:38 +0000 (20:36 +0100)
commit2f4c9ba23b887e7a69a474e9d53f38b5833a2119
tree00a7ea2a87a58d2bae51ac56e87faa7714481561
parentba4fb3205680ade6c29c80102e86b88641709561
nvme: export zoned namespaces without Zone Append support read-only

Allow ZNS NVMe SSDs to present a read-only namespace when append is not
supported, instead of rejecting the namespace directly.

This allows (i) the namespace to be used in read-only mode, which is not
a problem as the append command only affects the write path, and (ii) to
use standard management tools such as nvme-cli to choose a different
format or firmware slot that is compatible with the Linux zoned block
device.

Signed-off-by: Javier González <javier.gonz@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/zns.c