28 if (!S_ISDIR(dir->
mode))
105 if (!dir || !dir->
fs || !
vnode)
108 if (!S_ISDIR(dir->
mode))
134 if (!odir || !odir->
fs || !ndir)
137 if (!S_ISDIR(odir->
mode) || !S_ISDIR(ndir->
mode))
140 if (odir->
fs != ndir->
fs)
181 if (!super || !super->
fs)
int kdev_map(struct devid *dd, struct vm_space *vm_space, struct vm_entry *vm_entry)
Maps a device into an address space (mmap() of a framebuffer).
A device driver: its operations, any of which may be NULL.
Who does a filesystem operation: where its paths start, and its credentials and umask.
A mapping (map entry): a range of an address space, its permissions, and where its pages come from.
struct vm_object * vm_object
its object: what its other pages come from (a file)
void * p
the pager's own data (a file's vnode)
int type
its kind (VMOBJ_*)
An address space: its mappings, and its page tables.
A file in memory (a vnode): what its inode says, and the kernel's own state.
size_t ref
how many references there are to it
int(*) setattr(struct vnode *vnode)
int(*) vmknod(struct vnode *dir, const char *fn, uint32_t mode, dev_t dev, struct uio *uio, struct vnode **ref)
int(*) vget(struct vnode *super, ino_t ino, struct vnode **vnode)
int(*) vrename(struct vnode *odir, const char *ofn, struct vnode *ndir, const char *nfn, struct uio *uio)
int(*) vunlink(struct vnode *dir, const char *fn, struct uio *uio)
int(*) map(struct vm_space *vm_space, struct vm_entry *vm_entry)
int(*) vlink(struct vnode *dir, const char *fn, struct vnode *vnode, struct uio *uio)
#define VMOBJ_FILE
a file's pages
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_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.
int vfs_vget(struct vnode *super, ino_t ino, struct vnode **ref)
Gets the vnode of an inode, by its number.
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_vunlink(struct vnode *dir, const char *fn, struct uio *uio)
Removes a name from a directory.
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_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_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_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.