[RFC PATCHv2 3/4] nvme: add generic debugfs support
Hannes Reinecke
hare at suse.de
Sun Oct 12 23:32:34 PDT 2025
On 10/9/25 12:05, Nilay Shroff wrote:
> Add generic infrastructure for creating and managing debugfs files in
> the NVMe module. This introduces helper APIs that allow NVMe drivers to
> register and unregister debugfs entries, along with a reusable attribute
> structure for defining new debugfs files.
>
> The implementation uses seq_file interfaces to safely expose per-NS and
> per-NS-head statistics, while supporting both simple show callbacks and
> full seq_operations.
>
> Signed-off-by: Nilay Shroff <nilay at linux.ibm.com>
> ---
> drivers/nvme/host/Makefile | 2 +-
> drivers/nvme/host/debugfs.c | 122 ++++++++++++++++++++++++++++++++++++
> drivers/nvme/host/nvme.h | 10 +++
> 3 files changed, 133 insertions(+), 1 deletion(-)
> create mode 100644 drivers/nvme/host/debugfs.c
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list