12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

VFSOPS (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> VFSOPS (9)<strong>NAME</strong>vfsops, VFS_MOUNT, VFS_START, VFS_UNMOUNT, VFS_ROOT, VFS_QUOTACTL, VFS_STATVFS,VFS_SYNC, VFS_VGET, VFS_FHTOVP, VFS_VPTOFH, VFS_SNAPSHOT, VFS_SUSPENDCTL —kernelfile system interfaceSYNOPSIS#include #include #include intVFS_MOUNT(struct mount ∗mp , const char ∗path , void ∗data , size_t ∗dlen );intVFS_START(struct mount ∗mp , int flags);intVFS_UNMOUNT(struct mount ∗mp , int mntflags);intVFS_ROOT(struct mount ∗mp , struct vnode ∗∗vpp);intVFS_QUOTACTL(struct mount ∗mp , int cmds , uid_t uid , void ∗arg);intVFS_STATVFS(struct mount ∗mp , struct statvfs ∗sbp);intVFS_SYNC(struct mount ∗mp , int waitfor , kauth_cred_t cred);intVFS_VGET(struct mount ∗mp , ino_t ino , struct vnode ∗∗vpp);intVFS_FHTOVP(struct mount ∗mp , struct fid ∗fhp , struct vnode ∗∗vpp);intVFS_VPTOFH(struct vnode ∗vp , struct fid ∗fhp , size_t ∗fh_size);intVFS_SNAPSHOT(struct mount ∗mp , struct vnode ∗vp , struct timespec ∗ts);intVFS_SUSPENDCTL(struct mount ∗mp , int cmd);DESCRIPTIONIn a similar fashion to the vnode(9) interface, all operations that are done on a file system are conductedthrough a single interface that allows the system to carry out operations on a file system without knowing itsconstruction or type.All supported file systems in the kernel have an entry in the vfs_list_initial table. This table is generated byconfig(1) and is a NULL-terminated list of vfsops structures. The vfsops structure describes the operationsthat can be done to a specific file system type. The following table lists the elements of the vfsops vector, thecorresponding invocation macro, and a description of the element.Vector element Macro Descriptionint (∗vfs_mount)() VFS_MOUNT Mount a file systemint (∗vfs_start)() VFS_START Make operational<strong>NetBSD</strong> 3.0 January 24, 2008 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!