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 No more intel/minix segments. 2012-07-15 22:30:15 +02:00
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 retire 64-bit conversion functions 2013-06-24 16:50:57 +02:00
libbz2 Upgrading bzip2 2012-11-21 18:32:06 +01:00
libc Add UDP support to getsockname(2) and getpeername(2). 2013-10-26 15:26:08 -04:00
libchardriver libchardriver: resolve Coverity warnings 2012-07-30 12:10:13 +00:00
libclkconf i2c: initial bus drivers for am335x and dm37xx 2013-07-15 11:11:13 -04:00
libcompat_minix <a.out.h>, MINIX style: remove as obsolete 2013-08-06 11:43:35 +02:00
libcrypt Updating lib/libcrypt 2013-01-14 11:36:27 +01:00
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 panic: declare as printf-style-checked 2013-05-31 13:35:25 +00:00
libedit fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
libelf libelf:use self hosted m4. 2013-04-24 17:22:59 +02:00
libexec libexec: bug in debugging code 2013-08-06 11:46:40 +02:00
libfetch Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
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 libm Makefile: typo (from NetBSD) 2013-08-05 23:57:26 +02:00
libmenu Importing lib/libmenu 2013-11-12 07:39:59 -05:00
libminc libminc: add reboot() 2013-08-05 10:22:33 -04:00
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 LWIP - fixed makefiles 2013-03-25 16:51:25 +01:00
libprop a bit more -Werror compatability 2013-08-20 11:37:40 +02:00
libpuffs VFS: Implement REQ_BPEEK. 2013-04-24 10:18:16 +00:00
librefuse Let the build system manage compilation flags 2013-03-08 09:41:49 +01:00
librmt Fix warnings trivial warnings. 2013-01-14 11:44:31 +01:00
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 Re-adding extended keys in minix termcap entry 2013-01-23 21:28:17 +01:00
libtimers Replace NULL macro defs with null.h include 2010-07-22 10:03:31 +00:00
libusb panic: declare as printf-style-checked 2013-05-31 13:35:25 +00:00
libutil a few DBG=-g build fixes, both arches 2013-06-16 15:27:41 +02:00
libvassert No more intel/minix segments. 2012-07-15 22:30:15 +02:00
libvboxfs Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
libvirtio panic: declare as printf-style-checked 2013-05-31 13:35:25 +00:00
libvtreefs panic: declare as printf-style-checked 2013-05-31 13:35:25 +00:00
libz Downgrading to netbsd zlib version 2013-04-09 16:43:13 +02:00
lua Importing NetBSD "Kyua" test framework 2013-07-23 20:43:41 +02:00
Makefile Importing lib/libform 2013-11-12 07:56:07 -05:00
Makefile.inc Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00