Add NVMe CCB (union ccb / struct ccb_nvmeio) building functions for
the four NVMe reservation opcodes, Format NVM, and Get Features /
Set Features. These use the nvme_command building blocks added to
sys/dev/nvme/nvme.h, and are used by the new camcontrol(8) nvres,
nvformat and nvfeature subcommands that will be added separately.
sys/cam/nvme/nvme_all.c:
Add NVMe CCB building functions for the four NVMe reservation opcodes: nvme_resv_report(), nvme_resv_register(), nvme_resv_acquire() and nvme_resv_release(). Data direction is set internally (CAM_DIR_IN or CAM_DIR_OUT as appropriate), so no flags parameter is needed. Add a new nvme_format() CCB building function. Add nvme_get_feature() and nvme_set_feature() CCB building functions, along with nvme_get_feature_hostid() and nvme_set_feature_hostid() convenience wrappers for the hostid feature. nvme_set_feature_hostid() takes an sv argument so the caller can request that the hostid persist across reset.
sys/cam/nvme/nvme_all.h:
Add prototypes for the above. Wrap the declarations in __BEGIN_DECLS / __END_DECLS so C++ compilers don't mangle the names of the C symbols.
Co-authored-by: Reid Linnemann <reidl@spectralogic.com>
Co-authored-by: Dave Baukus <daveb@spectralogic.com>
Sponsored by: Spectra Logic
Depends on D59531
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>