From owner-freebsd-current Wed Feb 11 00:51:32 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA18234 for current-outgoing; Wed, 11 Feb 1998 00:51:32 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA18228 for ; Wed, 11 Feb 1998 00:51:29 -0800 (PST) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id BAA26267 for ; Wed, 11 Feb 1998 01:51:02 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp01.primenet.com, id smtpd026257; Wed Feb 11 01:50:53 1998 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id BAA22210 for current@freebsd.org; Wed, 11 Feb 1998 01:50:53 -0700 (MST) From: Terry Lambert Message-Id: <199802110850.BAA22210@usr09.primenet.com> Subject: PATCH.M To: current@FreeBSD.ORG Date: Wed, 11 Feb 1998 08:50:52 +0000 (GMT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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