#
ee038489 |
| 17-Jun-2016 |
David van Moolenbroek <david@minix3.org> |
MFS: do not crash when reading superblock fails
While MFS failing to do I/O on a block is generally fatal, reading the superblock at mount time is an exception: this case may occur when the given pa
MFS: do not crash when reading superblock fails
While MFS failing to do I/O on a block is generally fatal, reading the superblock at mount time is an exception: this case may occur when the given partition is too small to contain the superblock. Therefore, MFS should not crash or even report anything in this case, but rather refuse to mount cleanly.
This fixes #121.
Change-Id: I11326b48922a0e0ebefecbb8eec7c428f985f2b3
show more ...
|
#
0a6a1f1d |
| 15-Oct-2015 |
Lionel Sambuc <lionel.sambuc@gmail.com> |
NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the 10-10-2015.
This updates: - LLVM to 3.6.1 - GCC to GCC 5.1 - Replace minix/commands/z
NetBSD re-synchronization of the source tree
This brings our tree to NetBSD 7.0, as found on -current on the 10-10-2015.
This updates: - LLVM to 3.6.1 - GCC to GCC 5.1 - Replace minix/commands/zdump with usr.bin/zdump - external/bsd/libelf has moved to /external/bsd/elftoolchain/ - Import ctwm - Drop sprintf from libminc
Change-Id: I149836ac18e9326be9353958bab9b266efb056f0
show more ...
|
#
81b1f871 |
| 25-Sep-2015 |
Lionel Sambuc <lionel.sambuc@gmail.com> |
Fix noassert builds
Change-Id: I5626950ffa29afe7a0fb9e9144839b311824da92
|
#
7c48de6c |
| 21-Sep-2015 |
David van Moolenbroek <david@minix3.org> |
Resolve more warnings
Change-Id: Ibc1b7f7cd45ad7295285e59c6ce55888266fece8
|
#
129adfeb |
| 10-Aug-2015 |
David van Moolenbroek <david@minix3.org> |
Annotations and tweaks for live update
This change is necessary for instrumentation-aided state transfer.
Change-Id: I24be938009f02e302a15083f9a7a11824975e42b
|
#
4472b590 |
| 04-Apr-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: rework prefetch API
This patch changes the prefetch API so that file systems must now provide a set of block numbers, rather than a set of buffers. The result is a leaner and more well-
libminixfs: rework prefetch API
This patch changes the prefetch API so that file systems must now provide a set of block numbers, rather than a set of buffers. The result is a leaner and more well-defined API; linear computation of the range of blocks to prefetch; duplicates no longer interfering with the prefetch process; guaranteed inclusion of the block needed next into the prefetch range; and, limits and policy decisions better established by libminixfs now actually being moved into libminixfs.
Change-Id: I7e44daf2d2d164bc5e2f1473ad717f3ff0f0a77f
show more ...
|
#
6c46a77d |
| 29-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: better support for read errors and EOF
- The lmfs_get_block*(3) API calls may now return an error. The idea is to encourage a next generation of file system services to do a better
libminixfs: better support for read errors and EOF
- The lmfs_get_block*(3) API calls may now return an error. The idea is to encourage a next generation of file system services to do a better job at dealing with block read errors than the MFS-derived implementations do. These existing file systems have been changed to panic immediately upon getting a block read error, in order to let unchecked errors cause corruption. Note that libbdev already retries failing I/O operations a few times first.
- The libminixfs block device I/O module (bio.c) now deals properly with end-of-file conditions on block devices. Since a device or partition size may not be a multiple of the root file system's block size, support for partial block retrival has been added, with a new internal lmfs_get_partial_block(3) call. A new test program, test85, tests the new handling of EOF conditions when reading, writing, and memory-mapping a block device.
Change-Id: I05e35b6b8851488328a2679da635ebba0c6d08ce
show more ...
|
#
1311233c |
| 29-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: keep track of block usage
This patch changes the libminixfs API and implementation such that the library is at all times aware of how many total and used blocks there are in the file sys
libminixfs: keep track of block usage
This patch changes the libminixfs API and implementation such that the library is at all times aware of how many total and used blocks there are in the file system. This removes the last upcall of libminixfs into file systems (fs_blockstats). In the process, make this part of the libminixfs API a little prettier and more robust. Change file systems accordingly. Since this change only adds to MFS being unable to deal with zones and blocks having different sizes, fail to mount such file systems immediately rather than triggering an assert later.
Change-Id: I078e589c7e1be1fa691cf391bf5dfddd1baf2c86
show more ...
|
#
0314acfb |
| 28-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: miscellaneous API cleanup
Mostly removal of unused parameters from calls.
Change-Id: I0eb7b568265d1669492d958e78b9e69d7cf6fc05
|
#
b8f6d4a6 |
| 29-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: do not flush blocks that are in use
This removes an implicit requirement for the way the libminixfs API is to be used, namely that a block is to be marked as dirty only once its contents
libminixfs: do not flush blocks that are in use
This removes an implicit requirement for the way the libminixfs API is to be used, namely that a block is to be marked as dirty only once its contents have been fully updated, within a single get_block/put_block window. The requirement may not be appropriate for all file systems.
Change-Id: I6a129d51b1a5e9aec1572039dc7c1c82dd795db5
show more ...
|
#
cb9453ca |
| 27-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: add support for peeking blocks
With this change, the lmfs_get_block*(3) functions allow the caller to specify that it only wants the block if it is in the cache or the secondary VM cache
libminixfs: add support for peeking blocks
With this change, the lmfs_get_block*(3) functions allow the caller to specify that it only wants the block if it is in the cache or the secondary VM cache. If the block is not found there, the functions return NULL. Previously, the PREFETCH method would be used to this end instead, which was both abuse in name and less efficient.
Change-Id: Ieb5a15b67fa25d2008a8eeef9d126ac908fc2395
show more ...
|
#
d75faf18 |
| 13-Aug-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: add support for memory-mapped holes
When VM asks a file system to provide a block to satisfy a page fault on a file memory mapping, the file system previously had no way to inform VM tha
libminixfs: add support for memory-mapped holes
When VM asks a file system to provide a block to satisfy a page fault on a file memory mapping, the file system previously had no way to inform VM that the block is a hole, since there is no corresponding block on the underlying device. To work around this, MFS and ext2 would actually allocate a block for the hole when asked by VM, which not only defeats the point of holes in the first place, but also does not work on read-only file systems. With this patch, a new libminixfs call allows the file system to inform VM about holes. This issue does raise the question as to whether the VM cache is using the right data structures, since there are now two places where we have to fake a device offset. This will have to be revisited in the future.
The patch changes file systems accordingly, and adds a test to test74.
Change-Id: Ib537d56b3f30a8eb05bc1f63c92b5c7428d18f4c
show more ...
|
#
e94f856b |
| 13-Aug-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs/VM: fix memory-mapped file corruption
This patch employs one solution to resolve two independent but related issues. Both issues are the result of one fundamental aspect of the way VM's
libminixfs/VM: fix memory-mapped file corruption
This patch employs one solution to resolve two independent but related issues. Both issues are the result of one fundamental aspect of the way VM's memory mapping works: VM uses its cache to map in blocks for memory-mapped file regions, and for blocks already in the VM cache, VM does not go to the file system before mapping them in. To preserve consistency between the FS and VM caches, VM relies on being informed about all updates to file contents through the block cache. The two issues are both the result of VM not being properly informed about such updates:
1. Once a file system provides libminixfs with an inode association (inode number + inode offset) for a disk block, this association is not broken until a new inode association is provided for it. If a block is freed and reallocated as a metadata (non-inode) block, its old association is maintained, and may be supplied to VM's secondary cache. Due to reuse of inodes, it is possible that the same inode association becomes valid for an actual file block again. In that case, when that new file is memory-mapped, under certain circumstances, VM may end up using the metadata block to satisfy a page fault on the file, due to the stale inode association. The result is a corrupted memory mapping, with the application seeing data other than the current file contents mapped in at the file block.
2. When a hole is created in a file, the underlying block is freed from the device, but VM is not informed of this update, and thus, if VM's cache contains the block with its previous inode association, this block will remain there. As a result, if an application subsequently memory-maps the file, VM will map in the old block at the position of the hole, rather than an all-zeroes block. Thus, again, the result is a corrupted memory mapping.
This patch resolves both issues by making the file system inform the minixfs library about blocks being freed, so that libminixfs can break the inode association for that block, both in its own cache and in the VM cache. Since libminixfs does not know whether VM has the block in its cache or not, it makes a call to VM for each block being freed. Thus, this change introduces more calls to VM, but it solves the correctness issues at hand; optimizations may be introduced later. On the upside, all freed blocks are now marked as clean, which should result in fewer blocks being written back to the device, and the blocks are removed from the caches entirely, which should result in slightly better cache usage.
This patch is necessary but not sufficient to resolve the situation with respect to memory mapping of file holes in general. Therefore, this patch extends test 74 with a (rather particular but effective) test for the first issue, but not yet with a test for the second one.
This fixes #90.
Change-Id: Iad8b134d2f88a884f15d3fc303e463280749c467
show more ...
|
#
b65ad59e |
| 30-Mar-2015 |
David van Moolenbroek <david@minix3.org> |
libminixfs: add support for 64-bit block numbers
There are currently no devices out there that require this change. The change is merely needed to support subsequent changes.
Change-Id: I64214c5f46
libminixfs: add support for 64-bit block numbers
There are currently no devices out there that require this change. The change is merely needed to support subsequent changes.
Change-Id: I64214c5f46ff4a2260815d15c15e4a17709b9036
show more ...
|
#
e321f655 |
| 15-Nov-2014 |
David van Moolenbroek <david@minix3.org> |
libfsdriver: support mmap on FSes with no device
This patch adds (very limited) support for memory-mapping pages on file systems that are mounted on the special "none" device and that do not impleme
libfsdriver: support mmap on FSes with no device
This patch adds (very limited) support for memory-mapping pages on file systems that are mounted on the special "none" device and that do not implement PEEK support by themselves. This includes hgfs, vbfs, and procfs.
The solution is implemented in libvtreefs, and consists of allocating pages, filling them with content by calling the file system's READ functionality, passing the pages to VM, and freeing them again. A new VM flag is used to indicate that these pages should be mapped in only once, and thus not cached beyond their single use. This prevents stale data from getting mapped in without the involvement of the file system, which would be problematic on file systems where file contents may become outdated at any time. No VM caching means no sharing and poor performance, but mmap no longer fails on these file systems.
Compared to a libc-based approach, this patch retains the on-demand nature of mmap. Especially tail(1) is known to map in a large file area only to use a small portion of it.
All file systems now need to be given permission for the SETCACHEPAGE and CLEARCACHE calls to VM.
A very basic regression test is added to test74.
Change-Id: I17afc4cb97315b515cad1542521b98f293b6b559
show more ...
|
#
65f76edb |
| 30-Sep-2014 |
David van Moolenbroek <david@minix3.org> |
minix libraries: resolve clang warnings
Change-Id: I0f3425fb8838708c9848a006f1eee5ab1bad71d2
|
Revision tags: v3.3.0 |
|
#
ef9dc93f |
| 24-Aug-2014 |
David van Moolenbroek <david@minix3.org> |
Clean up obsolete FS support routines
Change-Id: I56d0ab51f32064bb964051732de7e2465dc22b75
|
#
ebd3c067 |
| 24-Aug-2014 |
David van Moolenbroek <david@minix3.org> |
libminixfs: add block I/O routines
The new functionality aims to save each file system server from having to implement its own block I/O routines just so that it can serve as a root file system. Th
libminixfs: add block I/O routines
The new functionality aims to save each file system server from having to implement its own block I/O routines just so that it can serve as a root file system. The new source file (bio.c) lists the requirements that file system servers have to fulfill in order to use the routines.
Change-Id: Ia0190fd5c30e8c2097ed8f4b0e3ccde1827e0b92
show more ...
|
#
c5beebb6 |
| 24-Aug-2014 |
David van Moolenbroek <david@minix3.org> |
libminixfs: do not make fs_sync upcalls
The file system may not be expecting these upcalls at arbitrary moments, while they serve only as a performance optimization anyway.
Change-Id: I0748fd1f6c26
libminixfs: do not make fs_sync upcalls
The file system may not be expecting these upcalls at arbitrary moments, while they serve only as a performance optimization anyway.
Change-Id: I0748fd1f6c2645ddbb64466093ee36025aac45e0
show more ...
|
#
433d6423 |
| 28-Jul-2014 |
Lionel Sambuc <lionel@minix3.org> |
New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
|