Marked as WIP due to doubts revolving around nvd(4) behaviour, command
sets, etc. Tests are missing because of this, also awaiting feedback.
Squash of the following commits:
nda.4: Fix mandoc useless macro warning nda: Add support for Zoned Namespaces cam: nvme: Fetch the ZNS identify data while probing a device disk_zone.h: Add zone capacity nvd: Do not attach to zoned namespaces nvme: Add Zoned Namespace Command Set definitions nvme: Record the I/O command set of each namespace nvme: Select every supported I/O command set nvme: Add I/O command set identification support
Uploaded on behalf of voidanix (GSoC 2026). This is the
zns-works-with-doubts branch from
https://github.com/voidanix/freebsd-src, rebased onto main. The rebase
resolved conflicts with b99595c9c072 ("nvme: derive CC.CSS from CAP.CSS
instead of hardcoding the NVM set"): the duplicated CAP.CSS and CC.CSS
macros were dropped in favor of the names now in the tree, and the
CC.CSS selection in nvme_ctrlr_enable() now prefers all supported I/O
command sets, then the NVM command set, then no I/O command set for
administrative controllers.
Boot tested on amd64 hardware with four conventional (non-ZNS) NVMe
drives (two Phison-based PASCARI X200, two KIOXIA XG8) attached via
nda(4): all four attach cleanly, Identify and sequential reads work,
ZFS pool I/O on an nda-backed mirror works, and zone commands
(zonectl(8) and the camcontrol(8) zone subcommand) are refused exactly
as on a stock kernel. voidanix tested the zoned paths on ZNS
hardware.
Discussed with: ken, fuz, asomers
Sponsored by: Google Summer of Code 2026