linux/drivers/nvme/host
Pankaj Raghav 726be2c72e nvme: fix the read-only state for zoned namespaces with unsupposed features
commit 2f4c9ba23b ("nvme: export zoned namespaces without Zone Append
support read-only") marks zoned namespaces without append support
read-only.  It does iso by setting NVME_NS_FORCE_RO in ns->flags in
nvme_update_zone_info and checking for that flag later in
nvme_update_disk_info to mark the disk as read-only.

But commit 73d90386b5 ("nvme: cleanup zone information initialization")
rearranged nvme_update_disk_info to be called before
nvme_update_zone_info and thus not marking the disk as read-only.
The call order cannot be just reverted because nvme_update_zone_info sets
certain queue parameters such as zone_write_granularity that depend on the
prior call to nvme_update_disk_info.

Remove the call to set_disk_ro in nvme_update_disk_info. and call
set_disk_ro after nvme_update_zone_info and nvme_update_disk_info to set
the permission for ZNS drives correctly. The same applies to the
multipath disk path.

Fixes: 73d90386b5 ("nvme: cleanup zone information initialization")
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2022-03-23 09:19:17 +01:00
..
constants.c nvme: add verbose error logging 2022-02-28 13:45:06 +02:00
core.c nvme: fix the read-only state for zoned namespaces with unsupposed features 2022-03-23 09:19:17 +01:00
fabrics.c nvme-fabrics: remove unnecessary braces for case 2022-02-28 13:45:04 +02:00
fabrics.h nvme: display correct subsystem NQN 2021-10-20 19:16:02 +02:00
fault_inject.c block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
fc.c nvme: add a helper to initialize connect_q 2022-02-28 13:45:06 +02:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme-hwmon: Return error code when registration fails 2021-03-05 13:41:03 +01:00
ioctl.c nvme: remove nvme_alloc_request and nvme_alloc_request_qid 2022-03-16 09:47:05 +01:00
Kconfig nvme: add verbose error logging 2022-02-28 13:45:06 +02:00
Makefile nvme: add verbose error logging 2022-02-28 13:45:06 +02:00
multipath.c nvme: cleanup how disk->disk_name is assigned 2022-03-16 09:47:01 +01:00
nvme.h nvme: remove nvme_alloc_request and nvme_alloc_request_qid 2022-03-16 09:47:05 +01:00
pci.c nvme: remove nvme_alloc_request and nvme_alloc_request_qid 2022-03-16 09:47:05 +01:00
rdma.c nvme: add a helper to initialize connect_q 2022-02-28 13:45:06 +02:00
tcp.c nvme-tcp: lockdep: annotate in-kernel sockets 2022-03-14 08:43:06 +01:00
trace.c nvme: add set feature tracing support 2021-08-16 14:42:23 +02:00
trace.h block: remove the ->rq_disk field in struct request 2021-11-29 06:41:29 -07:00
zns.c nvme: report write pointer for a full zone as zone start + zone len 2021-12-06 08:52:08 +01:00