From: Michael Tokarev on
Peter Korsgaard wrote:
> Make devtmpfs available on (embedded) configurations without SHMEM/TMPFS,
> using ramfs instead.
>
> Saves ~15KB.
>
> Signed-off-by: Peter Korsgaard <jacmet(a)sunsite.dk>
[]> --- a/drivers/base/devtmpfs.c
> +++ b/drivers/base/devtmpfs.c
> @@ -44,7 +45,11 @@ __setup("devtmpfs.mount=", mount_param);
> static int dev_get_sb(struct file_system_type *fs_type, int flags,
> const char *dev_name, void *data, struct vfsmount *mnt)
> {
> +#ifdef CONFIG_TMPFS
> return get_sb_single(fs_type, flags, data, shmem_fill_super, mnt);
> +#else
> + return get_sb_single(fs_type, flags, data, ramfs_fill_super, mnt);
> +#endif
> }

May be completely not to the point or even wrong, but I were
starring at this change for quite some time trying to understand
what's the difference. Can we do it like this:

#ifdef CONFIG_TMPFS
# define devtmpfs_fill_super shmem_fill_super
#else
# define devtmpfs_fill_super ramfs_fill_super
#endif
return get_sb_single(fs_type, flags, data, devtmpfs_fill_super, mnt);

?

Or maybe it's just me... ;)

/mjt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Korsgaard on
>>>>> "Kay" == Kay Sievers <kay.sievers(a)vrfy.org> writes:

Hi,

Kay> For the patch:
Kay> Acked-by: Kay Sievers <kay.sievers(a)vrfy.org>

Great - Greg, will you pick this up?

http://patchwork.kernel.org/patch/85237/

--
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Tue, Mar 16, 2010 at 02:04:06PM +0100, Peter Korsgaard wrote:
> >>>>> "Kay" == Kay Sievers <kay.sievers(a)vrfy.org> writes:
>
> Hi,
>
> Kay> For the patch:
> Kay> Acked-by: Kay Sievers <kay.sievers(a)vrfy.org>
>
> Great - Greg, will you pick this up?
>
> http://patchwork.kernel.org/patch/85237/

Yes, it's in my "to-apply" queue. I'm at a conference for a few days,
so give me a few more :)

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg KH on
On Fri, Mar 12, 2010 at 11:25:04AM +0100, Peter Korsgaard wrote:
> Make devtmpfs available on (embedded) configurations without SHMEM/TMPFS,
> using ramfs instead.
>
> Saves ~15KB.
>
> Signed-off-by: Peter Korsgaard <jacmet(a)sunsite.dk>
> ---
> drivers/base/Kconfig | 2 +-
> drivers/base/devtmpfs.c | 5 +++++
> fs/ramfs/inode.c | 2 +-
> include/linux/ramfs.h | 2 ++
> 4 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig
> index fd52c48..7e33b16 100644
> --- a/drivers/base/Kconfig
> +++ b/drivers/base/Kconfig
> @@ -18,7 +18,7 @@ config UEVENT_HELPER_PATH
>
> config DEVTMPFS
> bool "Maintain a devtmpfs filesystem to mount at /dev"
> - depends on HOTPLUG && SHMEM && TMPFS
> + depends on HOTPLUG
> help
> This creates a tmpfs filesystem instance early at bootup.
> In this filesystem, the kernel driver core maintains device

With this patch, the Kconfig help text now is incorrect.
Is there a way to explicitly call out in the Kconfig which way devtmpfs
is being created? How about a multiple selection that chooses either
TMPFS or RAMFS, with the default being TMPFS?

So care to redo this so that people can easily determine what is going
to happen easier than this patch currently causes?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Peter Korsgaard on
>>>>> "Greg" == Greg KH <greg(a)kroah.com> writes:

Hi,

>> config DEVTMPFS
>> bool "Maintain a devtmpfs filesystem to mount at /dev"
>> - depends on HOTPLUG && SHMEM && TMPFS
>> + depends on HOTPLUG
>> help
>> This creates a tmpfs filesystem instance early at bootup.
>> In this filesystem, the kernel driver core maintains device

Greg> With this patch, the Kconfig help text now is incorrect.

Greg> Is there a way to explicitly call out in the Kconfig which way
Greg> devtmpfs is being created? How about a multiple selection that
Greg> chooses either TMPFS or RAMFS, with the default being TMPFS?

I don't think that's needed - If CONFIG_TMPFS isn't set, then ramfs
pretends to be tmpfs anyway, see mm/shmem.c:

static struct file_system_type tmpfs_fs_type = {
.name = "tmpfs",
.get_sb = ramfs_get_sb,
.kill_sb = kill_litter_super,
};

So calling it tmpfs isn't really wrong.

Greg> So care to redo this so that people can easily determine what is going
Greg> to happen easier than this patch currently causes?

We can change the help text to say tmpfs/ramfs if you prefer - OK?

--
Bye, Peter Korsgaard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/