linux-sg2042/fs
David Howells 642fb4d1f1 [PATCH] NOMMU: Provide shared-writable mmap support on ramfs
The attached patch makes ramfs support shared-writable mmaps by:

 (1) Attempting to perform a contiguous block allocation to the requested size
     when truncate attempts to increase the file from zero size, such as
     happens when:

	fd = shm_open("/file/on/ramfs", ...):
	ftruncate(fd, size_requested);
	addr = mmap(NULL, subsize, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_SHARED,
		    fd, offset);

 (2) Permitting any shared-writable mapping over any contiguous set of extant
     pages. get_unmapped_area() will return the address into the actual ramfs
     pages. The mapping may start anywhere and be of any size, but may not go
     over the end of file. Multiple mappings may overlap in any way.

 (3) Not permitting a file to be shrunk if it would truncate any shared
     mappings (private mappings are copied).

Thus this patch provides support for POSIX shared memory on NOMMU kernels,
with certain limitations such as there being a large enough block of pages
available to support the allocation and it only working on directly mappable
filesystems.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:32 -08:00
..
9p [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
adfs [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00
affs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
afs fs/afs/callback.c should #include "cmservice.h" 2005-11-08 16:56:17 +01:00
autofs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
autofs4 [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
befs remove unused fs/befs/attribute.c 2005-11-08 16:54:53 +01:00
bfs [PATCH] bfs iget() abuses 2005-10-04 13:22:01 -07:00
cifs [CIFS] For previous fix, mode on mkdir needed S_IFDIR left out. 2005-11-29 22:38:43 -08:00
coda [PATCH] Driver Core: fix up all callers of class_device_create() 2005-10-28 09:52:52 -07:00
configfs [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
cramfs [PATCH] fs/cramfs/uncompress.c should #include <linux/cramfs_fs.h> 2005-09-10 10:06:35 -07:00
debugfs [PATCH] remove duplicate get_dentry functions in various places 2005-06-23 09:45:20 -07:00
devfs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
devpts [PATCH] Generic VFS fallback for security xattrs 2005-09-05 00:05:52 -07:00
efs Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
exportfs Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ext2 [PATCH] ext2: remove duplicate newlines in ext2_fill_super 2005-11-13 18:14:17 -08:00
ext3 [PATCH] ext3: Wrong return value for EXT3_IOC_GROUP_ADD 2005-11-28 14:42:24 -08:00
fat [PATCH] fat: respect silent mount flag 2005-11-09 07:55:58 -08:00
freevxfs fs/freevxfs/: add #include's 2005-11-08 16:47:45 +01:00
fuse [PATCH] fuse: check for invalid node ID in fuse_create_open() 2005-11-28 14:42:26 -08:00
hfs [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason 2005-11-09 07:55:57 -08:00
hfsplus [PATCH] hfsplus oops fix 2006-01-06 08:33:20 -08:00
hostfs [PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows 2005-12-29 09:48:15 -08:00
hpfs [PATCH] hpfs: remove spurious mtime update 2005-11-09 07:55:57 -08:00
hppfs [PATCH] hppfs: fix symlink error path 2005-08-26 11:39:19 -07:00
hugetlbfs [PATCH] Hugetlb: Copy on Write support 2006-01-06 08:33:23 -08:00
isofs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
jbd [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
jffs jffs_fm.c should #include "intrep.h" 2005-11-08 16:48:36 +01:00
jffs2 [JFFS2] Fix the slab cache constructor of 'struct jffs2_inode_info' objects. 2005-11-29 16:57:17 +01:00
jfs JFS: set i_ctime & i_mtime on target directory when creating links 2005-10-31 16:53:04 -06:00
lockd NLM: Fix Oops in nlmclnt_mark_reclaim() 2005-12-19 23:12:31 -05:00
minix [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
msdos [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
ncpfs [PATCH] add a file_permission helper 2005-11-09 07:55:59 -08:00
nfs [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
nfs_common [PATCH] nfsacl: Solaris VxFS compatibility fix 2005-10-11 09:46:54 -07:00
nfsd [PATCH] nfsd: check for read-only exports before setting acls 2005-12-20 10:31:33 -08:00
nls [PATCH] make some things static 2005-05-05 16:36:47 -07:00
ntfs update the email address of Randy Dunlap 2006-01-03 13:37:51 +01:00
ocfs2 [PATCH] This patch contains the following cleanups: 2006-01-03 11:45:55 -08:00
openpromfs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
partitions [PATCH] Driver core: Make block devices create the proper symlink name 2006-01-04 16:18:09 -08:00
proc Insanity avoidance in /proc 2005-12-30 08:39:10 -08:00
qnx4 fs/qnx4/bitmap.c: #if 0 qnx4_new_block() 2006-01-03 13:21:37 +01:00
ramfs [PATCH] NOMMU: Provide shared-writable mmap support on ramfs 2006-01-06 08:33:32 -08:00
reiserfs s/retreiv/retriev/g 2006-01-03 13:27:11 +01:00
relayfs [PATCH] relayfs: remove warning printk() in relay_switch_subbuf() 2005-12-20 17:33:22 -08:00
romfs Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
smbfs [PATCH] smbfs: 'names_cache' memory leak 2005-11-07 07:53:39 -08:00
sysfs [PATCH] sysfs: handle failures in sysfs_make_dirent 2006-01-04 16:18:09 -08:00
sysv [PATCH] update filesystems for new delete_inode behavior 2005-09-09 13:57:27 -07:00
udf remove pointers to the defunct UDF mailing list 2006-01-03 13:19:13 +01:00
ufs [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
vfat [PATCH] fat: remove the unneeded vfat_find() in vfat_rename() 2005-10-30 17:37:32 -08:00
xfs [PATCH] xfs: missing gfp_t annotations 2005-12-15 10:04:29 -08:00
Kconfig [PATCH] o Update Kconfig documentation to reflect support for readonly mounts. 2006-01-03 11:45:57 -08:00
Kconfig.binfmt [PATCH] CONFIG_IA32 2005-10-30 17:37:10 -08:00
Makefile [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:48 -08:00
aio.c [PATCH] aio: replace locking comments with assert_spin_locked() 2005-11-13 18:14:16 -08:00
attr.c [PATCH] fs/attr.c: remove BUG() 2005-10-30 17:37:27 -08:00
bad_inode.c [PATCH] make some things static 2005-05-05 16:36:47 -07:00
binfmt_aout.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
binfmt_elf.c [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
binfmt_elf_fdpic.c [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
binfmt_em86.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
binfmt_flat.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
binfmt_misc.c [PATCH] add a file_permission helper 2005-11-09 07:55:59 -08:00
binfmt_script.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
binfmt_som.c [PATCH] mm: mm_init set_mm_counters 2005-10-29 21:40:38 -07:00
bio.c [SCSI] seperate max_sectors from max_hw_sectors 2005-12-15 15:11:40 -08:00
block_dev.c [PATCH] block: add unlocked_ioctl support for block devices 2005-06-23 09:45:32 -07:00
buffer.c [PATCH] __find_get_block_slow() cleanup 2005-11-07 07:53:39 -08:00
char_dev.c [PATCH] cdev: cdev_put oops 2005-07-12 16:01:02 -07:00
compat.c Relax the rw_verify_area() error checking. 2006-01-04 16:20:40 -08:00
compat_ioctl.c [COMPAT] net: SIOCGIFCONF data corruption 2005-11-20 13:41:59 -08:00
dcache.c [PATCH] Remove hlist_for_each_rcu() API, convert existing use to hlist_for_each_entry_rcu 2005-11-07 07:53:35 -08:00
dcookies.c [PATCH] dcookies.c: use proper refcounting functions 2005-07-07 18:23:52 -07:00
direct-io.c [PATCH] core remove PageReserved 2005-10-29 21:40:39 -07:00
dnotify.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dquot.c [PATCH] Fix oops in vfs_quotaon_mount() 2005-11-28 14:42:26 -08:00
eventpoll.c [PATCH] epoll: handle timeout overflow 2005-09-28 07:46:41 -07:00
exec.c [PATCH] mm: rmap optimisation 2006-01-06 08:33:27 -08:00
fcntl.c [PATCH] files: lock-free fd look-up 2005-09-09 13:57:55 -07:00
fifo.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file.c [PATCH] Fix the fdtable freeing in the case of vmalloced fdset/arrays 2005-09-14 12:38:26 -07:00
file_table.c [PATCH] mm: rename kmem_cache_s to kmem_cache 2005-11-07 07:53:24 -08:00
filesystems.c [PATCH] fix missing includes 2005-10-30 17:37:32 -08:00
fs-writeback.c [PATCH] kernel-docs: fix kernel-doc format problems 2005-11-07 07:53:55 -08:00
inode.c [PATCH] fix nr_unused accounting, and avoid recursing in iput with I_WILL_FREE set 2005-10-30 17:37:26 -08:00
inotify.c [PATCH] inotify: add two inotify_add_watch flags 2005-12-12 08:57:43 -08:00
ioctl.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ioprio.c fs/ioprio.c should #include <linux/syscalls.h> 2005-11-08 16:57:02 +01:00
libfs.c [PATCH] fix fsync(dir) return value for ram-based filesystems 2005-06-25 16:24:38 -07:00
locks.c [PATCH] VFS: local denial-of-service with file leases 2005-11-13 12:29:58 -05:00
mbcache.c [PATCH] kfree cleanup: fs 2005-11-07 07:54:06 -08:00
mpage.c [PATCH] add AOP_TRUNCATED_PAGE, prepend AOP_ to WRITEPAGE_ACTIVATE 2006-01-03 11:45:42 -08:00
namei.c [PATCH] fs/namei.c: make path_lookup_create() static 2005-11-09 07:56:40 -08:00
namespace.c [PATCH] add a vfs_permission helper 2005-11-09 07:55:58 -08:00
nfsctl.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
open.c [PATCH] add a file_permission helper 2005-11-09 07:55:59 -08:00
pipe.c [PATCH] sched: TASK_NONINTERACTIVE 2005-09-10 10:06:22 -07:00
pnode.c [PATCH] unbindable mounts 2005-11-07 18:18:11 -08:00
pnode.h [PATCH] unbindable mounts 2005-11-07 18:18:11 -08:00
posix_acl.c [PATCH] gfp flags annotations - part 1 2005-10-08 15:00:57 -07:00
quota.c [PATCH] quota: small cleanups 2005-11-07 07:53:39 -08:00
quota_v1.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
quota_v2.c [PATCH] quota: possible bug in quota format v2 support 2005-04-16 15:25:47 -07:00
read_write.c Relax the rw_verify_area() error checking. 2006-01-04 16:20:40 -08:00
readdir.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
select.c [PATCH] files: lock-free fd look-up 2005-09-09 13:57:55 -07:00
seq_file.c [PATCH] allow callers of seq_open do allocation themselves 2005-11-07 18:18:09 -08:00
stat.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
super.c [PATCH] remove mount/umount uevents from superblock handling 2006-01-04 16:18:07 -08:00
xattr.c [PATCH] Fix listxattr() for generic security attributes 2005-12-12 08:57:42 -08:00
xattr_acl.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00