Open-zone limit
An open-zone limit is the maximum number of zones that may be in the implicitly opened or explicitly opened state at the same time.
In the NVMe Zoned Namespace command set the limit is the Maximum Open Resources (MOR) field. Open zones are a subset of active zones, which also include closed zones, so MOR shall not exceed Maximum Active Resources. Closing an open zone frees an open resource but keeps the active one, while a transition to empty, full, read-only or offline frees both. [2]
MOR is a 0's based value, so a raw 0 permits one open zone and FFFFFFFFh means no limit. When a requested transition lacks an open resource and the active limit is larger than the open limit, the controller aborts the command with the status Too Many Open Zones. [2]
Linux reports the decoded count in the max_open_zones queue attribute, available since kernel 5.9, where 0 means no limit. [4] Documented examples show 128 open zones for a host-managed SMR disk and 14 open and 14 active zones for a ZNS device. [5] zonefs exposes the value as max_wro_seq_files, and with its explicit-open mount option open() fails once that many sequential files are open for writing. [1]
Relations
Advantages
- With explicit opening at file open time, a host can secure an open resource before writing and avoid write errors caused by the limit later. [1]
Limitations
- The controller may close implicitly opened zones on its own for resource management, so a host cannot assume such a zone stays open. [2]
- Coordinating open-resource use among hosts that share one zoned namespace is outside the scope of the specification. [2]
Citations
- Linux kernel documentation, zonefs: sequential files, explicit-open and runtime sysfs attributes.
- NVM Express, Zoned Namespace Command Set Specification, revision 1.1 (18 May 2021), section 2.1.1.4 and Figure 48.
- Linux v6.12 Documentation/ABI/stable/sysfs-block: max_open_zones and max_active_zones.
- Zoned Storage documentation. Zoned Block Device User Interface: zone resources.
Further reading
Sources & caveats
- zns-spec is NVMe ZNS revision 1.1, read in section 2.1.1.4 and Figure 48 for resource accounting, error status and MOR encoding.
- sysfs-block is the Linux v6.12 stable sysfs ABI file, read for the max_open_zones and max_active_zones entries.
- zbd-api is the zoned storage project documentation of the Linux user interface, read for attribute versions and example values.
- zonefs is the Linux kernel zonefs documentation, read for the explicit-open option and max_wro_seq_files.