[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131212114917.GA2035@darkstar.nay.redhat.com>
Date: Thu, 12 Dec 2013 19:49:17 +0800
From: Dave Young <dyoung@...hat.com>
To: akpm@...ux-foundation.org, rob@...dley.net,
gregkh@...uxfoundation.org, grant.likely@...retlab.ca,
sebastian.capella@...aro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] use initmpfs even if there's root= cmdline
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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists