draft-ietf-nfsv4-minorversion2-34.txt   draft-ietf-nfsv4-minorversion2-35.txt 
NFSv4 T. Haynes NFSv4 T. Haynes
Internet-Draft Primary Data Internet-Draft Primary Data
Intended status: Standards Track March 30, 2015 Intended status: Standards Track March 30, 2015
Expires: October 1, 2015 Expires: October 1, 2015
NFS Version 4 Minor Version 2 NFS Version 4 Minor Version 2
draft-ietf-nfsv4-minorversion2-34.txt draft-ietf-nfsv4-minorversion2-35.txt
Abstract Abstract
This Internet-Draft describes NFS version 4 minor version two, This Internet-Draft describes NFS version 4 minor version two,
describing the protocol extensions made from NFS version 4 minor describing the protocol extensions made from NFS version 4 minor
version 1. Major extensions introduced in NFS version 4 minor version 1. Major extensions introduced in NFS version 4 minor
version two include: Server Side Copy, Application I/O Advise, Space version two include: Server Side Copy, Application I/O Advise, Space
Reservations, Sparse Files, Application Data Blocks, and Labeled NFS. Reservations, Sparse Files, Application Data Blocks, and Labeled NFS.
Requirements Language Requirements Language
skipping to change at page 3, line 44 skipping to change at page 3, line 44
11. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 43 11. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 43
11.1. Error Definitions . . . . . . . . . . . . . . . . . . . 43 11.1. Error Definitions . . . . . . . . . . . . . . . . . . . 43
11.1.1. General Errors . . . . . . . . . . . . . . . . . . . 43 11.1.1. General Errors . . . . . . . . . . . . . . . . . . . 43
11.1.2. Server to Server Copy Errors . . . . . . . . . . . . 43 11.1.2. Server to Server Copy Errors . . . . . . . . . . . . 43
11.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 44 11.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 44
11.2. New Operations and Their Valid Errors . . . . . . . . . 44 11.2. New Operations and Their Valid Errors . . . . . . . . . 44
11.3. New Callback Operations and Their Valid Errors . . . . . 48 11.3. New Callback Operations and Their Valid Errors . . . . . 48
12. New File Attributes . . . . . . . . . . . . . . . . . . . . . 49 12. New File Attributes . . . . . . . . . . . . . . . . . . . . . 49
12.1. New RECOMMENDED Attributes - List and Definition 12.1. New RECOMMENDED Attributes - List and Definition
References . . . . . . . . . . . . . . . . . . . . . . . 49 References . . . . . . . . . . . . . . . . . . . . . . . 49
12.2. Attribute Definitions . . . . . . . . . . . . . . . . . 49 12.2. Attribute Definitions . . . . . . . . . . . . . . . . . 50
13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 52 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 52
14. Modifications to NFSv4.1 Operations . . . . . . . . . . . . . 55 14. Modifications to NFSv4.1 Operations . . . . . . . . . . . . . 56
14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID . . . 55 14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID . . . 56
14.2. Operation 48: GETDEVICELIST - Get All Device Mappings 14.2. Operation 48: GETDEVICELIST - Get All Device Mappings
for a File System . . . . . . . . . . . . . . . . . . . 57 for a File System . . . . . . . . . . . . . . . . . . . 57
15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 58 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 59
15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a
File . . . . . . . . . . . . . . . . . . . . . . . . . . 58 File . . . . . . . . . . . . . . . . . . . . . . . . . . 59
15.2. Operation 60: COPY - Initiate a server-side copy . . . . 59 15.2. Operation 60: COPY - Initiate a server-side copy . . . . 60
15.3. Operation 61: COPY_NOTIFY - Notify a source server of a 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a
future copy . . . . . . . . . . . . . . . . . . . . . . 64 future copy . . . . . . . . . . . . . . . . . . . . . . 64
15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region 15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region
of a File . . . . . . . . . . . . . . . . . . . . . . . 66 of a File . . . . . . . . . . . . . . . . . . . . . . . 66
15.5. Operation 63: IO_ADVISE - Application I/O access pattern 15.5. Operation 63: IO_ADVISE - Application I/O access pattern
hints . . . . . . . . . . . . . . . . . . . . . . . . . 67 hints . . . . . . . . . . . . . . . . . . . . . . . . . 68
15.6. Operation 64: LAYOUTERROR - Provide Errors for the 15.6. Operation 64: LAYOUTERROR - Provide Errors for the
Layout . . . . . . . . . . . . . . . . . . . . . . . . . 72 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 73
15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the 15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the
Layout . . . . . . . . . . . . . . . . . . . . . . . . . 75 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 76
15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded 15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded
Operation . . . . . . . . . . . . . . . . . . . . . . . 77 Operation . . . . . . . . . . . . . . . . . . . . . . . 78
15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of 15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of
Asynchronous Operation . . . . . . . . . . . . . . . . . 78 Asynchronous Operation . . . . . . . . . . . . . . . . . 79
15.10. Operation 68: READ_PLUS - READ Data or Holes from a File 79 15.10. Operation 68: READ_PLUS - READ Data or Holes from a File 80
15.11. Operation 69: SEEK - Find the Next Data or Hole . . . . 84 15.11. Operation 69: SEEK - Find the Next Data or Hole . . . . 85
15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times 15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times
to a File . . . . . . . . . . . . . . . . . . . . . . . 85 to a File . . . . . . . . . . . . . . . . . . . . . . . 86
16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89 15.13. Operation 71: CLONE - Clone a file . . . . . . . . . . . 90
16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 91
16.1. Operation 15: CB_OFFLOAD - Report results of an 16.1. Operation 15: CB_OFFLOAD - Report results of an
asynchronous operation . . . . . . . . . . . . . . . . . 89 asynchronous operation . . . . . . . . . . . . . . . . . 91
17. Security Considerations . . . . . . . . . . . . . . . . . . . 90 17. Security Considerations . . . . . . . . . . . . . . . . . . . 93
18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 91 18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 93
19. References . . . . . . . . . . . . . . . . . . . . . . . . . 91 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 93
19.1. Normative References . . . . . . . . . . . . . . . . . . 91 19.1. Normative References . . . . . . . . . . . . . . . . . . 93
19.2. Informative References . . . . . . . . . . . . . . . . . 91 19.2. Informative References . . . . . . . . . . . . . . . . . 94
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 93 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 95
Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 94 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 97
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 94 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 97
1. Introduction 1. Introduction
1.1. The NFS Version 4 Minor Version 2 Protocol 1.1. The NFS Version 4 Minor Version 2 Protocol
The NFS version 4 minor version 2 (NFSv4.2) protocol is the third The NFS version 4 minor version 2 (NFSv4.2) protocol is the third
minor version of the NFS version 4 (NFSv4) protocol. The first minor minor version of the NFS version 4 (NFSv4) protocol. The first minor
version, NFSv4.0, is described in [I-D.ietf-nfsv4-rfc3530bis] and the version, NFSv4.0, is described in [RFC7530] and the second minor
second minor version, NFSv4.1, is described in [RFC5661]. version, NFSv4.1, is described in [RFC5661].
As a minor version, NFSv4.2 is consistent with the overall goals for As a minor version, NFSv4.2 is consistent with the overall goals for
NFSv4, but extends the protocol so as to better meet those goals, NFSv4, but extends the protocol so as to better meet those goals,
based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted
some additional goals, which motivate some of the major extensions in some additional goals, which motivate some of the major extensions in
NFSv4.2. NFSv4.2.
1.2. Scope of This Document 1.2. Scope of This Document
This document describes the NFSv4.2 protocol. With respect to This document describes the NFSv4.2 protocol. With respect to
skipping to change at page 6, line 52 skipping to change at page 6, line 52
Some applications treat a file as if it were a disk and as such want Some applications treat a file as if it were a disk and as such want
to initialize (or format) the file image. We introduce WRITE_SAME to initialize (or format) the file image. We introduce WRITE_SAME
(see Section 15.12) to send this metadata to the server to allow it (see Section 15.12) to send this metadata to the server to allow it
to write the block contents. to write the block contents.
1.4.6. Labeled NFS 1.4.6. Labeled NFS
While both clients and servers can employ Mandatory Access Control While both clients and servers can employ Mandatory Access Control
(MAC) security models to enforce data access, there has been no (MAC) security models to enforce data access, there has been no
protocol support for interoperability. A new file object attribute, protocol support for interoperability. A new file object attribute,
sec_label (see Section 12.2.2) allows for the server to store MAC sec_label (see Section 12.2.4) allows for the server to store MAC
labels on files, which the client retrieves and uses to enforce data labels on files, which the client retrieves and uses to enforce data
access (see Section 9.6.2). The format of the sec_label accommodates access (see Section 9.6.2). The format of the sec_label accommodates
any MAC security system. any MAC security system.
1.5. Enhancements to Minor Versioning Model 1.5. Enhancements to Minor Versioning Model
In NFSv4.1, the only way to introduce new variants of an operation In NFSv4.1, the only way to introduce new variants of an operation
was to introduce a new operation. I.e., READ becomes either READ2 or was to introduce a new operation. I.e., READ becomes either READ2 or
READ_PLUS. With the use of discriminated unions as parameters to READ_PLUS. With the use of discriminated unions as parameters to
such functions in NFSv4.2, it is possible to add a new arm in a such functions in NFSv4.2, it is possible to add a new arm in a
skipping to change at page 31, line 13 skipping to change at page 31, line 13
reporting of the space utilization. reporting of the space utilization.
For example, two files A and B have 10 blocks each. Let 6 of these For example, two files A and B have 10 blocks each. Let 6 of these
blocks be shared between them. Thus, the combined space utilized by blocks be shared between them. Thus, the combined space utilized by
the two files is 14 * BLOCK_SIZE bytes. In the former case, the the two files is 14 * BLOCK_SIZE bytes. In the former case, the
combined space utilization of the two files would be reported as 20 * combined space utilization of the two files would be reported as 20 *
BLOCK_SIZE. However, deleting either would only result in 4 * BLOCK_SIZE. However, deleting either would only result in 4 *
BLOCK_SIZE being freed. Conversely, the latter interpretation would BLOCK_SIZE being freed. Conversely, the latter interpretation would
report that the space utilization is only 8 * BLOCK_SIZE. report that the space utilization is only 8 * BLOCK_SIZE.
Adding another size attribute, space_freed (see Section 12.2.3), is Adding another size attribute, space_freed (see Section 12.2.2), is
helpful in solving this problem. space_freed is the number of blocks helpful in solving this problem. space_freed is the number of blocks
that are allocated to the given file that would be freed on its that are allocated to the given file that would be freed on its
deletion. In the example, both A and B would report space_freed as 4 deletion. In the example, both A and B would report space_freed as 4
* BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B * BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B
will report space_freed as 10 * BLOCK_SIZE as the deletion of B would will report space_freed as 10 * BLOCK_SIZE as the deletion of B would
result in the deallocation of all 10 blocks. result in the deallocation of all 10 blocks.
The addition of these attributes does not solve the problem of space The addition of these attributes does not solve the problem of space
being over-reported. However, over-reporting is better than under- being over-reported. However, over-reporting is better than under-
reporting. reporting.
skipping to change at page 38, line 8 skipping to change at page 38, line 8
interoperability between MAC mechanisms. The second component is an interoperability between MAC mechanisms. The second component is an
opaque field which is the actual security attribute data. To allow opaque field which is the actual security attribute data. To allow
for various MAC models, NFSv4 should be used solely as a transport for various MAC models, NFSv4 should be used solely as a transport
mechanism for the security attribute. It is the responsibility of mechanism for the security attribute. It is the responsibility of
the endpoints to consume the security attribute and make access the endpoints to consume the security attribute and make access
decisions based on their respective models. In addition, creation of decisions based on their respective models. In addition, creation of
objects through OPEN and CREATE allows for the security attribute to objects through OPEN and CREATE allows for the security attribute to
be specified upon creation. By providing an atomic create and set be specified upon creation. By providing an atomic create and set
operation for the security attribute it is possible to enforce the operation for the security attribute it is possible to enforce the
second and fourth requirements. The recommended attribute second and fourth requirements. The recommended attribute
FATTR4_SEC_LABEL (see Section 12.2.2) will be used to satisfy this FATTR4_SEC_LABEL (see Section 12.2.4) will be used to satisfy this
requirement. requirement.
9.3.1. Delegations 9.3.1. Delegations
In the event that a security attribute is changed on the server while In the event that a security attribute is changed on the server while
a client holds a delegation on the file, both the server and the a client holds a delegation on the file, both the server and the
client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661]) client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661])
with respect to attribute changes. It SHOULD flush all changes back with respect to attribute changes. It SHOULD flush all changes back
to the server and relinquish the delegation. to the server and relinquish the delegation.
skipping to change at page 42, line 29 skipping to change at page 42, line 29
An example of this is that a server that modifies READDIR or LOOKUP An example of this is that a server that modifies READDIR or LOOKUP
results based on the client's subject label might want to always results based on the client's subject label might want to always
construct the same subject label for a client which does not present construct the same subject label for a client which does not present
one. This will prevent a non-Labeled NFS client from mixing entries one. This will prevent a non-Labeled NFS client from mixing entries
in the directory cache. in the directory cache.
10. Sharing change attribute implementation characteristics with NFSv4 10. Sharing change attribute implementation characteristics with NFSv4
clients clients
Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1 Although both the NFSv4 [RFC7530] and NFSv4.1 protocol [RFC5661],
protocol [RFC5661], define the change attribute as being mandatory to define the change attribute as being mandatory to implement, there is
implement, there is little in the way of guidance as to its little in the way of guidance as to its construction. The only
construction. The only mandated constraint is that the value must mandated constraint is that the value must change whenever the file
change whenever the file data or metadata change. data or metadata change.
While this allows for a wide range of implementations, it also leaves While this allows for a wide range of implementations, it also leaves
the client with no way to determine which is the most recent value the client with no way to determine which is the most recent value
for the change attribute in a case where several RPC calls have been for the change attribute in a case where several RPC calls have been
issued in parallel. In other words if two COMPOUNDs, both containing issued in parallel. In other words if two COMPOUNDs, both containing
WRITE and GETATTR requests for the same file, have been issued in WRITE and GETATTR requests for the same file, have been issued in
parallel, how does the client determine which of the two change parallel, how does the client determine which of the two change
attribute values returned in the replies to the GETATTR requests attribute values returned in the replies to the GETATTR requests
correspond to the most recent state of the file? In some cases, the correspond to the most recent state of the file? In some cases, the
only recourse may be to send another COMPOUND containing a third only recourse may be to send another COMPOUND containing a third
GETATTR that is fully serialized with the first two. GETATTR that is fully serialized with the first two.
NFSv4.2 avoids this kind of inefficiency by allowing the server to NFSv4.2 avoids this kind of inefficiency by allowing the server to
share details about how the change attribute is expected to evolve, share details about how the change attribute is expected to evolve,
so that the client may immediately determine which, out of the so that the client may immediately determine which, out of the
several change attribute values returned by the server, is the most several change attribute values returned by the server, is the most
recent. change_attr_type is defined as a new recommended attribute recent. change_attr_type is defined as a new recommended attribute
(see Section 12.2.1), and is per file system. (see Section 12.2.3), and is per file system.
11. Error Values 11. Error Values
NFS error numbers are assigned to failed operations within a Compound NFS error numbers are assigned to failed operations within a Compound
(COMPOUND or CB_COMPOUND) request. A Compound request contains a (COMPOUND or CB_COMPOUND) request. A Compound request contains a
number of NFS operations that have their results encoded in sequence number of NFS operations that have their results encoded in sequence
in a Compound reply. The results of successful operations will in a Compound reply. The results of successful operations will
consist of an NFS4_OK status followed by the encoded results of the consist of an NFS4_OK status followed by the encoded results of the
operation. If an NFS operation fails, an error status will be operation. If an NFS operation fails, an error status will be
entered in the reply and the Compound request will be terminated. entered in the reply and the Compound request will be terminated.
skipping to change at page 45, line 26 skipping to change at page 45, line 26
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, | | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, |
| | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, | | | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| CLONE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
| | NFS4ERR_FBIG, NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, |
| | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOTSUPP, NFS4ERR_NOSPC, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, |
| | NFS4ERR_METADATA_NOTSUPP, NFS4ERR_MOVED, | | | NFS4ERR_METADATA_NOTSUPP, NFS4ERR_MOVED, |
| | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, |
| | NFS4ERR_OFFLOAD_DENIED, NFS4ERR_OLD_STATEID, | | | NFS4ERR_OFFLOAD_DENIED, NFS4ERR_OLD_STATEID, |
skipping to change at page 49, line 35 skipping to change at page 50, line 8
W means write-only (SETATTR may set, GETATTR may not retrieve). W means write-only (SETATTR may set, GETATTR may not retrieve).
R W means read/write (GETATTR may retrieve, SETATTR may set). R W means read/write (GETATTR may retrieve, SETATTR may set).
Defined in: The section of this specification that describes the Defined in: The section of this specification that describes the
attribute. attribute.
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| Name | Id | Data Type | Acc | Defined in | | Name | Id | Data Type | Acc | Defined in |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| space_freed | 77 | length4 | R | Section 12.2.3 | | clone_blksize | 77 | length4 | R | Section 12.2.1 |
| change_attr_type | 78 | change_attr_type4 | R | Section 12.2.1 | | space_freed | 78 | length4 | R | Section 12.2.2 |
| sec_label | 79 | sec_label4 | R W | Section 12.2.2 | | change_attr_type | 79 | change_attr_type4 | R | Section 12.2.3 |
| sec_label | 80 | sec_label4 | R W | Section 12.2.4 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
Table 4 Table 4
12.2. Attribute Definitions 12.2. Attribute Definitions
12.2.1. Attribute 78: change_attr_type 12.2.1. Attribute 77: clone_blksize
The clone_blksize attribute indicates the granularity of a CLONE
operation.
12.2.2. Attribute 78: space_freed
space_freed gives the number of bytes freed if the file is deleted.
This attribute is read only and is of type length4. It is a per file
attribute.
12.2.3. Attribute 79: change_attr_type
<CODE BEGINS> <CODE BEGINS>
enum change_attr_type4 { enum change_attr_type4 {
NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2,
NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3,
NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 NFS4_CHANGE_TYPE_IS_UNDEFINED = 4
}; };
<CODE ENDS> <CODE ENDS>
skipping to change at page 50, line 42 skipping to change at page 51, line 22
preserved when writing to pNFS data servers. preserved when writing to pNFS data servers.
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute
value MUST be incremented by one unit for every atomic change to value MUST be incremented by one unit for every atomic change to
the file attributes, data, or directory contents. In the case the file attributes, data, or directory contents. In the case
where the client is writing to pNFS data servers, the number of where the client is writing to pNFS data servers, the number of
increments is not guaranteed to exactly match the number of increments is not guaranteed to exactly match the number of
writes. writes.
NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is
implemented as suggested in [I-D.ietf-nfsv4-rfc3530bis] in terms implemented as suggested in [RFC7530] in terms of the
of the time_metadata attribute. time_metadata attribute.
If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR, If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or
NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at
the very least that the change attribute is monotonically increasing, the very least that the change attribute is monotonically increasing,
which is sufficient to resolve the question of which value is the which is sufficient to resolve the question of which value is the
most recent. most recent.
If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then
by inspecting the value of the 'time_delta' attribute it additionally by inspecting the value of the 'time_delta' attribute it additionally
skipping to change at page 51, line 22 skipping to change at page 52, line 5
be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This
again allows it to detect changes made in parallel by another client. again allows it to detect changes made in parallel by another client.
The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the
same, but only if the client is not doing pNFS WRITEs. same, but only if the client is not doing pNFS WRITEs.
Finally, if the server does not support change_attr_type or if Finally, if the server does not support change_attr_type or if
NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an
effort to implement the change attribute in terms of the effort to implement the change attribute in terms of the
time_metadata attribute. time_metadata attribute.
12.2.2. Attribute 79: sec_label 12.2.4. Attribute 80: sec_label
<CODE BEGINS> <CODE BEGINS>
typedef uint32_t policy4; typedef uint32_t policy4;
struct labelformat_spec4 { struct labelformat_spec4 {
policy4 lfs_lfs; policy4 lfs_lfs;
policy4 lfs_pi; policy4 lfs_pi;
}; };
skipping to change at page 52, line 12 skipping to change at page 52, line 43
attribute. This component is dependent on the MAC model to interpret attribute. This component is dependent on the MAC model to interpret
and enforce. and enforce.
In particular, it is the responsibility of the LFS specification to In particular, it is the responsibility of the LFS specification to
define a maximum size for the opaque section, slai_data<>. When define a maximum size for the opaque section, slai_data<>. When
creating or modifying a label for an object, the client needs to be creating or modifying a label for an object, the client needs to be
guaranteed that the server will accept a label that is sized guaranteed that the server will accept a label that is sized
correctly. By both client and server being part of a specific MAC correctly. By both client and server being part of a specific MAC
model, the client will be aware of the size. model, the client will be aware of the size.
12.2.3. Attribute 77: space_freed
space_freed gives the number of bytes freed if the file is deleted.
This attribute is read only and is of type length4. It is a per file
attribute.
13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL
The following tables summarize the operations of the NFSv4.2 protocol The following tables summarize the operations of the NFSv4.2 protocol
and the corresponding designation of REQUIRED, RECOMMENDED, and and the corresponding designation of REQUIRED, RECOMMENDED, and
OPTIONAL to implement or MUST NOT implement. The designation of MUST OPTIONAL to implement or MUST NOT implement. The designation of MUST
NOT implement is reserved for those operations that were defined in NOT implement is reserved for those operations that were defined in
either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2. either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2.
For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation
for operations sent by the client is for the server implementation. for operations sent by the client is for the server implementation.
skipping to change at page 53, line 45 skipping to change at page 54, line 22
Operations Operations
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, | | Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, |
| | or MNI | or OPT) | | | or MNI | or OPT) |
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| ALLOCATE | OPT | | | ALLOCATE | OPT | |
| ACCESS | REQ | | | ACCESS | REQ | |
| BACKCHANNEL_CTL | REQ | | | BACKCHANNEL_CTL | REQ | |
| BIND_CONN_TO_SESSION | REQ | | | BIND_CONN_TO_SESSION | REQ | |
| CLONE | OPT | |
| CLOSE | REQ | | | CLOSE | REQ | |
| COMMIT | REQ | | | COMMIT | REQ | |
| COPY | OPT | COPYer (REQ), COPYra | | COPY | OPT | COPYer (REQ), COPYra |
| | | (REQ) | | | | (REQ) |
| COPY_NOTIFY | OPT | COPYer (REQ) | | COPY_NOTIFY | OPT | COPYer (REQ) |
| DEALLOCATE | OPT | | | DEALLOCATE | OPT | |
| CREATE | REQ | | | CREATE | REQ | |
| CREATE_SESSION | REQ | | | CREATE_SESSION | REQ | |
| DELEGPURGE | OPT | FDELG (REQ) | | DELEGPURGE | OPT | FDELG (REQ) |
| DELEGRETURN | OPT | FDELG, DDELG, pNFS | | DELEGRETURN | OPT | FDELG, DDELG, pNFS |
skipping to change at page 89, line 23 skipping to change at page 90, line 5
15.12.3.2. Error Handling of a Partially Complete WRITE_SAME 15.12.3.2. Error Handling of a Partially Complete WRITE_SAME
WRITE_SAME will clone adb_block_count copies of the given ADB in WRITE_SAME will clone adb_block_count copies of the given ADB in
consecutive order in the file starting at adb_offset. An error can consecutive order in the file starting at adb_offset. An error can
occur after writing the Nth ADB to the file. WRITE_SAME MUST appear occur after writing the Nth ADB to the file. WRITE_SAME MUST appear
to populate the range of the file as if the client used WRITE to to populate the range of the file as if the client used WRITE to
transfer the instantiated ADBs. I.e., the contents of the range will transfer the instantiated ADBs. I.e., the contents of the range will
be easy for the client to determine in case of a partially complete be easy for the client to determine in case of a partially complete
WRITE_SAME. WRITE_SAME.
15.13. Operation 71: CLONE - Clone a file
15.13.1. ARGUMENT
<CODE BEGINS>
struct CLONE4args {
/* SAVED_FH: source file */
/* CURRENT_FH: destination file */
stateid4 cl_src_stateid;
stateid4 cl_dst_stateid;
offset4 cl_src_offset;
offset4 cl_dst_offset;
length4 cl_count;
};
<CODE ENDS>
15.13.2. RESULT
<CODE BEGINS>
struct CLONE4res {
nfsstat4 cl_status;
};
<CODE ENDS>
15.13.3. DESCRIPTION
The CLONE operation is used to clone file content from a source file
specified by the SAVED_FH value into a destination file specified by
CURRENT_FH without actually copying the data, e.g., by using a copy
on write mechanism.
Both SAVED_FH and CURRENT_FH must be regular files. If either
SAVED_FH or CURRENT_FH are not regular files, the operation MUST fail
and return NFS4ERR_WRONG_TYPE.
SAVED_FH and CURRENT_FH must be different files. If SAVED_FH and
CURRENT_FH refer to the same file, the operation will fail with
NFS4ERR_INVAL.
In order to set SAVED_FH to the source file handle, the compound
procedure requesting the COPY will include a sub-sequence of
operations such as
PUTFH source-fh
SAVEFH
The ca_dst_stateid MUST refer to a stateid that is valid for a WRITE
operation and follows the rules for stateids in Sections 8.2.5 and
18.32.3 of [RFC5661]. The ca_src_stateid MUST refer to a stateid
that is valid for a READ operations and follows the rules for
stateids in Sections 8.2.5 and 18.22.3 of [RFC5661]. If either
stateid is invalid, then the operation MUST fail.
The cl_src_offset is the offset within the source file from which the
data will be read, the cl_dst_offset is the offset within the
destination file to which the data will be written, and the cl_count
is the number of bytes that will be cloned. An offset of 0 (zero)
specifies the start of the file. A count of 0 (zero) requests that
all bytes from ca_src_offset through EOF be cloned to the
destination. Both cl_src_offset and cl_dst_offset must be aligned to
the clone block size Section 12.2.1. cl_count must be aligned to the
clone block size, unless cl_src_offset + cl_count are equal to the
source file size.
If the source offset or the source offset plus count is greater than
the size of the source file, the operation will fail with
NFS4ERR_INVAL. The destination offset or destination offset plus
count may be greater than the size of the destination file.
If the COPY wrote past the end of the file on the destination, then
the last byte written to will determine the new file size. The
contents of any block not written to and past the original size of
the file will be as if a normal WRITE extended the file.
The CLONE operation is atomic, that is either all changes or no
changes are seen by the client or other clients.
The completion status of the operation is indicated by cr_status.
16. NFSv4.2 Callback Operations 16. NFSv4.2 Callback Operations
16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous 16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
operation operation
16.1.1. ARGUMENT 16.1.1. ARGUMENT
<CODE BEGINS> <CODE BEGINS>
struct write_response4 { struct write_response4 {
stateid4 wr_callback_id<1>; stateid4 wr_callback_id<1>;
length4 wr_count; length4 wr_count;
stable_how4 wr_committed; stable_how4 wr_committed;
verifier4 wr_writeverf; verifier4 wr_writeverf;
}; };
union offload_info4 switch (nfsstat4 coa_status) { union offload_info4 switch (nfsstat4 coa_status) {
case NFS4_OK: case NFS4_OK:
write_response4 coa_resok4; write_response4 coa_resok4;
skipping to change at page 92, line 15 skipping to change at page 94, line 36
[BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems:
Mathematical Foundations and Model", Technical Report Mathematical Foundations and Model", Technical Report
M74-244, The MITRE Corporation, Bedford, MA, May 1973. M74-244, The MITRE Corporation, Bedford, MA, May 1973.
[Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci- [Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci-
Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data
Corruption in the Storage Stack", Proceedings of the 6th Corruption in the Storage Stack", Proceedings of the 6th
USENIX Symposium on File and Storage Technologies (FAST USENIX Symposium on File and Storage Technologies (FAST
'08) , 2008. '08) , 2008.
[I-D.ietf-nfsv4-rfc3530bis]
Haynes, T. and D. Noveck, "Network File System (NFS)
version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-35 (Work
In Progress), November 2014.
[IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream", [IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream",
2008. 2008.
[McDougall07] [McDougall07]
McDougall, R. and J. Mauro, "Section 11.4.3, Detecting McDougall, R. and J. Mauro, "Section 11.4.3, Detecting
Memory Corruption of Solaris Internals", 2007. Memory Corruption of Solaris Internals", 2007.
[NFSv4-Versioning] [NFSv4-Versioning]
Haynes, T. and D. Noveck, "NFSv4 Version Management", Haynes, T. and D. Noveck, "NFSv4 Version Management",
November 2014. November 2014.
skipping to change at page 93, line 11 skipping to change at page 95, line 27
[RFC4506] Eisler, M., "XDR: External Data Representation Standard", [RFC4506] Eisler, M., "XDR: External Data Representation Standard",
RFC 4506, May 2006. RFC 4506, May 2006.
[RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS [RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS
(pNFS) Block/Volume Layout", RFC 5663, January 2010. (pNFS) Block/Volume Layout", RFC 5663, January 2010.
[RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204,
April 2014. April 2014.
[RFC7530] Haynes, T. and D. Noveck, "Network File System (NFS)
version 4 Protocol", RFC 7530, March 2015.
[RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD [RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD
9, RFC 959, October 1985. 9, RFC 959, October 1985.
[Strohm11] [Strohm11]
Strohm, R., "Chapter 2, Data Blocks, Extents, and Strohm, R., "Chapter 2, Data Blocks, Extents, and
Segments, of Oracle Database Concepts 11g Release 1 Segments, of Oracle Database Concepts 11g Release 1
(11.1)", January 2011. (11.1)", January 2011.
[T10-SBC2] [T10-SBC2]
Elliott, R., Ed., "ANSI INCITS 405-2005, Information Elliott, R., Ed., "ANSI INCITS 405-2005, Information
 End of changes. 30 change blocks. 
55 lines changed or deleted 158 lines changed or added

This html diff was produced by rfcdiff 1.42. The latest version is available from http://tools.ietf.org/tools/rfcdiff/