libnvme API review

Chaitanya Kulkarni chaitanyak at nvidia.com
Mon Mar 16 10:21:25 PDT 2026


On 3/16/26 8:34 AM, Ballard, Curtis C (HPE Storage) wrote:
> Daniel,
>
> It looks like these proposed changes are intended to align better with the terms
> in common use or in the NVMe specifications.  That may be a side effect of the
> library authors generally using that to create names rather than being the goal
> since you refer to library consistency as the goal.
>
> With spec and common use in mind, one proposed changed jumped out at me:
> | `nvme_subsystem_reset`       | `nvme_reset_subsystem` |
>
> The term in the NVMe specifications is "subsystem reset" and that term is used
> many times but I don't see any use of "reset subsystem". Most common use by
> those well versed in the technology also is "subsystem reset" though I have
> seen "reset subsystem" used pretty frequently by people who aren't deep in
> the NVMe specs.
>
> I don't know whether there is a 'best' for this term. General software developers
> might prefer "reset subsystem" but mapping to the specs will be easier with
> "subsystem reset".
>
> Curtis Ballard
> Hewlett Packard Enterprise
>
> -----Original Message-----
> From: Linux-nvme <linux-nvme-bounces at lists.infradead.org> On Behalf Of Daniel Wagner
> Sent: Monday, March 16, 2026 4:27 AM
> To: Christoph Hellwig <hch at lst.de>; Hannes Reinecke <hare at suse.de>; Sagi Grimberg <sagi at grimberg.me>; Keith Busch <kbusch at kernel.org>; Chaitanya Kulkarni <chaitanyak at nvidia.com>
> Cc: linux-nvme at lists.infradead.org
> Subject: libnvme API review
>
> Hi,
>
> For the upcoming v3.0 release of nvme-cli and libnvme, I would like to
> get some feedback on the naming scheme used in the libnvme function API.
>
> The goal is to improve consistency across the library. Below is a table
> comparing the current names with the suggested new names.
>
> Functions are grouped by common prefixes:
>
> - Generic top-level functions use the nvme_ prefix.
> - Object-specific functions use the object type as a
>    prefix (e.g., nvme_ns_).
>
> The prefix is typically followed by a verb, such as nvme_create_ctrl.
>
> WDYT?
>
> Thanks,
> Daniel
>
(I'm avoiding top posting for kernel mailing lists.)

 From my experience, it always helps to keep the naming aligned with the
specification.

We often need to search for the same terms in the code and in the spec,
so using consistent naming makes that process much easier.

-ck







More information about the Linux-nvme mailing list