From: Breno Leitao <leitao@debian.org>
To: Joel Becker <jlbec@evilplan.org>
Cc: hch@lst.de, netdev@vger.kernel.org
Subject: Re: configfs: Create config_item from netconsole
Date: Mon, 2 Oct 2023 07:23:45 -0700 [thread overview]
Message-ID: <ZRrScSauRvN8nkUs@gmail.com> (raw)
In-Reply-To: <ZRccv2H3wK6PL5Rb@google.com>
Hello Joel,
On Fri, Sep 29, 2023 at 11:51:43AM -0700, Joel Becker wrote:
> On Thu, Sep 28, 2023 at 07:44:58AM -0700, Breno Leitao wrote:
> > Should I create a configfs_register_item() to solve this problem?
>
> It's an express philosophy of configfs that all lifetimes are controlled
> by userspace, which is why we don't have such a facility. If hch wants
> to change this, I defer to his judgement. But I don't think it is
> necessary.
I am happy the suggestion you gave, so, no need to change this
philosophy.
> In this fashion, each console created on the command line will get a
> name of `cmdline0`, `cmdline1`, etc. They will not be part of the
> configfs tree. If the user comes along later and says `mkdir
> /sys/kernel/config/netconsole/cmdline1`, the existing `cmdline1` console
> will be attached to the configfs tree. The user is then free to disable
> and reconfigure the device.
I am happy with this approach.
> There would, of course, be some other corner cases to handle. Do we
> allow dynamic names that look like command-line names if no command-line
> parameter exists?
I'd say so, I think `cmdline` targets shouldn't be special if there are
not netconsole targets defined at boot time.
> Does `rmdir /sys/kernel/config/netconsole/cmdline0`
> actually delete the command-line console entry, or does it return
> -EBUSY? And so on.
I've looked at the code and tested, it `cmdline0`could be removed as any
other target entry. On top of that, the user can create a new `cmdline0`
entry, and, it will be set with the default values for the attributes.
I am planning to send a patch based on what you suggested, and we can
continue the discuss there.
Thanks for the _very_ detailed feedback!
Breno
prev parent reply other threads:[~2023-10-02 14:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 14:44 configfs: Create config_item from netconsole Breno Leitao
2023-09-29 18:51 ` Joel Becker
2023-10-02 14:23 ` Breno Leitao [this message]
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=ZRrScSauRvN8nkUs@gmail.com \
--to=leitao@debian.org \
--cc=hch@lst.de \
--cc=jlbec@evilplan.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).