diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2002-02-28 19:22:06 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2002-02-28 19:22:06 +0000 |
commit | 8675c1d90ff97458027cc576e2b9f82a64a6a38c (patch) | |
tree | 4995a534f0a39667a31031407378f9edb8aea20e /share | |
parent | d475b4ba1f9d756c4fd72bd6b2db27b4e633bf72 (diff) |
Check in some new vnode man page from FreeBSD. Thanks to Peter Werner
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/Makefile | 6 | ||||
-rw-r--r-- | share/man/man9/extattr.9 | 1 | ||||
-rw-r--r-- | share/man/man9/getdevvp.9 | 89 | ||||
-rw-r--r-- | share/man/man9/getnewvnode.9 | 81 | ||||
-rw-r--r-- | share/man/man9/vaccess.9 | 89 | ||||
-rw-r--r-- | share/man/man9/vclean.9 | 76 | ||||
-rw-r--r-- | share/man/man9/vcount.9 | 61 | ||||
-rw-r--r-- | share/man/man9/vdevgone.9 | 78 | ||||
-rw-r--r-- | share/man/man9/vfinddev.9 | 59 | ||||
-rw-r--r-- | share/man/man9/vflush.9 | 78 | ||||
-rw-r--r-- | share/man/man9/vget.9 | 78 | ||||
-rw-r--r-- | share/man/man9/vgone.9 | 69 | ||||
-rw-r--r-- | share/man/man9/vhold.9 | 56 | ||||
-rw-r--r-- | share/man/man9/vinvalbuf.9 | 123 | ||||
-rw-r--r-- | share/man/man9/vn_lock.9 | 1 | ||||
-rw-r--r-- | share/man/man9/vnode.9 | 1 | ||||
-rw-r--r-- | share/man/man9/vput.9 | 63 | ||||
-rw-r--r-- | share/man/man9/vrecycle.9 | 65 | ||||
-rw-r--r-- | share/man/man9/vref.9 | 68 | ||||
-rw-r--r-- | share/man/man9/vrele.9 | 66 | ||||
-rw-r--r-- | share/man/man9/vwaitforio.9 | 1 |
21 files changed, 1207 insertions, 2 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index e2269294371..786d8255702 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.47 2002/02/22 21:13:18 drahn Exp $ +# $OpenBSD: Makefile,v 1.48 2002/02/28 19:22:05 csapuntz Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -7,7 +7,7 @@ MAN= altq.9 audio.9 boot.9 bus_dma.9 bus_space.9 copy.9 crypto.9 ctxsw.9 \ disk.9 disklabel.9 \ dohooks.9 dopowerhooks.9 doshutdownhooks.9 dostartuphooks.9 \ extattr.9 \ - fetch.9 fork1.9 extent.9 \ + fetch.9 fork1.9 extent.9 getdevvp.9 getnewvnode.9 \ hardclock.9 hook_establish.9 hz.9 hzto.9 intro.9 inittodr.9 log.9 \ kthread.9 malloc.9 mbuf.9 mbuf_tags.9 md5.9 microtime.9 \ panic.9 pfind.9 physio.9 \ @@ -16,6 +16,8 @@ MAN= altq.9 audio.9 boot.9 bus_dma.9 bus_space.9 copy.9 crypto.9 ctxsw.9 \ shutdownhook_establish.9 sleep.9 spl.9 startuphook_establish.9 \ store.9 style.9 \ time.9 timeout.9 tvtohz.9 uvm.9 \ + vaccess.9 vclean.9 vcount.9 vdevgone.9 vfinddev.9 vflush.9 vget.9 \ + vgone.9 vhold.9 vinvalbuf.9 vput.9 vref.9 vrele.9 \ vm_allocate.9 vm_map_copy.9 vm_deallocate.9 \ vm_map_inherit.9 vm_map_protect.9 vnode.9 vn_lock.9 \ vwaitforio.9 vwaitforio.9 diff --git a/share/man/man9/extattr.9 b/share/man/man9/extattr.9 index f8e59fce780..3a266951337 100644 --- a/share/man/man9/extattr.9 +++ b/share/man/man9/extattr.9 @@ -1,3 +1,4 @@ +.\" $OpenBSD: extattr.9,v 1.2 2002/02/28 19:22:05 csapuntz Exp $ .\"- .\" Copyright (c) 1999, 2000, 2001 Robert N. M. Watson .\" All rights reserved. diff --git a/share/man/man9/getdevvp.9 b/share/man/man9/getdevvp.9 new file mode 100644 index 00000000000..2cab358dba2 --- /dev/null +++ b/share/man/man9/getdevvp.9 @@ -0,0 +1,89 @@ +.\" $OpenBSD: getdevvp.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2002 Peter A. Werner. 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. +.\" +.\" +.Dd February 18, 2002 +.Dt GETDEVVP 9 +.Os +.Sh NAME +.Nm getdevvp , +.Nm bdevvp , +.Nm cdevvp , +.Nd "create a vnode for a device" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn getdevvp "dev_t dev" "struct vnode **vpp" "enum vtype type" +.Ft int +.Fn bdevvp "dev_t dev" "struct vnode **vpp" +.Ft int +.Fn cdevvp "dev_t dev" "struct vnode **vpp" +.Sh DESCRIPTION +The +.Fn getdevvp +function creates a vnode for a device of type +.Fa type +with a device number of +.Fa dev , +and returns a pointer to it in +.Fa vpp . +.Pp +Its arguments are: +.Bl -tag -width ".Fa rootrefs" +.It Fa dev +The device number of the desired device. +.It Fa vpp +Where the vnode will be returned on success. +.It Fa type +The type of device, either: +.Bl -tag -width ".Dv VBLK" +.It Dv VBLK +For a block device, or +.It Dv VCHR +for a character device. +.El +.El +.Pp +.Fn bdevvp +and +.Fn cdevvp +use getdevvp internally, specifying the third argument. +.Fn bdevvp +will create a vnode for a block device, and is used for the root filesystem +and swap areas, among other things. +.Fn cdevvp +will create a vnode for a character device and is used in kernfs and in some +console handling. +.Sh RETURN VALUES +All functions return 0 on success. If an error occurs, vpp will point to a +NULLVP. See +.Xr getnewvnode 9 +for further return values. +.Sh SEE ALSO +.Xr vnode 9 , +.Xr getnewvnode 9 diff --git a/share/man/man9/getnewvnode.9 b/share/man/man9/getnewvnode.9 new file mode 100644 index 00000000000..5a706158d91 --- /dev/null +++ b/share/man/man9/getnewvnode.9 @@ -0,0 +1,81 @@ +.\" $OpenBSD: getnewvnode.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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: src/share/man/man9/getnewvnode.9,v 1.1 2001/12/02 02:13:35 alfred Exp $ +.\" +.Dd November 21, 2001 +.Dt GETNEWVNODE 9 +.Os +.Sh NAME +.Nm getnewvnode +.Nd "get a new vnode" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Fd #include <sys/mount.h> +.Ft int +.Fo getnewvnode +.Fa "enum vtagtype tag" +.Fa "struct mount *mp" +.Fa "int (**vops) __P((void *))" +.Fa "struct vnode **vpp" +.Fc +.Sh DESCRIPTION +The +.Fn getnewvnode +function initializes a new vnode, assigning it the vnode operations passed in +.Fa vops . +It will have its v_tag field set to +.Fa tag +and be placed in the mount queue for the mount point represented by +.Fa mp . +.Pp +The vnode is either freshly allocated, taken from the free list or taken from +the hold list. If there are no vnodes on the free list, half the time a vnode +referencing buffers will be taken from the hold list, otherwise it will be +freshly allocated. +.Pp +The arguments to +.Fn getnewvnode +are: +.Bl -tag -width ".Fa vops" +.It Fa tag +The filesystem type. +.It Fa mp +The mount point to add the new vnode to. +.It Fa vops +The vnode operations to assign to the new vnode. +.It Fa vpp +Points to the new vnode upon successful completion. +.El +.Sh RETURN VALUES +.Fn getnewvnode +returns 0 on success, or ENFILE if the vnode table is full. +.Sh AUTHORS +This man page was originally written by +.An Chad David Aq davidc@acns.ab.ca +for FreeBSD. diff --git a/share/man/man9/vaccess.9 b/share/man/man9/vaccess.9 new file mode 100644 index 00000000000..bc3ec1bec57 --- /dev/null +++ b/share/man/man9/vaccess.9 @@ -0,0 +1,89 @@ +.\" $OpenBSD: vaccess.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\"- +.\" Copyright (c) 2001 Robert N. M. Watson +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. +.\" +.\" +.Dd February 18, 2002 +.Os +.Dt VACCESS 9 +.Sh NAME +.Nm vaccess +.Nd check access permissions based vnode parameters +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fo vaccess +.Fa "mode_t file_mode" +.Fa "uid_t uid" +.Fa "gid_t gid" +.Fa "mode_t acc_mode" +.Fa "struct ucred *cred" +.Fc +.Sh DESCRIPTION +The +.Fn vaccess +function checks if the credentials described in +.Fa cred +are sufficent to perform the operation described by +.Fa acc_mode , +based on the +.Fa file_mode , +.Fa uid , +and +.Fa gid +arguments. These arguments would typically be based on the vnode being +accessed. +.Pp +.Fa file_mode +is the current mode of the file that is having access checked. The +.Fa uid +and +.Fa gid +arguments are the user id and group id representing the owner of the file. +.Fa acc_mode +describes the operation wanted to be performed. It should be one of +.Dv VREAD , +.Dv VWRITE +or +.Dv VEXEC +representing read, write and execute respectively. +.Sh RETURN VALUES +.Fn vaccess +will return 0 on success, or a non-zero error value on failure. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er EACCES +Permission denied. +An attempt was made to access a file in a way forbidden by its file access +permissions. +.El +.Sh SEE ALSO +.Xr vnode 9 +.Sh HISTORY +This man page was originally written by +.An Robert Watson +for FreeBSD. It was modified to represent the OpenBSD implementation by +.An Peter Werner diff --git a/share/man/man9/vclean.9 b/share/man/man9/vclean.9 new file mode 100644 index 00000000000..54a9dd95408 --- /dev/null +++ b/share/man/man9/vclean.9 @@ -0,0 +1,76 @@ +.\" $OpenBSD: vclean.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\"- +.\" Copyright (c) 2002 Peter Werner +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. +.\" +.\" +.Dd February 18, 2002 +.Os +.Dt VCLEAN 9 +.Sh NAME +.Nm vclean +.Nd dissassociate the underlying file system from a vnode +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fo vclean +.Fa "struct vnode *vp" +.Fa "int flags" +.Fa "struct proc *p" +.Fc +.Sh DESCRIPTION +The +.Fn vclean +function clears any VM and buffer data associated with a vnode +.Fa vp +and reclaims it from the underlying filesystem. +The arguments are: +.Bl -tag -width ".Fa flags" +.It Fa vp +The vnode to be clean +.It Fa flags +The flags indicating how the vnode should be handled. +.Bl -tag -width ".Dv DOCLOSE" +.It Dv DOCLOSE +If this flag is set, +.Fn vclean +will call +.Xr vinvalbuf 9 +on the vnode. If the vnode is active, it will be closed and inactivated in the +underlying filesystem. +.El +.It Fa p +The process associated with this operation +.El +.Pp +The vnode interlock is held on entry. On exit the v_tag field of the vnode +will be set to +.Dv VT_NON +and if the vnode was active, it will be placed on the vnode free list. +.Sh SEE ALSO +.Xr vnode 9 , +.Xr vinvalbuf 9 +.Sh HISTORY +This man page was originally written for OpenBSD. diff --git a/share/man/man9/vcount.9 b/share/man/man9/vcount.9 new file mode 100644 index 00000000000..af16b0ff08a --- /dev/null +++ b/share/man/man9/vcount.9 @@ -0,0 +1,61 @@ +.\" $OpenBSD: vcount.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2000 Andrew Stevenson +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 DEVELOPERS ``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 DEVELOPERS 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. +.\" +.\" If this man page travels to places exotic (like projects other than +.\" FreeBSD) I would love to hear about it. +.\" Andrew <andrew@ugh.net.au> +.\" +.\" $FreeBSD: src/share/man/man9/vcount.9,v 1.4 2001/12/26 23:14:04 davidc Exp $ +.\" +.Dd February 6, 2001 +.Os +.Dt VCOUNT 9 +.Sh NAME +.Nm vcount , +.Nd "get total number of references to a device" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/time.h> +.Fd #include <sys/conf.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn vcount "struct vnode *vp" +.Sh DESCRIPTION +.Fn vcount +is used to get the number of references to a particular device. +It allows for the fact that multiple vnodes may reference the same device. +.Sh RETURN VALUES +.Fn vcount +returns the number of references to the device. +.Sh SEE ALSO +.Xr vnode 9 +.Sh AUTHORS +This man page was originally written by +.An Andrew Stevenson +for FreeBSD. diff --git a/share/man/man9/vdevgone.9 b/share/man/man9/vdevgone.9 new file mode 100644 index 00000000000..654362b2b72 --- /dev/null +++ b/share/man/man9/vdevgone.9 @@ -0,0 +1,78 @@ +.\" $OpenBSD: vdevgone.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\"- +.\" Copyright (c) 2002 Peter Werner +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. +.\" +.\" +.Dd February 18, 2002 +.Os +.Dt VDEVGONE 9 +.Sh NAME +.Nm vdevgone +.Nd revoke all specified minor numbered vnodes for a device +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fo vdevgone +.Fa "int maj" +.Fa "int minl" +.Fa "int minh" +.Fa "enum vtype type" +.Fc +.Sh DESCRIPTION +The +.Fn vdevgone +function will revoke all the vnodes corresponding to the specified minor +number range for the device with a major number of +.Fa maj +and of type +.Fa type . +Its arguments are: +.Bl -tag -width ".Fa type" +.It Fa maj +The major number of the device. +.It Fa minl +The lowest minor number for the device to be revoked +.It Fa minh +The highest minor number for the device to be revoked +.It Fa type +The type of the device, must be one of: +.Bl -tag -width ".Dv VBLK" +.It VBLK +Device is a block device +.It VCHR +Device is a character device +.El +.El +.Pp +The endpoints specified by +.Fa minl +and +.Fa minh +are inclusive. +.Sh SEE ALSO +.Xr vfinddev 9 +.Sh HISTORY +This man page was originally written for OpenBSD. diff --git a/share/man/man9/vfinddev.9 b/share/man/man9/vfinddev.9 new file mode 100644 index 00000000000..81c910d9341 --- /dev/null +++ b/share/man/man9/vfinddev.9 @@ -0,0 +1,59 @@ +.\" $OpenBSD: vfinddev.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\"- +.\" Copyright (c) 2002 Peter Werner +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. +.\" +.\" +.Dd February 18, 2002 +.Os +.Dt VFINDDEV 9 +.Sh NAME +.Nm vfinddev +.Nd lookup a vnode by device number +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fo vfinddev +.Fa "dev_t dev" +.Fa "enum vtype type" +.Fa "struct vnode **vpp" +.Fc +.Sh DESCRIPTION +The +.Fn vfinddev +function returns a pointer to the vnode of the device represented by the +device number +.Fa dev +and of type +.Fa type +in +.Fa vpp . +.Sh RETURN VALUES +.Fn vfinddev +will return 1 if a corresponding vnode was found, 0 if otherwise. +.Sh SEE ALSO +.Xr vnode 9 +.Sh HISTORY +This man page was originally written for OpenBSD. diff --git a/share/man/man9/vflush.9 b/share/man/man9/vflush.9 new file mode 100644 index 00000000000..eb837a501e2 --- /dev/null +++ b/share/man/man9/vflush.9 @@ -0,0 +1,78 @@ +.\" $OpenBSD: vflush.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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: src/share/man/man9/vflush.9,v 1.2 2001/12/14 09:11:13 ru Exp $ +.\" +.Dd November 21, 2001 +.Dt VFLUSH 9 +.Os +.Sh NAME +.Nm vflush +.Nd "flush vnodes for a mount point" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn vflush "struct mount *mp" "struct vnode *skipvp" "int flags" +.Sh DESCRIPTION +The +.Fn vflush +function removes any vnodes in the vnode table that belong to the given +.Fa mount +structure. +.Pp +Its arguments are: +.Bl -tag -width ".Fa rootrefs" +.It Fa mp +The mount point whose vnodes should be removed. +.It Fa skipvp +If this is given, the vnode it represents will be skipped. +.It Fa flags +The flags indicating how vnodes should be handled. +.Bl -tag -width ".Dv WRITECLOSE" +.It Dv FORCECLOSE +If set, busy vnodes will be forcibly closed. +.It Dv SKIPSYSTEM +If set, vnodes with the +.Dv VSYSTEM +flag set will be skipped. +.It Dv WRITECLOSE +If set, only regular files currently opened for writing will be removed. +.El +.El +.Sh RETURN VALUES +A value of 0 is returned if the flush is successful; otherwise, +.Er EBUSY +will be returned. +.Sh SEE ALSO +.Xr vgone 9 , +.Xr vgonel 9 , +.Xr vrele 9 +.Sh AUTHORS +This man page was originally written by +.An Chad David Aq davidc@acns.ab.ca +for FreeBSD. diff --git a/share/man/man9/vget.9 b/share/man/man9/vget.9 new file mode 100644 index 00000000000..11bf794292d --- /dev/null +++ b/share/man/man9/vget.9 @@ -0,0 +1,78 @@ +.\" $OpenBSD: vget.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 1996 Doug Rabson +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 DEVELOPERS ``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 DEVELOPERS 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: src/share/man/man9/vget.9,v 1.7 2001/12/26 23:14:04 davidc Exp $ +.\" +.Dd July 24, 1996 +.Os +.Dt VGET 9 +.Sh NAME +.Nm vget +.Nd get a vnode from the free list +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn vget "struct vnode *vp" "int flags" "struct proc *p" +.Sh DESCRIPTION +Get a vnode from the free list and increment its reference count. +.Bl -tag -width flag +.It Ar vp +the vnode to remove from the free list +.It Ar flags +if non-zero, the vnode will also be locked +.El +.Pp +When not in use, vnodes are kept on a free list. The vnodes still +reference valid files but may be reused to refer to a new file at any +time. Often, these vnodes are also held in caches in the system, such +as the name cache. +.Pp +When a vnode which is on the free list is used again, for instance if +the vnode was found in the name cache as a result of a call to +.Xr VOP_LOOKUP 9 +then the new user must call +.Xr vget 9 +to increment the reference count and remove it from the free list. +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ENOENT +The vnode +.Fa vp +is in the process of being cleaned out from the underlying +filesystem. +.Sh SEE ALSO +.Xr vnode 9 , +.Xr vput 9 , +.Xr vref 9 , +.Xr vrele 9 +.Sh AUTHORS +This man page was originally written by +.An Doug Rabson +for FreeBSD diff --git a/share/man/man9/vgone.9 b/share/man/man9/vgone.9 new file mode 100644 index 00000000000..393505dcb92 --- /dev/null +++ b/share/man/man9/vgone.9 @@ -0,0 +1,69 @@ +.\" $OpenBSD: vgone.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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: src/share/man/man9/vgone.9,v 1.2 2001/12/14 09:11:13 ru Exp $ +.\" +.Dd November 21, 2001 +.Dt VGONE 9 +.Os +.Sh NAME +.Nm vgone , vgonel +.Nd "prepare a vnode for reuse" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fn vgone "struct vnode *vp" +.Ft void +.Fn vgonel "struct vnode *vp" "struct proc *p" +.Sh DESCRIPTION +.Fn vgone +and +.Fn vgonel +prepare a vnode for reuse by another filesystem. +The preparation includes the cleaning of all filesystem specific data and +the removal from its mount point vnode list. +.Pp +The difference between +.Fn vgone +and +.Fn vgonel +is that +.Fn vgone +locks the vnode interlock and then calls +.Fn vgonel +while +.Fn vgonel +expects the interlock to already be locked. +.Sh SEE ALSO +.Xr vnode 9 +.Xr vclean 9 +.Xr vrecycle 9 +.Sh AUTHORS +This man page was originally written by +.An Chad David Aq davidc@acns.ab.ca +for FreeBSD. diff --git a/share/man/man9/vhold.9 b/share/man/man9/vhold.9 new file mode 100644 index 00000000000..a57b624fad7 --- /dev/null +++ b/share/man/man9/vhold.9 @@ -0,0 +1,56 @@ +.\" $OpenBSD: vhold.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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: src/share/man/man9/vhold.9,v 1.2 2001/12/14 09:11:13 ru Exp $ +.\" +.Dd November 21, 2001 +.Dt VHOLD 9 +.Os +.Sh NAME +.Nm vhold +.Nd "acquire a hold on a vnode" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fn vhold "struct vnode *vp" +.Sh DESCRIPTION +The +.Fn vhold +function increments the +.Va v_holdcnt +of the given vnode. +If the vnode has already been added to the free list and its v_holdcnt and +v_usecount are both zero, it will be removed from the free list and +added to the vnode hold list. +.Sh SEE ALSO +.Xr vbusy 9 , +.Xr vfree 9 +.Sh AUTHORS +This man page was orignally written by +.An Chad David Aq davidc@acns.ab.ca +for FreeBSD diff --git a/share/man/man9/vinvalbuf.9 b/share/man/man9/vinvalbuf.9 new file mode 100644 index 00000000000..d985f9aafad --- /dev/null +++ b/share/man/man9/vinvalbuf.9 @@ -0,0 +1,123 @@ +.\" $OpenBSD: vinvalbuf.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" +.\" Copyright (C) 2001 Chad David <davidc@acns.ab.ca>. 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: src/share/man/man9/vinvalbuf.9,v 1.6 2001/10/06 11:19:41 sheldonh Exp $ +.\" +.Dd July 7, 2001 +.Dt VINVALBUF 9 +.Os +.Sh NAME +.Nm vinvalbuf +.Nd "flushes and invalidates all buffers associated with a vnode" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fn vinvalbuf "struct vnode *vp" "int flags" "struct ucred *cred" "struct proc *p" "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 the +.Dv V_SAVEMETA +flag is set indirect blocks will not be flushed. +.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 supported flags are +.Dv V_SAVE +and +.Dv V_SAVEMETA . +.Dv V_SAVE +indicates that dirty buffers should be synced with the disk. +.Dv V_SAVEMETA +indicates the indirect blocks should not be flushed +.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 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. +.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); +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 tsleep 9 +.Sh AUTHORS +This man page was originally written by +.An Chad David Aq davidc@acns.ab.ca +for FreeBSD. diff --git a/share/man/man9/vn_lock.9 b/share/man/man9/vn_lock.9 index 32cfc18c90e..66247c1ac6d 100644 --- a/share/man/man9/vn_lock.9 +++ b/share/man/man9/vn_lock.9 @@ -1,3 +1,4 @@ +.\" $OpenBSD: vn_lock.9,v 1.4 2002/02/28 19:22:05 csapuntz Exp $ .Dd March 9, 2001 .Dt VN_LOCK 9 .Os diff --git a/share/man/man9/vnode.9 b/share/man/man9/vnode.9 index 5a1d5d3c3cc..0a56b375b42 100644 --- a/share/man/man9/vnode.9 +++ b/share/man/man9/vnode.9 @@ -1,3 +1,4 @@ +.\" $OpenBSD: vnode.9,v 1.7 2002/02/28 19:22:05 csapuntz Exp $ .Dd February 22, 2001 .Dt vnode 9 .Os OpenBSD 2.9 diff --git a/share/man/man9/vput.9 b/share/man/man9/vput.9 new file mode 100644 index 00000000000..4f901fcce54 --- /dev/null +++ b/share/man/man9/vput.9 @@ -0,0 +1,63 @@ +.\" $OpenBSD: vput.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 1996 Doug Rabson +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 DEVELOPERS ``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 DEVELOPERS 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: src/share/man/man9/vput.9,v 1.9 2001/10/01 16:09:25 ru Exp $ +.\" +.Dd July 24, 1996 +.Os +.Dt VPUT 9 +.Sh NAME +.Nm vput +.Nd "decrement the use count for a vnode and unlock it" +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fn vput "struct vnode *vp" +.Sh DESCRIPTION +Decrement the +.Dv v_usecount +field of a vnode and unlock the vnode if the usecount drops to zero +.Bl -tag -width 2n +.It Ar vp +the vnode to decrement +.El +.Pp +This operation is functionally equivalent to calling +.Fn VOP_UNLOCK +followed by +.Xr vrele 9 . +.Sh SEE ALSO +.Xr vnode 9 , +.Xr vref 9 , +.Xr vrele 9 +.Sh AUTHORS +This man page was originally written by +.An Doug Rabson +for FreeBSD. diff --git a/share/man/man9/vrecycle.9 b/share/man/man9/vrecycle.9 new file mode 100644 index 00000000000..ab491091b5c --- /dev/null +++ b/share/man/man9/vrecycle.9 @@ -0,0 +1,65 @@ +.\" $OpenBSD: vrecycle.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\"- +.\" Copyright (c) 2002 Peter Werner +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 AUTHOR AND CONTRIBUTORS ``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 AUTHOR OR CONTRIBUTORS 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. +.\" +.\" +.Dd February 18, 2002 +.Os +.Dt VRECYCLE 9 +.Sh NAME +.Nm vrecycle +.Nd recycle a vnode if its usecount is zero +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft int +.Fo vrecycle +.Fa "struct vnode *vp" +.Fa "struct simplelock *inter_lkp" +.Fa "struct proc *p" +.Fc +.Sh DESCRIPTION +The +.Fn vrecycle +function places a vnode +.Fa vp +on the free list using +.Xr vgonel 9 +if its v_usecount field is zero. If the usecount is not zero it simply +returns. If its usecount is zero and an interlock +.Fa inter_lkp +was passed, this will be unlocked before calling +.Xr vgonel 9 . +.Sh RETURN VALUES +.Fn vrecycle +will return 1 if the vnode was placed on the free list. It will return 0 if +the usecount was not zero, and any lock passed in +.Fa inter_lkp +will still be locked. +.Sh SEE ALSO +.Xr vnode 9 , +.Xr vgonel 9 +.Sh HISTORY +This man page was originally written for OpenBSD. diff --git a/share/man/man9/vref.9 b/share/man/man9/vref.9 new file mode 100644 index 00000000000..9ace086438f --- /dev/null +++ b/share/man/man9/vref.9 @@ -0,0 +1,68 @@ +.\" $OpenBSD: vref.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 1996 Doug Rabson +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 DEVELOPERS ``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 DEVELOPERS 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: src/share/man/man9/vref.9,v 1.8 2001/10/01 16:09:25 ru Exp $ +.\" +.Dd July 24, 1996 +.Os +.Dt VREF 9 +.Sh NAME +.Nm vref +.Nd increment the use count for a vnode +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fn vref "struct vnode *vp" +.Sh DESCRIPTION +Increment the +.Dv v_usecount +field of a vnode. +.Bl -tag -width 2n +.It Ar vp +the vnode to increment +.El +.Pp +Each vnode maintains a reference count of how many parts of the system +are using the vnode. This allows the system to detect when a vnode is +no longer being used and can be safely recycled for a different file. +.Pp +Any code in the system which is using a vnode (e.g. during the +operation of some algorithm or to store in a data structure) should +call +.Xr vref 9 . +.Sh SEE ALSO +.Xr vget 9 , +.Xr vnode 9 , +.Xr vput 9 , +.Xr vrele 9 +.Sh AUTHORS +This man page was originally written by +.An Doug Rabson +for FreeBSD diff --git a/share/man/man9/vrele.9 b/share/man/man9/vrele.9 new file mode 100644 index 00000000000..cdc5db022e7 --- /dev/null +++ b/share/man/man9/vrele.9 @@ -0,0 +1,66 @@ +.\" $OpenBSD: vrele.9,v 1.1 2002/02/28 19:22:05 csapuntz Exp $ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 1996 Doug Rabson +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" 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, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, 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 DEVELOPERS ``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 DEVELOPERS 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: src/share/man/man9/vrele.9,v 1.9 2001/10/01 16:09:25 ru Exp $ +.\" +.Dd July 24, 1996 +.Os +.Dt VRELE 9 +.Sh NAME +.Nm vrele +.Nd decrement the use count for a vnode +.Sh SYNOPSIS +.Fd #include <sys/param.h> +.Fd #include <sys/vnode.h> +.Ft void +.Fn vrele "struct vnode *vp" +.Sh DESCRIPTION +Decrement the +.Dv v_usecount +field of a vnode. +.Bl -tag -width 2n +.It Ar vp +the vnode to decrement +.El +.Pp +Any code in the system which is using a vnode should call +.Xr vrele 9 +when it is finished with the vnode. +If the +.Dv v_usecount +field of the vnode reaches zero, then it will be placed on the free list. +.Sh SEE ALSO +.Xr vget 9 , +.Xr vnode 9 , +.Xr vput 9 , +.Xr vref 9 +.Sh AUTHORS +This man page was originally written by +.An Doug Rabson +for FreeBSD diff --git a/share/man/man9/vwaitforio.9 b/share/man/man9/vwaitforio.9 index 7866fae5e7c..a0e44119d18 100644 --- a/share/man/man9/vwaitforio.9 +++ b/share/man/man9/vwaitforio.9 @@ -1,3 +1,4 @@ +.\" $OpenBSD: vwaitforio.9,v 1.4 2002/02/28 19:22:05 csapuntz Exp $ .Dd February 26, 2001 .Dt vwaitforio 9 .Os OpenBSD 2.9 |