mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: David Reaver <me@davidreaver.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, cocci@inria.fr,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/6] debugfs: Replace dentry with an opaque handle in debugfs API
Date: Mon, 10 Feb 2025 12:12:46 -0500	[thread overview]
Message-ID: <20250210121246.60b2efbf@gandalf.local.home> (raw)
In-Reply-To: <20250210170016.GD1977892@ZenIV>

On Mon, 10 Feb 2025 17:00:16 +0000
Al Viro <viro@zeniv.linux.org.uk> wrote:

> On Mon, Feb 10, 2025 at 11:53:13AM -0500, Steven Rostedt wrote:
> 
> > No it will not be fine. You should not be using dentry at all. I thought
> > this was going to convert debugfs over to kernfs. The debugfs_node should
> > be using kernfs and completely eliminate the use of dentry.  
> 
> I disagree, actually - kernfs is an awful model for anything, sysfs included...

Then what would you suggest? It's the only generic system that is
appropriate for control features, where the underlining "files" are
actually functions to modify or query information from the kernel.

The entire VFS layer is designed for efficient management of some kind of
storage device, where the only interaction with the storage device is
through VFS.

For pseudo file systems like debugfs, sysfs and tracefs, the underlining
"storage" is the kernel itself, where we need a way for the "storage" part
to work with the kernel. The VFS layer doesn't give that, which is why
debugfs and tracefs used dentry as that interface, as the dentry does
represent the underlining storage.

From what I understand (and Christian can correct me), is that kernfs was
created to be that interface of the "storage" connecting back to the
kernel. Where the VFS layer deals with the user accessing the file system
(read, write, mkdir, etc) but kernfs is the "data storage" that attaches
those call back to the kernel to retrieve kernel information or even modify
the kernel behavior.

-- Steve

  reply	other threads:[~2025-02-10 17:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10  5:20 David Reaver
2025-02-10  5:20 ` [RFC PATCH 1/6] debugfs: Add temporary "#define debugfs_node dentry" directives David Reaver
2025-02-10  5:20 ` [RFC PATCH 2/6] debugfs: Add helper functions for debugfs_node encapsulation David Reaver
2025-02-10  5:20 ` [RFC PATCH 3/6] relay: Replace dentry with debugfs_node David Reaver
2025-02-10  5:20 ` [RFC PATCH 4/6] debugfs: Automated conversion from dentry to debugfs_node David Reaver
2025-02-10  5:20 ` [RFC PATCH 5/6] debugfs: Manual fixes for incomplete Coccinelle conversions David Reaver
2025-02-10 16:45   ` Steven Rostedt
2025-02-10 17:53     ` David Reaver
2025-02-10  5:20 ` [RFC PATCH 6/6] debugfs: Replace debugfs_node #define with struct wrapping dentry David Reaver
2025-02-10  5:58   ` Al Viro
2025-02-10  5:53 ` [RFC PATCH 0/6] debugfs: Replace dentry with an opaque handle in debugfs API Al Viro
2025-02-10  7:08 ` Greg Kroah-Hartman
2025-02-10 16:08   ` David Reaver
2025-02-10 16:53     ` Steven Rostedt
2025-02-10 17:00       ` Al Viro
2025-02-10 17:12         ` Steven Rostedt [this message]
2025-02-10 17:25           ` Steven Rostedt
2025-02-10 17:59       ` David Reaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250210121246.60b2efbf@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=brauner@kernel.org \
    --cc=cocci@inria.fr \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@davidreaver.com \
    --cc=rafael@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®