Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Feb 1998 08:50:52 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        current@FreeBSD.ORG
Subject:   PATCH.M
Message-ID:  <199802110850.BAA22210@usr09.primenet.com>

next in thread | raw e-mail | index | archive | help
These are the patches to the fcntl() man page to describe the NFS
server side proxy locking interface.  This manual page should be
read and understood before applying the related code patches, which
implement not only the server side locking semantics, but the advisory
locking veto semantics necessary to enable support for NFS client
locking.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
==============================================================================
Index: fcntl.2
===================================================================
RCS file: /b/cvstree/ncvs/src/lib/libc/sys/fcntl.2,v
retrieving revision 1.11
diff -c -r1.11 fcntl.2
*** 1.11	1997/01/31 01:06:39
--- fcntl.2	1997/05/09 00:22:15
***************
*** 158,165 ****
--- 158,171 ----
  	pid_t	l_pid;		/* lock owner */
  	short	l_type;		/* lock type: read/write, etc. */
  	short	l_whence;	/* type of l_start */
+ 	long    l_rsys;		/* remote system id, or 0 for local*/
+ 	long    l_pad[4];	/* reserved */
  };
  .Ed
+ Note: the l_rsys fields and l_pad fields are not used for the local
+ versions of the locking commands for binary compatability with
+ previous versions of these commands.
+ .Pp
  The commands available for advisory record locking are as follows:
  .Bl -tag -width F_SETLKWX
  .It Dv F_GETLK
***************
*** 190,197 ****
  .Dv (F_RDLCK)
  or exclusive (or write) locks,
  .Dv (F_WRLCK) ,
! as well as remove either type of lock
! .Dv (F_UNLCK) .
  If a shared or exclusive lock cannot be set,
  .Fn fcntl
  returns immediately with
--- 196,206 ----
  .Dv (F_RDLCK)
  or exclusive (or write) locks,
  .Dv (F_WRLCK) ,
! or remove either type of lock,
! .Dv (F_UNLCK) ,
! as well as removing all locks for a given remote system id specified by
! .Fa l_rsys ,
! .Dv (F_UNLKSYS) .
  If a shared or exclusive lock cannot be set,
  .Fn fcntl
  returns immediately with
***************
*** 209,214 ****
--- 218,262 ----
  .Dv SA_RESTART
  (see
  .Xr sigaction 2 ) .
+ .It Dv F_RGETLK
+ Identical in operation to
+ .Dv F_GETLK
+ above, but is used to test locks on behalf of a remote system.  The
+ value of
+ .Fa l_rsys
+ and
+ .Fa l_rpid
+ are also used in determining the uniqueness of the lock.  This allows
+ a process to proxy lock services for a remote host or hosted server
+ environment.
+ .It Dv F_RSETLK
+ Identical in operation to
+ .Dv F_SETLK
+ above, but is used to assert locks on behalf of a remote system.  The
+ value of
+ .Fa l_rsys
+ and
+ .Fa l_pid
+ are also used in determining the uniqueness of the lock.  This allows
+ a process to proxy lock services for a remote host or hosted server
+ environment.
+ .It Dv F_RSETLKW
+ Identical in operation to
+ .Dv F_SETLKW
+ above, but is used to assert locks on behalf of a remote system.  The
+ value of
+ .Fa l_rsys
+ and
+ .Fa l_pid
+ are also used in determining the uniqueness of the lock.  This allows
+ a process to proxy lock services for a remote host or hosted server
+ environment.
+ .It Dv F_CNVT
+ Convert an NFS file handle into an open fd; this is used by the NFS
+ proxy locking process to get a local file handle on which proxy
+ requests can be made.  This call is
+ .Xr rpc.lockd 8
+ specific, and is not useful otherwise.
  .El
  .Pp
  When a shared lock has been set on a segment of a file,
***************
*** 243,249 ****
  is negative, the result is undefined.
  The
  .Fa l_pid
! field is only used with
  .Dv F_GETLK
  to return the process ID of the process holding a blocking lock.
  After a successful
--- 291,298 ----
  is negative, the result is undefined.
  The
  .Fa l_pid
! field is used by the remote calls to pass the remote process identifier
! in, and with
  .Dv F_GETLK
  to return the process ID of the process holding a blocking lock.
  After a successful
==============================================================================


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802110850.BAA22210>