[PATCH 1/8] nvmet: add debugfs support

Sagi Grimberg sagi at grimberg.me
Sat Mar 23 13:25:21 PDT 2024


> +int nvmet_debugfs_subsys_setup(struct nvmet_subsys *subsys)
> +{
> +	int ret = 0;
> +
> +	subsys->debugfs_dir = debugfs_create_dir(subsys->subsysnqn,
> +						 nvmet_debugfs);
> +	if (IS_ERR(subsys->debugfs_dir)) {
> +		ret = PTR_ERR(subsys->debugfs_dir);
> +		subsys->debugfs_dir = NULL;
> +	}
> +	return ret;
> +}
> +
> +void nvmet_debugfs_subsys_free(struct nvmet_subsys *subsys)
> +{
> +	debugfs_remove_recursive(subsys->debugfs_dir);
> +}

The subsys setup/free look trivial enough to just open-code
in the call-sites.

The rest looks fine to me.



More information about the Linux-nvme mailing list