vfs - #ifndef _VFS_H_ #define _VFS_H_ /* * Virtual File...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef _VFS_H_ #define _VFS_H_ /* * Virtual File System layer functions. * * The VFS layer translates operations on abstract on-disk files or * pathnames to operations on specific files on specific filesystems. */ struct uio; /* kernel or userspace I/O buffer (uio.h) */ struct device; /* abstract structure for a device (dev.h) */ struct fs; /* abstract structure for a filesystem (fs.h) */ struct vnode; /* abstract structure for an on-disk file (vnode.h) */ /* * VFS layer low-level operations. * See vnode.h for direct operations on vnodes. * See fs.h for direct operations on filesystems/devices. * * vfs_setcurdir - change current directory of current thread by vnode * vfs_clearcurdir - change current directory of current thread to "none" * vfs_getcurdir - retrieve vnode of current directory of current thread * vfs_sync - force all dirty buffers to disk * vfs_getroot - get root vnode for the filesystem named DEVNAME * vfs_getdevname - get mounted device name for the filesystem passed in */ int vfs_setcurdir(struct vnode *dir); int vfs_clearcurdir(void); int vfs_getcurdir(struct vnode **retdir); int vfs_sync(void); int vfs_getroot(const char *devname, struct vnode **result); const char *vfs_getdevname(struct fs *fs); /* * VFS layer mid-level operations.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

vfs - #ifndef _VFS_H_ #define _VFS_H_ /* * Virtual File...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online