Go to file
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
benchmarks Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
bin fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
commands Importing usr.bin/colcrt 2013-11-19 07:26:37 -05:00
common a bit more -Werror compatability 2013-08-20 11:37:40 +02:00
dist/nvi Termcap update, replacing elvis by nvi. 2013-01-24 07:44:38 +01:00
distrib Importing usr.bin/colcrt 2013-11-19 07:26:37 -05:00
docs Allow install of binutils and import texinfo 2013-07-12 14:18:08 +02:00
drivers Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
etc Importing usr.bin/calendar 2013-11-12 06:18:01 -05:00
external Fix some unintialized variables with -O3 2013-10-08 11:45:49 +02:00
gnu Prevent make -C gnu from installing files in / 2013-09-17 15:19:50 +02:00
include Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
kernel Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
lib libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
libexec increase -Werror resilience 2013-08-21 13:53:39 +02:00
man Importing usr.bin/hexdump 2013-10-29 15:18:45 -04:00
releasetools Importing usr.bin/colcrt 2013-11-19 07:26:37 -05:00
sbin Importing sbin/nologin 2013-10-17 08:40:33 -04:00
servers libminixfs: allow non-pagesize-multiple FSes 2013-11-21 10:03:06 +00:00
share enable fatal warnings 2013-09-01 12:59:37 +00:00
sys Importing usr.bin/nl 2013-10-14 18:06:05 -04:00
test Replaced add64, add64u and add64ul with operators. 2013-11-13 13:11:33 +00:00
tests Importing usr.bin/id 2013-11-12 10:15:47 -05:00
tools x86_hdimage.sh -i: crossbuild x86 release CD 2013-11-07 13:44:22 +00:00
usr.bin Importing usr.bin/colcrt 2013-11-19 07:26:37 -05:00
usr.sbin mkfs.mfs, mkproto: minor features 2013-11-19 15:58:05 +00: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 Importing NetBSD "Kyua" test framework 2013-07-23 20:43:41 +02:00