From: Jeff Garzik <jgarzik@pobox.com>
To: Matt Mackall <mpm@selenic.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] tiny shmem/tmpfs replacement
Date: Tue, 31 Aug 2004 15:52:08 -0400 [thread overview]
Message-ID: <4134D6E8.9050502@pobox.com> (raw)
In-Reply-To: <200408311914.i7VJE6VX021726@hera.kernel.org>
Linux Kernel Mailing List wrote:
> ChangeSet 1.1882, 2004/08/31 10:34:47-07:00, mpm@selenic.com
>
> [PATCH] tiny shmem/tmpfs replacement
>
> A patch to replace tmpfs/shmem with ramfs for systems without swap,
> incorporating the suggestions from Andi and Hugh. It uses ramfs instead.
>
> Signed-off-by: Matt Mackall <mpm@selenic.com>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
this change needs lib-izing...
> diff -Nru a/fs/ramfs/inode.c b/fs/ramfs/inode.c
> --- a/fs/ramfs/inode.c 2004-08-31 12:14:15 -07:00
> +++ b/fs/ramfs/inode.c 2004-08-31 12:14:15 -07:00
> @@ -31,6 +31,7 @@
> #include <linux/string.h>
> #include <linux/smp_lock.h>
> #include <linux/backing-dev.h>
> +#include <linux/ramfs.h>
>
> #include <asm/uaccess.h>
>
> @@ -39,7 +40,6 @@
>
> static struct super_operations ramfs_ops;
> static struct address_space_operations ramfs_aops;
> -static struct file_operations ramfs_file_operations;
> static struct inode_operations ramfs_file_inode_operations;
> static struct inode_operations ramfs_dir_inode_operations;
>
> @@ -48,7 +48,7 @@
> .memory_backed = 1, /* Does not contribute to dirty memory */
> };
>
> -static struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev)
> +struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev)
> {
> struct inode * inode = new_inode(sb);
>
> @@ -146,7 +146,7 @@
> .commit_write = simple_commit_write
> };
>
> -static struct file_operations ramfs_file_operations = {
> +struct file_operations ramfs_file_operations = {
> .read = generic_file_read,
> .write = generic_file_write,
> .mmap = generic_file_mmap,
> @@ -199,7 +199,7 @@
> return 0;
> }
>
> -static struct super_block *ramfs_get_sb(struct file_system_type *fs_type,
> +struct super_block *ramfs_get_sb(struct file_system_type *fs_type,
> int flags, const char *dev_name, void *data)
> {
> return get_sb_nodev(fs_type, flags, data, ramfs_fill_super);
> diff -Nru a/include/linux/ramfs.h b/include/linux/ramfs.h
> --- /dev/null Wed Dec 31 16:00:00 196900
> +++ b/include/linux/ramfs.h 2004-08-31 12:14:15 -07:00
> @@ -0,0 +1,11 @@
> +#ifndef _LINUX_RAMFS_H
> +#define _LINUX_RAMFS_H
> +
> +struct inode *ramfs_get_inode(struct super_block *sb, int mode, dev_t dev);
> +struct super_block *ramfs_get_sb(struct file_system_type *fs_type,
> + int flags, const char *dev_name, void *data);
> +
> +extern struct file_operations ramfs_file_operations;
> +extern struct vm_operations_struct generic_file_vm_ops;
> +
> +#endif
> diff -Nru a/mm/filemap.c b/mm/filemap.c
> --- a/mm/filemap.c 2004-08-31 12:14:15 -07:00
> +++ b/mm/filemap.c 2004-08-31 12:14:15 -07:00
> @@ -1488,7 +1488,7 @@
> return 0;
> }
>
> -static struct vm_operations_struct generic_file_vm_ops = {
> +struct vm_operations_struct generic_file_vm_ops = {
> .nopage = filemap_nopage,
> .populate = filemap_populate,
> };
a lot of this is libfs material, for example.
Jeff
parent reply other threads:[~2004-08-31 20:07 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <200408311914.i7VJE6VX021726@hera.kernel.org>]
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=4134D6E8.9050502@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.