Index: head/share/man/man9/lockmgr.9 =================================================================== --- head/share/man/man9/lockmgr.9 (revision 84584) +++ head/share/man/man9/lockmgr.9 (revision 84585) @@ -1,155 +1,151 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 9, 2001 .Dt LOCKMGR 9 .Os .Sh NAME .Nm lockmgr .Nd "acquires, releases and updates locks" .Sh SYNOPSIS .In sys/types.h .In sys/lockmgr.h .Ft int -.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp" "struct proc *p" +.Fn lockmgr "struct lock *lkp" "u_int flags" "struct mtx *interlkp" "struct thread *td" .Sh DESCRIPTION The .Fn lockmgr function handles general locking functionality within the kernel, including support for shared and exclusive locks, and recursion. Locks can also be upgraded and downgraded. .Pp Its arguments are: .Bl -tag -width ".Fa interlkp" .It Fa lkp -A pointer to lock to manipulate. +A pointer to the lock to manipulate. .It Fa flags Flags indicating what action is to be taken. .Bl -tag -width ".Dv LK_EXCLUPGRADE" .It Dv LK_SHARED Acquire a shared lock. If we currently hold an exclusive lock it will be downgraded. .It Dv LK_EXCLUSIVE Acquire an exclusive lock. If we already hold an exclusive lock and .Dv LK_CANRECURSE is not set we will panic. .It Dv LK_DOWNGRADE Downgrade our exclusive lock to a shared lock. Downgrading a shared lock is not valid. -If the exclusive lock has been recursed, all references will -be downgraded. +If the exclusive lock has been recursed, all references will be downgraded. .It Dv LK_EXCLUPGRADE Upgrade our lock to an exclusive lock. Will fail with .Er EBUSY if there is someone ahead of use waiting for an upgrade. -If this call fails we loose -our shared lock. +If this call fails we loose our shared lock. Upgrading an exclusive lock will cause a panic. .It Dv LK_UPGRADE Upgrades our lock to an exclusive lock. If this call fails we loose our shared lock. Upgrading an exclusive lock will cause a panic. .It Dv LK_RELEASE Release the lock. -Releasing a lock that you do not hold can cause -a panic. +Releasing a lock that you do not hold can cause a panic. .It Dv LK_DRAIN Waits for all activity on the lock to end, and then marks it decommissioned. -This is used before freeing a lock that is part of a piece of memory that is about to -be freed. +This is used before freeing a lock that is part of a piece of memory that is +about to be freed. (As documented in .Pa sys/lockmgr.h . ) .It Dv LK_SLEEPFAIL If we had to sleep for the lock then fail. .It Dv LK_NOWAIT Do not allow the call to sleep. This can be used to test the lock. .It Dv LK_CANRECURSE It is ok to recurse on an exclusive lock. -For every lock there -must be a release. +For every lock there must be a release. .It Dv LK_INTERLOCK Unlock the interlock, which is of course locked already. .El .It Fa interlkp An interlock mutex for controlling group access to the lock. If .Dv LK_INTERLOCK is specified, .Fn lockmgr assumes .Fa interlkp is currently owned and not recursed, and will return it unlocked. See .Xr mtx_assert 9 . -.It Fa p -The process responsible for this call. +.It Fa td +The thread responsible for this call. .Dv NULL becomes .Dv LK_KERNPROC . .El .Sh LOCKS If .Dv LK_INTERLOCK is specified then .Fa interlkp must be held prior to calling .Fn lockmgr and will be returned unlocked. .Pp Upgrade attempts that fail result in the loss of the lock that is currently held. As well, it is not valid to upgrade an exclusive lock, and a panic will be the result of trying. .Sh RETURN VALUES A value of 0 is returned on success. .Sh ERRORS .Bl -tag -width Er .It Bq Er EBUSY Either .Dv LK_NOWAIT was specified and .Fn lockmgr -would have slept, or another -process was ahead of you in line for an exclusive upgrade. +would have slept, or another thread was ahead of you in line for an exclusive +upgrade. .It Bq Er ENOLCK .Dv LK_SLEEP_FAIL was set and we slept. .El .Sh SEE ALSO .Xr lockcount 9 , .Xr lockdestroy 9 , .Xr lockmgr_printinfo 9 , .Xr lockstatus 9 , .Xr mutex 9 .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca . Index: head/share/man/man9/lockstatus.9 =================================================================== --- head/share/man/man9/lockstatus.9 (revision 84584) +++ head/share/man/man9/lockstatus.9 (revision 84585) @@ -1,83 +1,83 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 9, 2001 .Dt LOCKSTATUS 9 .Os .Sh NAME .Nm lockstatus .Nd "returns the lock status" .Sh SYNOPSIS .In sys/types.h .In sys/lockmgr.h .Ft int -.Fn lockstatus "struct lock *lkp" "struct proc *p" +.Fn lockstatus "struct lock *lkp" "struct thread *td" .Sh DESCRIPTION The .Fn lockstatus function returns the status of the lock in relation to the -.Vt proc +.Vt thread passed to it. .Pp Its arguments are: .Bl -tag -width ".Fa lkp" .It Fa lkp The lock to return the status of. -.It Fa p -The process to check any exclusive locks against. +.It Fa td +The thread to check any exclusive locks against. If -.Fa p +.Fa td is .Dv NULL and an exclusive lock is held, .Dv LK_EXCLUSIVE is returned. .El .Sh RETURN VALUES .Bl -tag -width ".Dv LK_EXCLUSIVE" .It Dv LK_EXCLUSIVE -An exclusive lock is held by the process -.Fa p +An exclusive lock is held by the thread +.Fa td passed in. .It Dv LK_EXCLOTHER -An exclusive lock is held by someone other then the process -.Fa p +An exclusive lock is held by someone other then the thread +.Fa td passed in. .It Dv LK_SHARED A shared lock is held. .It 0 The lock is not held by anyone. .El .Sh SEE ALSO .Xr lockcount 9 , .Xr lockdestroy 9 , .Xr lockmgr 9 , .Xr lockmgr_printinfo 9 .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca . Index: head/share/man/man9/vfs_busy.9 =================================================================== --- head/share/man/man9/vfs_busy.9 (revision 84584) +++ head/share/man/man9/vfs_busy.9 (revision 84585) @@ -1,103 +1,103 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 8, 2001 .Dt VFS_BUSY 9 .Os .Sh NAME .Nm vfs_busy .Nd "marks a mount point as busy" .Sh SYNOPSIS .In sys/param.h .In sys/mount.h .Ft int -.Fn vfs_busy "struct mount *mp" "int flags" "struct mtx *interlkp" "struct proc *p" +.Fn vfs_busy "struct mount *mp" "int flags" "struct mtx *interlkp" "struct thread *td" .Sh DESCRIPTION The .Fn vfs_busy function marks a mount point as busy. The purpose of this function is to synchronize access to a mount point. It also delays unmounting by sleeping on .Fa mp if the .Dv MNTK_UNMOUNT flag is set in .Fa mp->mnt_kern_flag and the .Dv LK_NOWAIT flag is .Em not set. .Pp Its arguments are: .Bl -tag -width ".Fa interlkp" .It Fa mp The mount point to busy. .It Fa flags Flags controlling how .Fn vfs_busy should act. .Bl -tag -width ".Dv LK_NOWAIT" .It Dv LK_NOWAIT do not sleep if .Dv MNTK_UNMOUNT is set. .El .It Fa interlkp The interlock mutex for .Fa mp->mount_lock . If there is any chance the mount point is being unmounted and .Dv LK_NOWAIT is not set then interlock must be valid locked mutex. -.It Fa p -The process responsible for this call. +.It Fa td +The thread responsible for this call. .El .Sh LOCKS If .Fa interlkp is a valid pointer it must be locked on entry, and it will not be unlocked even in the case of an error. .Sh RETURN VALUES A 0 value is returned on success. If the mount point is being unmounted .Er ENOENT will always be returned. .Sh ERRORS .Bl -tag -width Er .It Bq Er ENOENT The mount point is being unmounted .Dv ( MNTK_UNMOUNT is set). .El .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca . Index: head/share/man/man9/vfs_mount.9 =================================================================== --- head/share/man/man9/vfs_mount.9 (revision 84584) +++ head/share/man/man9/vfs_mount.9 (revision 84585) @@ -1,129 +1,129 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 8, 2001 .Dt VFS_MOUNT 9 .Os .Sh NAME .Nm vfs_mount .Nd "generic filesystem mount function" .Sh SYNOPSIS .In sys/param.h .In sys/mount.h .Ft int -.Fn vfs_mount "struct proc *p" "char *fstype" "char *fspath" "int fsflags" "void *fsdata" +.Fn vfs_mount "struct thread *td" "char *fstype" "char *fspath" "int fsflags" "void *fsdata" .Sh DESCRIPTION The .Fn vfs_mount function handles the generic portion of mounting a filesystem, and calls the filesystem specific mount function after verifying its parameters and setting up the structures expected by the underlying mount code. .Pp .Fn vfs_mount is called directly by the .Xr mount 2 system call. .Pp Its arguments are: .Bl -tag -width ".Fa fsflags" -.It Fa p -The process responsible for this call. +.It Fa td +The thread responsible for this call. .It Fa fstype The type of filesystem being mounted. .It Fa fspath The path to the mount point of the filesystem. .It Fa fsflags Flags controlling the mount. See .Xr mount 2 for details. .Pp .Dv MNT_EXPORTED , MNT_NOSUID , MNT_NODEV , MNT_UPDATE , MNT_RELOAD , .Dv MNT_FORCE , MNT_ASYNC , MNT_SYNCHRONOUS , MNT_UNION , MNT_NOATIME , .Dv MNT_SNAPSHOT , MNT_NOCLUSTERR , MNT_NOCLUSTERW , MNT_IGNORE , .Dv MNT_UNION , MNT_NOSYMFOLLOW .It Fa fsdata Filesystem specific data structure. It is in userspace when passed to .Fn vfs_mount and is left untouched when passed to filesystem's .Fn mount . .El .Sh RETURN VALUES A 0 value is returned on success. .Sh ERRORS .Bl -tag -width Er .It Bq Er ENAMETOOLONG The fs type or the mount point path is too long or any individual path component is too long. .It Bq Er EPERM Permission denied. There are a number of reason this can occur ranging from the user not having permission to mount a filesystem to the securelevel being to high to load the .Fa fstype module. .It Bq Er EINVAL Invalid operation (ex: trying to update a non mount-point). .It Bq Er ENOENT The mount point does not exist (from .Fn namei ) . .It Bq Er ELOOP The mount point is a muddle of links (from .Fn namei ) . .It Bq Er EOPNOTSUPP The operation is not supported (ex: reloading a r/w filesystem). .It Bq Er EBUSY The mount point is busy or is not really a mount point (on update). .It Bq Er ENOTDIR The mount point is not a directory. .It Bq Er ENODEV The kernel linker was unable to load the specified .Fa fstype or was unable to find the specified .Fa fstype module. .El .Pp Other errors can be returned by the filesystem's .Fn mount and you should check the specific filesystem for details. Also this call relies on a large number of other kernel services whose errors it returns so this list may not be exhaustive. .Sh SEE ALSO .Xr mount 2 , .Xr mount 8 .Pp .Va vfs.usermount .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca . Index: head/share/man/man9/vfs_unbusy.9 =================================================================== --- head/share/man/man9/vfs_unbusy.9 (revision 84584) +++ head/share/man/man9/vfs_unbusy.9 (revision 84585) @@ -1,66 +1,66 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 8, 2001 .Dt VFS_UNBUSY 9 .Os .Sh NAME .Nm vfs_unbusy .Nd "unbusy a mount point" .Sh SYNOPSIS .In sys/param.h .In sys/mount.h .Ft void -.Fn vfs_unbusy "struct mount *mp" "struct proc *p" +.Fn vfs_unbusy "struct mount *mp" "struct thread *td" .Sh DESCRIPTION The .Fn vfs_unbusy function unbusies a mount point by unlocking .Fa mp->mnt_lock . The lock is typically acquired by calling .Xr vfs_busy 9 prior to this call. .Pp Its arguments are: .Bl -tag -width ".Fa mp" .It Fa mp The mount point to unbusy (unlock). -.It Fa p -The process responsible for this call. +.It Fa td +The thread responsible for this call. .El .Sh LOCKS .Va mnt_lock must be locked in .Fa mp prior to calling this function, and it will be unlocked upon return. .Sh SEE ALSO .Xr vfs_busy 9 .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca . Index: head/share/man/man9/vinvalbuf.9 =================================================================== --- head/share/man/man9/vinvalbuf.9 (revision 84584) +++ head/share/man/man9/vinvalbuf.9 (revision 84585) @@ -1,121 +1,121 @@ .\" .\" Copyright (C) 2001 Chad David . All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice(s), this list of conditions and the following disclaimer as .\" the first lines of this file unmodified other than the possible .\" addition of one or more copyright notices. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice(s), this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" .\" $FreeBSD$ .\" .Dd July 7, 2001 .Dt VINVALBUF 9 .Os .Sh NAME .Nm vinvalbuf .Nd "flushes and invalidates all buffers associated with a vnode" .Sh SYNOPSIS .In sys/param.h .In sys/vnode.h .Ft int -.Fn vinvalbuf "struct vnode *vp" "int flags" "struct ucred *cred" "struct proc *p" "int slpflag" "int slptimeo" +.Fn vinvalbuf "struct vnode *vp" "int flags" "struct ucred *cred" "struct thread *td" "int slpflag" "int slptimeo" .Sh DESCRIPTION The .Fn vinvalbuf function invalidates all of the buffers associated with the given vnode. This includes buffers on the clean list and the dirty list. If the .Dv V_SAVE flag is specified then the buffers on the dirty list are synced prior to being released. If there is a VM Object associated with the vnode, it is removed. .Pp Its arguments are: .Bl -tag -width ".Fa spltimeo" .It Fa vp A pointer to the vnode whose buffers will be invalidated. .It Fa flags The only supported flag is .Dv V_SAVE and it indicates that dirty buffers should be synced with the disk. .It Fa cred The user credentials that are used to .Xr VOP_FSYNC 9 buffers if .Dv V_SAVE is set. -.It Fa p -The process responsible for this call. +.It Fa td +The thread responsible for this call. .It Fa slpflag The slp flag that will be used in the priority of any sleeps in the function. .It Fa slptimeo The timeout for any sleeps in the function. .El .Sh LOCKS The vnode is assumed to be locked prior to the call and remains locked upon return. .Pp .Va Giant must be held by prior to the call and remains locked upon return. .Sh RETURN VALUES A 0 value is returned on success. .Sh PSEUDOCODE .Bd -literal -offset indent -vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, p); -error = vinvalbuf(devvp, V_SAVE, cred, p, 0, 0); -VOP_UNLOCK(devvp, 0, p); +vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td); +error = vinvalbuf(devvp, V_SAVE, cred, td, 0, 0); +VOP_UNLOCK(devvp, 0, td); if (error) return (error); .Ed .Sh ERRORS .Bl -tag -width Er .It Bq Er ENOSPC The filesystem is full. (With .Dv V_SAVE ) .It Bq Er EDQUOT Disc quota exceeded. (With .Dv V_SAVE ) .It Bq Er EWOULDBLOCK Sleep operation timed out. (See .Fa slptimeo ) .It Bq Er ERESTART A signal needs to be delivered and the system call should be restarted. (With .Dv PCATCH set in .Fa slpflag ) .It Bq Er EINTR The system has been interrupted by a signal. (With .Dv PCATCH set in .Fa slpflag ) .El .Sh SEE ALSO .Xr brelse 9 , .Xr bremfree 9 , .Xr tsleep 9 , .Xr VOP_FSYNC 9 .Sh AUTHORS This man page was written by .An Chad David Aq davidc@acns.ab.ca .