kernel-ark/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
affs
afs
autofs
autofs4
befs
bfs
cifs [CIFS] For previous fix, mode on mkdir needed S_IFDIR left out. 2005-11-29 22:38:43 -08:00
coda
configfs [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
cramfs
debugfs
devfs
devpts
efs
exportfs
ext2
ext3 [PATCH] ext3: Wrong return value for EXT3_IOC_GROUP_ADD 2005-11-28 14:42:24 -08:00
fat
freevxfs
fuse [PATCH] fuse: check for invalid node ID in fuse_create_open() 2005-11-28 14:42:26 -08:00
hfs
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
hppfs
hugetlbfs [PATCH] Hugetlb: Copy on Write support 2006-01-06 08:33:23 -08:00
isofs
jbd
jffs
jffs2 [JFFS2] Fix the slab cache constructor of 'struct jffs2_inode_info' objects. 2005-11-29 16:57:17 +01:00
jfs
lockd NLM: Fix Oops in nlmclnt_mark_reclaim() 2005-12-19 23:12:31 -05:00
minix
msdos
ncpfs
nfs [INET_SOCK]: Move struct inet_sock & helper functions to net/inet_sock.h 2006-01-03 13:11:21 -08:00
nfs_common
nfsd [PATCH] nfsd: check for read-only exports before setting acls 2005-12-20 10:31:33 -08:00
nls
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
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
smbfs
sysfs [PATCH] sysfs: handle failures in sysfs_make_dirent 2006-01-04 16:18:09 -08:00
sysv
udf remove pointers to the defunct UDF mailing list 2006-01-03 13:19:13 +01:00
ufs
vfat
xfs [PATCH] xfs: missing gfp_t annotations 2005-12-15 10:04:29 -08:00
aio.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c [SCSI] seperate max_sectors from max_hw_sectors 2005-12-15 15:11:40 -08:00
block_dev.c
buffer.c
char_dev.c
compat_ioctl.c [COMPAT] net: SIOCGIFCONF data corruption 2005-11-20 13:41:59 -08:00
compat.c Relax the rw_verify_area() error checking. 2006-01-04 16:20:40 -08:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c [PATCH] Fix oops in vfs_quotaon_mount() 2005-11-28 14:42:26 -08:00
eventpoll.c
exec.c [PATCH] mm: rmap optimisation 2006-01-06 08:33:27 -08:00
fcntl.c
fifo.c
file_table.c
file.c
filesystems.c
fs-writeback.c
inode.c
inotify.c [PATCH] inotify: add two inotify_add_watch flags 2005-12-12 08:57:43 -08:00
ioctl.c
ioprio.c
Kconfig [PATCH] o Update Kconfig documentation to reflect support for readonly mounts. 2006-01-03 11:45:57 -08:00
Kconfig.binfmt
libfs.c
locks.c
Makefile [PATCH] OCFS2: The Second Oracle Cluster Filesystem 2006-01-03 11:45:48 -08:00
mbcache.c
mpage.c [PATCH] add AOP_TRUNCATED_PAGE, prepend AOP_ to WRITEPAGE_ACTIVATE 2006-01-03 11:45:42 -08:00
namei.c
namespace.c
nfsctl.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c
quota.c
read_write.c Relax the rw_verify_area() error checking. 2006-01-04 16:20:40 -08:00
readdir.c
select.c
seq_file.c
stat.c
super.c [PATCH] remove mount/umount uevents from superblock handling 2006-01-04 16:18:07 -08:00
xattr_acl.c
xattr.c [PATCH] Fix listxattr() for generic security attributes 2005-12-12 08:57:42 -08:00