minix/servers
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
..
devman Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
ds Cleanup: Remove minix.bootprog.mk 2013-03-06 11:56:56 +01:00
ext2 Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
hgfs Create SFFS library out of HGFS 2012-04-09 18:08:26 +02:00
inet inet: Reply to TASK messages even if we're waiting for STAT reply 2013-09-12 14:06:27 +02:00
init init: handle getty string of "" (default) 2013-06-12 07:04:53 +00:00
ipc ipc: add missing printf argument. 2013-10-11 10:36:53 -04:00
is is: leave newline for stacktrace for SF9 dump 2013-06-12 07:04:53 +00:00
iso9660fs iso9660fs fix 2013-11-19 15:59:33 +00:00
lwip fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
mfs Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
pfs PFS: unblock the child when unsuspending an accept 2013-08-21 11:12:48 +02:00
pm PM: fix clock_gettime() nanosecond overflow 2013-10-27 17:05:03 +01:00
procfs <a.out.h>, MINIX style: remove as obsolete 2013-08-06 11:43:35 +02:00
rs VM: support for shared call mask ACLs 2013-08-08 23:22:58 +02:00
sched kernel: spelling fixes 2013-10-09 20:24:17 -04:00
vbfs Add VBFS: VirtualBox Shared Folder File System 2012-04-11 00:27:48 +02:00
vfs libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
vm libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
Makefile lwip (inet's alternative) is compiled by default 2013-03-25 16:51:25 +01:00
Makefile.inc Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00