public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Landley <rob@landley.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Al Viro <viro@zeniv.linux.org.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jens Axboe <axboe@kernel.dk>, Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH 5/5] initmpfs v2: Use initramfs if rootfstype= or root= specified.
Date: Thu, 25 Jul 2013 23:12:20 -0500	[thread overview]
Message-ID: <1374811940.3031.15@driftwood> (raw)
In-Reply-To: <20130719125718.2227f52ccf642dda060f0ae8@linux-foundation.org> (from akpm@linux-foundation.org on Fri Jul 19 14:57:18 2013)

On 07/19/2013 02:57:18 PM, Andrew Morton wrote:
> On Tue, 16 Jul 2013 16:45:39 -0700 (PDT) Rob Landley  
> <rob@landley.net> wrote:
> 
> > Command line option rootfstype=ramfs to obtain old initramfs  
> behavior,
> > and use ramfs instead of tmpfs for stub when root= defined (for  
> cosmetic
> > reasons).
> 
> Could we get a Documentation/kernel-parameters.txt update please?

Sorry for the delay, traveling. Behind on email...

"rootfstype" is already documented in kernel parameters:

         rootfstype=     [KNL] Set root filesystem type

I just applied the existing definition to initramfs now that it has  
more than one filesystem option there. Do you want me to add a special  
case here to say that rootfstype= still works when the root filesystem  
is initramfs? Or would it instead make more sense to add:

Signed-off-by: Rob Landley <rob@landley.net>

Document that rootfstype= applies to initmpfs too.

--- a/Documentation/filesystems/ramfs-rootfs-initramfs.txt
+++ b/Documentation/filesystems/ramfs-rootfs-initramfs.txt
@@ -79,6 +79,9 @@ to just make sure certain lists can't become empty.
  Most systems just mount another filesystem over rootfs and ignore  
it.  The
  amount of space an empty instance of ramfs takes up is tiny.

+If CONFIG_TMPFS is enabled, rootfs will use tmpfs instead of ramfs by  
default.
+To force ramfs, add "rootfstype=ramfs" to the kernel command line.
+
  What is initramfs?
  ------------------


(What I _didn't_ do yet is hook up rootflags= to initmpfs, so you can  
specify size= as something other than 50%. Partly because if you have  
an empty cpio archive and the rootflags= applies to ext3 or something,  
those flags could potentially confuse tmpfs with unknown options and  
throw errors. And partly because mount -o remount,size=20% works fine  
after the fact, so it's not time critical and I easily can do a  
follow-up patch. The one potential downside is if you want to have a  
cpio archive eat more than 50% of the kernel's memory, it'll fail to  
extract into tmpfs with the size limits. But the rootfstype=ramfs  
downgrade also works around that for now...)

There are a number of follow up patches I could do, but the basic  
functionality doesn't depend on them...

Rob

      reply	other threads:[~2013-07-26  4:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 23:45 [PATCH 0/5] initmpfs v2: use tmpfs instead of ramfs for rootfs Rob Landley
2013-07-16 23:45 ` [PATCH 1/5] initmpfs v2: replace MS_NOUSER in initramfs Rob Landley
2013-07-16 23:45 ` [PATCH 2/5] initmpfs v2: Move bdi setup from init_rootfs to init_ramfs Rob Landley
2013-07-16 23:45 ` [PATCH 3/5] initmpfs v2: Move rootfs code from fs/ramfs/ to init/ Rob Landley
2013-07-16 23:45 ` [PATCH 4/5] initmpfs v2: Make rootfs use tmpfs when CONFIG_TMPFS enabled Rob Landley
2013-07-16 23:45 ` [PATCH 5/5] initmpfs v2: Use initramfs if rootfstype= or root= specified Rob Landley
2013-07-19 19:57   ` Andrew Morton
2013-07-26  4:12     ` Rob Landley [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=1374811940.3031.15@driftwood \
    --to=rob@landley.net \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swarren@nvidia.com \
    --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