minix/lib
Ben Gras 740c1a7425 libminixfs: allow non-pagesize-multiple FSes
The memory-mapped files implementation (mmap() etc.) is implemented with
the help of the filesystems using the in-VM FS cache. Filesystems tell it
about all cached blocks and their metadata. Metadata is: device offset and,
if any (and known), inode number and in-inode offset. VM can then map in
requested memory-mapped file blocks, and request them if necessary.

A limitation of this system is that filesystem block sizes that are not
a multiple of the VM system (and VM hardware) page size are not possible;
we can't map blocks in partially. (We can copy, but then the benefits of
mapping and sharing the physical pages is gone.) So until before this
commit various pieces of caching code assumed page size multiple
blocksizes. This isn't strictly necessary as long as mmap() needn't be
supported on that FS.

This change allows the in-FS cache code (libminixfs) to allocate any-sized
blocks, and will not interact with the VM cache for non-pagesize-multiple
blocks. In that case it will also signal requestors, by failing 'peek'
requests, that mmap() should not be supported on this FS. VM and VFS
will then gracefully fail all file-mapping mmap() calls, and exec() will
fall back to copying executable blocks instead of mmap()ping executables.

As a result, 3 diagnostics that signal file-mapped mmap()s failing
(hitherto an unusual occurence) are disabled, as ld.so does file-mapped
mmap()s to map in objects it needs. On FSes not supporting it this situation
is legitimate and shouldn't cause so much noise. ld.so will revert to its own
minix-specific allocate+copy style of starting executables if mmap()s fail.

Change-Id: Iecb1c8090f5e0be28da8f5181bb35084eb18f67b
2013-11-21 10:03:06 +00:00
..
csu a bit more -Werror compatability 2013-08-20 11:37:40 +02:00
libasyn
libaudiodriver libaudiodriver: handle interrupt only once 2013-08-20 19:42:37 +02:00
libbdev libbdev: fix IOCTL grant access bug 2013-10-22 14:01:03 +00:00
libblockdriver
libbz2
libc Add UDP support to getsockname(2) and getpeername(2). 2013-10-26 15:26:08 -04:00
libchardriver
libclkconf
libcompat_minix
libcrypt
libcurses Fix out of array bounds errors with -O3 2013-10-08 11:43:31 +02:00
libddekit fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
libdevman
libedit fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
libelf
libexec libexec: bug in debugging code 2013-08-06 11:46:40 +02:00
libfetch
libform Importing lib/libform 2013-11-12 07:56:07 -05:00
libgpio gpio: port to am335x 2013-09-03 08:14:18 -04:00
libhgfs Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
libi2cdriver libi2cdriver: add functions for IC register access 2013-09-18 08:10:26 -04:00
liblwip fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
libm
libmenu Importing lib/libmenu 2013-11-12 07:39:59 -05:00
libminc
libminixfs libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
libminlib VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
libmthread fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
libnetdriver libnetdriver: only block datalink messages 2013-08-18 12:09:51 +02:00
libnetsock
libprop a bit more -Werror compatability 2013-08-20 11:37:40 +02:00
libpuffs
librefuse
librmt
libsffs Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
libsys Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
libterminfo
libtimers
libusb
libutil
libvassert
libvboxfs Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
libvirtio
libvtreefs
libz
lua
Makefile Importing lib/libform 2013-11-12 07:56:07 -05:00
Makefile.inc