xref: /freebsd/share/man/man9/VOP_ADVLOCK.9 (revision c03ccb991d0e399435c9bbdb6b266ecee93f5b46)
1fab63cc4SDoug Rabson.\" -*- nroff -*-
2fab63cc4SDoug Rabson.\"
3fab63cc4SDoug Rabson.\" Copyright (c) 1996 Doug Rabson
4fab63cc4SDoug Rabson.\"
5fab63cc4SDoug Rabson.\" All rights reserved.
6fab63cc4SDoug Rabson.\"
7fab63cc4SDoug Rabson.\" This program is free software.
8fab63cc4SDoug Rabson.\"
9fab63cc4SDoug Rabson.\" Redistribution and use in source and binary forms, with or without
10fab63cc4SDoug Rabson.\" modification, are permitted provided that the following conditions
11fab63cc4SDoug Rabson.\" are met:
12fab63cc4SDoug Rabson.\" 1. Redistributions of source code must retain the above copyright
13fab63cc4SDoug Rabson.\"    notice, this list of conditions and the following disclaimer.
14fab63cc4SDoug Rabson.\" 2. Redistributions in binary form must reproduce the above copyright
15fab63cc4SDoug Rabson.\"    notice, this list of conditions and the following disclaimer in the
16fab63cc4SDoug Rabson.\"    documentation and/or other materials provided with the distribution.
17fab63cc4SDoug Rabson.\"
18fab63cc4SDoug Rabson.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
19fab63cc4SDoug Rabson.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20fab63cc4SDoug Rabson.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21fab63cc4SDoug Rabson.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
22fab63cc4SDoug Rabson.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23fab63cc4SDoug Rabson.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24fab63cc4SDoug Rabson.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25fab63cc4SDoug Rabson.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26fab63cc4SDoug Rabson.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27fab63cc4SDoug Rabson.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28fab63cc4SDoug Rabson.\"
297f3dea24SPeter Wemm.\" $FreeBSD$
30fab63cc4SDoug Rabson.\"
31*c03ccb99SGuangyuan Yang.Dd February 10, 2021
32fab63cc4SDoug Rabson.Dt VOP_ADVLOCK 9
33aa12cea2SUlrich Spörlein.Os
34fab63cc4SDoug Rabson.Sh NAME
35fab63cc4SDoug Rabson.Nm VOP_ADVLOCK
36fab63cc4SDoug Rabson.Nd advisory record locking
37fab63cc4SDoug Rabson.Sh SYNOPSIS
3832eef9aeSRuslan Ermilov.In sys/param.h
3932eef9aeSRuslan Ermilov.In sys/vnode.h
4032eef9aeSRuslan Ermilov.In sys/fcntl.h
4132eef9aeSRuslan Ermilov.In sys/lockf.h
42fab63cc4SDoug Rabson.Ft int
43fab63cc4SDoug Rabson.Fn VOP_ADVLOCK "struct vnode *vp" "caddr_t id" "int op" "struct flock *fl" "int flags"
44fab63cc4SDoug Rabson.Sh DESCRIPTION
45fab63cc4SDoug RabsonThe arguments are:
46fab63cc4SDoug Rabson.Bl -tag -width flags
470640e9e0SHiten Pandya.It Fa vp
480a57ea7dSRuslan ErmilovThe vnode being manipulated.
490640e9e0SHiten Pandya.It Fa id
500a57ea7dSRuslan ErmilovThe id token which is changing the lock.
510640e9e0SHiten Pandya.It Fa op
520a57ea7dSRuslan ErmilovThe operation to perform (see
530a57ea7dSRuslan Ermilov.Xr fcntl 2 ) .
540640e9e0SHiten Pandya.It Fa fl
550a57ea7dSRuslan ErmilovDescription of the lock.
560640e9e0SHiten Pandya.It Fa flags
57*c03ccb99SGuangyuan YangOne or more of the following:
580a57ea7dSRuslan Ermilov.Pp
592b3899c0SAlan Somers.Bl -tag -width ".Dv F_REMOTE" -offset indent -compact
600a57ea7dSRuslan Ermilov.It Dv F_WAIT
610a57ea7dSRuslan ErmilovWait until lock is granted.
620a57ea7dSRuslan Ermilov.It Dv F_FLOCK
630a57ea7dSRuslan ErmilovUse
64d30b1794SKris Kennaway.Xr flock 2
650a57ea7dSRuslan Ermilovsemantics for lock.
660a57ea7dSRuslan Ermilov.It Dv F_POSIX
670a57ea7dSRuslan ErmilovUse POSIX semantics for lock.
682b3899c0SAlan Somers.It Dv F_REMOTE
692b3899c0SAlan SomersLock owner is remote NFS client.
702b3899c0SAlan Somers.It Dv F_NOINTR
712b3899c0SAlan SomersMask signals while waiting for the lock.
72d30b1794SKris Kennaway.El
73fab63cc4SDoug Rabson.El
74fab63cc4SDoug Rabson.Pp
75c1c03d49SHiten PandyaThis entry point manipulates advisory record locks on the file.
76c1c03d49SHiten PandyaMost file systems delegate the work for this call to
77d30b1794SKris Kennaway.Fn lf_advlock .
78fab63cc4SDoug Rabson.Sh RETURN VALUES
79fab63cc4SDoug RabsonZero is returned on success, otherwise an error is returned.
80fab63cc4SDoug Rabson.Sh SEE ALSO
81bceb8aedSWolfram Schneider.Xr fcntl 2 ,
82fab63cc4SDoug Rabson.Xr flock 2 ,
83bceb8aedSWolfram Schneider.Xr vnode 9
84fab63cc4SDoug Rabson.Sh AUTHORS
85571dba6eSHiten PandyaThis manual page was written by
86aaf1f16eSPhilippe Charnier.An Doug Rabson .
87