Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nfsclnt(2) [mojave man page]

NFSCLNT(2)						      BSD System Calls Manual							NFSCLNT(2)

NAME
nfsclnt -- NFS client services SYNOPSIS
#include <unistd.h> #include <nfs/nfs.h> int nfsclnt(int flags, void *argstructp); DESCRIPTION
The nfsclnt() function is used by the NFS client daemons to pass information into and out of the kernel. The flags argument consists of sev- eral bits that show what action is to be taken once in the kernel and the argstructp points to any corresponding data that the action may require. rpc.lockd(8) calls nfsclnt() with the flag NFSCLNT_LOCKDANS and a pointer to a struct lockd_ans { int la_version; /* lockd_ans version */ int la_errno; /* return status */ u_int64_t la_xid; /* unique message transaction ID */ int la_flags; /* answer flags */ pid_t la_pid; /* pid of lock requester/owner */ off_t la_start; /* lock starting offset */ off_t la_len; /* lock length */ int la_fh_len; /* The file handle length. */ u_int8_t la_fh[NFSV3_MAX_FH_SIZE];/* The file handle. */ }; to pass the response to an NFS file locking request back into the kernel. RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, -1 is returned and the global variable errno is set to specify the error. ERRORS
[EPERM] The caller is not the super-user. [EINVAL] The action specified by the flags argument was not valid. [EFAULT] argstructp points to an invalid address. [EPIPE] The response doesn't match any currently-outstanding lock request. SEE ALSO
rpc.lockd(8) BUGS
The nfsclnt system call is designed specifically for the NFS client daemons and as such is specific to their requirements. Several fields of the argument structures are assumed to be valid, such that nfsclnt must be used with extreme care. BSD
January 9, 2007 BSD

Check Out this Related Man Page

rpc.lockd(8)						      System Manager's Manual						      rpc.lockd(8)

NAME
rpc.lockd, lockd - Network lock daemon SYNOPSIS
/usr/sbin/rpc.lockd [-b hostname] [-c] [-d debug] [-g graceperiod] [-h hashsize] [-s] [-t timeout] OPTIONS
The default behavior will create and bind a socket for each protocol per interface on the system. When the -b switch is specified, one socket per protocol will be created and bind to the passed IP address. Available only on TruCluster Server systems. This option starts the clusterwide lock daemon, which helps provide highly available NFS service. Do not use -c directly. Highly available NFS service is config- ured by default and typically does not require intervention. If you do need to start the clusterwide lock daemon, use the CAA command, caa_start cluster_lockd. For more information, see the TruCluster Server Administration manual. Internal Use Only. Use this option only under the direction of technical support personnel. Causes the rpc.lockd daemon to use the variable graceperiod (in seconds) as the grace period dura- tion instead of the default value of 15 seconds. Internal Use Only. Causes the rpc.lockd daemon to use the variable timeout (in seconds) as the interval instead of the default value of 5 seconds to retransmit a lock request to the remote server. DESCRIPTION
The rpc.lockd daemon processes lock requests that are either sent locally by the kernel or remotely by another lock daemon. The NFS locking service makes this advisory locking support possible by using the fcntl system call and the lockf subroutine. The rpc.lockd daemon forwards lock requests for remote data to the server site's lock daemon. The rpc.lockd daemon then requests the status monitor daemon, rpc.statd, for monitor service. The reply to the lock request is not sent to the kernel until the status daemon and the server site's lock daemon have replied. If either the status monitor or server site's lock daemon is unavailable, the reply to a lock request for remote data is delayed until all daemons become available. When a server recovers, it waits for a grace period for all client site lock daemons to submit reclaim requests. Client site lock daemons are notified by rpc.statd of the server recovery and promptly resubmit previously granted lock requests. If a client site's lock daemon fails to secure previously granted locks at the server site, it sends the signal SIGLOST to all the processes that were previously holding locks and cannot reclaim them. SEE ALSO
Commands: rpc.statd(8) Functions: fcntl(2), signal(2), lockf(3) rpc.lockd(8)
Man Page