Add NVMe reservation support to camcontrol(8). This supports the
four NVMe reservation opcodes: Report, Register, Acquire and
Release, in the same way that the camcontrol persist subcommand
supports SCSI Persistent Reservations:
camcontrol nvres ndaX -a report [-e]
camcontrol nvres ndaX -a register -A <register|unregister|replace>
[-i] [-k curkey] [-K newkey] [-p <enable|disable>]
camcontrol nvres ndaX -a acquire -A <acquire|preempt|preempt_abort>
-k curkey [-K prekey] -T resv_type
camcontrol nvres ndaX -a release -A <clear|release> -k curkey
-T resv_typeThe report action displays the reservation status and registered
controllers for a namespace, including the full 8 or 16 byte hostid
for each registrant depending on the value of the eds (extended
data structure) bit.
sbin/camcontrol/nvres.c:
New file, NVMe reservation support.
sbin/camcontrol/camcontrol.c:
Add the nvres subcommand.
sbin/camcontrol/camcontrol.h:
Add the nvmeres() prototype.
sbin/camcontrol/Makefile:
Add nvres.c to the build.
sbin/camcontrol/camcontrol.8:
Document the nvres subcommand.
Co-authored-by: Reid Linnemann <reidl@spectralogic.com>
Sponsored by: Spectra Logic
Depends on D59532
Depends on D59533
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>