From: Rob Landley <rob@landley.net>
To: Christian Brauner <brauner@kernel.org>, Lichen Liu <lichliu@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
safinaskar@zohomail.com, kexec@lists.infradead.org,
weilongchen@huawei.com, cyphar@cyphar.com,
linux-api@vger.kernel.org, zohar@linux.ibm.com,
stefanb@linux.ibm.com, initramfs@vger.kernel.org, corbet@lwn.net,
linux-doc@vger.kernel.org, viro@zeniv.linux.org.uk, jack@suse.cz
Subject: Re: [PATCH v2] fs: Add 'rootfsflags' to set rootfs mount options
Date: Thu, 21 Aug 2025 14:02:00 -0500 [thread overview]
Message-ID: <da1b1926-ba18-4a81-93e0-56cb2f85e4dd@landley.net> (raw)
In-Reply-To: <20250821-zirkel-leitkultur-2653cba2cd5b@brauner>
On 8/21/25 03:24, Christian Brauner wrote:
> This seems rather useful but I've renamed "rootfsflags" to
I remember when bikeshedding came in the form of a question.
> "initramfs_options" because "rootfsflags" is ambiguous and it's not
> really just about flags.
The existing config option (applying to the fallback root=/dev/blah
filesystem overmounting rootfs) is called "rootflags", the new name
differs for the same reason init= and rdinit= differ.
The name "rootfs" has been around for over 20 years, as evidenced in
https://kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
and so on. Over the past decade least three independently authored
patches have come up with the same name for this option. Nobody ever
suggested a name where people have to remember whether it has _ or - in it.
Technically initramfs is the name of the cpio extractor and related
plumbing, the filesystem instance identifies itself as "rootfs" in
/proc/mounts:
$ head -n 1 /proc/mounts
rootfs / rootfs rw,size=29444k,nr_inodes=7361 0 0
I.E. rootfs is an instance of ramfs (or tmpfs) populated by initramfs.
Given that rdinit= is two letters added to init= it made sense for
rootfsflags= to be two letters added to rootflags= to distinguish them.
(The "rd" was because it's legacy shared infrastructure with the old
1990s initial ramdisk mechanism ala /dev/ram0. The same reason
bootloaders like grub have an "initrd" command to load the external
cpio.gz for initramfs when it's not statically linked into the kernel
image: the delivery mechanism is the same, the kernel inspects the file
type to determine how to handle it. This new option _isn't_ legacy, and
"rootfs" is already common parlance, so it seemed obvious to everyone
with even moderate domain familiarity what to call it.)
> Other than that I think it would make sense to just raise the limit to
> 90% for the root_fs_type mount. I'm not sure why this super privileged
> code would only be allowed 50% by default.
Because when a ram based filesystem pins all available memory the kernel
deadlocks (ramfs always doing this was one of the motivations to use
tmpfs, but tmpfs doesn't mean you have swap), because the existing use
cases for this come from low memory systems that already micromanage
this sort of thing so a different default wouldn't help, because it
isn't a domain-specific decision but was inheriting the tmpfs default
value so you'd need extra code _to_ specify a different default, because
you didn't read the answer to the previous guy who asked this question
earlier in this patch's discussion...
https://lkml.org/lkml/2025/8/8/1050
Rob
P.S. It's a pity lkml.iu.edu and spinics.net are both down right now,
but after vger.kernel.org deleted all reference to them I can't say I'm
surprised. Neither lkml.org nor lore.kernel.org have an obvious threaded
interface allowing you to find stuff without a keyword search, and
lore.kernel.org somehow manages not to list "linux-kernel" in its top
level list of "inboxes" at all. The wagons are circled pretty tightly...
next prev parent reply other threads:[~2025-08-21 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 12:14 Lichen Liu
2025-08-20 15:17 ` Lichen Liu
2025-08-21 8:24 ` Christian Brauner
2025-08-21 13:04 ` Askar Safin
2025-08-21 19:02 ` Rob Landley [this message]
2025-08-22 0:44 ` Randy Dunlap
2025-08-22 13:25 ` Aleksa Sarai
2025-08-22 12:48 ` Lichen Liu
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=da1b1926-ba18-4a81-93e0-56cb2f85e4dd@landley.net \
--to=rob@landley.net \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=cyphar@cyphar.com \
--cc=initramfs@vger.kernel.org \
--cc=jack@suse.cz \
--cc=kexec@lists.infradead.org \
--cc=lichliu@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=safinaskar@zohomail.com \
--cc=stefanb@linux.ibm.com \
--cc=viro@zeniv.linux.org.uk \
--cc=weilongchen@huawei.com \
--cc=zohar@linux.ibm.com \
/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®