Commit 726be2c
nvme: fix the read-only state for zoned namespaces with unsupposed features
commit 2f4c9ba ("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 73d9038 ("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: 73d9038 ("nvme: cleanup zone information initialization")
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent b2479de commit 726be2c
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1867 | 1867 | | |
1868 | 1868 | | |
1869 | 1869 | | |
1870 | | - | |
1871 | | - | |
1872 | | - | |
1873 | 1870 | | |
1874 | 1871 | | |
1875 | 1872 | | |
| |||
1930 | 1927 | | |
1931 | 1928 | | |
1932 | 1929 | | |
| 1930 | + | |
| 1931 | + | |
1933 | 1932 | | |
1934 | 1933 | | |
1935 | 1934 | | |
| |||
1942 | 1941 | | |
1943 | 1942 | | |
1944 | 1943 | | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
1945 | 1947 | | |
1946 | 1948 | | |
1947 | 1949 | | |
| |||
0 commit comments