Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 5661

Network File System (NFS) Version 4 Minor Version 1 Protocol

Pages: 617
Obsoleted by:  8881
Updated by:  81788434
Part 12 of 20 – Pages 334 to 361
First   Prev   Next

Top   ToC   RFC5661 - Page 334   prevText

14. Internationalization

The primary issue in which NFSv4.1 needs to deal with internationalization, or I18N, is with respect to file names and other strings as used within the protocol. The choice of string representation must allow reasonable name/string access to clients that use various languages. The UTF-8 encoding of the UCS (Universal Multiple-Octet Coded Character Set) as defined by ISO10646 [21] allows for this type of access and follows the policy described in "IETF Policy on Character Sets and Languages", RFC 2277 [22].
Top   ToC   RFC5661 - Page 335
   RFC 3454 [19], otherwise know as "stringprep", documents a framework
   for using Unicode/UTF-8 in networking protocols so as "to increase
   the likelihood that string input and string comparison work in ways
   that make sense for typical users throughout the world".  A protocol
   must define a profile of stringprep "in order to fully specify the
   processing options".  The remainder of this section defines the
   NFSv4.1 stringprep profiles.  Much of the terminology used for the
   remainder of this section comes from stringprep.

   There are three UTF-8 string types defined for NFSv4.1: utf8str_cs,
   utf8str_cis, and utf8str_mixed.  Separate profiles are defined for
   each.  Each profile defines the following, as required by stringprep:

   o  The intended applicability of the profile.

   o  The character repertoire that is the input and output to
      stringprep (which is Unicode 3.2 for the referenced version of
      stringprep).  However, NFSv4.1 implementations are not limited to
      3.2.

   o  The mapping tables from stringprep used (as described in Section 3
      of stringprep).

   o  Any additional mapping tables specific to the profile.

   o  The Unicode normalization used, if any (as described in Section 4
      of stringprep).

   o  The tables from the stringprep listing of characters that are
      prohibited as output (as described in Section 5 of stringprep).

   o  The bidirectional string testing used, if any (as described in
      Section 6 of stringprep).

   o  Any additional characters that are prohibited as output specific
      to the profile.

   Stringprep discusses Unicode characters, whereas NFSv4.1 renders
   UTF-8 characters.  Since there is a one-to-one mapping from UTF-8 to
   Unicode, when the remainder of this document refers to Unicode, the
   reader should assume UTF-8.

   Much of the text for the profiles comes from RFC 3491 [23].
Top   ToC   RFC5661 - Page 336

14.1. Stringprep Profile for the utf8str_cs Type

Every use of the utf8str_cs type definition in the NFSv4 protocol specification follows the profile named nfs4_cs_prep.

14.1.1. Intended Applicability of the nfs4_cs_prep Profile

The utf8str_cs type is a case-sensitive string of UTF-8 characters. Its primary use in NFSv4.1 is for naming components and pathnames. Components and pathnames are stored on the server's file system. Two valid distinct UTF-8 strings might be the same after processing via the utf8str_cs profile. If the strings are two names inside a directory, the NFSv4.1 server will need to either: o disallow the creation of a second name if its post-processed form collides with that of an existing name, or o allow the creation of the second name, but arrange so that after post-processing, the second name is different than the post- processed form of the first name.

14.1.2. Character Repertoire of nfs4_cs_prep

The nfs4_cs_prep profile uses Unicode 3.2, as defined in stringprep's Appendix A.1. However, NFSv4.1 implementations are not limited to 3.2.

14.1.3. Mapping Used by nfs4_cs_prep

The nfs4_cs_prep profile specifies mapping using the following tables from stringprep: Table B.1 Table B.2 is normally not part of the nfs4_cs_prep profile as it is primarily for dealing with case-insensitive comparisons. However, if the NFSv4.1 file server supports the case_insensitive file system attribute, and if case_insensitive is TRUE, the NFSv4.1 server MUST use Table B.2 (in addition to Table B1) when processing utf8str_cs strings, and the NFSv4.1 client MUST assume Table B.2 (in addition to Table B.1) is being used. If the case_preserving attribute is present and set to FALSE, then the NFSv4.1 server MUST use Table B.2 to map case when processing utf8str_cs strings. Whether the server maps from lower to upper case or from upper to lower case is an implementation dependency.
Top   ToC   RFC5661 - Page 337

14.1.4. Normalization used by nfs4_cs_prep

The nfs4_cs_prep profile does not specify a normalization form. A later revision of this specification may specify a particular normalization form. Therefore, the server and client can expect that they may receive unnormalized characters within protocol requests and responses. If the operating environment requires normalization, then the implementation must normalize utf8str_cs strings within the protocol before presenting the information to an application (at the client) or local file system (at the server).

14.1.5. Prohibited Output for nfs4_cs_prep

The nfs4_cs_prep profile RECOMMENDS prohibiting the use of the following tables from stringprep: Table C.5 Table C.6

14.1.6. Bidirectional Output for nfs4_cs_prep

The nfs4_cs_prep profile does not specify any checking of bidirectional strings.

14.2. Stringprep Profile for the utf8str_cis Type

Every use of the utf8str_cis type definition in the NFSv4.1 protocol specification follows the profile named nfs4_cis_prep.

14.2.1. Intended Applicability of the nfs4_cis_prep Profile

The utf8str_cis type is a case-insensitive string of UTF-8 characters. Its primary use in NFSv4.1 is for naming NFS servers.

14.2.2. Character Repertoire of nfs4_cis_prep

The nfs4_cis_prep profile uses Unicode 3.2, as defined in stringprep's Appendix A.1. However, NFSv4.1 implementations are not limited to 3.2.
Top   ToC   RFC5661 - Page 338

14.2.3. Mapping Used by nfs4_cis_prep

The nfs4_cis_prep profile specifies mapping using the following tables from stringprep: Table B.1 Table B.2

14.2.4. Normalization Used by nfs4_cis_prep

The nfs4_cis_prep profile specifies using Unicode normalization form KC, as described in stringprep.

14.2.5. Prohibited Output for nfs4_cis_prep

The nfs4_cis_prep profile specifies prohibiting using the following tables from stringprep: Table C.1.2 Table C.2.2 Table C.3 Table C.4 Table C.5 Table C.6 Table C.7 Table C.8 Table C.9

14.2.6. Bidirectional Output for nfs4_cis_prep

The nfs4_cis_prep profile specifies checking bidirectional strings as described in stringprep's Section 6.

14.3. Stringprep Profile for the utf8str_mixed Type

Every use of the utf8str_mixed type definition in the NFSv4.1 protocol specification follows the profile named nfs4_mixed_prep.
Top   ToC   RFC5661 - Page 339

14.3.1. Intended Applicability of the nfs4_mixed_prep Profile

The utf8str_mixed type is a string of UTF-8 characters, with a prefix that is case sensitive, a separator equal to '@', and a suffix that is a fully qualified domain name. Its primary use in NFSv4.1 is for naming principals identified in an Access Control Entry.

14.3.2. Character Repertoire of nfs4_mixed_prep

The nfs4_mixed_prep profile uses Unicode 3.2, as defined in stringprep's Appendix A.1. However, NFSv4.1 implementations are not limited to 3.2.

14.3.3. Mapping Used by nfs4_cis_prep

For the prefix and the separator of a utf8str_mixed string, the nfs4_mixed_prep profile specifies mapping using the following table from stringprep: Table B.1 For the suffix of a utf8str_mixed string, the nfs4_mixed_prep profile specifies mapping using the following tables from stringprep: Table B.1 Table B.2

14.3.4. Normalization Used by nfs4_mixed_prep

The nfs4_mixed_prep profile specifies using Unicode normalization form KC, as described in stringprep.

14.3.5. Prohibited Output for nfs4_mixed_prep

The nfs4_mixed_prep profile specifies prohibiting using the following tables from stringprep: Table C.1.2 Table C.2.2 Table C.3 Table C.4 Table C.5
Top   ToC   RFC5661 - Page 340
      Table C.6

      Table C.7

      Table C.8

      Table C.9

14.3.6. Bidirectional Output for nfs4_mixed_prep

The nfs4_mixed_prep profile specifies checking bidirectional strings as described in stringprep's Section 6.

14.4. UTF-8 Capabilities

const FSCHARSET_CAP4_CONTAINS_NON_UTF8 = 0x1; const FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 = 0x2; typedef uint32_t fs_charset_cap4; Because some operating environments and file systems do not enforce character set encodings, NFSv4.1 supports the fs_charset_cap attribute (Section 5.8.2.11) that indicates to the client a file system's UTF-8 capabilities. The attribute is an integer containing a pair of flags. The first flag is FSCHARSET_CAP4_CONTAINS_NON_UTF8, which, if set to one, tells the client that the file system contains non-UTF-8 characters, and the server will not convert non-UTF characters to UTF-8 if the client reads a symlink or directory, neither will operations with component names or pathnames in the arguments convert the strings to UTF-8. The second flag is FSCHARSET_CAP4_ALLOWS_ONLY_UTF8, which, if set to one, indicates that the server will accept (and generate) only UTF-8 characters on the file system. If FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 is set to one, FSCHARSET_CAP4_CONTAINS_NON_UTF8 MUST be set to zero. FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 SHOULD always be set to one.

14.5. UTF-8 Related Errors

Where the client sends an invalid UTF-8 string, the server should return NFS4ERR_INVAL (see Table 5). This includes cases in which inappropriate prefixes are detected and where the count includes trailing bytes that do not constitute a full UCS character. Where the client-supplied string is valid UTF-8 but contains characters that are not supported by the server as a value for that string (e.g., names containing characters outside of Unicode plane 0
Top   ToC   RFC5661 - Page 341
   on file systems that fail to support such characters despite their
   presence in the Unicode standard), the server should return
   NFS4ERR_BADCHAR.

   Where a UTF-8 string is used as a file name, and the file system
   (while supporting all of the characters within the name) does not
   allow that particular name to be used, the server should return the
   error NFS4ERR_BADNAME (Table 5).  This includes situations in which
   the server file system imposes a normalization constraint on name
   strings, but will also include such situations as file system
   prohibitions of "." and ".." as file names for certain operations,
   and other such constraints.

15. Error Values

NFS error numbers are assigned to failed operations within a Compound (COMPOUND or CB_COMPOUND) request. A Compound request contains a number of NFS operations that have their results encoded in sequence in a Compound reply. The results of successful operations will consist of an NFS4_OK status followed by the encoded results of the operation. If an NFS operation fails, an error status will be entered in the reply and the Compound request will be terminated.

15.1. Error Definitions

Protocol Error Definitions +-----------------------------------+--------+-------------------+ | Error | Number | Description | +-----------------------------------+--------+-------------------+ | NFS4_OK | 0 | Section 15.1.3.1 | | NFS4ERR_ACCESS | 13 | Section 15.1.6.1 | | NFS4ERR_ATTRNOTSUPP | 10032 | Section 15.1.15.1 | | NFS4ERR_ADMIN_REVOKED | 10047 | Section 15.1.5.1 | | NFS4ERR_BACK_CHAN_BUSY | 10057 | Section 15.1.12.1 | | NFS4ERR_BADCHAR | 10040 | Section 15.1.7.1 | | NFS4ERR_BADHANDLE | 10001 | Section 15.1.2.1 | | NFS4ERR_BADIOMODE | 10049 | Section 15.1.10.1 | | NFS4ERR_BADLAYOUT | 10050 | Section 15.1.10.2 | | NFS4ERR_BADNAME | 10041 | Section 15.1.7.2 | | NFS4ERR_BADOWNER | 10039 | Section 15.1.15.2 | | NFS4ERR_BADSESSION | 10052 | Section 15.1.11.1 | | NFS4ERR_BADSLOT | 10053 | Section 15.1.11.2 | | NFS4ERR_BADTYPE | 10007 | Section 15.1.4.1 | | NFS4ERR_BADXDR | 10036 | Section 15.1.1.1 | | NFS4ERR_BAD_COOKIE | 10003 | Section 15.1.1.2 | | NFS4ERR_BAD_HIGH_SLOT | 10077 | Section 15.1.11.3 | | NFS4ERR_BAD_RANGE | 10042 | Section 15.1.8.1 |
Top   ToC   RFC5661 - Page 342
    | NFS4ERR_BAD_SEQID                 | 10026  | Section 15.1.16.1 |
    | NFS4ERR_BAD_SESSION_DIGEST        | 10051  | Section 15.1.12.2 |
    | NFS4ERR_BAD_STATEID               | 10025  | Section 15.1.5.2  |
    | NFS4ERR_CB_PATH_DOWN              | 10048  | Section 15.1.11.4 |
    | NFS4ERR_CLID_INUSE                | 10017  | Section 15.1.13.2 |
    | NFS4ERR_CLIENTID_BUSY             | 10074  | Section 15.1.13.1 |
    | NFS4ERR_COMPLETE_ALREADY          | 10054  | Section 15.1.9.1  |
    | NFS4ERR_CONN_NOT_BOUND_TO_SESSION | 10055  | Section 15.1.11.6 |
    | NFS4ERR_DEADLOCK                  | 10045  | Section 15.1.8.2  |
    | NFS4ERR_DEADSESSION               | 10078  | Section 15.1.11.5 |
    | NFS4ERR_DELAY                     | 10008  | Section 15.1.1.3  |
    | NFS4ERR_DELEG_ALREADY_WANTED      | 10056  | Section 15.1.14.1 |
    | NFS4ERR_DELEG_REVOKED             | 10087  | Section 15.1.5.3  |
    | NFS4ERR_DENIED                    | 10010  | Section 15.1.8.3  |
    | NFS4ERR_DIRDELEG_UNAVAIL          | 10084  | Section 15.1.14.2 |
    | NFS4ERR_DQUOT                     | 69     | Section 15.1.4.2  |
    | NFS4ERR_ENCR_ALG_UNSUPP           | 10079  | Section 15.1.13.3 |
    | NFS4ERR_EXIST                     | 17     | Section 15.1.4.3  |
    | NFS4ERR_EXPIRED                   | 10011  | Section 15.1.5.4  |
    | NFS4ERR_FBIG                      | 27     | Section 15.1.4.4  |
    | NFS4ERR_FHEXPIRED                 | 10014  | Section 15.1.2.2  |
    | NFS4ERR_FILE_OPEN                 | 10046  | Section 15.1.4.5  |
    | NFS4ERR_GRACE                     | 10013  | Section 15.1.9.2  |
    | NFS4ERR_HASH_ALG_UNSUPP           | 10072  | Section 15.1.13.4 |
    | NFS4ERR_INVAL                     | 22     | Section 15.1.1.4  |
    | NFS4ERR_IO                        | 5      | Section 15.1.4.6  |
    | NFS4ERR_ISDIR                     | 21     | Section 15.1.2.3  |
    | NFS4ERR_LAYOUTTRYLATER            | 10058  | Section 15.1.10.3 |
    | NFS4ERR_LAYOUTUNAVAILABLE         | 10059  | Section 15.1.10.4 |
    | NFS4ERR_LEASE_MOVED               | 10031  | Section 15.1.16.2 |
    | NFS4ERR_LOCKED                    | 10012  | Section 15.1.8.4  |
    | NFS4ERR_LOCKS_HELD                | 10037  | Section 15.1.8.5  |
    | NFS4ERR_LOCK_NOTSUPP              | 10043  | Section 15.1.8.6  |
    | NFS4ERR_LOCK_RANGE                | 10028  | Section 15.1.8.7  |
    | NFS4ERR_MINOR_VERS_MISMATCH       | 10021  | Section 15.1.3.2  |
    | NFS4ERR_MLINK                     | 31     | Section 15.1.4.7  |
    | NFS4ERR_MOVED                     | 10019  | Section 15.1.2.4  |
    | NFS4ERR_NAMETOOLONG               | 63     | Section 15.1.7.3  |
    | NFS4ERR_NOENT                     | 2      | Section 15.1.4.8  |
    | NFS4ERR_NOFILEHANDLE              | 10020  | Section 15.1.2.5  |
    | NFS4ERR_NOMATCHING_LAYOUT         | 10060  | Section 15.1.10.5 |
    | NFS4ERR_NOSPC                     | 28     | Section 15.1.4.9  |
    | NFS4ERR_NOTDIR                    | 20     | Section 15.1.2.6  |
    | NFS4ERR_NOTEMPTY                  | 66     | Section 15.1.4.10 |
    | NFS4ERR_NOTSUPP                   | 10004  | Section 15.1.1.5  |
    | NFS4ERR_NOT_ONLY_OP               | 10081  | Section 15.1.3.3  |
    | NFS4ERR_NOT_SAME                  | 10027  | Section 15.1.15.3 |
    | NFS4ERR_NO_GRACE                  | 10033  | Section 15.1.9.3  |
Top   ToC   RFC5661 - Page 343
    | NFS4ERR_NXIO                      | 6      | Section 15.1.16.3 |
    | NFS4ERR_OLD_STATEID               | 10024  | Section 15.1.5.5  |
    | NFS4ERR_OPENMODE                  | 10038  | Section 15.1.8.8  |
    | NFS4ERR_OP_ILLEGAL                | 10044  | Section 15.1.3.4  |
    | NFS4ERR_OP_NOT_IN_SESSION         | 10071  | Section 15.1.3.5  |
    | NFS4ERR_PERM                      | 1      | Section 15.1.6.2  |
    | NFS4ERR_PNFS_IO_HOLE              | 10075  | Section 15.1.10.6 |
    | NFS4ERR_PNFS_NO_LAYOUT            | 10080  | Section 15.1.10.7 |
    | NFS4ERR_RECALLCONFLICT            | 10061  | Section 15.1.14.3 |
    | NFS4ERR_RECLAIM_BAD               | 10034  | Section 15.1.9.4  |
    | NFS4ERR_RECLAIM_CONFLICT          | 10035  | Section 15.1.9.5  |
    | NFS4ERR_REJECT_DELEG              | 10085  | Section 15.1.14.4 |
    | NFS4ERR_REP_TOO_BIG               | 10066  | Section 15.1.3.6  |
    | NFS4ERR_REP_TOO_BIG_TO_CACHE      | 10067  | Section 15.1.3.7  |
    | NFS4ERR_REQ_TOO_BIG               | 10065  | Section 15.1.3.8  |
    | NFS4ERR_RESTOREFH                 | 10030  | Section 15.1.16.4 |
    | NFS4ERR_RETRY_UNCACHED_REP        | 10068  | Section 15.1.3.9  |
    | NFS4ERR_RETURNCONFLICT            | 10086  | Section 15.1.10.8 |
    | NFS4ERR_ROFS                      | 30     | Section 15.1.4.11 |
    | NFS4ERR_SAME                      | 10009  | Section 15.1.15.4 |
    | NFS4ERR_SHARE_DENIED              | 10015  | Section 15.1.8.9  |
    | NFS4ERR_SEQUENCE_POS              | 10064  | Section 15.1.3.10 |
    | NFS4ERR_SEQ_FALSE_RETRY           | 10076  | Section 15.1.11.7 |
    | NFS4ERR_SEQ_MISORDERED            | 10063  | Section 15.1.11.8 |
    | NFS4ERR_SERVERFAULT               | 10006  | Section 15.1.1.6  |
    | NFS4ERR_STALE                     | 70     | Section 15.1.2.7  |
    | NFS4ERR_STALE_CLIENTID            | 10022  | Section 15.1.13.5 |
    | NFS4ERR_STALE_STATEID             | 10023  | Section 15.1.16.5 |
    | NFS4ERR_SYMLINK                   | 10029  | Section 15.1.2.8  |
    | NFS4ERR_TOOSMALL                  | 10005  | Section 15.1.1.7  |
    | NFS4ERR_TOO_MANY_OPS              | 10070  | Section 15.1.3.11 |
    | NFS4ERR_UNKNOWN_LAYOUTTYPE        | 10062  | Section 15.1.10.9 |
    | NFS4ERR_UNSAFE_COMPOUND           | 10069  | Section 15.1.3.12 |
    | NFS4ERR_WRONGSEC                  | 10016  | Section 15.1.6.3  |
    | NFS4ERR_WRONG_CRED                | 10082  | Section 15.1.6.4  |
    | NFS4ERR_WRONG_TYPE                | 10083  | Section 15.1.2.9  |
    | NFS4ERR_XDEV                      | 18     | Section 15.1.4.12 |
    +-----------------------------------+--------+-------------------+

                                  Table 5

15.1.1. General Errors

This section deals with errors that are applicable to a broad set of different purposes.
Top   ToC   RFC5661 - Page 344
15.1.1.1. NFS4ERR_BADXDR (Error Code 10036)
The arguments for this operation do not match those specified in the XDR definition. This includes situations in which the request ends before all the arguments have been seen. Note that this error applies when fixed enumerations (these include booleans) have a value within the input stream that is not valid for the enum. A replier may pre-parse all operations for a Compound procedure before doing any operation execution and return RPC-level XDR errors in that case.
15.1.1.2. NFS4ERR_BAD_COOKIE (Error Code 10003)
Used for operations that provide a set of information indexed by some quantity provided by the client or cookie sent by the server for an earlier invocation. Where the value cannot be used for its intended purpose, this error results.
15.1.1.3. NFS4ERR_DELAY (Error Code 10008)
For any of a number of reasons, the replier could not process this operation in what was deemed a reasonable time. The client should wait and then try the request with a new slot and sequence value. Some examples of scenarios that might lead to this situation: o A server that supports hierarchical storage receives a request to process a file that had been migrated. o An operation requires a delegation recall to proceed, and waiting for this delegation recall makes processing this request in a timely fashion impossible. In such cases, the error NFS4ERR_DELAY allows these preparatory operations to proceed without holding up client resources such as a session slot. After delaying for period of time, the client can then re-send the operation in question (but not with the same slot ID and sequence ID; one or both MUST be different on the re-send). Note that without the ability to return NFS4ERR_DELAY and the client's willingness to re-send when receiving it, deadlock might result. For example, if a recall is done, and if the delegation return or operations preparatory to delegation return are held up by other operations that need the delegation to be returned, session slots might not be available. The result could be deadlock.
Top   ToC   RFC5661 - Page 345
15.1.1.4. NFS4ERR_INVAL (Error Code 22)
The arguments for this operation are not valid for some reason, even though they do match those specified in the XDR definition for the request.
15.1.1.5. NFS4ERR_NOTSUPP (Error Code 10004)
Operation 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.
15.1.1.6. NFS4ERR_SERVERFAULT (Error Code 10006)
An error occurred on the server that does not map to any of the specific legal NFSv4.1 protocol error values. The client should translate this into an appropriate error. UNIX clients may choose to translate this to EIO.
15.1.1.7. NFS4ERR_TOOSMALL (Error Code 10005)
Used where an operation returns a variable amount of data, with a limit specified by the client. Where the data returned cannot be fit within the limit specified by the client, this error results.

15.1.2. Filehandle Errors

These errors deal with the situation in which the current or saved filehandle, or the filehandle passed to PUTFH intended to become the current filehandle, is invalid in some way. This includes situations in which the filehandle is a valid filehandle in general but is not of the appropriate object type for the current operation. Where the error description indicates a problem with the current or saved filehandle, it is to be understood that filehandles are only checked for the condition if they are implicit arguments of the operation in question.
15.1.2.1. NFS4ERR_BADHANDLE (Error Code 10001)
Illegal NFS filehandle for the current server. The current file handle failed internal consistency checks. Once accepted as valid (by PUTFH), no subsequent status change can cause the filehandle to generate this error.
Top   ToC   RFC5661 - Page 346
15.1.2.2. NFS4ERR_FHEXPIRED (Error Code 10014)
A current or saved filehandle that is an argument to the current operation is volatile and has expired at the server.
15.1.2.3. NFS4ERR_ISDIR (Error Code 21)
The current or saved filehandle designates a directory when the current operation does not allow a directory to be accepted as the target of this operation.
15.1.2.4. NFS4ERR_MOVED (Error Code 10019)
The file system that contains the current filehandle object is not present at the server. It may have been relocated or migrated to another server, or it may have never been present. The client may obtain the new file system location by obtaining the "fs_locations" or "fs_locations_info" attribute for the current filehandle. For further discussion, refer to Section 11.2.
15.1.2.5. NFS4ERR_NOFILEHANDLE (Error Code 10020)
The logical current or saved filehandle value is required by the current operation and is not set. This may be a result of a malformed COMPOUND operation (i.e., no PUTFH or PUTROOTFH before an operation that requires the current filehandle be set).
15.1.2.6. NFS4ERR_NOTDIR (Error Code 20)
The current (or saved) filehandle designates an object that is not a directory for an operation in which a directory is required.
15.1.2.7. NFS4ERR_STALE (Error Code 70)
The current or saved filehandle value designating an argument to the current operation is invalid. The file referred to by that filehandle no longer exists or access to it has been revoked.
15.1.2.8. NFS4ERR_SYMLINK (Error Code 10029)
The current filehandle designates a symbolic link when the current operation does not allow a symbolic link as the target.
Top   ToC   RFC5661 - Page 347
15.1.2.9. NFS4ERR_WRONG_TYPE (Error Code 10083)
The current (or saved) filehandle designates an object that is of an invalid type for the current operation, and there is no more specific error (such as NFS4ERR_ISDIR or NFS4ERR_SYMLINK) that applies. Note that in NFSv4.0, such situations generally resulted in the less- specific error NFS4ERR_INVAL.

15.1.3. Compound Structure Errors

This section deals with errors that relate to the overall structure of a Compound request (by which we mean to include both COMPOUND and CB_COMPOUND), rather than to particular operations. There are a number of basic constraints on the operations that may appear in a Compound request. Sessions add to these basic constraints by requiring a Sequence operation (either SEQUENCE or CB_SEQUENCE) at the start of the Compound.
15.1.3.1. NFS_OK (Error code 0)
Indicates the operation completed successfully, in that all of the constituent operations completed without error.
15.1.3.2. NFS4ERR_MINOR_VERS_MISMATCH (Error code 10021)
The minor version specified is not one that the current listener supports. This value is returned in the overall status for the Compound but is not associated with a specific operation since the results will specify a result count of zero.
15.1.3.3. NFS4ERR_NOT_ONLY_OP (Error Code 10081)
Certain operations, which are allowed to be executed outside of a session, MUST be the only operation within a Compound whenever the Compound does not start with a Sequence operation. This error results when that constraint is not met.
15.1.3.4. NFS4ERR_OP_ILLEGAL (Error Code 10044)
The operation code is not a valid one for the current Compound procedure. The opcode in the result stream matched with this error is the ILLEGAL value, although the value that appears in the request stream may be different. Where an illegal value appears and the replier pre-parses all operations for a Compound procedure before doing any operation execution, an RPC-level XDR error may be returned.
Top   ToC   RFC5661 - Page 348
15.1.3.5. NFS4ERR_OP_NOT_IN_SESSION (Error Code 10071)
Most forward operations and all callback operations are only valid within the context of a session, so that the Compound request in question MUST begin with a Sequence operation. If an attempt is made to execute these operations outside the context of session, this error results.
15.1.3.6. NFS4ERR_REP_TOO_BIG (Error Code 10066)
The reply to a Compound would exceed the channel's negotiated maximum response size.
15.1.3.7. NFS4ERR_REP_TOO_BIG_TO_CACHE (Error Code 10067)
The reply to a Compound would exceed the channel's negotiated maximum size for replies cached in the reply cache when the Sequence for the current request specifies that this request is to be cached.
15.1.3.8. NFS4ERR_REQ_TOO_BIG (Error Code 10065)
The Compound request exceeds the channel's negotiated maximum size for requests.
15.1.3.9. NFS4ERR_RETRY_UNCACHED_REP (Error Code 10068)
The requester has attempted a retry of a Compound that it previously requested not be placed in the reply cache.
15.1.3.10. NFS4ERR_SEQUENCE_POS (Error Code 10064)
A Sequence operation appeared in a position other than the first operation of a Compound request.
15.1.3.11. NFS4ERR_TOO_MANY_OPS (Error Code 10070)
The Compound request has too many operations, exceeding the count negotiated when the session was created.
15.1.3.12. NFS4ERR_UNSAFE_COMPOUND (Error Code 10068)
The client has sent a COMPOUND request with an unsafe mix of operations -- specifically, with a non-idempotent operation that changes the current filehandle and that is not followed by a GETFH.
Top   ToC   RFC5661 - Page 349

15.1.4. File System Errors

These errors describe situations that occurred in the underlying file system implementation rather than in the protocol or any NFSv4.x feature.
15.1.4.1. NFS4ERR_BADTYPE (Error Code 10007)
An attempt was made to create an object with an inappropriate type specified to CREATE. This may be because the type is undefined, because the type is not supported by the server, or because the type is not intended to be created by CREATE (such as a regular file or named attribute, for which OPEN is used to do the file creation).
15.1.4.2. NFS4ERR_DQUOT (Error Code 19)
Resource (quota) hard limit exceeded. The user's resource limit on the server has been exceeded.
15.1.4.3. NFS4ERR_EXIST (Error Code 17)
A file of the specified target name (when creating, renaming, or linking) already exists.
15.1.4.4. NFS4ERR_FBIG (Error Code 27)
The file is too large. The operation would have caused the file to grow beyond the server's limit.
15.1.4.5. NFS4ERR_FILE_OPEN (Error Code 10046)
The operation is not allowed because a file involved in the operation is currently open. Servers may, but are not required to, disallow linking-to, removing, or renaming open files.
15.1.4.6. NFS4ERR_IO (Error Code 5)
Indicates that an I/O error occurred for which the file system was unable to provide recovery.
15.1.4.7. NFS4ERR_MLINK (Error Code 31)
The request would have caused the server's limit for the number of hard links a file may have to be exceeded.
Top   ToC   RFC5661 - Page 350
15.1.4.8. NFS4ERR_NOENT (Error Code 2)
Indicates no such file or directory. The file or directory name specified does not exist.
15.1.4.9. NFS4ERR_NOSPC (Error Code 28)
Indicates there is no space left on the device. The operation would have caused the server's file system to exceed its limit.
15.1.4.10. NFS4ERR_NOTEMPTY (Error Code 66)
An attempt was made to remove a directory that was not empty.
15.1.4.11. NFS4ERR_ROFS (Error Code 30)
Indicates a read-only file system. A modifying operation was attempted on a read-only file system.
15.1.4.12. NFS4ERR_XDEV (Error Code 18)
Indicates an attempt to do an operation, such as linking, that inappropriately crosses a boundary. This may be due to such boundaries as: o that between file systems (where the fsids are different). o that between different named attribute directories or between a named attribute directory and an ordinary directory. o that between byte-ranges of a file system that the file system implementation treats as separate (for example, for space accounting purposes), and where cross-connection between the byte- ranges are not allowed.

15.1.5. State Management Errors

These errors indicate problems with the stateid (or one of the stateids) passed to a given operation. This includes situations in which the stateid is invalid as well as situations in which the stateid is valid but designates locking state that has been revoked. Depending on the operation, the stateid when valid may designate opens, byte-range locks, file or directory delegations, layouts, or device maps.
Top   ToC   RFC5661 - Page 351
15.1.5.1. NFS4ERR_ADMIN_REVOKED (Error Code 10047)
A stateid designates locking state of any type that has been revoked due to administrative interaction, possibly while the lease is valid.
15.1.5.2. NFS4ERR_BAD_STATEID (Error Code 10026)
A stateid does not properly designate any valid state. See Sections 8.2.4 and 8.2.3 for a discussion of how stateids are validated.
15.1.5.3. NFS4ERR_DELEG_REVOKED (Error Code 10087)
A stateid designates recallable locking state of any type (delegation or layout) that has been revoked due to the failure of the client to return the lock when it was recalled.
15.1.5.4. NFS4ERR_EXPIRED (Error Code 10011)
A stateid designates locking state of any type that has been revoked due to expiration of the client's lease, either immediately upon lease expiration, or following a later request for a conflicting lock.
15.1.5.5. NFS4ERR_OLD_STATEID (Error Code 10024)
A stateid with a non-zero seqid value does match the current seqid for the state designated by the user.

15.1.6. Security Errors

These are the various permission-related errors in NFSv4.1.
15.1.6.1. NFS4ERR_ACCESS (Error Code 13)
Indicates permission denied. The caller does not have the correct permission to perform the requested operation. Contrast this with NFS4ERR_PERM (Section 15.1.6.2), which restricts itself to owner or privileged-user permission failures, and NFS4ERR_WRONG_CRED (Section 15.1.6.4), which deals with appropriate permission to delete or modify transient objects based on the credentials of the user that created them.
15.1.6.2. NFS4ERR_PERM (Error Code 1)
Indicates requester is not the owner. The operation was not allowed because the caller is neither a privileged user (root) nor the owner of the target of the operation.
Top   ToC   RFC5661 - Page 352
15.1.6.3. NFS4ERR_WRONGSEC (Error Code 10016)
Indicates that the security mechanism being used by the client for the operation does not match the server's security policy. The client should change the security mechanism being used and re-send the operation (but not with the same slot ID and sequence ID; one or both MUST be different on the re-send). SECINFO and SECINFO_NO_NAME can be used to determine the appropriate mechanism.
15.1.6.4. NFS4ERR_WRONG_CRED (Error Code 10082)
An operation that manipulates state was attempted by a principal that was not allowed to modify that piece of state.

15.1.7. Name Errors

Names in NFSv4 are UTF-8 strings. When the strings are not valid UTF-8 or are of length zero, the error NFS4ERR_INVAL results. Besides this, there are a number of other errors to indicate specific problems with names.
15.1.7.1. NFS4ERR_BADCHAR (Error Code 10040)
A UTF-8 string contains a character that is not supported by the server in the context in which it being used.
15.1.7.2. NFS4ERR_BADNAME (Error Code 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 the 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.
15.1.7.3. NFS4ERR_NAMETOOLONG (Error Code 63)
Returned when the filename in an operation exceeds the server's implementation limit.

15.1.8. Locking Errors

This section deals with errors related to locking, both as to share reservations and byte-range locking. It does not deal with errors specific to the process of reclaiming locks. Those are dealt with in Section 15.1.9.
Top   ToC   RFC5661 - Page 353
15.1.8.1. NFS4ERR_BAD_RANGE (Error Code 10042)
The byte-range of a LOCK, LOCKT, or LOCKU operation is not allowed by 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. (See Section 18.10.3.)
15.1.8.2. NFS4ERR_DEADLOCK (Error Code 10045)
The server has been able to determine a byte-range locking deadlock condition for a READW_LT or WRITEW_LT LOCK operation.
15.1.8.3. NFS4ERR_DENIED (Error Code 10010)
An attempt to lock a file is denied. Since this may be a temporary condition, the client is encouraged to re-send the lock request (but not with the same slot ID and sequence ID; one or both MUST be different on the re-send) until the lock is accepted. See Section 9.6 for a discussion of the re-send.
15.1.8.4. NFS4ERR_LOCKED (Error Code 10012)
A READ or WRITE operation was attempted on a file where there was a conflict between the I/O and an existing lock: o There is a share reservation inconsistent with the I/O being done. o The range to be read or written intersects an existing mandatory byte-range lock.
15.1.8.5. NFS4ERR_LOCKS_HELD (Error Code 10037)
An operation was prevented by the unexpected presence of locks.
15.1.8.6. NFS4ERR_LOCK_NOTSUPP (Error Code 10043)
A LOCK operation was attempted that would require the upgrade or downgrade of a byte-range lock range already held by the owner, and the server does not support atomic upgrade or downgrade of locks.
15.1.8.7. NFS4ERR_LOCK_RANGE (Error Code 10028)
A LOCK operation is operating on a range that overlaps in part a currently held byte-range lock for the current lock-owner and does not precisely match a single such byte-range lock where the server does not support this type of request, and thus does not implement
Top   ToC   RFC5661 - Page 354
   POSIX locking semantics [24].  See Sections 18.10.4, 18.11.4, and
   18.12.4 for a discussion of how this applies to LOCK, LOCKT, and
   LOCKU respectively.

15.1.8.8. NFS4ERR_OPENMODE (Error Code 10038)
The client attempted a READ, WRITE, LOCK, or other operation not sanctioned by the stateid passed (e.g., writing to a file opened for read-only access).
15.1.8.9. NFS4ERR_SHARE_DENIED (Error Code 10015)
An attempt to OPEN a file with a share reservation has failed because of a share conflict.

15.1.9. Reclaim Errors

These errors relate to the process of reclaiming locks after a server restart.
15.1.9.1. NFS4ERR_COMPLETE_ALREADY (Error Code 10054)
The client previously sent a successful RECLAIM_COMPLETE operation. An additional RECLAIM_COMPLETE operation is not necessary and results in this error.
15.1.9.2. NFS4ERR_GRACE (Error Code 10013)
The server was in its recovery or grace period. The locking request was not a reclaim request and so could not be granted during that period.
15.1.9.3. NFS4ERR_NO_GRACE (Error Code 10033)
A reclaim of client state was attempted in circumstances in which the server cannot guarantee that conflicting state has not been provided to another client. This can occur because the reclaim has been done outside of the grace period of the server, after the client has done a RECLAIM_COMPLETE operation, or because previous operations have created a situation in which the server is not able to determine that a reclaim-interfering edge condition does not exist.
15.1.9.4. NFS4ERR_RECLAIM_BAD (Error Code 10034)
The server has determined that a reclaim attempted by the client is not valid, i.e. the lock specified as being reclaimed could not possibly have existed before the server restart. A server is not obliged to make this determination and will typically rely on the
Top   ToC   RFC5661 - Page 355
   client to only reclaim locks that the client was granted prior to
   restart.  However, when a server does have reliable information to
   enable it make this determination, this error indicates that the
   reclaim has been rejected as invalid.  This is as opposed to the
   error NFS4ERR_RECLAIM_CONFLICT (see Section 15.1.9.5) where the
   server can only determine that there has been an invalid reclaim, but
   cannot determine which request is invalid.

15.1.9.5. NFS4ERR_RECLAIM_CONFLICT (Error Code 10035)
The reclaim attempted by the client has encountered a conflict and cannot be satisfied. Potentially indicates a misbehaving client, although not necessarily the one receiving the error. The misbehavior might be on the part of the client that established the lock with which this client conflicted. See also Section 15.1.9.4 for the related error, NFS4ERR_RECLAIM_BAD.

15.1.10. pNFS Errors

This section deals with pNFS-related errors including those that are associated with using NFSv4.1 to communicate with a data server.
15.1.10.1. NFS4ERR_BADIOMODE (Error Code 10049)
An invalid or inappropriate layout iomode was specified. For example an inappropriate layout iomode, suppose a client's LAYOUTGET operation specified an iomode of LAYOUTIOMODE4_RW, and the server is neither able nor willing to let the client send write requests to data servers; the server can reply with NFS4ERR_BADIOMODE. The client would then send another LAYOUTGET with an iomode of LAYOUTIOMODE4_READ.
15.1.10.2. NFS4ERR_BADLAYOUT (Error Code 10050)
The layout specified is invalid in some way. For LAYOUTCOMMIT, this indicates that the specified layout is not held by the client or is not of mode LAYOUTIOMODE4_RW. For LAYOUTGET, it indicates that a layout matching the client's specification as to minimum length cannot be granted.
15.1.10.3. NFS4ERR_LAYOUTTRYLATER (Error Code 10058)
Layouts are temporarily unavailable for the file. The client should re-send later (but not with the same slot ID and sequence ID; one or both MUST be different on the re-send).
Top   ToC   RFC5661 - Page 356
15.1.10.4. NFS4ERR_LAYOUTUNAVAILABLE (Error Code 10059)
Returned when layouts are not available for the current file system or the particular specified file.
15.1.10.5. NFS4ERR_NOMATCHING_LAYOUT (Error Code 10060)
Returned when layouts are recalled and the client has no layouts matching the specification of the layouts being recalled.
15.1.10.6. NFS4ERR_PNFS_IO_HOLE (Error Code 10075)
The pNFS client has attempted to read from or write to an illegal hole of a file of a data server that is using sparse packing. See Section 13.4.4.
15.1.10.7. NFS4ERR_PNFS_NO_LAYOUT (Error Code 10080)
The pNFS client has attempted to read from or write to a file (using a request to a data server) without holding a valid layout. This includes the case where the client had a layout, but the iomode does not allow a WRITE.
15.1.10.8. NFS4ERR_RETURNCONFLICT (Error Code 10086)
A layout is unavailable due to an attempt to perform the LAYOUTGET before a pending LAYOUTRETURN on the file has been received. See Section 12.5.5.2.1.3.
15.1.10.9. NFS4ERR_UNKNOWN_LAYOUTTYPE (Error Code 10062)
The client has specified a layout type that is not supported by the server.

15.1.11. Session Use Errors

This section deals with errors encountered when using sessions, that is, errors encountered when a request uses a Sequence (i.e., either SEQUENCE or CB_SEQUENCE) operation.
15.1.11.1. NFS4ERR_BADSESSION (Error Code 10052)
The specified session ID is unknown to the server to which the operation is addressed.
Top   ToC   RFC5661 - Page 357
15.1.11.2. NFS4ERR_BADSLOT (Error Code 10053)
The requester sent a Sequence operation that attempted to use a slot the replier does not have in its slot table. It is possible the slot may have been retired.
15.1.11.3. NFS4ERR_BAD_HIGH_SLOT (Error Code 10077)
The highest_slot argument in a Sequence operation exceeds the replier's enforced highest_slotid.
15.1.11.4. NFS4ERR_CB_PATH_DOWN (Error Code 10048)
There is a problem contacting the client via the callback path. The function of this error has been mostly superseded by the use of status flags in the reply to the SEQUENCE operation (see Section 18.46).
15.1.11.5. NFS4ERR_DEADSESSION (Error Code 10078)
The specified session is a persistent session that is dead and does not accept new requests or perform new operations on existing requests (in the case in which a request was partially executed before server restart).
15.1.11.6. NFS4ERR_CONN_NOT_BOUND_TO_SESSION (Error Code 10055)
A Sequence operation was sent on a connection that has not been associated with the specified session, where the client specified that connection association was to be enforced with SP4_MACH_CRED or SP4_SSV state protection.
15.1.11.7. NFS4ERR_SEQ_FALSE_RETRY (Error Code 10076)
The requester sent a Sequence operation with a slot ID and sequence ID that are in the reply cache, but the replier has detected that the retried request is not the same as the original request. See Section 2.10.6.1.3.1.
15.1.11.8. NFS4ERR_SEQ_MISORDERED (Error Code 10063)
The requester sent a Sequence operation with an invalid sequence ID.

15.1.12. Session Management Errors

This section deals with errors associated with requests used in session management.
Top   ToC   RFC5661 - Page 358
15.1.12.1. NFS4ERR_BACK_CHAN_BUSY (Error Code 10057)
An attempt was made to destroy a session when the session cannot be destroyed because the server has callback requests outstanding.
15.1.12.2. NFS4ERR_BAD_SESSION_DIGEST (Error Code 10051)
The digest used in a SET_SSV request is not valid.

15.1.13. Client Management Errors

This section deals with errors associated with requests used to create and manage client IDs.
15.1.13.1. NFS4ERR_CLIENTID_BUSY (Error Code 10074)
The DESTROY_CLIENTID operation has found there are sessions and/or unexpired state associated with the client ID to be destroyed.
15.1.13.2. NFS4ERR_CLID_INUSE (Error Code 10017)
While processing an EXCHANGE_ID operation, the server was presented with a co_ownerid field that matches an existing client with valid leased state, but the principal sending the EXCHANGE_ID operation differs from the principal that established the existing client. This indicates a collision (most likely due to chance) between clients. The client should recover by changing the co_ownerid and re-sending EXCHANGE_ID (but not with the same slot ID and sequence ID; one or both MUST be different on the re-send).
15.1.13.3. NFS4ERR_ENCR_ALG_UNSUPP (Error Code 10079)
An EXCHANGE_ID was sent that specified state protection via SSV, and where the set of encryption algorithms presented by the client did not include any supported by the server.
15.1.13.4. NFS4ERR_HASH_ALG_UNSUPP (Error Code 10072)
An EXCHANGE_ID was sent that specified state protection via SSV, and where the set of hashing algorithms presented by the client did not include any supported by the server.
15.1.13.5. NFS4ERR_STALE_CLIENTID (Error Code 10022)
A client ID not recognized by the server was passed to an operation. Note that unlike the case of NFSv4.0, client IDs are not passed explicitly to the server in ordinary locking operations and cannot result in this error. Instead, when there is a server restart, it is
Top   ToC   RFC5661 - Page 359
   first manifested through an error on the associated session, and the
   staleness of the client ID is detected when trying to associate a
   client ID with a new session.

15.1.14. Delegation Errors

This section deals with errors associated with requesting and returning delegations.
15.1.14.1. NFS4ERR_DELEG_ALREADY_WANTED (Error Code 10056)
The client has requested a delegation when it had already registered that it wants that same delegation.
15.1.14.2. NFS4ERR_DIRDELEG_UNAVAIL (Error Code 10084)
This error is returned when the server is unable or unwilling to provide a requested directory delegation.
15.1.14.3. NFS4ERR_RECALLCONFLICT (Error Code 10061)
A recallable object (i.e., a layout or delegation) is unavailable due to a conflicting recall operation that is currently in progress for that object.
15.1.14.4. NFS4ERR_REJECT_DELEG (Error Code 10085)
The callback operation invoked to deal with a new delegation has rejected it.

15.1.15. Attribute Handling Errors

This section deals with errors specific to attribute handling within NFSv4.
15.1.15.1. NFS4ERR_ATTRNOTSUPP (Error Code 10032)
An attribute specified is not supported by the server. This error MUST NOT be returned by the GETATTR operation.
15.1.15.2. NFS4ERR_BADOWNER (Error Code 10039)
This error is returned when an owner or owner_group attribute value or the who field of an ACE within an ACL attribute value cannot be translated to a local representation.
Top   ToC   RFC5661 - Page 360
15.1.15.3. NFS4ERR_NOT_SAME (Error Code 10027)
This error is returned by the VERIFY operation to signify that the attributes compared were not the same as those provided in the client's request.
15.1.15.4. NFS4ERR_SAME (Error Code 10009)
This error is returned by the NVERIFY operation to signify that the attributes compared were the same as those provided in the client's request.

15.1.16. Obsoleted Errors

These errors MUST NOT be generated by any NFSv4.1 operation. This can be for a number of reasons. o The function provided by the error has been superseded by one of the status bits returned by the SEQUENCE operation. o The new session structure and associated change in locking have made the error unnecessary. o There has been a restructuring of some errors for NFSv4.1 that resulted in the elimination of certain errors.
15.1.16.1. NFS4ERR_BAD_SEQID (Error Code 10026)
The sequence number (seqid) in a locking request is neither the next expected number or the last number processed. These seqids are ignored in NFSv4.1.
15.1.16.2. NFS4ERR_LEASE_MOVED (Error Code 10031)
A lease being renewed is associated with a file system that has been migrated to a new server. The error has been superseded by the SEQ4_STATUS_LEASE_MOVED status bit (see Section 18.46).
15.1.16.3. NFS4ERR_NXIO (Error Code 5)
I/O error. No such device or address. This error is for errors involving block and character device access, but because NFSv4.1 is not a device-access protocol, this error is not applicable.
Top   ToC   RFC5661 - Page 361
15.1.16.4. NFS4ERR_RESTOREFH (Error Code 10030)
The RESTOREFH operation does not have a saved filehandle (identified by SAVEFH) to operate upon. In NFSv4.1, this error has been superseded by NFS4ERR_NOFILEHANDLE.
15.1.16.5. NFS4ERR_STALE_STATEID (Error Code 10023)
A stateid generated by an earlier server instance was used. This error is moot in NFSv4.1 because all operations that take a stateid MUST be preceded by the SEQUENCE operation, and the earlier server instance is detected by the session infrastructure that supports SEQUENCE.


(page 361 continued on part 13)

Next Section