summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2016-01-18 22:21:46 +0000
committermarkj <markj@FreeBSD.org>2016-01-18 22:21:46 +0000
commit09fb369fc5164b2baaba44740ab7379c43306071 (patch)
tree93731c648315eadaf2fcf33fef8fe7ef553fd8ce /share/man
parentcf792338169fcd15fbb628696c34d234e8781827 (diff)
downloadFreeBSD-src-09fb369fc5164b2baaba44740ab7379c43306071.zip
FreeBSD-src-09fb369fc5164b2baaba44740ab7379c43306071.tar.gz
Add vrefl(), a locked variant of vref(9).
This API has no in-tree consumers at the moment but is useful to at least one out-of-tree consumer, and naturally complements existing vnode refcount functions (vholdl(9), vdropl(9)). Obtained from: kib (sys/ portion) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4947 Differential Revision: https://reviews.freebsd.org/D4953
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/vref.915
1 files changed, 12 insertions, 3 deletions
diff --git a/share/man/man9/vref.9 b/share/man/man9/vref.9
index f21b9f2..7b0c0f3 100644
--- a/share/man/man9/vref.9
+++ b/share/man/man9/vref.9
@@ -28,17 +28,19 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 24, 1996
+.Dd January 18, 2016
.Dt VREF 9
.Os
.Sh NAME
-.Nm vref
+.Nm vref , vrefl
.Nd increment the use count for a vnode
.Sh SYNOPSIS
.In sys/param.h
.In sys/vnode.h
.Ft void
.Fn vref "struct vnode *vp"
+.Ft void
+.Fn vrefl "struct vnode *vp"
.Sh DESCRIPTION
Increment the
.Va v_usecount
@@ -56,7 +58,14 @@ no longer being used and can be safely recycled for a different file.
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
-.Fn vref .
+.Fn vref
+or
+.Fn vrefl .
+.Pp
+.Fn vref
+locks the vnode interlock while
+.Fn vrefl
+expects the interlock to already be held.
.Sh SEE ALSO
.Xr vget 9 ,
.Xr vnode 9 ,
OpenPOWER on IntegriCloud