Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
Ben Gras db40bc9db0 vfs: mmap support
. libc: add vfs_mmap, a way for vfs to initiate mmap()s.
	  This is a good special case to have as vfs is a slightly
	  different client from regular user processes. It doesn't do it
	  for itself, and has the dev & inode info already so the callback
	  to VFS for the lookup isn't necessary. So it has different info
	  to have to give to VM.
	. libc: also add minix_mmap64() that accepts a 64-bit offset, even
	  though our off_t is still 32 bit now.
	. to support mmap, we need to create new references to FD's (such
	  as an FD) so that the mmapped object can never be removed even if
	  all FD's are closed. To do that we conceptually dup the
	  filedescriptor into a new range that is only visible to the system.
	  So there are FDS_PER_PROCESS fd's, which is more than OPEN_MAX,
	  per process, and user processes can still use up to OPEN_MAX
	  FD's. mmap()ped objects then get extra reference in the invisible
	  range so user processes can't close them. The in-vfs fd_set is
	  of size FDS_PER_PROCESS.
	. On exec() time, try to mmap() in the executable if available.
	  (It is not yet available in this commit.)
	. To support mmap(), add do_vm_call that allows VM to lookup
	  (to ino+dev), do i/o from and close FD's on behalf of other
	  processes.
	. To make this possible, a few functions have 2 more arguments
	  to make the target process explicit (instead of the implicit
	  global fp) and to specify whether the request is from a user
	  process or the system (which implies whether FD's starting at
	  OPEN_MAX are valid). These are close_fd, common_open, actual_llseek,
	  actual_read_write_peek, get_fd and get_filp2.

Change-Id: I831551e45a6781c74313c450eb9c967a68505932
2013-05-23 12:38:30 +00:00
benchmarks Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
bin remove utimes() workarounds 2013-04-12 18:55:40 +00:00
commands vfs: mmap support 2013-05-23 12:38:30 +00:00
common Downgrading to netbsd zlib version 2013-04-09 16:43:13 +02:00
dist/nvi Termcap update, replacing elvis by nvi. 2013-01-24 07:44:38 +01:00
distrib mkfs.mfs: various programs 2013-05-13 11:18:15 +02:00
docs build:refactor arm_sdimage.sh as to no longer require root. 2013-04-23 11:24:12 +02:00
drivers at_wini: enable busmastering in pci if necessary 2013-05-18 15:57:30 +00:00
etc vfs: mmap support 2013-05-23 12:38:30 +00:00
external remove utimes() workarounds 2013-04-12 18:55:40 +00:00
gnu/dist Toolchain upgrade and portability improvements. 2012-11-15 16:07:29 +01:00
include vfs: mmap support 2013-05-23 12:38:30 +00:00
kernel arm: recognize instruction fetch pagefault 2013-05-21 15:05:06 +02:00
lib vfs: mmap support 2013-05-23 12:38:30 +00:00
libexec Removing obsolete _NBSD_LIBC define 2013-02-26 09:44:24 +00:00
man mkfs.mfs: various programs 2013-05-13 11:18:15 +02:00
releasetools build:arm enable verbose mode by default. 2013-05-16 20:39:19 +02:00
sbin ext2: annotate cache blocks with inode metadata 2013-04-26 15:39:07 +00:00
servers vfs: mmap support 2013-05-23 12:38:30 +00:00
share remove utimes() workarounds 2013-04-12 18:55:40 +00:00
sys vfs: mmap support 2013-05-23 12:38:30 +00:00
test vm: new secondary cache code 2013-04-24 10:18:16 +00:00
tools mkfs.mfs: various programs 2013-05-13 11:18:15 +02:00
usr.bin toproto:convert special execute bits to chars 2013-04-24 13:22:45 +02:00
usr.sbin mkfs: only complain about failing stat with -d 2013-05-23 12:09:38 +02:00
.gitignore gitignore: ignore some more generated files 2012-12-06 13:29:20 +00:00
.gitreview misc:Add gerrit code review support. 2013-01-16 09:44:16 +01:00
build.sh Reverting back to default value of MKARZERO 2013-01-17 10:03:58 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile some etc fixes 2013-04-04 12:50:12 +00:00