|
AquilaOS documentation
How it works, and its code
|
minix: loading and mounting the filesystem, and the vnodes of its inodes. More...
#include <core/system.h>#include <core/module.h>#include <fs/vfs.h>#include <fs/posix.h>#include <fs/vcache.h>#include <fs/bcache.h>#include <aquila/errno.h>#include <ds/bitmap.h>#include <minix.h>Go to the source code of this file.
Functions | |
| int | minix_inode_build (struct minix *desc, ino_t ino, struct vnode **ref) |
| Gets the vnode of an inode: the cached one if it's in use, or a new one made from the inode on the disk. | |
| int | minix_inode_sync (struct vnode *inode) |
| Writes a vnode's attributes back to its inode on the disk. | |
| static int | minix_init () |
| Installs the minix filesystem at boot. | |
| static int | minix_load (struct vnode *dev, struct vnode **super) |
| Loads a minix filesystem from a device: its superblock, its bitmaps, and its root directory's vnode in *super. | |
| static int | minix_mount (struct vnode *dir, int flags, void *_args) |
| Mounts the minix filesystem of a device (the dev argument) on a directory. | |
Variables | |
| struct fs | minixfs |
minix: loading and mounting the filesystem, and the vnodes of its inodes.
The inode and zone bitmaps are kept in memory, and the vnodes in use in a cache by inode number. See minix.h for the disk's format.
Definition in file minix.c.
|
static |
Installs the minix filesystem at boot.
Definition at line 110 of file minix.c.
References minix_init(), minixfs, and vfs_install().
Referenced by minix_init().
Gets the vnode of an inode: the cached one if it's in use, or a new one made from the inode on the disk.
| desc | the mounted filesystem |
| ino | the inode number |
| ref | if not NULL, set to the vnode |
Definition at line 30 of file minix.c.
References vnode::fs, minix_inode::gid, vnode::gid, vnode::ino, kfree(), kmalloc(), M_ZERO, minix_inode_build(), minix_inode_read(), minixfs, minix_inode::mode, vnode::mode, minix_inode::mtime, vnode::mtime, vnode::nlink, minix_inode::nlinks, NULL, vnode::p, vnode::rdev, minix_inode::size, vnode::size, timespec::tv_nsec, timespec::tv_sec, minix_inode::uid, vnode::uid, minix::vcache, vcache_find(), vcache_insert(), and minix_inode::zones.
Referenced by minix_inode_build(), minix_load(), minix_vget(), and minix_vmknod().
| int minix_inode_sync | ( | struct vnode * | inode | ) |
Writes a vnode's attributes back to its inode on the disk.
| inode | the vnode |
Definition at line 87 of file minix.c.
References minix_inode::gid, vnode::gid, vnode::ino, minix_inode_read(), minix_inode_sync(), minix_inode_write(), minix_inode::mode, vnode::mode, minix_inode::mtime, vnode::mtime, vnode::nlink, minix_inode::nlinks, vnode::p, minix_inode::size, vnode::size, timespec::tv_sec, minix_inode::uid, and vnode::uid.
Referenced by minix_inode_sync(), and minix_trunc().
Loads a minix filesystem from a device: its superblock, its bitmaps, and its root directory's vnode in *super.
Returns 0, -EINVAL if the device doesn't have a minix v1 filesystem with 1 KiB blocks, or a negative errno.
Definition at line 119 of file minix.c.
References minix::bcache, bcache_init(), minix_superblock::block_size, minix::bs, minix::dentry_size, minix_superblock::firstdatazone, bcache::hashmap, vcache::hashmap, minix::imap, minix_superblock::imap_blocks, minix::imap_off, minix::inode_size, minix::inode_table, kfree(), kmalloc(), M_ZERO, minix_superblock::magic, bitmap::map, bitmap::max_idx, minix_inode_build(), minix_load(), MINIX_MAGIC, MINIX_MAGIC2, minix::name_len, minix_superblock::ninodes, NULL, minix_superblock::nzones, minix::superblock, minix::supernode, minix::vcache, vcache_init(), vfs_read(), minix::zmap, minix_superblock::zmap_blocks, and minix::zmap_off.
Referenced by minix_load().
|
static |
Mounts the minix filesystem of a device (the dev argument) on a directory.
Definition at line 236 of file minix.c.
References fs::load, minix_mount(), minixfs, NULL, vfs_bind(), and vfs_lookup().
Referenced by minix_mount().
| struct fs minixfs |
Definition at line 265 of file minix.c.
Referenced by minix_init(), minix_inode_build(), and minix_mount().