Constants

NFS Access Flags

ACCESS4_READ
Value: 0x00000001
Read data from a file or read a directory.
ACCESS4_LOOKUP
Value: 0x00000002
Look up a name in a directory (no meaning for non-directory objects).
ACCESS4_MODIFY
Value: 0x00000004
Rewrite existing file data or modify existing directory entries.
ACCESS4_EXTEND
Value: 0x00000008
Write new data or add directory entries.
ACCESS4_DELETE
Value: 0x00000010
Delete an existing directory entry.
ACCESS4_EXECUTE
Value: 0x00000020
Execute a file (no meaning for a directory).

NFS Open Type Constants

OPEN4_NOCREATE
Value: 0
Indicates the file should be opened if it exists, but if the file does not exist, the file should not be created. In this case, the operation should fail with the error NFS4ERR_NOENT.
OPEN4_CREATE
Value: 1
Indicates the file should be created using the method specified by the CreateMode parameter.

NFS Create Mode Constants

UNCHECKED4
Value: 0
Indicates the file should be created without checking for the existence of a duplicate file in the associated directory.
GUARDED4
Value: 1
Indicates the file should be created, but the server should check for the presence of a duplicate file before doing so. If the file exists, the open operation should fail with the error NFS4ERR_EXIST.
EXCLUSIVE4
Value: 2
Indicates the file should be exclusively created, or created with the condition that no other client should be concurrently creating or opening a file with the same name. If a file with the same name does exist, the operation should fail with the error NFS4ERR_EXIST.

NFS Share Access Flags

OPEN4_SHARE_ACCESS_READ
Value: 0x00000001
Indicates the client desires read-only access to the file.
OPEN4_SHARE_ACCESS_WRITE
Value: 0x00000002
Indicates the client desires write-only access to the file.
OPEN4_SHARE_ACCESS_BOTH
Value: 0x00000003
Indicates the client desires both read and write access to the file.

NFS Share Deny Flags

OPEN4_SHARE_DENY_NONE
Value: 0x00000000
Indicates no denial of share access to other clients while the file is open.
OPEN4_SHARE_DENY_READ
Value: 0x00000001
Indicates denial of read access to other clients while the file is open.
OPEN4_SHARE_DENY_WRITE
Value: 0x00000002
Indicates denial of write access to other clients while the file is open.
OPEN4_SHARE_DENY_BOTH
Value: 0x00000003
Indicates denial of both read and write access to other clients while the file is open.

NFS Lock Type Constants

READ_LT
Value: 1
Indicates a non-blocking read lock.
WRITE_LT
Value: 2
Indicates a non-blocking write lock.
READW_LT
Value: 3
Indicates a blocking read lock.
WRITEW_LT
Value: 4
Indicates a blocking write lock.

NFS Stable Constants

UNSTABLE4
Value: 0
Indicates the application is free to commit any part of the data written and filesystem metadata before returning any results.
DATA_SYNC4
Value: 1
Indicates the application must commit all of the data to stable storage and enough filesystem metadata to retrieve the data before returning any results.
FILE_SYNC4
Value: 2
Indicates the application must commit the data written plus all filesystem metadata to stable storage before returning any results.

NFS Result Codes

NFS4_OK
Value: 0
Indicates successful completion of the operation, in that all constituent operations completed without error.
NFS4ERR_ACCESS
Value: 13
Indicates that permission has been denied. The client does not have the correct permission to perform the requested operation. Note this differs from NFS4ERR_PERM which is constrained to owner or privileged user permission failures.
NFS4ERR_ADMIN_REVOKED
Value: 10047
A locking state of any type has been revoked due to administrative interaction, possibly while the lease is valid, or because a delegation was revoked because of failure to return it, while the lease was valid.
NFS4ERR_ATTRNOTSUPP
Value: 10032
An attribute specified by the client is not supported by the server. This error must not be returned in the GetAttr event.
NFS4ERR_BADCHAR
Value: 10040
A UTF-8 string contains a character that is not supported by the server in the context in which it is being used.
NFS4ERR_BADNAME
Value: 10041
A name string in a request consisted of valid UTF-8 characters supported by the server, but the name is not supported by the server as a valid name for current operation. An example might be creating a file or directory named ".." on a server whose file system uses that name for links to parent directories. This error should not be returned due to a normalization issue in a string. When a file system keeps names in a particular normalization form, it is the server's responsibility to do the appropriate normalization, rather than rejecting the name.
NFS4ERR_BADOWNER
Value: 10039
This error is returned when an owner or owner_group attribute value cannot be translated to a local representation.
NFS4ERR_BADTYPE
Value: 10007
An attempt was made to create an object with an inappropriate type specified.
NFS4ERR_BAD_COOKIE
Value: 10003
This error should be returned if the client provides an invalid or unusable cookie in the ReadDir event.
NFS4ERR_BAD_RANGE
Value: 10042
The range specified in the Lock event is not appropriate to the allowable range of offsets for the server. For example, this error results when a server that only supports 32-bit ranges receives a range that cannot be handled by that server.
NFS4ERR_DEADLOCK
Value: 10045
The server has been able to determine a file locking deadlock condition for a blocking lock request.
NFS4ERR_DELAY
Value: 10008
For some reason, the application could not process this operation in what was deemed a reasonable time.
NFS4ERR_DENIED
Value: 10010
An attempt to lock a file is denied. Note this may be a temporary condition.
NFS4ERR_DQUOT
Value: 69
Either the resource (quota) hard limit has been exceeded for the server, or the client's resource limit on the server has been exceeded.
NFS4ERR_EXIST
Value: 17
A file system object of the specified target name already exists. Applicable when creating or renaming a file during the Open or Rename operations.
NFS4ERR_EXPIRED
Value: 10011
This error indicates a locking state of any type has been revoked or released due to cancellation of the client's lease, either immediately upon lease expiration, or following a later request for a conflicting lock.
NFS4ERR_FBIG
Value: 27
The file system object is too large. The operation would have caused a file system object to grow beyond the server's limit.
NFS4ERR_FILE_OPEN
Value: 10046
The operation is not allowed because a file system object involved in the operation is currently open. Servers may disallow removing or renaming open file system objects.
NFS4ERR_GRACE
Value: 10013
The server is in its recovery or grace period, which should at least match the lease period of the server. A locking request other than a reclaim could not be granted during that period.
NFS4ERR_INVAL
Value: 22
The arguments for this operation are determined to be invalid by the application.
NFS4ERR_IO
Value: 5
This indicates an unrecoverable I/O error has occurred for the file system.
NFS4ERR_ISDIR
Value: 21
The current object designates a directory when the current operation does not allow a directory to be accepted as the target of this operation.
NFS4ERR_LEASE_MOVED
Value: 10031
A lease being renewed is associated with a file system that has been migrated to a new server.
NFS4ERR_LOCKED
Value: 10012
A READ or WRITE operation was attempted on a file where there was a conflict between the I/O and an existing lock. A conflict may occur if a) there is a share reservation inconsistent with the I/O being done, or b) the range to be read or written intersects an existing mandatory byte-range lock.
NFS4ERR_LOCKS_HELD
Value: 10037
An operation was prevented due to the existence of a lock on the target object.
NFS4ERR_LOCK_NOTSUPP
Value: 10043
A locking request was attempted that would require the upgrade or downgrade of a lock range already held by the owner when the server does not support atomic upgrade or downgrade of locks.
NFS4ERR_LOCK_RANGE
Value: 10028
A lock request is operating on a range that partially overlaps a currently held lock for the current lock-owner and does not precisely match a single such lock, where the server does not support this type of request and thus does not implement POSIX locking semantics.
Value: 31
The request would have caused the server's limit for the number of hard links a file system object may have to be exceeded.
NFS4ERR_NAMETOOLONG
Value: 63
This is returned when the filename in an operation exceeds the server's implementation limit.
NFS4ERR_NOENT
Value: 2
This indicates no such file or directory. The file system object referenced by the name specified does not exist.
NFS4ERR_NOSPC
Value: 28
This indicates no space left on the device. The operation would have caused the server's file system to exceed its limit.
NFS4ERR_NOTDIR
Value: 20
Indicates that the current object is not a directory for an operation in which a directory is required.
NFS4ERR_NOTEMPTY
Value: 66
An attempt was made to remove a directory that was not empty.
NFS4ERR_NOTSUPP
Value: 10004
The operation is not supported, either because the operation is an optional one and is not supported by this server or because the operation must not be implemented in the current minor version.
NFS4ERR_NO_GRACE
Value: 10033
The server cannot guarantee that it has not granted state to another client that may conflict with this client's state. No further reclaims from this client will succeed.
NFS4ERR_OPENMODE
Value: 10038
The client attempted a Read, Write, Lock, or other operation not available to the client (e.g., writing to a file opened only for read).
NFS4ERR_PERM
Value: 1
This indicates that the requester is not the owner. The operation was not allowed because the caller is neither a privileged user nor the owner of the target of the operation.
NFS4ERR_RECLAIM_BAD
Value: 10034
The server cannot guarantee that it has not granted state to another client that may conflict with the requested state. However, this applies only to the state requested in this call; further reclaims may succeed. This result code is only valid for Lock and Open operations.
NFS4ERR_RECLAIM_CONFLICT
Value: 10035
The reclaim attempted by the client conflicts with a lock already held by another client. Unlike NFS4ERR_RECLAIM_BAD, this can only occur if one of the clients misbehaved. This result code is only valid for Lock and Open operations.
NFS4ERR_ROFS
Value: 30
This indicates a read-only file system. A modifying operation was attempted on a read-only file system.
NFS4ERR_SERVERFAULT
Value: 10006
An error that does not map to any of the specific legal NFSv4 protocol error values occurred on the server.
NFS4ERR_SHARE_DENIED
Value: 10015
An attempt to open a file with a share reservation has failed due to an existing share conflict.
Value: 10029
The current object designates a symbolic link when the current operation does not allow a symbolic link as the target.
NFS4ERR_TOOSMALL
Value: 10005
This error is used where an operation returns a variable amount of data, with a limit specified by the client. Where the data returned cannot be fitted within the limit specified by the client, this error results.
NFS4ERR_XDEV
Value: 18
This indicates an attempt to perform an operation, such as linking, has inappropriately crossed a boundary (e.g., across a file system boundary).