From: Dave Young <dyoung@redhat.com>
To: akpm@linux-foundation.org, rob@landley.net,
gregkh@linuxfoundation.org, grant.likely@secretlab.ca,
sebastian.capella@linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] use initmpfs even if there's root= cmdline
Date: Thu, 12 Dec 2013 19:49:17 +0800 [thread overview]
Message-ID: <20131212114917.GA2035@darkstar.nay.redhat.com> (raw)
In-Reply-To: <20131212092542.GA14218@dhcp-16-126.nay.redhat.com>
On Thu, Dec 12, 2013 at 05:25:42PM +0800, Dave Young wrote:
>
> Current code use ramfs instead of tmpfs for stub when root= defined.
>
> But for real use case with initramfs, usually there's like cmdline like
> root=UUID=$UUID the root dev is the real device. For that case we have
> no way to use initmpfs, thus this patch removes the limitation so tmpfs
> can benefit more people.
>
> The logic become:
> if CONFIG_TMPFS && rootfstype is not ramfs
> use tmpfs
> else
> use ramfs
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
> init/do_mounts.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/init/do_mounts.c b/init/do_mounts.c
> index 8e5addc..6fde471 100644
> --- a/init/do_mounts.c
> +++ b/init/do_mounts.c
> @@ -622,8 +622,8 @@ int __init init_rootfs(void)
> if (err)
> return err;
>
> - if (IS_ENABLED(CONFIG_TMPFS) && !saved_root_name[0] &&
> - (!root_fs_names || strstr(root_fs_names, "tmpfs"))) {
> + if (IS_ENABLED(CONFIG_TMPFS) &&
> + (root_fs_names && !(strstr(root_fs_names, "ramfs")))) {
Oops, I probably mistakenly tested with "rootfstype=tmpfs". Rethinking about
it, below should be what I want:
if (IS_ENABLED(CONFIG_TMPFS) &&
(!root_fs_names || strstr(root_fs_names, "tmpfs"))) {
I will retest it tomorrow.
Qeustion to Rob Landley:
Rob, do you remember why you added the checking for root=? git log mentioned
below which is not clear:
use ramfs instead of tmpfs for stub when root= defined (for cosmetic
reasons).
--
Thanks
Dave
next prev parent reply other threads:[~2013-12-12 11:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 9:25 [PATCH] use initmpfs even if there's root= cmdline Dave Young
2013-12-12 11:49 ` Dave Young [this message]
2013-12-13 2:38 ` Dave Young
2013-12-18 17:51 ` Rob Landley
2013-12-19 2:35 ` Dave Young
2013-12-23 4:49 ` Rob Landley
2013-12-23 6:43 ` Dave Young
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=20131212114917.GA2035@darkstar.nay.redhat.com \
--to=dyoung@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob@landley.net \
--cc=sebastian.capella@linaro.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