rfc3010.txt

来自「RFC 的详细文档!」· 文本 代码 · 共 1,421 行 · 第 1/5 页

TXT
1,421 行
字号

   Client    The "client" is the entity that accesses the NFS server's
             resources.  The client may be an application which contains
             the logic to access the NFS server directly.  The client
             may also be the traditional operating system client remote
             file system services for a set of applications.

             In the case of file locking the client is the entity that
             maintains a set of locks on behalf of one or more
             applications.  This client is responsible for crash or
             failure recovery for those locks it manages.

             Note that multiple clients may share the same transport and
             multiple clients may exist on the same network node.

   Clientid  A 64-bit quantity used as a unique, short-hand reference to
             a client supplied Verifier and ID.  The server is
             responsible for supplying the Clientid.

   Lease     An interval of time defined by the server for which the
             client is irrevocably granted a lock.  At the end of a
             lease period the lock may be revoked if the lease has not
             been extended.  The lock must be revoked if a conflicting
             lock has been granted after the lease interval.

             All leases granted by a server have the same fixed
             interval.  Note that the fixed interval was chosen to
             alleviate the expense a server would have in maintaining
             state about variable length leases across server failures.

   Lock      The term "lock" is used to refer to both record (byte-
             range) locks as well as file (share) locks unless
             specifically stated otherwise.

   Server    The "Server" is the entity responsible for coordinating
             client access to a set of file systems.

   Stable Storage
             NFS version 4 servers must be able to recover without data
             loss from multiple power failures (including cascading
             power failures, that is, several power failures in quick
             succession), operating system failures, and hardware
             failure of components other than the storage medium itself
             (for example, disk, nonvolatile RAM).



Shepler, et al.             Standards Track                    [Page 11]

RFC 3010                 NFS version 4 Protocol            December 2000


             Some examples of stable storage that are allowable for an
             NFS server include:

             1. Media commit of data, that is, the modified data has
                been successfully written to the disk media, for
                example, the disk platter.

             2. An immediate reply disk drive with battery-backed on-
                drive intermediate storage or uninterruptible power
                system (UPS).

             3. Server commit of data with battery-backed intermediate
                storage and recovery software.

             4. Cache commit with uninterruptible power system (UPS) and
                recovery software.

   Stateid   A 64-bit quantity returned by a server that uniquely
             defines the locking state granted by the server for a
             specific lock owner for a specific file.

             Stateids composed of all bits 0 or all bits 1 have special
             meaning and are reserved values.

   Verifier  A 64-bit quantity generated by the client that the server
             can use to determine if the client has restarted and lost
             all previous lock state.

2.  Protocol Data Types

   The syntax and semantics to describe the data types of the NFS
   version 4 protocol are defined in the XDR [RFC1832] and RPC [RFC1831]
   documents.  The next sections build upon the XDR data types to define
   types and structures specific to this protocol.

2.1.  Basic Data Types

   Data Type     Definition
   _____________________________________________________________________
   int32_t       typedef int             int32_t;

   uint32_t      typedef unsigned int    uint32_t;

   int64_t       typedef hyper           int64_t;

   uint64_t      typedef unsigned hyper  uint64_t;





Shepler, et al.             Standards Track                    [Page 12]

RFC 3010                 NFS version 4 Protocol            December 2000


   attrlist4     typedef opaque        attrlist4<>;
                 Used for file/directory attributes

   bitmap4       typedef uint32_t        bitmap4<>;
                 Used in attribute array encoding.

   changeid4     typedef       uint64_t        changeid4;
                 Used in definition of change_info

   clientid4     typedef uint64_t        clientid4;
                 Shorthand reference to client identification

   component4    typedef utf8string      component4;
                 Represents path name components

   count4        typedef uint32_t        count4;
                 Various count parameters (READ, WRITE, COMMIT)

   length4       typedef uint64_t        length4;
                 Describes LOCK lengths

   linktext4     typedef utf8string      linktext4;
                 Symbolic link contents

   mode4         typedef uint32_t        mode4;
                 Mode attribute data type

   nfs_cookie4   typedef uint64_t        nfs_cookie4;
                 Opaque cookie value for READDIR

   nfs_fh4       typedef opaque          nfs_fh4<NFS4_FHSIZE>;
                 Filehandle definition; NFS4_FHSIZE is defined as 128

   nfs_ftype4    enum nfs_ftype4;
                 Various defined file types

   nfsstat4      enum nfsstat4;
                 Return value for operations

   offset4       typedef uint64_t        offset4;
                 Various offset designations (READ, WRITE, LOCK, COMMIT)

   pathname4     typedef component4      pathname4<>;
                 Represents path name for LOOKUP, OPEN and others

   qop4          typedef uint32_t        qop4;
                 Quality of protection designation in SECINFO




Shepler, et al.             Standards Track                    [Page 13]

RFC 3010                 NFS version 4 Protocol            December 2000


   sec_oid4      typedef opaque          sec_oid4<>;
                 Security Object Identifier
                 The sec_oid4 data type is not really opaque.
                 Instead contains an ASN.1 OBJECT IDENTIFIER as used
                 by GSS-API in the mech_type argument to
                 GSS_Init_sec_context.  See [RFC2078] for details.

   seqid4        typedef uint32_t        seqid4;
                 Sequence identifier used for file locking

   stateid4      typedef uint64_t        stateid4;
                 State identifier used for file locking and delegation

   utf8string    typedef opaque          utf8string<>;
                 UTF-8 encoding for strings

   verifier4     typedef opaque        verifier4[NFS4_VERIFIER_SIZE];
                 Verifier used for various operations (COMMIT, CREATE,
                 OPEN, READDIR, SETCLIENTID, WRITE)
                 NFS4_VERIFIER_SIZE is defined as 8

2.2.  Structured Data Types

   nfstime4
                  struct nfstime4 {
                          int64_t seconds;
                          uint32_t nseconds;
                  }

      The nfstime4 structure gives the number of seconds and nanoseconds
      since midnight or 0 hour January 1, 1970 Coordinated Universal
      Time (UTC).  Values greater than zero for the seconds field denote
      dates after the 0 hour January 1, 1970.  Values less than zero for
      the seconds field denote dates before the 0 hour January 1, 1970.
      In both cases, the nseconds field is to be added to the seconds
      field for the final time representation.  For example, if the time
      to be represented is one-half second before 0 hour January 1,
      1970, the seconds field would have a value of negative one (-1)
      and the nseconds fields would have a value of one-half second
      (500000000).  Values greater than 999,999,999 for nseconds are
      considered invalid.

      This data type is used to pass time and date information.  A
      server converts to and from its local representation of time when
      processing time values, preserving as much accuracy as possible.
      If the precision of timestamps stored for a file system object is





Shepler, et al.             Standards Track                    [Page 14]

RFC 3010                 NFS version 4 Protocol            December 2000


      less than defined, loss of precision can occur.  An adjunct time
      maintenance protocol is recommended to reduce client and server
      time skew.

   time_how4

                  enum time_how4 {
                          SET_TO_SERVER_TIME4 = 0,
                          SET_TO_CLIENT_TIME4 = 1
                  };


   settime4

                  union settime4 switch (time_how4 set_it) {
                   case SET_TO_CLIENT_TIME4:
                           nfstime4       time;
                   default:
                           void;
                  };

        The above definitions are used as the attribute definitions to
        set time values.  If set_it is SET_TO_SERVER_TIME4, then the
        server uses its local representation of time for the time value.


   specdata4

                  struct specdata4 {
                          uint32_t specdata1;
                          uint32_t specdata2;
                  };

        This data type represents additional information for the device
        file types NF4CHR and NF4BLK.


   fsid4

                  struct fsid4 {
                    uint64_t        major;
                    uint64_t        minor;
                  };

        This type is the file system identifier that is used as a
        mandatory attribute.





Shepler, et al.             Standards Track                    [Page 15]

RFC 3010                 NFS version 4 Protocol            December 2000


   fs_location4

                  struct fs_location4 {
                          utf8string    server<>;
                          pathname4     rootpath;
                  };


   fs_locations4

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?