|
AquilaOS documentation
How it works, and its code
|
The vnode operations that work on a directory and a name, or on a vnode's inode: each checks its arguments, then calls the filesystem's operation (vops). More...
Go to the source code of this file.
Functions | |
| int | vfs_vmknod (struct vnode *dir, const char *name, mode_t mode, dev_t dev, struct uio *uio, struct vnode **ref) |
| Makes a node in a directory. | |
| int | vfs_vcreat (struct vnode *dir, const char *name, struct uio *uio, struct vnode **ref) |
| Makes a regular file in a directory, with no permissions set. | |
| int | vfs_vmkdir (struct vnode *dir, const char *name, struct uio *uio, struct vnode **ref) |
| Makes a directory in a directory, with no permissions set. | |
| int | vfs_vunlink (struct vnode *dir, const char *fn, struct uio *uio) |
| Removes a name from a directory. | |
| int | vfs_vlink (struct vnode *dir, const char *fn, struct vnode *vnode, struct uio *uio) |
| Adds a name for an existing file (a hard link) to a directory of the same filesystem. | |
| int | vfs_vrename (struct vnode *odir, const char *ofn, struct vnode *ndir, const char *nfn, struct uio *uio) |
| Renames an entry, possibly to another directory of the same filesystem. | |
| int | vfs_setattr (struct vnode *vnode) |
| Has the filesystem store a vnode's attributes (mode, owner, times) after they were changed in memory. | |
| int | vfs_vget (struct vnode *super, ino_t ino, struct vnode **ref) |
| Gets the vnode of an inode, by its number. | |
| int | vfs_map (struct vm_space *vm_space, struct vm_entry *vm_entry) |
| Maps a file into an address space, for mmap(): a device's own mapping, or the filesystem's. | |
The vnode operations that work on a directory and a name, or on a vnode's inode: each checks its arguments, then calls the filesystem's operation (vops).
Definition in file vops.c.
Maps a file into an address space, for mmap(): a device's own mapping, or the filesystem's.
| vm_space | the address space |
| vm_entry | the mapping, whose object is the file |
Definition at line 205 of file vops.c.
References vnode::fs, ISDEV, kdev_map(), vops::map, vm_object::p, vm_object::type, vfs_map(), vm_entry::vm_object, VMOBJ_FILE, VNODE_DEV, and fs::vops.
Referenced by sys_mmap(), and vfs_map().
| int vfs_setattr | ( | struct vnode * | vnode | ) |
Has the filesystem store a vnode's attributes (mode, owner, times) after they were changed in memory.
| vnode | the vnode |
Definition at line 156 of file vops.c.
References vnode::fs, vops::setattr, vfs_setattr(), and fs::vops.
Referenced by store(), and vfs_setattr().
Makes a regular file in a directory, with no permissions set.
| dir | the directory |
| name | the new file's name |
| uio | who is asking |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 52 of file vops.c.
References vfs_vcreat(), and vfs_vmknod().
Referenced by vfs_vcreat().
Gets the vnode of an inode, by its number.
On success it has a reference for the caller.
| super | any vnode of the filesystem (it names the filesystem) |
| ino | the inode number |
| ref | if not NULL, set to the vnode (the caller closes it) |
Definition at line 176 of file vops.c.
References vnode::fs, vnode::ino, NULL, vnode::ref, vfs_vget(), vops::vget, and fs::vops.
Referenced by entry_get(), lookup_name(), vfs_lookup_parent(), vfs_parent(), vfs_remove(), and vfs_vget().
Adds a name for an existing file (a hard link) to a directory of the same filesystem.
| dir | the directory |
| fn | the new name |
| vnode | the file |
| uio | who is asking |
Definition at line 103 of file vops.c.
References vnode::fs, vnode::mode, vfs_vlink(), vops::vlink, and fs::vops.
Referenced by vfs_link(), and vfs_vlink().
Makes a directory in a directory, with no permissions set.
| dir | the directory |
| name | the new directory's name |
| uio | who is asking |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 66 of file vops.c.
References vfs_vmkdir(), and vfs_vmknod().
Referenced by vfs_vmkdir().
| int vfs_vmknod | ( | struct vnode * | dir, |
| const char * | name, | ||
| mode_t | mode, | ||
| dev_t | dev, | ||
| struct uio * | uio, | ||
| struct vnode ** | ref ) |
Makes a node in a directory.
On success the new vnode has a reference for the caller.
| dir | the directory |
| name | the new node's name |
| mode | its type (S_IF*) and permissions |
| dev | its device number, for a device node |
| uio | who is asking |
| ref | if not NULL, set to the new vnode (the caller closes it) |
Definition at line 22 of file vops.c.
References vnode::fs, vnode::mode, vfs_vmknod(), vops::vmknod, and fs::vops.
Referenced by pts_new(), vfs_mknod(), vfs_vcreat(), vfs_vmkdir(), and vfs_vmknod().
| int vfs_vrename | ( | struct vnode * | odir, |
| const char * | ofn, | ||
| struct vnode * | ndir, | ||
| const char * | nfn, | ||
| struct uio * | uio ) |
Renames an entry, possibly to another directory of the same filesystem.
| odir | the directory it's in |
| ofn | its name |
| ndir | the directory it goes to |
| nfn | its new name |
| uio | who is asking |
Definition at line 132 of file vops.c.
References vnode::fs, vnode::mode, vfs_vrename(), fs::vops, and vops::vrename.
Referenced by vfs_rename(), and vfs_vrename().
Removes a name from a directory.
| dir | the directory |
| fn | the name |
| uio | who is asking |
Definition at line 79 of file vops.c.
References vnode::fs, vfs_vunlink(), fs::vops, and vops::vunlink.
Referenced by pty_free(), vfs_remove(), and vfs_vunlink().