Zone Reset
Zone Reset is a zone management operation that returns a sequential zone to the Empty state with its write pointer at the zone start, discarding its data.
In the NVMe zoned namespace command set, Reset Zone is Zone Send Action 04h of the Zone Management Send command. A zone in the Implicitly Opened, Explicitly Opened, Closed or Full state moves to Empty, a zone already Empty is left unchanged, and a Read Only or Offline zone makes the command abort with Invalid Zone State Transition. With Select All set, every opened, closed and full zone is reset by one command. [2]
After a successful reset the write pointer equals the zone start LBA, every logical block in the zone is deallocated, and the Zone Descriptor Extension Valid, Finish Zone Recommended, Reset Zone Recommended and Zone Finished by Controller bits are cleared. Leaving an opened zone releases one Active Resource and one Open Resource, and leaving a closed zone releases one Active Resource. With variable zone capacity, the controller may also change the zone capacity on reset. [2]
A controller that plans background work on a full zone can set Reset Zone Recommended and report, in the RRL field, the number of seconds before it may act on that zone. Acting on the hint is optional for the host because a reset destroys the data. On Linux the BLKRESETZONE ioctl, available since kernel 4.10, resets the zones in a zone-aligned range given in 512-byte sectors. [2] [4]
Logical deallocation is not proof of secure sanitization or physical erasure of every prior copy. [2]
Relations
- related
- Zoned namespaces (ZNS), Zone write pointer, Zone Finish, Data sanitization, ZBC, Active-zone limit, ZenFS
Advantages
- Resetting a zone that is already Empty succeeds without a state change, so repeating a reset after an uncertain completion does not harm the zone. [2]
Limitations
- The Linux ioctl accepts only zone-aligned ranges, so part of a zone cannot be discarded on its own. [4]
- Linux zone write plugging does not serialize a reset with writes in flight to the same zone, so the caller must wait for those writes first. [5]
Citations
- NVM Express, Zoned Namespace Command Set Specification, revision 1.1 (18 May 2021), sections 2.1.1, 3.4.3.1.4 and 5.4.
- Zoned Storage documentation: Zoned Block Device User Interface, sysfs attributes and ioctl commands.
- Linux v6.10, block/blk-zoned.c: blk_zone_plug_bio handling of reset and finish.
Further reading
- Western Digital, Zoned Storage: zone management commands and state transitions.
- Hesela: ZNS resource limits, lifecycle and recovery boundaries
Sources & caveats
- zns-spec is NVM Express Zoned Namespace Command Set revision 1.1, Copyright 2007-2021 NVM Express, Inc., read in sections 2.1.1, 3.4.3.1.4, 5.4 and the Zone Descriptor and Identify Namespace fields.
- zbd-api is a page of the zonedstorage.io documentation site published by Western Digital, read in the ioctl section.
- linux610-zoned is the Linux v6.10 block/blk-zoned.c source, read in the comment and switch of blk_zone_plug_bio.
- The ZBC and ZAC reset commands for SMR drives were not checked because those standards are not openly published.