idnits 2.17.1 draft-ietf-nfsv4-minorversion2-26.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (May 19, 2014) is 3623 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: '0' on line 3893 == Missing Reference: '32K' is mentioned on line 3893, but not defined == Unused Reference: 'RFC5664' is defined on line 4189, but no explicit reference was found in the text == Unused Reference: 'RFC4506' is defined on line 4248, but no explicit reference was found in the text -- Possible downref: Non-RFC (?) normative reference: ref. 'NFSv42xdr' ** Obsolete normative reference: RFC 5661 (Obsoleted by RFC 8881) == Outdated reference: A later version (-35) exists of draft-ietf-nfsv4-rfc3530bis-25 == Outdated reference: A later version (-06) exists of draft-ietf-nfsv4-lfs-registry-00 -- Obsolete informational reference (is this intentional?): RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) Summary: 1 error (**), 0 flaws (~~), 6 warnings (==), 6 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 NFSv4 T. Haynes 3 Internet-Draft Primary Data 4 Intended status: Standards Track May 19, 2014 5 Expires: November 20, 2014 7 NFS Version 4 Minor Version 2 8 draft-ietf-nfsv4-minorversion2-26.txt 10 Abstract 12 This Internet-Draft describes NFS version 4 minor version two, 13 focusing mainly on the protocol extensions made from NFS version 4 14 minor version 0 and NFS version 4 minor version 1. Major extensions 15 introduced in NFS version 4 minor version two include: Server Side 16 Copy, Application I/O Advise, Space Reservations, Sparse Files, 17 Application Data Blocks, and Labeled NFS. 19 Requirements Language 21 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 22 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 23 document are to be interpreted as described in RFC 2119 [RFC2119]. 25 Status of This Memo 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six months 36 and may be updated, replaced, or obsoleted by other documents at any 37 time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on November 20, 2014. 42 Copyright Notice 44 Copyright (c) 2014 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with respect 52 to this document. Code Components extracted from this document must 53 include Simplified BSD License text as described in Section 4.e of 54 the Trust Legal Provisions and are provided without warranty as 55 described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 60 1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 4 61 1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5 62 1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5 63 1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 5 64 1.4.1. Server Side Copy . . . . . . . . . . . . . . . . . . 5 65 1.4.2. Application I/O Advise . . . . . . . . . . . . . . . 5 66 1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . 6 67 1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6 68 1.4.5. Application Data Block (ADB) Support . . . . . . . . 6 69 1.4.6. Labeled NFS . . . . . . . . . . . . . . . . . . . . . 6 70 1.5. Differences from NFSv4.1 . . . . . . . . . . . . . . . . 6 71 2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7 72 3. pNFS considerations for New Operations . . . . . . . . . . . 10 73 3.1. Atomicity for ALLOCATE and DEALLOCATE . . . . . . . . . . 10 74 3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 10 75 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout 76 Type . . . . . . . . . . . . . . . . . . . . . . . . . . 10 77 3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 11 78 4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 11 79 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 11 80 4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 11 81 4.2.1. Copy Operations . . . . . . . . . . . . . . . . . . . 12 82 4.2.2. Requirements for Operations . . . . . . . . . . . . . 12 83 4.3. Requirements for Inter-Server Copy . . . . . . . . . . . 13 84 4.4. Locking the Files . . . . . . . . . . . . . . . . . . . . 13 85 4.5. Intra-Server Copy . . . . . . . . . . . . . . . . . . . . 14 86 4.6. Inter-Server Copy . . . . . . . . . . . . . . . . . . . . 15 87 4.7. Server-to-Server Copy Protocol . . . . . . . . . . . . . 19 88 4.7.1. Considerations on Selecting a Copy Protocol . . . . . 19 89 4.7.2. Using NFSv4.x as the Copy Protocol . . . . . . . . . 19 90 4.7.3. Using an Alternative Copy Protocol . . . . . . . . . 19 91 4.8. netloc4 - Network Locations . . . . . . . . . . . . . . . 20 92 4.9. Copy Offload Stateids . . . . . . . . . . . . . . . . . . 21 93 4.10. Security Considerations . . . . . . . . . . . . . . . . . 21 94 4.10.1. Inter-Server Copy Security . . . . . . . . . . . . . 21 95 5. Support for Application IO Hints . . . . . . . . . . . . . . 31 96 6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 31 97 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 31 98 6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 32 99 6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 32 100 6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 32 101 6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 33 102 7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 33 103 7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 33 104 8. Application Data Block Support . . . . . . . . . . . . . . . 35 105 8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 36 106 8.1.1. Data Block Representation . . . . . . . . . . . . . . 36 107 8.2. An Example of Detecting Corruption . . . . . . . . . . . 37 108 8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 38 109 8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 39 110 9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 39 111 9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 39 112 9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 40 113 9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 41 114 9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 41 115 9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 42 116 9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 42 117 9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 42 118 9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 42 119 9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 43 120 9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 43 121 9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 43 122 9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 43 123 9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 45 124 9.7. Security Considerations . . . . . . . . . . . . . . . . . 45 125 10. Sharing change attribute implementation details with NFSv4 126 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 127 10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 46 128 11. Security Considerations . . . . . . . . . . . . . . . . . . . 46 129 12. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 46 130 12.1. Error Definitions . . . . . . . . . . . . . . . . . . . 47 131 12.1.1. General Errors . . . . . . . . . . . . . . . . . . . 47 132 12.1.2. Server to Server Copy Errors . . . . . . . . . . . . 47 133 12.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 48 134 12.2. New Operations and Their Valid Errors . . . . . . . . . 48 135 12.3. New Callback Operations and Their Valid Errors . . . . . 52 136 13. New File Attributes . . . . . . . . . . . . . . . . . . . . . 52 137 13.1. New RECOMMENDED Attributes - List and Definition 138 References . . . . . . . . . . . . . . . . . . . . . . . 52 139 13.2. Attribute Definitions . . . . . . . . . . . . . . . . . 53 140 14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 56 141 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 59 142 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a 143 File . . . . . . . . . . . . . . . . . . . . . . . . . . 59 144 15.2. Operation 60: COPY - Initiate a server-side copy . . . . 60 145 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a 146 future copy . . . . . . . . . . . . . . . . . . . . . . 65 147 15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate 148 Client ID . . . . . . . . . . . . . . . . . . . . . . . 66 149 15.5. Operation 62: DEALLOCATE - Unreserve Space in a Region 150 of a File . . . . . . . . . . . . . . . . . . . . . . . 68 151 15.6. Operation 63: IO_ADVISE - Application I/O access pattern 152 hints . . . . . . . . . . . . . . . . . . . . . . . . . 69 153 15.7. Operation 64: LAYOUTERROR - Provide Errors for the 154 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 74 155 15.8. Operation 65: LAYOUTSTATS - Provide Statistics for the 156 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 77 157 15.9. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded 158 Operation . . . . . . . . . . . . . . . . . . . . . . . 78 159 15.10. Operation 67: OFFLOAD_STATUS - Poll for Status of 160 Asynchronous Operation . . . . . . . . . . . . . . . . . 79 161 15.11. Operation 68: READ_PLUS - READ Data or Holes from a File 80 162 15.12. Operation 69: SEEK - Find the Next Data or Hole . . . . 84 163 15.13. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times 164 to a File . . . . . . . . . . . . . . . . . . . . . . . 85 165 16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89 166 16.1. Operation 15: CB_OFFLOAD - Report results of an 167 asynchronous operation . . . . . . . . . . . . . . . . . 89 168 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 90 169 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 90 170 18.1. Normative References . . . . . . . . . . . . . . . . . . 90 171 18.2. Informative References . . . . . . . . . . . . . . . . . 91 172 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 92 173 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 93 174 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 93 176 1. Introduction 178 1.1. The NFS Version 4 Minor Version 2 Protocol 180 The NFS version 4 minor version 2 (NFSv4.2) protocol is the third 181 minor version of the NFS version 4 (NFSv4) protocol. The first minor 182 version, NFSv4.0, is described in [I-D.ietf-nfsv4-rfc3530bis] and the 183 second minor version, NFSv4.1, is described in [RFC5661]. 185 As a minor version, NFSv4.2 is consistent with the overall goals for 186 NFSv4, but extends the protocol so as to better meet those goals, 187 based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted 188 some additional goals, which motivate some of the major extensions in 189 NFSv4.2. 191 1.2. Scope of This Document 193 This document describes the NFSv4.2 protocol. With respect to 194 NFSv4.0 and NFSv4.1, this document does not: 196 o describe the NFSv4.0 or NFSv4.1 protocols, except where needed to 197 contrast with NFSv4.2 199 o modify the specification of the NFSv4.0 or NFSv4.1 protocols 201 o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any 202 clarifications made here apply to NFSv4.2 and neither of the prior 203 protocols 205 The full XDR for NFSv4.2 is presented in [NFSv42xdr]. 207 1.3. NFSv4.2 Goals 209 The goal of the design of NFSv4.2 is to take common local file system 210 features and offer them remotely. These features might 212 o already be available on the servers, e.g., sparse files 214 o be under development as a new standard, e.g., SEEK pulls in both 215 SEEK_HOLE and SEEK_DATA 217 o be used by clients with the servers via some proprietary means, 218 e.g., Labeled NFS 220 but the clients are not able to leverage them on the server within 221 the confines of the NFS protocol. 223 1.4. Overview of NFSv4.2 Features 225 1.4.1. Server Side Copy 227 A traditional file copy from one server to another results in the 228 data being put on the network twice - source to client and then 229 client to destination. New operations are introduced to allow the 230 client to authorize the two servers to interact directly. As this 231 copy can be lengthy, asynchronous support is also provided. 233 1.4.2. Application I/O Advise 235 Applications and clients want to advise the server as to expected I/O 236 behavior. Using IO_ADVISE (see Section 15.6) to communicate future I 237 /O behavior such as whether a file will be accessed sequentially or 238 randomly, and whether a file will or will not be accessed in the near 239 future, allows servers to optimize future I/O requests for a file by, 240 for example, prefetching or evicting data. This operation can be 241 used to support the posix_fadvise function as well as other 242 applications such as databases and video editors. 244 1.4.3. Sparse Files 246 Sparse files are ones which have unallocated or uninitialized data 247 blocks as holes in the file. Such holes are typically transferred as 248 0s during I/O. READ_PLUS (see Section 15.11) allows a server to send 249 back to the client metadata describing the hole and DEALLOCATE (see 250 Section 15.5) allows the client to punch holes into a file. In 251 addition, SEEK (see Section 15.12) is provided to scan for the next 252 hole or data from a given location. 254 1.4.4. Space Reservation 256 When a file is sparse, one concern applications have is ensuring that 257 there will always be enough data blocks available for the file during 258 future writes. ALLOCATE (see Section 15.1) allows a client to 259 request a guarantee that space will be available. And DEALLOCATE 260 (see Section 15.5) allows the client to punch a hole into a file, 261 thus releasing a space reservation. 263 1.4.5. Application Data Block (ADB) Support 265 Some applications treat a file as if it were a disk and as such want 266 to initialize (or format) the file image. We introduce WRITE_SAME 267 (see Section 15.13) to send this metadata to the server to allow it 268 to write the block contents. 270 1.4.6. Labeled NFS 272 While both clients and servers can employ Mandatory Access Control 273 (MAC) security models to enforce data access, there has been no 274 protocol support to allow full interoperability. A new file object 275 attribute, sec_label (see Section 13.2.2) allows for the server to 276 store and enforce MAC labels. The format of the sec_label 277 accommodates any MAC security system. 279 1.5. Differences from NFSv4.1 281 In NFSv4.1, the only way to introduce new variants of an operation 282 was to introduce a new operation. I.e., READ becomes either READ2 or 283 READ_PLUS. With the use of discriminated unions as parameters to 284 such functions in NFSv4.2, it is possible to add a new arm in a 285 subsequent minor version. And it is also possible to move such an 286 operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an 287 implementation to adopt each arm of a discriminated union at such a 288 time does not meet the spirit of the minor versioning rules. As 289 such, new arms of a discriminated union MUST follow the same 290 guidelines for minor versioning as operations in NFSv4.1 - i.e., they 291 may not be made REQUIRED. To support this, a new error code, 292 NFS4ERR_UNION_NOTSUPP, allows the server to communicate to the client 293 that the operation is supported, but the specific arm of the 294 discriminated union is not. 296 2. Minor Versioning 298 To address the requirement of an NFS protocol that can evolve as the 299 need arises, the NFSv4 protocol contains the rules and framework to 300 allow for future minor changes or versioning. 302 The base assumption with respect to minor versioning is that any 303 future accepted minor version will be documented in one or more 304 Standards Track RFCs. Minor version 0 of the NFSv4 protocol is 305 represented by [I-D.ietf-nfsv4-rfc3530bis], minor version 1 by 306 [RFC5661], and minor version 2 by this document. The COMPOUND and 307 CB_COMPOUND procedures support the encoding of the minor version 308 being requested by the client. 310 The following items represent the basic rules for the development of 311 minor versions. Note that a future minor version may modify or add 312 to the following rules as part of the minor version definition. 314 1. Procedures are not added or deleted. 316 To maintain the general RPC model, NFSv4 minor versions will not 317 add to or delete procedures from the NFS program. 319 2. Minor versions may add operations to the COMPOUND and 320 CB_COMPOUND procedures. 322 The addition of operations to the COMPOUND and CB_COMPOUND 323 procedures does not affect the RPC model. 325 * Minor versions may append attributes to the bitmap4 that 326 represents sets of attributes and to the fattr4 that 327 represents sets of attribute values. 329 This allows for the expansion of the attribute model to allow 330 for future growth or adaptation. 332 * Minor version X must append any new attributes after the last 333 documented attribute. 335 Since attribute results are specified as an opaque array of 336 per-attribute, XDR-encoded results, the complexity of adding 337 new attributes in the midst of the current definitions would 338 be too burdensome. 340 3. Minor versions must not modify the structure of an existing 341 operation's arguments or results. 343 Again, the complexity of handling multiple structure definitions 344 for a single operation is too burdensome. New operations should 345 be added instead of modifying existing structures for a minor 346 version. 348 This rule does not preclude the following adaptations in a minor 349 version: 351 * adding bits to flag fields, such as new attributes to 352 GETATTR's bitmap4 data type, and providing corresponding 353 variants of opaque arrays, such as a notify4 used together 354 with such bitmaps 356 * adding bits to existing attributes like ACLs that have flag 357 words 359 * extending enumerated types (including NFS4ERR_*) with new 360 values 362 * adding cases to a switched union 364 4. Note that when adding new cases to a switched union, a minor 365 version must not make new cases be REQUIRED. While the 366 encapsulating operation may be REQUIRED, the new cases (the 367 specific arm of the discriminated union) is not. The error code 368 NFS4ERR_UNION_NOTSUPP is used to notify the client when the 369 server does not support such a case. 371 5. Minor versions must not modify the structure of existing 372 attributes. 374 6. Minor versions must not delete operations. 376 This prevents the potential reuse of a particular operation 377 "slot" in a future minor version. 379 7. Minor versions must not delete attributes. 381 8. Minor versions must not delete flag bits or enumeration values. 383 9. Minor versions may declare an operation MUST NOT be implemented. 385 Specifying that an operation MUST NOT be implemented is 386 equivalent to obsoleting an operation. For the client, it means 387 that the operation MUST NOT be sent to the server. For the 388 server, an NFS error can be returned as opposed to "dropping" 389 the request as an XDR decode error. This approach allows for 390 the obsolescence of an operation while maintaining its structure 391 so that a future minor version can reintroduce the operation. 393 1. Minor versions may declare that an attribute MUST NOT be 394 implemented. 396 2. Minor versions may declare that a flag bit or enumeration 397 value MUST NOT be implemented. 399 10. Minor versions may declare an operation to be OBSOLESCENT, which 400 indicates an intention to remove the operation (i.e., make it 401 MANDATORY TO NOT implement) in a subsequent minor version. Such 402 labeling is separate from the question of whether the operation 403 is REQUIRED or RECOMMENDED or OPTIONAL in the current minor 404 version. An operation may be both REQUIRED for the given minor 405 version and marked OBSOLESCENT, with the expectation that it 406 will be MANDATORY TO NOT implement in the next (or other 407 subsequent) minor version. 409 11. Note that the early notification of operation obsolescence is 410 put in place to mitigate the effects of design and 411 implementation mistakes, and to allow protocol development to 412 adapt to unexpected changes in the pace of implementation. Even 413 if an operation is marked OBSOLESCENT in a given minor version, 414 it may end up not being marked MANDATORY TO NOT implement in the 415 next minor version. In unusual circumstances, it might not be 416 marked OBSOLESCENT in a subsequent minor version, and never 417 become MANDATORY TO NOT implement. 419 12. Minor versions may downgrade features from REQUIRED to 420 RECOMMENDED, from RECOMMENDED to OPTIONAL, or from OPTIONAL to 421 MANDATORY TO NOT implement. Also, if a feature was marked as 422 OBSOLESCENT in the prior minor version, it may be downgraded 423 from REQUIRED to OPTIONAL from RECOMMENDED to MANDATORY TO NOT 424 implement, or from REQUIRED to MANDATORY TO NOT implement. 426 13. Minor versions may upgrade features from OPTIONAL to 427 RECOMMENDED, or RECOMMENDED to REQUIRED. Also, if a feature was 428 marked as OBSOLESCENT in the prior minor version, it may be 429 upgraded to not be OBSOLESCENT. 431 14. A client and server that support minor version X SHOULD support 432 minor versions 0 through X-1 as well. 434 15. Except for infrastructural changes, a minor version must not 435 introduce REQUIRED new features. 437 This rule allows for the introduction of new functionality and 438 forces the use of implementation experience before designating a 439 feature as REQUIRED. On the other hand, some classes of 440 features are infrastructural and have broad effects. Allowing 441 infrastructural features to be RECOMMENDED or OPTIONAL 442 complicates implementation of the minor version. 444 16. Unless explicitly documented in a minor version standard's 445 document, a client MUST NOT attempt to use a stateid, 446 filehandle, or similar returned object from the COMPOUND 447 procedure with minor version X for another COMPOUND procedure 448 with minor version Y, where X != Y. 450 3. pNFS considerations for New Operations 452 3.1. Atomicity for ALLOCATE and DEALLOCATE 454 Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.5) 455 are sent to the metadata server, which is responsible for 456 coordinating the changes onto the storage devices. In particular, 457 both operations must either fully succeed or fail, it cannot be the 458 case that one storage device succeeds whilst another fails. 460 3.2. Sharing of stateids with NFSv4.1 462 A NFSv4.2 metadata server can hand out a layout to a NFSv4.1 storage 463 device. Section 13.9.1 of [RFC5661] discusses how the client gets a 464 stateid from the metadata server to present to a storage device. 466 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout Type 468 A file layout provided by a NFSv4.2 server may refer either to a 469 storage device that only implements NFSv4.1 as specified in 470 [RFC5661], or to a storage device that implements additions from 471 NFSv4.2, in which case the rules in Section 3.3.1 apply. As the File 472 Layout Type does not provide a means for informing the client as to 473 which minor version a particular storage device is providing, it will 474 have to negotiate this via the normal RPC semantics of major and 475 minor version discovery. 477 3.3.1. Operations Sent to NFSv4.2 Data Servers 479 In addition to the commands listed in [RFC5661], NFSv4.2 data servers 480 MAY accept a COMPOUND containing the following additional operations: 481 IO_ADVISE (see Section 15.6), READ_PLUS (see Section 15.11), 482 WRITE_SAME (see Section 15.13), and SEEK (see Section 15.12), which 483 will be treated like the subset specified as "Operations Sent to 484 NFSv4.1 Data Servers" in Section 13.6 of [RFC5661]. 486 Additional details on the implementation of these operations in a 487 pNFS context are documented in the operation specific sections. 489 4. Server Side Copy 491 4.1. Introduction 493 The server-side copy feature provides a mechanism for the NFS client 494 to perform a file copy on a server or between two servers without the 495 data being transmitted back and forth over the network through the 496 NFS client. Without this feature, an NFS client copies data from one 497 location to another by reading the data from the source server over 498 the network, and then writing the data back over the network to the 499 destination server. 501 If the source object and destination object are on different file 502 servers, the file servers will communicate with one another to 503 perform the copy operation. The server-to-server protocol by which 504 this is accomplished is not defined in this document. 506 4.2. Protocol Overview 508 The server-side copy offload operations support both intra-server and 509 inter-server file copies. An intra-server copy is a copy in which 510 the source file and destination file reside on the same server. In 511 an inter-server copy, the source file and destination file are on 512 different servers. In both cases, the copy may be performed 513 synchronously or asynchronously. 515 Throughout the rest of this document, we refer to the NFS server 516 containing the source file as the "source server" and the NFS server 517 to which the file is transferred as the "destination server". In the 518 case of an intra-server copy, the source server and destination 519 server are the same server. Therefore in the context of an intra- 520 server copy, the terms source server and destination server refer to 521 the single server performing the copy. 523 The new operations are designed to copy files. Other file system 524 objects can be copied by building on these operations or using other 525 techniques. For example if the user wishes to copy a directory, the 526 client can synthesize a directory copy by first creating the 527 destination directory and then copying the source directory's files 528 to the new destination directory. 530 For the inter-server copy, the operations are defined to be 531 compatible with the traditional copy authentication approach. The 532 client and user are authorized at the source for reading. Then they 533 are authorized at the destination for writing. 535 4.2.1. Copy Operations 537 COPY_NOTIFY: Used by the client to notify the source server of a 538 future file copy from a given destination server for the given 539 user. (Section 15.3) 541 COPY: Used by the client to request a file copy. (Section 15.2) 543 OFFLOAD_CANCEL: Used by the client to terminate an asynchronous file 544 copy. (Section 15.9) 546 OFFLOAD_STATUS: Used by the client to poll the status of an 547 asynchronous file copy. (Section 15.10) 549 CB_OFFLOAD: Used by the destination server to report the results of 550 an asynchronous file copy to the client. (Section 16.1) 552 4.2.2. Requirements for Operations 554 The implementation of server-side copy is OPTIONAL by the client and 555 the server. However, in order to successfully copy a file, some 556 operations MUST be supported by the client and/or server. 558 If a client desires an intra-server file copy, then it MUST support 559 the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then 560 the client MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations. 562 If a client desires an inter-server file copy, then it MUST support 563 the COPY, COPY_NOTICE, and CB_OFFLOAD operations, and MAY use the 564 OFFLOAD_CANCEL operation. If COPY returns a stateid, then the client 565 MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations. 567 If a server supports intra-server copy, then the server MUST support 568 the COPY operation. If a server's COPY operation returns a stateid, 569 then the server MUST also support these operations: CB_OFFLOAD, 570 OFFLOAD_CANCEL, and OFFLOAD_STATUS. 572 If a source server supports inter-server copy, then the source server 573 MUST support all these operations: COPY_NOTIFY and OFFLOAD_CANCEL. 574 If a destination server supports inter-server copy, then the 575 destination server MUST support the COPY operation. If a destination 576 server's COPY operation returns a stateid, then the destination 577 server MUST also support these operations: CB_OFFLOAD, 578 OFFLOAD_CANCEL, COPY_NOTIFY, and OFFLOAD_STATUS. 580 Each operation is performed in the context of the user identified by 581 the ONC RPC credential of its containing COMPOUND or CB_COMPOUND 582 request. For example, an OFFLOAD_CANCEL operation issued by a given 583 user indicates that a specified COPY operation initiated by the same 584 user be canceled. Therefore an OFFLOAD_CANCEL MUST NOT interfere 585 with a copy of the same file initiated by another user. 587 An NFS server MAY allow an administrative user to monitor or cancel 588 copy operations using an implementation specific interface. 590 4.3. Requirements for Inter-Server Copy 592 Inter-server copy is driven by several requirements: 594 o The specification MUST NOT mandate the server-to-server protocol. 596 o The specification MUST provide guidance for using NFSv4.x as a 597 copy protocol. For those source and destination servers willing 598 to use NFSv4.x, there are specific security considerations that 599 this specification MUST address. 601 o The specification MUST NOT mandate preconfiguration between the 602 source and destination server. Requiring that the source and 603 destination first have a "copying relationship" increases the 604 administrative burden. However the specification MUST NOT 605 preclude implementations that require preconfiguration. 607 o The specification MUST NOT mandate a trust relationship between 608 the source and destination server. The NFSv4 security model 609 requires mutual authentication between a principal on an NFS 610 client and a principal on an NFS server. This model MUST continue 611 with the introduction of COPY. 613 4.4. Locking the Files 615 Both the source and destination file may need to be locked to protect 616 the content during the copy operations. A client can achieve this by 617 a combination of OPEN and LOCK operations. I.e., either share or 618 byte range locks might be desired. 620 4.5. Intra-Server Copy 622 To copy a file on a single server, the client uses a COPY operation. 623 The server may respond to the copy operation with the final results 624 of the copy or it may perform the copy asynchronously and deliver the 625 results using a CB_OFFLOAD operation callback. If the copy is 626 performed asynchronously, the client may poll the status of the copy 627 using OFFLOAD_STATUS or cancel the copy using OFFLOAD_CANCEL. 629 A synchronous intra-server copy is shown in Figure 1. In this 630 example, the NFS server chooses to perform the copy synchronously. 631 The copy operation is completed, either successfully or 632 unsuccessfully, before the server replies to the client's request. 633 The server's reply contains the final result of the operation. 635 Client Server 636 + + 637 | | 638 |--- OPEN ---------------------------->| Client opens 639 |<------------------------------------/| the source file 640 | | 641 |--- OPEN ---------------------------->| Client opens 642 |<------------------------------------/| the destination file 643 | | 644 |--- COPY ---------------------------->| Client requests 645 |<------------------------------------/| a file copy 646 | | 647 |--- CLOSE --------------------------->| Client closes 648 |<------------------------------------/| the destination file 649 | | 650 |--- CLOSE --------------------------->| Client closes 651 |<------------------------------------/| the source file 652 | | 653 | | 655 Figure 1: A synchronous intra-server copy. 657 An asynchronous intra-server copy is shown in Figure 2. In this 658 example, the NFS server performs the copy asynchronously. The 659 server's reply to the copy request indicates that the copy operation 660 was initiated and the final result will be delivered at a later time. 661 The server's reply also contains a copy stateid. The client may use 662 this copy stateid to poll for status information (as shown) or to 663 cancel the copy using an OFFLOAD_CANCEL. When the server completes 664 the copy, the server performs a callback to the client and reports 665 the results. 667 Client Server 668 + + 669 | | 670 |--- OPEN ---------------------------->| Client opens 671 |<------------------------------------/| the source file 672 | | 673 |--- OPEN ---------------------------->| Client opens 674 |<------------------------------------/| the destination file 675 | | 676 |--- COPY ---------------------------->| Client requests 677 |<------------------------------------/| a file copy 678 | | 679 | | 680 |--- OFFLOAD_STATUS ------------------>| Client may poll 681 |<------------------------------------/| for status 682 | | 683 | . | Multiple OFFLOAD_STATUS 684 | . | operations may be sent. 685 | . | 686 | | 687 |<-- CB_OFFLOAD -----------------------| Server reports results 688 |\------------------------------------>| 689 | | 690 |--- CLOSE --------------------------->| Client closes 691 |<------------------------------------/| the destination file 692 | | 693 |--- CLOSE --------------------------->| Client closes 694 |<------------------------------------/| the source file 695 | | 696 | | 698 Figure 2: An asynchronous intra-server copy. 700 4.6. Inter-Server Copy 702 A copy may also be performed between two servers. The copy protocol 703 is designed to accommodate a variety of network topologies. As shown 704 in Figure 3, the client and servers may be connected by multiple 705 networks. In particular, the servers may be connected by a 706 specialized, high speed network (network 192.0.2.0/24 in the diagram) 707 that does not include the client. The protocol allows the client to 708 setup the copy between the servers (over network 203.0.113.0/24 in 709 the diagram) and for the servers to communicate on the high speed 710 network if they choose to do so. 712 192.0.2.0/24 713 +-------------------------------------+ 714 | | 715 | | 716 | 192.0.2.18 | 192.0.2.56 717 +-------+------+ +------+------+ 718 | Source | | Destination | 719 +-------+------+ +------+------+ 720 | 203.0.113.18 | 203.0.113.56 721 | | 722 | | 723 | 203.0.113.0/24 | 724 +------------------+------------------+ 725 | 726 | 727 | 203.0.113.243 728 +-----+-----+ 729 | Client | 730 +-----------+ 732 Figure 3: An example inter-server network topology. 734 For an inter-server copy, the client notifies the source server that 735 a file will be copied by the destination server using a COPY_NOTIFY 736 operation. The client then initiates the copy by sending the COPY 737 operation to the destination server. The destination server may 738 perform the copy synchronously or asynchronously. 740 A synchronous inter-server copy is shown in Figure 4. In this case, 741 the destination server chooses to perform the copy before responding 742 to the client's COPY request. 744 An asynchronous copy is shown in Figure 5. In this case, the 745 destination server chooses to respond to the client's COPY request 746 immediately and then perform the copy asynchronously. 748 Client Source Destination 749 + + + 750 | | | 751 |--- OPEN --->| | Returns os1 752 |<------------------/| | 753 | | | 754 |--- COPY_NOTIFY --->| | 755 |<------------------/| | 756 | | | 757 |--- OPEN ---------------------------->| Returns os2 758 |<------------------------------------/| 759 | | | 760 |--- COPY ---------------------------->| 761 | | | 762 | | | 763 | |<----- read -----| 764 | |\--------------->| 765 | | | 766 | | . | Multiple reads may 767 | | . | be necessary 768 | | . | 769 | | | 770 | | | 771 |<------------------------------------/| Destination replies 772 | | | to COPY 773 | | | 774 |--- CLOSE --------------------------->| Release open state 775 |<------------------------------------/| 776 | | | 777 |--- CLOSE --->| | Release open state 778 |<------------------/| | 780 Figure 4: A synchronous inter-server copy. 782 Client Source Destination 783 + + + 784 | | | 785 |--- OPEN --->| | Returns os1 786 |<------------------/| | 787 | | | 788 |--- LOCK --->| | Optional, could be done 789 |<------------------/| | with a share lock 790 | | | 791 |--- COPY_NOTIFY --->| | Need to pass in 792 |<------------------/| | os1 or lock state 793 | | | 794 | | | 795 | | | 796 |--- OPEN ---------------------------->| Returns os2 797 |<------------------------------------/| 798 | | | 799 |--- LOCK ---------------------------->| Optional ... 800 |<------------------------------------/| 801 | | | 802 |--- COPY ---------------------------->| Need to pass in 803 |<------------------------------------/| os2 or lock state 804 | | | 805 | | | 806 | |<----- read -----| 807 | |\--------------->| 808 | | | 809 | | . | Multiple reads may 810 | | . | be necessary 811 | | . | 812 | | | 813 | | | 814 |--- OFFLOAD_STATUS ------------------>| Client may poll 815 |<------------------------------------/| for status 816 | | | 817 | | . | Multiple OFFLOAD_STATUS 818 | | . | operations may be sent 819 | | . | 820 | | | 821 | | | 822 | | | 823 |<-- CB_OFFLOAD -----------------------| Destination reports 824 |\------------------------------------>| results 825 | | | 826 |--- LOCKU --------------------------->| Only if LOCK was done 827 |<------------------------------------/| 828 | | | 829 |--- CLOSE --------------------------->| Release open state 830 |<------------------------------------/| 831 | | | 832 |--- LOCKU --->| | Only if LOCK was done 833 |<------------------/| | 834 | | | 835 |--- CLOSE --->| | Release open state 836 |<------------------/| | 837 | | | 839 Figure 5: An asynchronous inter-server copy. 841 4.7. Server-to-Server Copy Protocol 843 The choice of what protocol to use in an inter-server copy is 844 ultimately the destination server's decision. However, the 845 destination server has to be cognizant that it is working on behalf 846 of the client. 848 4.7.1. Considerations on Selecting a Copy Protocol 850 The client can have requirements over both the size of transactions 851 and error recovery semantics. It may want to split the copy up such 852 that each chunk is synchronously transferred. It may want the copy 853 protocol to copy the bytes in consecutive order such that upon an 854 error, the client can restart the copy at the last known good offset. 855 If the destination server cannot meet these requirements, the client 856 may prefer the traditional copy mechanism such that it can meet those 857 requirements. 859 4.7.2. Using NFSv4.x as the Copy Protocol 861 The destination server MAY use standard NFSv4.x (where x >= 1) 862 operations to read the data from the source server. If NFSv4.x is 863 used for the server-to-server copy protocol, the destination server 864 can use the source filehandle and ca_src_stateid provided in the COPY 865 request with standard NFSv4.x operations to read data from the source 866 server. 868 4.7.3. Using an Alternative Copy Protocol 870 In a homogeneous environment, the source and destination servers 871 might be able to perform the file copy extremely efficiently using 872 specialized protocols. For example the source and destination 873 servers might be two nodes sharing a common file system format for 874 the source and destination file systems. Thus the source and 875 destination are in an ideal position to efficiently render the image 876 of the source file to the destination file by replicating the file 877 system formats at the block level. Another possibility is that the 878 source and destination might be two nodes sharing a common storage 879 area network, and thus there is no need to copy any data at all, and 880 instead ownership of the file and its contents might simply be re- 881 assigned to the destination. To allow for these possibilities, the 882 destination server is allowed to use a server-to-server copy protocol 883 of its choice. 885 In a heterogeneous environment, using a protocol other than NFSv4.x 886 (e.g., HTTP [RFC2616] or FTP [RFC959]) presents some challenges. In 887 particular, the destination server is presented with the challenge of 888 accessing the source file given only an NFSv4.x filehandle. 890 One option for protocols that identify source files with path names 891 is to use an ASCII hexadecimal representation of the source 892 filehandle as the file name. 894 Another option for the source server is to use URLs to direct the 895 destination server to a specialized service. For example, the 896 response to COPY_NOTIFY could include the URL ftp:// 897 s1.example.com:9999/_FH/0x12345, where 0x12345 is the ASCII 898 hexadecimal representation of the source filehandle. When the 899 destination server receives the source server's URL, it would use 900 "_FH/0x12345" as the file name to pass to the FTP server listening on 901 port 9999 of s1.example.com. On port 9999 there would be a special 902 instance of the FTP service that understands how to convert NFS 903 filehandles to an open file descriptor (in many operating systems, 904 this would require a new system call, one which is the inverse of the 905 makefh() function that the pre-NFSv4 MOUNT service needs). 907 Authenticating and identifying the destination server to the source 908 server is also a challenge. Recommendations for how to accomplish 909 this are given in Section 4.10.1.3. 911 4.8. netloc4 - Network Locations 913 The server-side copy operations specify network locations using the 914 netloc4 data type shown below: 916 enum netloc_type4 { 917 NL4_NAME = 0, 918 NL4_URL = 1, 919 NL4_NETADDR = 2 920 }; 921 union netloc4 switch (netloc_type4 nl_type) { 922 case NL4_NAME: utf8str_cis nl_name; 923 case NL4_URL: utf8str_cis nl_url; 924 case NL4_NETADDR: netaddr4 nl_addr; 925 }; 927 If the netloc4 is of type NL4_NAME, the nl_name field MUST be 928 specified as a UTF-8 string. The nl_name is expected to be resolved 929 to a network address via DNS, LDAP, NIS, /etc/hosts, or some other 930 means. If the netloc4 is of type NL4_URL, a server URL [RFC3986] 931 appropriate for the server-to-server copy operation is specified as a 932 UTF-8 string. If the netloc4 is of type NL4_NETADDR, the nl_addr 933 field MUST contain a valid netaddr4 as defined in Section 3.3.9 of 934 [RFC5661]. 936 When netloc4 values are used for an inter-server copy as shown in 937 Figure 3, their values may be evaluated on the source server, 938 destination server, and client. The network environment in which 939 these systems operate should be configured so that the netloc4 values 940 are interpreted as intended on each system. 942 4.9. Copy Offload Stateids 944 A server may perform a copy offload operation asynchronously. An 945 asynchronous copy is tracked using a copy offload stateid. Copy 946 offload stateids are included in the COPY, OFFLOAD_CANCEL, 947 OFFLOAD_STATUS, and CB_OFFLOAD operations. 949 A copy offload stateid will be valid until either (A) the client or 950 server restarts or (B) the client returns the resource by issuing a 951 OFFLOAD_CANCEL operation or the client replies to a CB_OFFLOAD 952 operation. 954 A copy offload stateid's seqid MUST NOT be 0. In the context of a 955 copy offload operation, it is ambiguous to indicate the most recent 956 copy offload operation using a stateid with seqid of 0. Therefore a 957 copy offload stateid with seqid of 0 MUST be considered invalid. 959 4.10. Security Considerations 961 The security considerations pertaining to NFSv4.1 [RFC5661] apply to 962 this section. And as such, the standard security mechanisms used by 963 the protocol can be used to secure the server-to-server operations. 965 NFSv4 clients and servers supporting the inter-server copy operations 966 described in this chapter are REQUIRED to implement the mechanism 967 described in Section 4.10.1.1, and to support rejecting COPY_NOTIFY 968 requests that do not use RPCSEC_GSS with privacy. If the server-to- 969 server copy protocol is ONC RPC based, the servers are also REQUIRED 970 to implement [rpcsec_gssv3] including the RPCSEC_GSSv3 copy_to_auth, 971 copy_from_auth, and copy_confirm_auth structured privileges. This 972 requirement to implement is not a requirement to use; for example, a 973 server may depending on configuration also allow COPY_NOTIFY requests 974 that use only AUTH_SYS. 976 4.10.1. Inter-Server Copy Security 978 4.10.1.1. Inter-Server Copy via ONC RPC with RPCSEC_GSSv3 980 When the client sends a COPY_NOTIFY to the source server to expect 981 the destination to attempt to copy data from the source server, it is 982 expected that this copy is being done on behalf of the principal 983 (called the "user principal") that sent the RPC request that encloses 984 the COMPOUND procedure that contains the COPY_NOTIFY operation. The 985 user principal is identified by the RPC credentials. A mechanism 986 that allows the user principal to authorize the destination server to 987 perform the copy, that lets the source server properly authenticate 988 the destination's copy, and does not allow the destination server to 989 exceed this authorization, is necessary. 991 An approach that sends delegated credentials of the client's user 992 principal to the destination server is not used for the following 993 reason. If the client's user delegated its credentials, the 994 destination would authenticate as the user principal. If the 995 destination were using the NFSv4 protocol to perform the copy, then 996 the source server would authenticate the destination server as the 997 user principal, and the file copy would securely proceed. However, 998 this approach would allow the destination server to copy other files. 999 The user principal would have to trust the destination server to not 1000 do so. This is counter to the requirements, and therefore is not 1001 considered. 1003 Instead, a combination of two features of the RPCSEC_GSSv3 1004 [rpcsec_gssv3] protocol can be used: compound authentication and RPC 1005 application defined structured privilege assertions. These features 1006 allow the destination server to authenticate to the source server as 1007 acting on behalf of the user principal, and to authorize the 1008 destination server to perform READs of the file to be copied from the 1009 source on behalf of the user principal. Once the copy is complete, 1010 the client can destroy the RPCSEC_GSSv3 handles to end the 1011 authorization of both the source and destination servers to copy. 1013 RPCSEC_GSSv3 introduces the notion of RPC application defined 1014 structured privileges. We define three structured privileges that 1015 work in tandem to authorize the copy: 1017 copy_from_auth: A user principal is authorizing a source principal 1018 ("nfs@") to allow a destination principal 1019 ("nfs@") to setup the copy_confirm_auth privilege 1020 required to copy a file from the source to the destination on 1021 behalf of the user principal. This privilege is established on 1022 the source server before the user principal sends a COPY_NOTIFY 1023 operation to the source server, and the resultant RPCSEC_GSSv3 1024 context is used to secure the COPY_NOTIFY operation. 1026 struct copy_from_auth_priv { 1027 secret4 cfap_shared_secret; 1028 netloc4 cfap_destination; 1029 /* the NFSv4 user name that the user principal maps to */ 1030 utf8str_mixed cfap_username; 1031 }; 1032 cfp_shared_secret is an automatically generated random number 1033 secret value. 1035 copy_to_auth: A user principal is authorizing a destination 1036 principal ("nfs@") to setup a copy_confirm_auth 1037 privilege with a source principal ("nfs@") to allow it to 1038 copy a file from the source to the destination on behalf of the 1039 user principal. This privilege is established on the destination 1040 server before the user principal sends a COPY operation to the 1041 destination server, and the resultant RPCSEC_GSSv3 context is used 1042 to secure the COPY operation. 1044 struct copy_to_auth_priv { 1045 /* equal to cfap_shared_secret */ 1046 secret4 ctap_shared_secret; 1047 netloc4 ctap_source; 1048 /* the NFSv4 user name that the user principal maps to */ 1049 utf8str_mixed ctap_username; 1050 /* 1051 * user principal RPCSEC_GSSv1 (or v2) handle shared 1052 * with the source server 1053 */ 1054 opaque ctap_handle<>; 1055 int ctap_handle_vers; 1056 /* A nounce and a mic of the nounce using ctap_handle */ 1057 opaque ctap_nounce<>; 1058 opaque ctap_nounce_mic<>; 1059 }; 1061 ctap_shared_secret is the automatically generated secret value 1062 used to establish the copy_from_auth privilege with the source 1063 principal. ctap_handle, ctap_handle_vers, ctap_nounce, and 1064 ctap_nounce_mic are used to construct the compound authentication 1065 portion of the copy_confirm_auth RPCSEC_GSSv3 context between the 1066 destination server and the source server (See Section 4.10.1.1.1). 1068 copy_confirm_auth: A destination principal ("nfs@") is 1069 confirming with the source principal ("nfs@") that it is 1070 authorized to copy data from the source. Note that besides the 1071 rpc_gss3_privs payload (struct copy_confirm_auth_priv), the 1072 copy_confirm_auth RPCSEC_GSS3_CREATE message also contains an 1073 rpc_gss3_gss_binding payload so that the copy is done on behalf of 1074 the user principal. This privilege is established on the 1075 destination server before the file is copied from the source to 1076 the destination. The resultant RPCSEC_GSSv3 context is used to 1077 secure the READ operations from the source to the destination 1078 server. 1080 struct copy_confirm_auth_priv { 1081 /* equal to GSS_GetMIC() of cfap_shared_secret */ 1082 opaque ccap_shared_secret_mic<>; 1083 /* the NFSv4 user name that the user principal maps to */ 1084 utf8str_mixed ccap_username; 1085 }; 1087 4.10.1.1.1. Establishing a Security Context 1089 The RPCSEC_GSSv3 compound authentication feature allows a server to 1090 act on behalf of a user if the server identifies the user and trusts 1091 the client. In the inter-server server side copy case, the server is 1092 the source server, and the client is the destination server acting as 1093 a client when performing the copy. 1095 The user principal is not required (nor expected) to have an 1096 RPCSEC_GSS secured connection and context between the destination 1097 server (acting as a client) and the source server. The user 1098 principal does have an RPCSEC_GSS secured connection and context 1099 between the client and the source server established for the OPEN of 1100 the file to be copied. 1102 We use the RPCSEC_GSS context established between the user principal 1103 and the source server to OPEN the file to be copied to provide the 1104 the necessary user principal identification to the source server from 1105 the destination server (acting as a client). This is accomplished by 1106 sending the user principal identification information: e.g., the 1107 rpc_gss3_gss_binding fields, in the copy_to_auth privilege 1108 established between the client and the destination server. This same 1109 information is then placed in the rpc_gss3_gss_binding fields of the 1110 copy_confirm_auth RPCSEC_GSS3_CREATE message sent from the 1111 destination server (acting as a client) to the source server. 1113 When the user principal wants to COPY a file between two servers, if 1114 it has not established copy_from_auth and copy_to_auth privileges on 1115 the servers, it establishes them: 1117 o As noted in [rpcsec_gssv3] the client uses an existing 1118 RPCSEC_GSSv1 (or v2) context termed the "parent" handle to 1119 establish and protect RPCSEC_GSSv3 exchanges. The copy_from_auth 1120 privilege will use the context established between the user 1121 principal and the source server used to OPEN the source file as 1122 the RPCSEC_GSSv3 parent handle. The copy_to_auth privilege will 1123 use the context established between the user principal and the 1124 destination server used to OPEN the destination file as the 1125 RPCSEC_GSSv3 parent handle. 1127 o A random number is generated to use as a secret to be shared 1128 between the two servers. This shared secret will be placed in the 1129 cfap_shared_secret and ctap_shared_secret fields of the 1130 appropriate privilege data types, copy_from_auth_priv and 1131 copy_to_auth_priv. Because of this shared_secret the 1132 RPCSEC_GSS3_CREATE control messages for copy_from_auth and 1133 copy_to_auth MUST use a QOP of rpc_gss_svc_privacy. 1135 o An instance of copy_from_auth_priv is filled in with the shared 1136 secret, the destination server, and the NFSv4 user id of the user 1137 principal and is placed in rpc_gss3_create_args 1138 assertions[0].assertion.privs.privilege. The string 1139 "copy_from_auth" is placed in assertions[0].assertion.privs.name. 1140 The field assertions[0].critical is set to TRUE. The source 1141 server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload 1142 and verifies that the NFSv4 user id being asserted matches the 1143 source server's mapping of the user principal. If it does, the 1144 privilege is established on the source server as: 1145 <"copy_from_auth", user id, destination>. The field "handle" in a 1146 successful reply is the RPCSEC_GSSv3 "child" handle that the 1147 client will use on COPY_NOTIFY requests to the source server 1148 involving the destination server. 1149 granted_assertions[0].assertion.privs.name will be equal to 1150 "copy_from_auth". 1152 o An instance of copy_to_auth_priv is filled in with the shared 1153 secret, the cnr_source_server list returned by COPY_NOTIFY, and 1154 the NFSv4 user id of the user principal. The next four fields are 1155 passed in the copy_to_auth privilege to be used by the 1156 copy_confirm_auth rpc_gss3_gss_binding fields as explained above. 1157 A nounce is created, and GSS_MIC() is invoked on the nounce using 1158 the RPCSEC_GSSv1 (or v2) context shared between user principal and 1159 the source server. The nounce, nounce MIC, context handle used to 1160 create the nounce MIC, and the context handle version are added to 1161 the copy_to_auth_priv instance which is placed in 1162 rpc_gss3_create_args assertions[0].assertion.privs.privilege. The 1163 string "copy_to_auth" is placed in 1164 assertions[0].assertion.privs.name. The field 1165 assertions[0].critical is set to TRUE. The destination server 1166 unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and 1167 verifies that the NFSv4 user id being asserted matches the 1168 destination server's mapping of the user principal. If it does, 1169 the privilege is established on the destination server as: 1170 <"copy_to_auth", user id, source list, nounce, nounce MIC, context 1171 handle, handle version>. The field "handle" in a successful reply 1172 is the RPCSEC_GSSv3 "child" handle that the client will use on 1173 COPY requests to the destination server involving the source 1174 server. granted_assertions[0].assertion.privs.name will be equal 1175 to "copy_to_auth". 1177 As noted in [rpcsec_gssv3] Section 2.3.1 "Create Request", both the 1178 client and the source server should associate the RPCSEC_GSSv3 1179 "child" handle with the parent RPCSEC_GSSv1 (or v2) handle used to 1180 create the RPCSEC_GSSv3 child handle. 1182 4.10.1.1.2. Starting a Secure Inter-Server Copy 1184 When the client sends a COPY_NOTIFY request to the source server, it 1185 uses the privileged "copy_from_auth" RPCSEC_GSSv3 handle. 1186 cna_destination_server in COPY_NOTIFY MUST be the same as 1187 cfap_destination specified in copy_from_auth_priv. Otherwise, 1188 COPY_NOTIFY will fail with NFS4ERR_ACCESS. The source server 1189 verifies that the privilege <"copy_from_auth", user id, destination> 1190 exists, and annotates it with the source filehandle, if the user 1191 principal has read access to the source file, and if administrative 1192 policies give the user principal and the NFS client read access to 1193 the source file (i.e., if the ACCESS operation would grant read 1194 access). Otherwise, COPY_NOTIFY will fail with NFS4ERR_ACCESS. 1196 When the client sends a COPY request to the destination server, it 1197 uses the privileged "copy_to_auth" RPCSEC_GSSv3 handle. 1198 ca_source_server list in COPY MUST be the same as ctap_source list 1199 specified in copy_to_auth_priv. Otherwise, COPY will fail with 1200 NFS4ERR_ACCESS. The destination server verifies that the privilege 1201 <"copy_to_auth", user id, source list, nounce, nounce MIC, context 1202 handle, handle version> exists, and annotates it with the source and 1203 destination filehandles. If the COPY returns a wr_callback_id, then 1204 this is an asynchronous copy and the wr_callback_id must also must be 1205 annotated to the copy_to_auth privilege. If the client has failed to 1206 establish the "copy_to_auth" privilege it will reject the request 1207 with NFS4ERR_PARTNER_NO_AUTH. 1209 If either the COPY_NOTIFY, or the COPY operations fail, the 1210 associated "copy_from_auth" and "copy_to_auth" RPCSEC_GSSv3 handles 1211 MUST be destroyed. 1213 4.10.1.1.3. Securing ONC RPC Server-to-Server Copy Protocols 1215 After a destination server has a "copy_to_auth" privilege established 1216 on it, and it receives a COPY request, if it knows it will use an ONC 1217 RPC protocol to copy data, it will establish a "copy_confirm_auth" 1218 privilege on the source server prior to responding to the COPY 1219 operation as follows: 1221 o Before establishing an RPCSEC_GSSv3 context, a parent context 1222 needs to exist between nfs@ as the initiator 1223 principal, and nfs@ as the target principal. If NFS is to 1224 be used as the copy protocol, this means that the destination 1225 server must mount the source server using RPCSEC_GSS. 1227 o An instance of copy_confirm_auth_priv is filled in with 1228 information from the established "copy_to_auth" privilege. The 1229 value of the field ccap_shared_secret_mic is a GSS_GetMIC() of the 1230 ctap_shared_secret in the copy_to_auth privilege using the parent 1231 handle context. The field ccap_username is the mapping of the 1232 user principal to an NFSv4 user name ("user"@"domain" form), and 1233 MUST be the same as the ctap_username in the copy_to_auth 1234 privilege. The copy_confirm_auth_priv instance is placed in 1235 rpc_gss3_create_args assertions[0].assertion.privs.privilege. The 1236 string "copy_confirm_auth" is placed in 1237 assertions[0].assertion.privs.name. The field 1238 assertions[0].critical is set to TRUE. 1240 o The copy_confirm_auth RPCSEC_GSS3_CREATE call also includes a 1241 compound authentication component. The rpc_gss3_gss_binding 1242 fields are filled in with information from the established 1243 "copy_to_auth" privilege (see Section 4.10.1.1.1). The 1244 ctap_handle_vers, ctap_handle, ctap_nounce, and ctap_nounce_mic 1245 are assigned to the vers, handle, nounce, and mic fields of an 1246 rpc_gss3_gss_binding instance respectively. 1248 o The RPCSEC_GSS3_CREATE copy_from_auth message is sent to the 1249 source server with a QOP of rpc_gss_svc_privacy. The source 1250 server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload 1251 and verifies the cap_shared_secret_mic by calling GSS_VerifyMIC() 1252 using the parent context on the cfap_shared_secret from the 1253 established "copy_from_auth" privilege, and verifies the that the 1254 ccap_username equals the cfap_username. The source server then 1255 locates the ctap_handle in it's GSS context cache and verifies 1256 that the handle belongs to the user principal that maps to the 1257 ccap_username and that the cached handle version equals 1258 ctap_handle_vers. The ctap_nounce_mic is verified by calling 1259 GSS_VerifyMIC() on the ctap_nounce using the cached handle 1260 context. If all verification succeeds, the "copy_confirm_auth" 1261 privilege is established on the source server as < 1262 "copy_confirm_auth", shared_secret_mic, user id, nounce, nounce 1263 MIC, context handle, context handle version>, and the resultant 1264 child handle is noted to be acting on behalf of the user 1265 principal. If the source server fails to verify either the 1266 privilege or the compound_binding, the COPY operation will be 1267 rejected with NFS4ERR_PARTNER_NO_AUTH. 1269 o All subsequent ONC RPC requests sent from the destination to copy 1270 data from the source to the destination will use the RPCSEC_GSSv3 1271 handle returned by the source's RPCSEC_GSS3_CREATE response. Note 1272 that as per the Compound Authentication section of [rpcsec_gssv3] 1273 the resultant RPCSEC_GSSv3 context handle is bound to the user 1274 principal RPCSEC_GSS context and so it MUST be treated by servers 1275 as authenticating the user principal. 1277 Note that the use of the "copy_confirm_auth" privilege accomplishes 1278 the following: 1280 o If a protocol like NFS is being used, with export policies, export 1281 policies can be overridden in case the destination server as-an- 1282 NFS-client is not authorized 1284 o Manual configuration to allow a copy relationship between the 1285 source and destination is not needed. 1287 4.10.1.1.4. Finishing or Stopping a Secure Inter-Server Copy 1289 Under normal operation, the client MUST destroy the copy_from_auth 1290 and the copy_to_auth RPCSEC_GSSv3 handle once the COPY operation 1291 returns for a synchronous inter-server copy or a CB_OFFLOAD reports 1292 the result of an asynchronous copy. 1294 The copy_confirm_auth privilege and compound authentication 1295 RPCSEC_GSSv3 handle is constructed from information held by the 1296 copy_to_auth privilege, and MUST be destroyed by the destination 1297 server (via an RPCSEC_GSS3_DESTROY call) when the copy_to_auth 1298 RPCSEC_GSSv3 handle is destroyed. 1300 If the client sends an OFFLOAD_CANCEL to the source server to rescind 1301 the destination server's synchronous copy privilege, it uses the 1302 privileged "copy_from_auth" RPCSEC_GSSv3 handle and the 1303 cra_destination_server in OFFLOAD_CANCEL MUST be the same as the name 1304 of the destination server specified in copy_from_auth_priv. The 1305 source server will then delete the <"copy_from_auth", user id, 1306 destination> privilege and fail any subsequent copy requests sent 1307 under the auspices of this privilege from the destination server. 1309 The client MUST destroy both the "copy_from_auth" and the 1310 "copy_to_auth" RPCSEC_GSSv3 handles. 1312 If the client sends an OFFLOAD_STATUS to the destination server to 1313 check on the status of an asynchronous copy, it uses the privileged 1314 "copy_to_auth" RPCSEC_GSSv3 handle and the osa_stateid in 1315 OFFLOAD_STATUS MUST be the same as the wr_callback_id specified in 1316 the "copy_to_auth" privilege stored on the destination server. 1318 If the client sends an OFFLOAD_CANCEL to the destination server to 1319 cancel an asynchronous copy, it uses the privileged "copy_to_auth" 1320 RPCSEC_GSSv3 handle and the oaa_stateid in OFFLOAD_CANCEL MUST be the 1321 same as the wr_callback_id specified in the "copy_to_auth" privilege 1322 stored on the destination server. The destination server will then 1323 delete the <"copy_to_auth", user id, source list, nounce, nounce MIC, 1324 context handle, handle version> privilege and the associated 1325 "copy_confirm_auth" RPCSEC_GSSv3 handle. The client MUST destroy 1326 both the copy_to_auth and copy_from_auth RPCSEC_GSSv3 handles. 1328 4.10.1.2. Inter-Server Copy via ONC RPC without RPCSEC_GSS 1330 ONC RPC security flavors other than RPCSEC_GSS MAY be used with the 1331 server-side copy offload operations described in this chapter. In 1332 particular, host-based ONC RPC security flavors such as AUTH_NONE and 1333 AUTH_SYS MAY be used. If a host-based security flavor is used, a 1334 minimal level of protection for the server-to-server copy protocol is 1335 possible. 1337 In the absence of a strong security mechanism designed for the 1338 purpose, the challenge is how the source server and destination 1339 server identify themselves to each other, especially in the presence 1340 of multi-homed source and destination servers. In a multi-homed 1341 environment, the destination server might not contact the source 1342 server from the same network address specified by the client in the 1343 COPY_NOTIFY. This can be overcome using the procedure described 1344 below. 1346 When the client sends the source server the COPY_NOTIFY operation, 1347 the source server may reply to the client with a list of target 1348 addresses, names, and/or URLs and assign them to the unique 1349 quadruple: . If the destination uses one of these target netlocs to contact 1351 the source server, the source server will be able to uniquely 1352 identify the destination server, even if the destination server does 1353 not connect from the address specified by the client in COPY_NOTIFY. 1354 The level of assurance in this identification depends on the 1355 unpredictability, strength and secrecy of the random number. 1357 For example, suppose the network topology is as shown in Figure 3. 1358 If the source filehandle is 0x12345, the source server may respond to 1359 a COPY_NOTIFY for destination 203.0.113.56 with the URLs: 1361 nfs://203.0.113.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/203.0.113.56/ 1362 _FH/0x12345 1364 nfs://192.0.2.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/203.0.113.56/_FH/ 1365 0x12345 1367 The name component after _COPY is 24 characters of base 64, more than 1368 enough to encode a 128 bit random number. 1370 The client will then send these URLs to the destination server in the 1371 COPY operation. Suppose that the 192.0.2.0/24 network is a high 1372 speed network and the destination server decides to transfer the file 1373 over this network. If the destination contacts the source server 1374 from 192.0.2.56 over this network using NFSv4.1, it does the 1375 following: 1377 COMPOUND { PUTROOTFH, LOOKUP "_COPY" ; LOOKUP 1378 "FvhH1OKbu8VrxvV1erdjvR7N" ; LOOKUP "203.0.113.56"; LOOKUP "_FH" ; 1379 OPEN "0x12345" ; GETFH } 1381 Provided that the random number is unpredictable and has been kept 1382 secret by the parties involved, the source server will therefore know 1383 that these NFSv4.x operations are being issued by the destination 1384 server identified in the COPY_NOTIFY. This random number technique 1385 only provides initial authentication of the destination server, and 1386 cannot defend against man-in-the-middle attacks after authentication 1387 or an eavesdropper that observes the random number on the wire. 1388 Other secure communication techniques (e.g., IPsec) are necessary to 1389 block these attacks. 1391 Servers SHOULD reject COPY_NOTIFY requests that do not use RPCSEC_GSS 1392 with privacy, thus ensuring the URL in the COPY_NOTIFY reply is 1393 encrypted. For the same reason, clients SHOULD send COPY requests to 1394 the destination using RPCSEC_GSS with privacy. 1396 4.10.1.3. Inter-Server Copy without ONC RPC 1398 The same techniques as Section 4.10.1.2, using unique URLs for each 1399 destination server, can be used for other protocols (e.g., HTTP 1400 [RFC2616] and FTP [RFC959]) as well. 1402 5. Support for Application IO Hints 1404 Applications can issue client I/O hints via posix_fadvise() 1405 [posix_fadvise] to the NFS client. While this can help the NFS 1406 client optimize I/O and caching for a file, it does not allow the NFS 1407 server and its exported file system to do likewise. We add an 1408 IO_ADVISE procedure (Section 15.6) to communicate the client file 1409 access patterns to the NFS server. The NFS server upon receiving a 1410 IO_ADVISE operation MAY choose to alter its I/O and caching behavior, 1411 but is under no obligation to do so. 1413 Application specific NFS clients such as those used by hypervisors 1414 and databases can also leverage application hints to communicate 1415 their specialized requirements. 1417 6. Sparse Files 1419 6.1. Introduction 1421 A sparse file is a common way of representing a large file without 1422 having to utilize all of the disk space for it. Consequently, a 1423 sparse file uses less physical space than its size indicates. This 1424 means the file contains 'holes', byte ranges within the file that 1425 contain no data. Most modern file systems support sparse files, 1426 including most UNIX file systems and NTFS, but notably not Apple's 1427 HFS+. Common examples of sparse files include Virtual Machine (VM) 1428 OS/disk images, database files, log files, and even checkpoint 1429 recovery files most commonly used by the HPC community. 1431 In addition many modern file systems support the concept of 1432 'unwritten' or 'uninitialized' blocks, which have uninitialized space 1433 allocated to them on disk, but will return zeros until data is 1434 written to them. Such functionality is already present in the data 1435 model of the pNFS Block/Volume Layout (see [RFC5663]). Uninitialized 1436 blocks can thought as holes inside a space reservation window. 1438 If an application reads a hole in a sparse file, the file system must 1439 return all zeros to the application. For local data access there is 1440 little penalty, but with NFS these zeroes must be transferred back to 1441 the client. If an application uses the NFS client to read data into 1442 memory, this wastes time and bandwidth as the application waits for 1443 the zeroes to be transferred. 1445 A sparse file is typically created by initializing the file to be all 1446 zeros - nothing is written to the data in the file, instead the hole 1447 is recorded in the metadata for the file. So a 8G disk image might 1448 be represented initially by a couple hundred bits in the inode and 1449 nothing on the disk. If the VM then writes 100M to a file in the 1450 middle of the image, there would now be two holes represented in the 1451 metadata and 100M in the data. 1453 No new operation is needed to allow the creation of a sparsely 1454 populated file, when a file is created and a write occurs past the 1455 current size of the file, the non-allocated region will either be a 1456 hole or filled with zeros. The choice of behavior is dictated by the 1457 underlying file system and is transparent to the application. What 1458 is needed are the abilities to read sparse files and to punch holes 1459 to reinitialize the contents of a file. 1461 Two new operations DEALLOCATE (Section 15.5) and READ_PLUS 1462 (Section 15.11) are introduced. DEALLOCATE allows for the hole 1463 punching. I.e., an application might want to reset the allocation 1464 and reservation status of a range of the file. READ_PLUS supports 1465 all the features of READ but includes an extension to support sparse 1466 files. READ_PLUS is guaranteed to perform no worse than READ, and 1467 can dramatically improve performance with sparse files. READ_PLUS 1468 does not depend on pNFS protocol features, but can be used by pNFS to 1469 support sparse files. 1471 6.2. Terminology 1473 Regular file: An object of file type NF4REG or NF4NAMEDATTR. 1475 Sparse file: A Regular file that contains one or more holes. 1477 Hole: A byte range within a Sparse file that contains regions of all 1478 zeroes. A hole might or might not have space allocated or 1479 reserved to it. 1481 6.3. New Operations 1483 6.3.1. READ_PLUS 1485 READ_PLUS is a new variant of the NFSv4.1 READ operation [RFC5661]. 1486 Besides being able to support all of the data semantics of the READ 1487 operation, it can also be used by the client and server to 1488 efficiently transfer holes. Note that as the client has no a priori 1489 knowledge of whether a hole is present or not, if the client supports 1490 READ_PLUS and so does the server, then it should always use the 1491 READ_PLUS operation in preference to the READ operation. 1493 READ_PLUS extends the response with a new arm representing holes to 1494 avoid returning data for portions of the file which are initialized 1495 to zero and may or may not contain a backing store. Returning data 1496 blocks of uninitialized data wastes computational and network 1497 resources, thus reducing performance. 1499 If the client sends a READ operation, it is explicitly stating that 1500 it is not supporting sparse files. So if a READ occurs on a sparse 1501 file, then the server must expand such data to be raw bytes. If a 1502 READ occurs in the middle of a hole, the server can only send back 1503 bytes starting from that offset. In contrast, if a READ_PLUS occurs 1504 in the middle of a hole, the server can send back a range which 1505 starts before the offset and extends past the range. 1507 6.3.2. DEALLOCATE 1509 DEALLOCATE can be used to hole punch, which allows the client to 1510 avoid the transfer of a repetitive pattern of zeros across the 1511 network. 1513 7. Space Reservation 1515 7.1. Introduction 1517 Applications want to be able to reserve space for a file, report the 1518 amount of actual disk space a file occupies, and free-up the backing 1519 space of a file when it is not required. 1521 One example is the posix_fallocate ([posix_fallocate]) which allows 1522 applications to ask for space reservations from the operating system, 1523 usually to provide a better file layout and reduce overhead for 1524 random or slow growing file appending workloads. 1526 Another example is space reservation for virtual disks in a 1527 hypervisor. In virtualized environments, virtual disk files are 1528 often stored on NFS mounted volumes. When a hypervisor creates a 1529 virtual disk file, it often tries to preallocate the space for the 1530 file so that there are no future allocation related errors during the 1531 operation of the virtual machine. Such errors prevent a virtual 1532 machine from continuing execution and result in downtime. 1534 Currently, in order to achieve such a guarantee, applications zero 1535 the entire file. The initial zeroing allocates the backing blocks 1536 and all subsequent writes are overwrites of already allocated blocks. 1537 This approach is not only inefficient in terms of the amount of I/O 1538 done, it is also not guaranteed to work on file systems that are log 1539 structured or deduplicated. An efficient way of guaranteeing space 1540 reservation would be beneficial to such applications. 1542 The new ALLOCATE operation (see Section 15.1) allows a client to 1543 request a guarantee that space will be available. The ALLOCATE 1544 operation guarantees that any future writes to the region it was 1545 successfully called for will not fail with NFS4ERR_NOSPC. 1547 Another useful feature is the ability to report the number of blocks 1548 that would be freed when a file is deleted. Currently, NFS reports 1549 two size attributes: 1551 size The logical file size of the file. 1553 space_used The size in bytes that the file occupies on disk 1555 While these attributes are sufficient for space accounting in 1556 traditional file systems, they prove to be inadequate in modern file 1557 systems that support block sharing. In such file systems, multiple 1558 inodes can point to a single block with a block reference count to 1559 guard against premature freeing. Having a way to tell the number of 1560 blocks that would be freed if the file was deleted would be useful to 1561 applications that wish to migrate files when a volume is low on 1562 space. 1564 Since virtual disks represent a hard drive in a virtual machine, a 1565 virtual disk can be viewed as a file system within a file. Since not 1566 all blocks within a file system are in use, there is an opportunity 1567 to reclaim blocks that are no longer in use. A call to deallocate 1568 blocks could result in better space efficiency. Lesser space MAY be 1569 consumed for backups after block deallocation. 1571 The following operations and attributes can be used to resolve these 1572 issues: 1574 space_freed This attribute specifies the space freed when a file is 1575 deleted, taking block sharing into consideration. 1577 DEALLOCATE This operation delallocates the blocks backing a region 1578 of the file. 1580 If space_used of a file is interpreted to mean the size in bytes of 1581 all disk blocks pointed to by the inode of the file, then shared 1582 blocks get double counted, over-reporting the space utilization. 1583 This also has the adverse effect that the deletion of a file with 1584 shared blocks frees up less than space_used bytes. 1586 On the other hand, if space_used is interpreted to mean the size in 1587 bytes of those disk blocks unique to the inode of the file, then 1588 shared blocks are not counted in any file, resulting in under- 1589 reporting of the space utilization. 1591 For example, two files A and B have 10 blocks each. Let 6 of these 1592 blocks be shared between them. Thus, the combined space utilized by 1593 the two files is 14 * BLOCK_SIZE bytes. In the former case, the 1594 combined space utilization of the two files would be reported as 20 * 1595 BLOCK_SIZE. However, deleting either would only result in 4 * 1596 BLOCK_SIZE being freed. Conversely, the latter interpretation would 1597 report that the space utilization is only 8 * BLOCK_SIZE. 1599 Adding another size attribute, space_freed (see Section 13.2.4), is 1600 helpful in solving this problem. space_freed is the number of blocks 1601 that are allocated to the given file that would be freed on its 1602 deletion. In the example, both A and B would report space_freed as 4 1603 * BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B 1604 will report space_freed as 10 * BLOCK_SIZE as the deletion of B would 1605 result in the deallocation of all 10 blocks. 1607 The addition of this problem does not solve the problem of space 1608 being over-reported. However, over-reporting is better than under- 1609 reporting. 1611 8. Application Data Block Support 1613 At the OS level, files are contained on disk blocks. Applications 1614 are also free to impose structure on the data contained in a file and 1615 we can define an Application Data Block (ADB) to be such a structure. 1616 From the application's viewpoint, it only wants to handle ADBs and 1617 not raw bytes (see [Strohm11]). An ADB is typically comprised of two 1618 sections: header and data. The header describes the characteristics 1619 of the block and can provide a means to detect corruption in the data 1620 payload. The data section is typically initialized to all zeros. 1622 The format of the header is application specific, but there are two 1623 main components typically encountered: 1625 1. An Application Data Block Number (ADBN) which allows the 1626 application to determine which data block is being referenced. 1627 This is useful when the client is not storing the blocks in 1628 contiguous memory, i.e., a logical block number. 1630 2. Fields to describe the state of the ADB and a means to detect 1631 block corruption. For both pieces of data, a useful property is 1632 that allowed values be unique in that if passed across the 1633 network, corruption due to translation between big and little 1634 endian architectures are detectable. For example, 0xF0DEDEF0 has 1635 the same bit pattern in both architectures. 1637 Applications already impose structures on files [Strohm11] and detect 1638 corruption in data blocks [Ashdown08]. What they are not able to do 1639 is efficiently transfer and store ADBs. To initialize a file with 1640 ADBs, the client must send each full ADB to the server and that must 1641 be stored on the server. 1643 In this section, we define a framework for transferring the ADB from 1644 client to server and present one approach to detecting corruption in 1645 a given ADB implementation. 1647 8.1. Generic Framework 1649 We want the representation of the ADB to be flexible enough to 1650 support many different applications. The most basic approach is no 1651 imposition of a block at all, which means we are working with the raw 1652 bytes. Such an approach would be useful for storing holes, punching 1653 holes, etc. In more complex deployments, a server might be 1654 supporting multiple applications, each with their own definition of 1655 the ADB. One might store the ADBN at the start of the block and then 1656 have a guard pattern to detect corruption [McDougall07]. The next 1657 might store the ADBN at an offset of 100 bytes within the block and 1658 have no guard pattern at all, i.e., existing applications might 1659 already have well defined formats for their data blocks. 1661 The guard pattern can be used to represent the state of the block, to 1662 protect against corruption, or both. Again, it needs to be able to 1663 be placed anywhere within the ADB. 1665 We need to be able to represent the starting offset of the block and 1666 the size of the block. Note that nothing prevents the application 1667 from defining different sized blocks in a file. 1669 8.1.1. Data Block Representation 1671 struct app_data_block4 { 1672 offset4 adb_offset; 1673 length4 adb_block_size; 1674 length4 adb_block_count; 1675 length4 adb_reloff_blocknum; 1676 count4 adb_block_num; 1677 length4 adb_reloff_pattern; 1678 opaque adb_pattern<>; 1679 }; 1681 The app_data_block4 structure captures the abstraction presented for 1682 the ADB. The additional fields present are to allow the transmission 1683 of adb_block_count ADBs at one time. We also use adb_block_num to 1684 convey the ADBN of the first block in the sequence. Each ADB will 1685 contain the same adb_pattern string. 1687 As both adb_block_num and adb_pattern are optional, if either 1688 adb_reloff_pattern or adb_reloff_blocknum is set to NFS4_UINT64_MAX, 1689 then the corresponding field is not set in any of the ADB. 1691 8.2. An Example of Detecting Corruption 1693 In this section, we define an ADB format in which corruption can be 1694 detected. Note that this is just one possible format and means to 1695 detect corruption. 1697 Consider a very basic implementation of an operating system's disk 1698 blocks. A block is either data or it is an indirect block which 1699 allows for files to be larger than one block. It is desired to be 1700 able to initialize a block. Lastly, to quickly unlink a file, a 1701 block can be marked invalid. The contents remain intact - which 1702 would enable this OS application to undelete a file. 1704 The application defines 4k sized data blocks, with an 8 byte block 1705 counter occurring at offset 0 in the block, and with the guard 1706 pattern occurring at offset 8 inside the block. Furthermore, the 1707 guard pattern can take one of four states: 1709 0xfeedface - This is the FREE state and indicates that the ADB 1710 format has been applied. 1712 0xcafedead - This is the DATA state and indicates that real data 1713 has been written to this block. 1715 0xe4e5c001 - This is the INDIRECT state and indicates that the 1716 block contains block counter numbers that are chained off of this 1717 block. 1719 0xba1ed4a3 - This is the INVALID state and indicates that the block 1720 contains data whose contents are garbage. 1722 Finally, it also defines an 8 byte checksum [Baira08] starting at 1723 byte 16 which applies to the remaining contents of the block. If the 1724 state is FREE, then that checksum is trivially zero. As such, the 1725 application has no need to transfer the checksum implicitly inside 1726 the ADB - it need not make the transfer layer aware of the fact that 1727 there is a checksum (see [Ashdown08] for an example of checksums used 1728 to detect corruption in application data blocks). 1730 Corruption in each ADB can thus be detected: 1732 o If the guard pattern is anything other than one of the allowed 1733 values, including all zeros. 1735 o If the guard pattern is FREE and any other byte in the remainder 1736 of the ADB is anything other than zero. 1738 o If the guard pattern is anything other than FREE, then if the 1739 stored checksum does not match the computed checksum. 1741 o If the guard pattern is INDIRECT and one of the stored indirect 1742 block numbers has a value greater than the number of ADBs in the 1743 file. 1745 o If the guard pattern is INDIRECT and one of the stored indirect 1746 block numbers is a duplicate of another stored indirect block 1747 number. 1749 As can be seen, the application can detect errors based on the 1750 combination of the guard pattern state and the checksum. But also, 1751 the application can detect corruption based on the state and the 1752 contents of the ADB. This last point is important in validating the 1753 minimum amount of data we incorporated into our generic framework. 1754 I.e., the guard pattern is sufficient in allowing applications to 1755 design their own corruption detection. 1757 Finally, it is important to note that none of these corruption checks 1758 occur in the transport layer. The server and client components are 1759 totally unaware of the file format and might report everything as 1760 being transferred correctly even in the case the application detects 1761 corruption. 1763 8.3. Example of READ_PLUS 1765 The hypothetical application presented in Section 8.2 can be used to 1766 illustrate how READ_PLUS would return an array of results. A file is 1767 created and initialized with 100 4k ADBs in the FREE state with the 1768 WRITE_SAME operation (see Section 15.13): 1770 WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface} 1772 Further, assume the application writes a single ADB at 16k, changing 1773 the guard pattern to 0xcafedead, we would then have in memory: 1775 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00 1776 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00 1777 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00 1778 12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00 1779 16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00 1780 20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00 1781 24k -> (28k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00 1782 ... 1783 396k -> (400k - 1) : 00 00 00 63 fe ed fa ce 00 00 ... 00 00 1785 And when the client did a READ_PLUS of 64k at the start of the file, 1786 it could get back a result of data: 1788 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00 1789 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00 1790 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00 1791 12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00 1792 16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00 1793 20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00 1794 24k -> (24k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00 1795 ... 1796 62k -> (64k - 1) : 00 00 00 15 fe ed fa ce 00 00 ... 00 00 1798 8.4. An Example of Zeroing Space 1800 A simpler use case for WRITE_SAME are applications that want to 1801 efficiently zero out a file, but do not want to modify space 1802 reservations. This can easily be archived by a call to WRITE_SAME 1803 without a ADB block numbers and pattern, e.g.: 1805 WRITE_SAME {0, 1k, 10000, 0, 0, 0, 0} 1807 9. Labeled NFS 1809 9.1. Introduction 1811 Access control models such as Unix permissions or Access Control 1812 Lists are commonly referred to as Discretionary Access Control (DAC) 1813 models. These systems base their access decisions on user identity 1814 and resource ownership. In contrast Mandatory Access Control (MAC) 1815 models base their access control decisions on the label on the 1816 subject (usually a process) and the object it wishes to access 1817 [RFC7204]. These labels may contain user identity information but 1818 usually contain additional information. In DAC systems users are 1819 free to specify the access rules for resources that they own. MAC 1820 models base their security decisions on a system wide policy 1821 established by an administrator or organization which the users do 1822 not have the ability to override. In this section, we add a MAC 1823 model to NFSv4.2. 1825 The first change necessary is to devise a method for transporting and 1826 storing security label data on NFSv4 file objects. Security labels 1827 have several semantics that are met by NFSv4 recommended attributes 1828 such as the ability to set the label value upon object creation. 1829 Access control on these attributes are done through a combination of 1830 two mechanisms. As with other recommended attributes on file objects 1831 the usual DAC checks (ACLs and permission bits) will be performed to 1832 ensure that proper file ownership is enforced. In addition a MAC 1833 system MAY be employed on the client, server, or both to enforce 1834 additional policy on what subjects may modify security label 1835 information. 1837 The second change is to provide methods for the client to determine 1838 if the security label has changed. A client which needs to know if a 1839 label is going to change SHOULD request a delegation on that file. 1840 In order to change the security label, the server will have to recall 1841 all delegations. This will inform the client of the change. 1843 An additional useful change would be modification to the RPC layer 1844 used in NFSv4 to allow RPC calls to carry security labels. Such 1845 modifications are outside the scope of this document (see 1846 [rpcsec_gssv3]). 1848 9.2. Definitions 1850 Label Format Specifier (LFS): is an identifier used by the client to 1851 establish the syntactic format of the security label and the 1852 semantic meaning of its components. These specifiers exist in a 1853 registry associated with documents describing the format and 1854 semantics of the label. 1856 Label Format Registry: is the IANA registry containing all 1857 registered LFS along with references to the documents that 1858 describe the syntactic format and semantics of the security label. 1860 Policy Identifier (PI): is an optional part of the definition of a 1861 Label Format Specifier which allows for clients and server to 1862 identify specific security policies. 1864 Object: is a passive resource within the system that we wish to be 1865 protected. Objects can be entities such as files, directories, 1866 pipes, sockets, and many other system resources relevant to the 1867 protection of the system state. 1869 Subject: is an active entity usually a process which is requesting 1870 access to an object. 1872 MAC-Aware: is a server which can transmit and store object labels. 1874 MAC-Functional: is a client or server which is Labeled NFS enabled. 1875 Such a system can interpret labels and apply policies based on the 1876 security system. 1878 Multi-Level Security (MLS): is a traditional model where objects are 1879 given a sensitivity level (Unclassified, Secret, Top Secret, etc) 1880 and a category set [MLS]. 1882 9.3. MAC Security Attribute 1884 MAC models base access decisions on security attributes bound to 1885 subjects and objects. This information can range from a user 1886 identity for an identity based MAC model, sensitivity levels for 1887 Multi-level security, or a type for Type Enforcement. These models 1888 base their decisions on different criteria but the semantics of the 1889 security attribute remain the same. The semantics required by the 1890 security attributes are listed below: 1892 o MUST provide flexibility with respect to the MAC model. 1894 o MUST provide the ability to atomically set security information 1895 upon object creation. 1897 o MUST provide the ability to enforce access control decisions both 1898 on the client and the server. 1900 o MUST NOT expose an object to either the client or server name 1901 space before its security information has been bound to it. 1903 NFSv4 implements the security attribute as a recommended attribute. 1904 These attributes have a fixed format and semantics, which conflicts 1905 with the flexible nature of the security attribute. To resolve this 1906 the security attribute consists of two components. The first 1907 component is a LFS as defined in [Quigley14] to allow for 1908 interoperability between MAC mechanisms. The second component is an 1909 opaque field which is the actual security attribute data. To allow 1910 for various MAC models, NFSv4 should be used solely as a transport 1911 mechanism for the security attribute. It is the responsibility of 1912 the endpoints to consume the security attribute and make access 1913 decisions based on their respective models. In addition, creation of 1914 objects through OPEN and CREATE allows for the security attribute to 1915 be specified upon creation. By providing an atomic create and set 1916 operation for the security attribute it is possible to enforce the 1917 second and fourth requirements. The recommended attribute 1918 FATTR4_SEC_LABEL (see Section 13.2.2) will be used to satisfy this 1919 requirement. 1921 9.3.1. Delegations 1923 In the event that a security attribute is changed on the server while 1924 a client holds a delegation on the file, both the server and the 1925 client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661]) 1926 with respect to attribute changes. It SHOULD flush all changes back 1927 to the server and relinquish the delegation. 1929 9.3.2. Permission Checking 1931 It is not feasible to enumerate all possible MAC models and even 1932 levels of protection within a subset of these models. This means 1933 that the NFSv4 client and servers cannot be expected to directly make 1934 access control decisions based on the security attribute. Instead 1935 NFSv4 should defer permission checking on this attribute to the host 1936 system. These checks are performed in addition to existing DAC and 1937 ACL checks outlined in the NFSv4 protocol. Section 9.6 gives a 1938 specific example of how the security attribute is handled under a 1939 particular MAC model. 1941 9.3.3. Object Creation 1943 When creating files in NFSv4 the OPEN and CREATE operations are used. 1944 One of the parameters to these operations is an fattr4 structure 1945 containing the attributes the file is to be created with. This 1946 allows NFSv4 to atomically set the security attribute of files upon 1947 creation. When a client is MAC-Functional it must always provide the 1948 initial security attribute upon file creation. In the event that the 1949 server is MAC-Functional as well, it should determine by policy 1950 whether it will accept the attribute from the client or instead make 1951 the determination itself. If the client is not MAC-Functional, then 1952 the MAC-Functional server must decide on a default label. A more in 1953 depth explanation can be found in Section 9.6. 1955 9.3.4. Existing Objects 1957 Note that under the MAC model, all objects must have labels. 1958 Therefore, if an existing server is upgraded to include Labeled NFS 1959 support, then it is the responsibility of the security system to 1960 define the behavior for existing objects. 1962 9.3.5. Label Changes 1964 If there are open delegations on the file belonging to client other 1965 than the one making the label change, then the process described in 1966 Section 9.3.1 must be followed. In short, the delegation will be 1967 recalled, which effectively notifies the client of the change. 1969 Consider a system in which the clients enforce MAC checks and and the 1970 server has a very simple security system which just stores the 1971 labels. In this system, the MAC label check always allows access, 1972 regardless of the subject label. 1974 The way in which MAC labels are enforced is by the client. The 1975 security policies on the client can be such that the client does not 1976 have access to the file unless it has a delegation. The recall of 1977 the delegation will force the client to flush any cached content of 1978 the file. 1980 9.4. pNFS Considerations 1982 The new FATTR4_SEC_LABEL attribute is metadata information and as 1983 such the DS is not aware of the value contained on the MDS. 1984 Fortunately, the NFSv4.1 protocol [RFC5661] already has provisions 1985 for doing access level checks from the DS to the MDS. In order for 1986 the DS to validate the subject label presented by the client, it 1987 SHOULD utilize this mechanism. 1989 9.5. Discovery of Server Labeled NFS Support 1991 The server can easily determine that a client supports Labeled NFS 1992 when it queries for the FATTR4_SEC_LABEL label for an object. The 1993 client might need to discover which LFS the server supports. 1995 The following compound MUST NOT be denied by any MAC label check: 1997 PUTROOTFH, GETATTR {FATTR4_SEC_LABEL} 1999 Note that the server might have imposed a security flavor on the root 2000 that precludes such access. I.e., if the server requires kerberized 2001 access and the client presents a compound with AUTH_SYS, then the 2002 server is allowed to return NFS4ERR_WRONGSEC in this case. But if 2003 the client presents a correct security flavor, then the server MUST 2004 return the FATTR4_SEC_LABEL attribute with the supported LFS filled 2005 in. 2007 9.6. MAC Security NFS Modes of Operation 2009 A system using Labeled NFS may operate in two modes. The first mode 2010 provides the most protection and is called "full mode". In this mode 2011 both the client and server implement a MAC model allowing each end to 2012 make an access control decision. The remaining mode is called the 2013 "guest mode" and in this mode one end of the connection is not 2014 implementing a MAC model and thus offers less protection than full 2015 mode. 2017 9.6.1. Full Mode 2019 Full mode environments consist of MAC-Functional NFSv4 servers and 2020 clients and may be composed of mixed MAC models and policies. The 2021 system requires that both the client and server have an opportunity 2022 to perform an access control check based on all relevant information 2023 within the network. The file object security attribute is provided 2024 using the mechanism described in Section 9.3. 2026 Fully MAC-Functional NFSv4 servers are not possible in the absence of 2027 RPC layer modifications to support subject label transport. However, 2028 servers may make decisions based on the RPC credential information 2029 available and future specifications may provide subject label 2030 transport. 2032 9.6.1.1. Initial Labeling and Translation 2034 The ability to create a file is an action that a MAC model may wish 2035 to mediate. The client is given the responsibility to determine the 2036 initial security attribute to be placed on a file. This allows the 2037 client to make a decision as to the acceptable security attributes to 2038 create a file with before sending the request to the server. Once 2039 the server receives the creation request from the client it may 2040 choose to evaluate if the security attribute is acceptable. 2042 Security attributes on the client and server may vary based on MAC 2043 model and policy. To handle this the security attribute field has an 2044 LFS component. This component is a mechanism for the host to 2045 identify the format and meaning of the opaque portion of the security 2046 attribute. A full mode environment may contain hosts operating in 2047 several different LFSs. In this case a mechanism for translating the 2048 opaque portion of the security attribute is needed. The actual 2049 translation function will vary based on MAC model and policy and is 2050 out of the scope of this document. If a translation is unavailable 2051 for a given LFS then the request MUST be denied. Another recourse is 2052 to allow the host to provide a fallback mapping for unknown security 2053 attributes. 2055 9.6.1.2. Policy Enforcement 2057 In full mode access control decisions are made by both the clients 2058 and servers. When a client makes a request it takes the security 2059 attribute from the requesting process and makes an access control 2060 decision based on that attribute and the security attribute of the 2061 object it is trying to access. If the client denies that access an 2062 RPC call to the server is never made. If however the access is 2063 allowed the client will make a call to the NFS server. 2065 When the server receives the request from the client it uses any 2066 credential information conveyed in the RPC request and the attributes 2067 of the object the client is trying to access to make an access 2068 control decision. If the server's policy allows this access it will 2069 fulfill the client's request, otherwise it will return 2070 NFS4ERR_ACCESS. 2072 Future protocol extensions may also allow the server to factor into 2073 the decision a security label extracted from the RPC request. 2075 Implementations MAY validate security attributes supplied over the 2076 network to ensure that they are within a set of attributes permitted 2077 from a specific peer, and if not, reject them. Note that a system 2078 may permit a different set of attributes to be accepted from each 2079 peer. 2081 9.6.1.3. Limited Server 2083 A Limited Server mode (see Section 4.2 of [RFC7204]) consists of a 2084 server which is label aware, but does not enforce policies. Such a 2085 server will store and retrieve all object labels presented by 2086 clients, utilize the methods described in Section 9.3.5 to allow the 2087 clients to detect changing labels, but may not factor the label into 2088 access decisions. Instead, it will expect the clients to enforce all 2089 such access locally. 2091 9.6.2. Guest Mode 2093 Guest mode implies that either the client or the server does not 2094 handle labels. If the client is not Labeled NFS aware, then it will 2095 not offer subject labels to the server. The server is the only 2096 entity enforcing policy, and may selectively provide standard NFS 2097 services to clients based on their authentication credentials and/or 2098 associated network attributes (e.g., IP address, network interface). 2099 The level of trust and access extended to a client in this mode is 2100 configuration-specific. If the server is not Labeled NFS aware, then 2101 it will not return object labels to the client. Clients in this 2102 environment are may consist of groups implementing different MAC 2103 model policies. The system requires that all clients in the 2104 environment be responsible for access control checks. 2106 9.7. Security Considerations 2108 This entire chapter deals with security issues. 2110 Depending on the level of protection the MAC system offers there may 2111 be a requirement to tightly bind the security attribute to the data. 2113 When only one of the client or server enforces labels, it is 2114 important to realize that the other side is not enforcing MAC 2115 protections. Alternate methods might be in use to handle the lack of 2116 MAC support and care should be taken to identify and mitigate threats 2117 from possible tampering outside of these methods. 2119 An example of this is that a server that modifies READDIR or LOOKUP 2120 results based on the client's subject label might want to always 2121 construct the same subject label for a client which does not present 2122 one. This will prevent a non-Labeled NFS client from mixing entries 2123 in the directory cache. 2125 10. Sharing change attribute implementation details with NFSv4 clients 2127 10.1. Introduction 2129 Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1 2130 protocol [RFC5661], define the change attribute as being mandatory to 2131 implement, there is little in the way of guidance. The only mandated 2132 feature is that the value must change whenever the file data or 2133 metadata change. 2135 While this allows for a wide range of implementations, it also leaves 2136 the client with a conundrum: how does it determine which is the most 2137 recent value for the change attribute in a case where several RPC 2138 calls have been issued in parallel? In other words if two COMPOUNDs, 2139 both containing WRITE and GETATTR requests for the same file, have 2140 been issued in parallel, how does the client determine which of the 2141 two change attribute values returned in the replies to the GETATTR 2142 requests correspond to the most recent state of the file? In some 2143 cases, the only recourse may be to send another COMPOUND containing a 2144 third GETATTR that is fully serialized with the first two. 2146 NFSv4.2 avoids this kind of inefficiency by allowing the server to 2147 share details about how the change attribute is expected to evolve, 2148 so that the client may immediately determine which, out of the 2149 several change attribute values returned by the server, is the most 2150 recent. change_attr_type is defined as a new recommended attribute 2151 (see Section 13.2.1), and is per file system. 2153 11. Security Considerations 2155 NFSv4.2 has all of the security concerns present in NFSv4.1 (see 2156 Section 21 of [RFC5661]) and those present in the Server Side Copy 2157 (see Section 4.10) and in Labeled NFS (see Section 9.7). 2159 12. Error Values 2161 NFS error numbers are assigned to failed operations within a Compound 2162 (COMPOUND or CB_COMPOUND) request. A Compound request contains a 2163 number of NFS operations that have their results encoded in sequence 2164 in a Compound reply. The results of successful operations will 2165 consist of an NFS4_OK status followed by the encoded results of the 2166 operation. If an NFS operation fails, an error status will be 2167 entered in the reply and the Compound request will be terminated. 2169 12.1. Error Definitions 2171 Protocol Error Definitions 2173 +-------------------------+--------+------------------+ 2174 | Error | Number | Description | 2175 +-------------------------+--------+------------------+ 2176 | NFS4ERR_BADLABEL | 10093 | Section 12.1.3.1 | 2177 | NFS4ERR_OFFLOAD_DENIED | 10091 | Section 12.1.2.1 | 2178 | NFS4ERR_OFFLOAD_NO_REQS | 10094 | Section 12.1.2.2 | 2179 | NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 12.1.2.3 | 2180 | NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 12.1.2.4 | 2181 | NFS4ERR_UNION_NOTSUPP | 10090 | Section 12.1.1.1 | 2182 | NFS4ERR_WRONG_LFS | 10092 | Section 12.1.3.2 | 2183 +-------------------------+--------+------------------+ 2185 Table 1 2187 12.1.1. General Errors 2189 This section deals with errors that are applicable to a broad set of 2190 different purposes. 2192 12.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090) 2194 One of the arguments to the operation is a discriminated union and 2195 while the server supports the given operation, it does not support 2196 the selected arm of the discriminated union. 2198 12.1.2. Server to Server Copy Errors 2200 These errors deal with the interaction between server to server 2201 copies. 2203 12.1.2.1. NFS4ERR_OFFLOAD_DENIED (Error Code 10091) 2205 The copy offload operation is supported by both the source and the 2206 destination, but the destination is not allowing it for this file. 2207 If the client sees this error, it should fall back to the normal copy 2208 semantics. 2210 12.1.2.2. NFS4ERR_OFFLOAD_NO_REQS (Error Code 10094) 2212 The copy offload operation is supported by both the source and the 2213 destination, but the destination can not meet the client requirements 2214 for either consecutive byte copy or synchronous copy. If the client 2215 sees this error, it should either relax the requirements (if any) or 2216 fall back to the normal copy semantics. 2218 12.1.2.3. NFS4ERR_PARTNER_NO_AUTH (Error Code 10089) 2220 The source server does not authorize a server-to-server copy offload 2221 operation. This may be due to the client's failure to send the 2222 COPY_NOTIFY operation to the source server, the source server 2223 receiving a server-to-server copy offload request after the copy 2224 lease time expired, or for some other permission problem. 2226 12.1.2.4. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088) 2228 The remote server does not support the server-to-server copy offload 2229 protocol. 2231 12.1.3. Labeled NFS Errors 2233 These errors are used in Labeled NFS. 2235 12.1.3.1. NFS4ERR_BADLABEL (Error Code 10093) 2237 The label specified is invalid in some manner. 2239 12.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092) 2241 The LFS specified in the subject label is not compatible with the LFS 2242 in the object label. 2244 12.2. New Operations and Their Valid Errors 2246 This section contains a table that gives the valid error returns for 2247 each new NFSv4.2 protocol operation. The error code NFS4_OK 2248 (indicating no error) is not listed but should be understood to be 2249 returnable by all new operations. The error values for all other 2250 operations are defined in Section 15.2 of [RFC5661]. 2252 Valid Error Returns for Each New Protocol Operation 2254 +----------------+--------------------------------------------------+ 2255 | Operation | Errors | 2256 +----------------+--------------------------------------------------+ 2257 | ALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2258 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2259 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2260 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2261 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2262 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2263 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, | 2264 | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | 2265 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2266 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2267 | | NFS4ERR_REP_TOO_BIG, | 2268 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2269 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2270 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2271 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2272 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2273 | COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2274 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2275 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2276 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2277 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2278 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2279 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | 2280 | | NFS4ERR_METADATA_NOTSUPP, NFS4ERR_MOVED, | 2281 | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | 2282 | | NFS4ERR_OFFLOAD_DENIED, NFS4ERR_OLD_STATEID, | 2283 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2284 | | NFS4ERR_PARTNER_NO_AUTH, | 2285 | | NFS4ERR_PARTNER_NOTSUPP, NFS4ERR_PNFS_IO_HOLE, | 2286 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2287 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2288 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2289 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2290 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2291 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2292 | COPY_NOTIFY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2293 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2294 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2295 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2296 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2297 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2298 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2299 | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | 2300 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | 2301 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2302 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2303 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2304 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2305 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2306 | | NFS4ERR_WRONG_TYPE | 2307 | DEALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2308 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2309 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2310 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2311 | | NFS4ERR_FBIG, NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, | 2312 | | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, | 2313 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2314 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2315 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2316 | | NFS4ERR_REP_TOO_BIG, | 2317 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2318 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2319 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2320 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2321 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2322 | LAYOUTERROR | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2323 | | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, | 2324 | | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, | 2325 | | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, | 2326 | | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, | 2327 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2328 | | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, | 2329 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2330 | | NFS4ERR_REP_TOO_BIG, | 2331 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2332 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2333 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2334 | | NFS4ERR_TOO_MANY_OPS, | 2335 | | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, | 2336 | | NFS4ERR_WRONG_TYPE | 2337 | LAYOUTSTATS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2338 | | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, | 2339 | | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, | 2340 | | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, | 2341 | | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, | 2342 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2343 | | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, | 2344 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2345 | | NFS4ERR_REP_TOO_BIG, | 2346 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2347 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2348 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2349 | | NFS4ERR_TOO_MANY_OPS, | 2350 | | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, | 2351 | | NFS4ERR_WRONG_TYPE | 2352 | OFFLOAD_CANCEL | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2353 | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | 2354 | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | 2355 | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | 2356 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2357 | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | 2358 | OFFLOAD_STATUS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2359 | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | 2360 | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | 2361 | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | 2362 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2363 | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | 2364 | READ_PLUS | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2365 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2366 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2367 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2368 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2369 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2370 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2371 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2372 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2373 | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, | 2374 | | NFS4ERR_REP_TOO_BIG, | 2375 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2376 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2377 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2378 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2379 | | NFS4ERR_WRONG_TYPE | 2380 | SEEK | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2381 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2382 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2383 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2384 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2385 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2386 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2387 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2388 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2389 | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, | 2390 | | NFS4ERR_REP_TOO_BIG, | 2391 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2392 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2393 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2394 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2395 | | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE | 2396 | SEQUENCE | NFS4ERR_BADSESSION, NFS4ERR_BADSLOT, | 2397 | | NFS4ERR_BADXDR, NFS4ERR_BAD_HIGH_SLOT, | 2398 | | NFS4ERR_CONN_NOT_BOUND_TO_SESSION, | 2399 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2400 | | NFS4ERR_REP_TOO_BIG, | 2401 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2402 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2403 | | NFS4ERR_SEQUENCE_POS, NFS4ERR_SEQ_FALSE_RETRY, | 2404 | | NFS4ERR_SEQ_MISORDERED, NFS4ERR_TOO_MANY_OPS | 2405 | WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2406 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2407 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2408 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2409 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2410 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2411 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | 2412 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2413 | | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, | 2414 | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | 2415 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | 2416 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2417 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2418 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2419 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2420 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2421 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2422 +----------------+--------------------------------------------------+ 2424 Table 2 2426 12.3. New Callback Operations and Their Valid Errors 2428 This section contains a table that gives the valid error returns for 2429 each new NFSv4.2 callback operation. The error code NFS4_OK 2430 (indicating no error) is not listed but should be understood to be 2431 returnable by all new callback operations. The error values for all 2432 other callback operations are defined in Section 15.3 of [RFC5661]. 2434 Valid Error Returns for Each New Protocol Callback Operation 2436 +------------+------------------------------------------------------+ 2437 | Callback | Errors | 2438 | Operation | | 2439 +------------+------------------------------------------------------+ 2440 | CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, | 2441 | | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, | 2442 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, | 2443 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, | 2444 | | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, | 2445 | | NFS4ERR_TOO_MANY_OPS | 2446 +------------+------------------------------------------------------+ 2448 Table 3 2450 13. New File Attributes 2452 13.1. New RECOMMENDED Attributes - List and Definition References 2454 The list of new RECOMMENDED attributes appears in Table 4. The 2455 meaning of the columns of the table are: 2457 Name: The name of the attribute. 2459 Id: The number assigned to the attribute. In the event of conflicts 2460 between the assigned number and [NFSv42xdr], the latter is likely 2461 authoritative, but should be resolved with Errata to this document 2462 and/or [NFSv42xdr]. See [IESG08] for the Errata process. 2464 Data Type: The XDR data type of the attribute. 2466 Acc: Access allowed to the attribute. 2468 R means read-only (GETATTR may retrieve, SETATTR may not set). 2470 W means write-only (SETATTR may set, GETATTR may not retrieve). 2472 R W means read/write (GETATTR may retrieve, SETATTR may set). 2474 Defined in: The section of this specification that describes the 2475 attribute. 2477 +------------------+----+-------------------+-----+----------------+ 2478 | Name | Id | Data Type | Acc | Defined in | 2479 +------------------+----+-------------------+-----+----------------+ 2480 | space_freed | 77 | length4 | R | Section 13.2.4 | 2481 | change_attr_type | 78 | change_attr_type4 | R | Section 13.2.1 | 2482 | sec_label | 79 | sec_label4 | R W | Section 13.2.2 | 2483 +------------------+----+-------------------+-----+----------------+ 2485 Table 4 2487 13.2. Attribute Definitions 2489 13.2.1. Attribute 78: change_attr_type 2491 enum change_attr_type4 { 2492 NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, 2493 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, 2494 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, 2495 NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, 2496 NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 2497 }; 2499 change_attr_type is a per file system attribute which enables the 2500 NFSv4.2 server to provide additional information about how it expects 2501 the change attribute value to evolve after the file data, or metadata 2502 has changed. While Section 5.4 of [RFC5661] discusses per file 2503 system attributes, it is expected that the value of change_attr_type 2504 not depend on the value of "homogeneous" and only changes in the 2505 event of a migration. 2507 NFS4_CHANGE_TYPE_IS_UNDEFINED: The change attribute does not take 2508 values that fit into any of these categories. 2510 NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR: The change attribute value MUST 2511 monotonically increase for every atomic change to the file 2512 attributes, data, or directory contents. 2514 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER: The change attribute value MUST 2515 be incremented by one unit for every atomic change to the file 2516 attributes, data, or directory contents. This property is 2517 preserved when writing to pNFS data servers. 2519 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute 2520 value MUST be incremented by one unit for every atomic change to 2521 the file attributes, data, or directory contents. In the case 2522 where the client is writing to pNFS data servers, the number of 2523 increments is not guaranteed to exactly match the number of 2524 writes. 2526 NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is 2527 implemented as suggested in [I-D.ietf-nfsv4-rfc3530bis] in terms 2528 of the time_metadata attribute. 2530 If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR, 2531 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or 2532 NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at 2533 the very least that the change attribute is monotonically increasing, 2534 which is sufficient to resolve the question of which value is the 2535 most recent. 2537 If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then 2538 by inspecting the value of the 'time_delta' attribute it additionally 2539 has the option of detecting rogue server implementations that use 2540 time_metadata in violation of the spec. 2542 If the client sees NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, it has the 2543 ability to predict what the resulting change attribute value should 2544 be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This 2545 again allows it to detect changes made in parallel by another client. 2546 The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the 2547 same, but only if the client is not doing pNFS WRITEs. 2549 Finally, if the server does not support change_attr_type or if 2550 NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an 2551 effort to implement the change attribute in terms of the 2552 time_metadata attribute. 2554 13.2.2. Attribute 79: sec_label 2556 typedef uint32_t policy4; 2558 struct labelformat_spec4 { 2559 policy4 lfs_lfs; 2560 policy4 lfs_pi; 2561 }; 2563 struct sec_label4 { 2564 labelformat_spec4 slai_lfs; 2565 opaque slai_data<>; 2566 }; 2568 The FATTR4_SEC_LABEL contains an array of two components with the 2569 first component being an LFS. It serves to provide the receiving end 2570 with the information necessary to translate the security attribute 2571 into a form that is usable by the endpoint. Label Formats assigned 2572 an LFS may optionally choose to include a Policy Identifier field to 2573 allow for complex policy deployments. The LFS and Label Format 2574 Registry are described in detail in [Quigley14]. The translation 2575 used to interpret the security attribute is not specified as part of 2576 the protocol as it may depend on various factors. The second 2577 component is an opaque section which contains the data of the 2578 attribute. This component is dependent on the MAC model to interpret 2579 and enforce. 2581 In particular, it is the responsibility of the LFS specification to 2582 define a maximum size for the opaque section, slai_data<>. When 2583 creating or modifying a label for an object, the client needs to be 2584 guaranteed that the server will accept a label that is sized 2585 correctly. By both client and server being part of a specific MAC 2586 model, the client will be aware of the size. 2588 If a server supports sec_label, then it MUST also support 2589 change_sec_label. Any modification to sec_label MUST modify the 2590 value for change_sec_label. 2592 13.2.3. Attribute 79: change_sec_label 2594 The change_sec_label attribute is a read-only attribute per file. If 2595 the value of sec_label for a file is not the same at two disparate 2596 times then the values of change_sec_label at those times MUST be 2597 different as well. The value of change_sec_label MAY change at other 2598 times as well, but this should be rare, as that will require the 2599 client to abort any operation in progress, re-read the label, and 2600 retry the operation. As the sec_label is not bounded by size, this 2601 attribute allows for VERIFY and NVERIFY to quickly determine if the 2602 sec_label has been modified. 2604 13.2.4. Attribute 77: space_freed 2606 space_freed gives the number of bytes freed if the file is deleted. 2607 This attribute is read only and is of type length4. It is a per file 2608 attribute. 2610 14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL 2612 The following tables summarize the operations of the NFSv4.2 protocol 2613 and the corresponding designation of REQUIRED, RECOMMENDED, and 2614 OPTIONAL to implement or either OBSOLESCENT or MUST NOT implement. 2615 The designation of OBSOLESCENT is reserved for those operations which 2616 are defined in either NFSv4.0 or NFSv4.1 and are intended to be 2617 classified as MUST NOT be implemented in NFSv4.3. The designation of 2618 MUST NOT implement is reserved for those operations that were defined 2619 in either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2. 2621 For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation 2622 for operations sent by the client is for the server implementation. 2623 The client is generally required to implement the operations needed 2624 for the operating environment for which it serves. For example, a 2625 read-only NFSv4.2 client would have no need to implement the WRITE 2626 operation and is not required to do so. 2628 The REQUIRED or OPTIONAL designation for callback operations sent by 2629 the server is for both the client and server. Generally, the client 2630 has the option of creating the backchannel and sending the operations 2631 on the fore channel that will be a catalyst for the server sending 2632 callback operations. A partial exception is CB_RECALL_SLOT; the only 2633 way the client can avoid supporting this operation is by not creating 2634 a backchannel. 2636 Since this is a summary of the operations and their designation, 2637 there are subtleties that are not presented here. Therefore, if 2638 there is a question of the requirements of implementation, the 2639 operation descriptions themselves must be consulted along with other 2640 relevant explanatory text within this either specification or that of 2641 NFSv4.1 [RFC5661]. 2643 The abbreviations used in the second and third columns of the table 2644 are defined as follows. 2646 REQ REQUIRED to implement 2648 REC RECOMMENDED to implement 2649 OPT OPTIONAL to implement 2651 MNI MUST NOT implement 2653 OBS Also OBSOLESCENT for future versions. 2655 For the NFSv4.2 features that are OPTIONAL, the operations that 2656 support those features are OPTIONAL, and the server would return 2657 NFS4ERR_NOTSUPP in response to the client's use of those operations. 2658 If an OPTIONAL feature is supported, it is possible that a set of 2659 operations related to the feature become REQUIRED to implement. The 2660 third column of the table designates the feature(s) and if the 2661 operation is REQUIRED or OPTIONAL in the presence of support for the 2662 feature. 2664 The OPTIONAL features identified and their abbreviations are as 2665 follows: 2667 pNFS Parallel NFS 2669 FDELG File Delegations 2671 DDELG Directory Delegations 2673 COPY Server Side Copy 2675 ADB Application Data Blocks 2677 Operations 2679 +----------------------+---------------------+----------------------+ 2680 | Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, | 2681 | | or MNI | or OPT) | 2682 +----------------------+---------------------+----------------------+ 2683 | ALLOCATE | OPT | | 2684 | ACCESS | REQ | | 2685 | BACKCHANNEL_CTL | REQ | | 2686 | BIND_CONN_TO_SESSION | REQ | | 2687 | CLOSE | REQ | | 2688 | COMMIT | REQ | | 2689 | COPY | OPT | COPY (REQ) | 2690 | COPY_NOTIFY | OPT | COPY (REQ) | 2691 | DEALLOCATE | OPT | | 2692 | CREATE | REQ | | 2693 | CREATE_SESSION | REQ | | 2694 | DELEGPURGE | OPT | FDELG (REQ) | 2695 | DELEGRETURN | OPT | FDELG, DDELG, pNFS | 2696 | | | (REQ) | 2697 | DESTROY_CLIENTID | REQ | | 2698 | DESTROY_SESSION | REQ | | 2699 | EXCHANGE_ID | REQ | | 2700 | FREE_STATEID | REQ | | 2701 | GETATTR | REQ | | 2702 | GETDEVICEINFO | OPT | pNFS (REQ) | 2703 | GETDEVICELIST | OPT | pNFS (OPT) | 2704 | GETFH | REQ | | 2705 | GET_DIR_DELEGATION | OPT | DDELG (REQ) | 2706 | LAYOUTCOMMIT | OPT | pNFS (REQ) | 2707 | LAYOUTGET | OPT | pNFS (REQ) | 2708 | LAYOUTRETURN | OPT | pNFS (REQ) | 2709 | LAYOUTERROR | OPT | pNFS (OPT) | 2710 | LAYOUTSTATS | OPT | pNFS (OPT) | 2711 | LINK | OPT | | 2712 | LOCK | REQ | | 2713 | LOCKT | REQ | | 2714 | LOCKU | REQ | | 2715 | LOOKUP | REQ | | 2716 | LOOKUPP | REQ | | 2717 | NVERIFY | REQ | | 2718 | OFFLOAD_CANCEL | OPT | COPY (REQ) | 2719 | OFFLOAD_STATUS | OPT | COPY (REQ) | 2720 | OPEN | REQ | | 2721 | OPENATTR | OPT | | 2722 | OPEN_CONFIRM | MNI | | 2723 | OPEN_DOWNGRADE | REQ | | 2724 | PUTFH | REQ | | 2725 | PUTPUBFH | REQ | | 2726 | PUTROOTFH | REQ | | 2727 | READ | REQ | | 2728 | READDIR | REQ | | 2729 | READLINK | OPT | | 2730 | READ_PLUS | OPT | | 2731 | RECLAIM_COMPLETE | REQ | | 2732 | RELEASE_LOCKOWNER | MNI | | 2733 | REMOVE | REQ | | 2734 | RENAME | REQ | | 2735 | RENEW | MNI | | 2736 | RESTOREFH | REQ | | 2737 | SAVEFH | REQ | | 2738 | SECINFO | REQ | | 2739 | SECINFO_NO_NAME | REC | pNFS file layout | 2740 | | | (REQ) | 2741 | SEQUENCE | REQ | | 2742 | SETATTR | REQ | | 2743 | SETCLIENTID | MNI | | 2744 | SETCLIENTID_CONFIRM | MNI | | 2745 | SET_SSV | REQ | | 2746 | TEST_STATEID | REQ | | 2747 | VERIFY | REQ | | 2748 | WANT_DELEGATION | OPT | FDELG (OPT) | 2749 | WRITE | REQ | | 2750 | WRITE_SAME | OPT | ADB (REQ) | 2751 +----------------------+---------------------+----------------------+ 2753 Callback Operations 2755 +-------------------------+-------------------+---------------------+ 2756 | Operation | REQ, REC, OPT, or | Feature (REQ, REC, | 2757 | | MNI | or OPT) | 2758 +-------------------------+-------------------+---------------------+ 2759 | CB_OFFLOAD | OPT | COPY (REQ) | 2760 | CB_GETATTR | OPT | FDELG (REQ) | 2761 | CB_LAYOUTRECALL | OPT | pNFS (REQ) | 2762 | CB_NOTIFY | OPT | DDELG (REQ) | 2763 | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | 2764 | CB_NOTIFY_LOCK | OPT | | 2765 | CB_PUSH_DELEG | OPT | FDELG (OPT) | 2766 | CB_RECALL | OPT | FDELG, DDELG, pNFS | 2767 | | | (REQ) | 2768 | CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS | 2769 | | | (REQ) | 2770 | CB_RECALL_SLOT | REQ | | 2771 | CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) | 2772 | CB_SEQUENCE | OPT | FDELG, DDELG, pNFS | 2773 | | | (REQ) | 2774 | CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS | 2775 | | | (REQ) | 2776 +-------------------------+-------------------+---------------------+ 2778 15. NFSv4.2 Operations 2780 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a File 2782 15.1.1. ARGUMENT 2784 struct ALLOCATE4args { 2785 /* CURRENT_FH: file */ 2786 stateid4 aa_stateid; 2787 offset4 aa_offset; 2788 length4 aa_length; 2789 }; 2791 15.1.2. RESULT 2793 struct ALLOCATE4res { 2794 nfsstat4 ar_status; 2795 }; 2797 15.1.3. DESCRIPTION 2799 Whenever a client wishes to reserve space for a region in a file it 2800 calls the ALLOCATE operation with the current filehandle set to the 2801 filehandle of the file in question, and the start offset and length 2802 in bytes of the region set in aa_offset and aa_length respectively. 2804 The server will ensure that backing blocks are reserved to the region 2805 specified by aa_offset and aa_length, and that no future writes into 2806 this region will return NFS4ERR_NOSPC. If the region lies partially 2807 or fully outside the current file size the file size will be set to 2808 aa_offset + aa_length implicitly. If the server cannot guarantee 2809 this, it must return NFS4ERR_NOSPC. 2811 The ALLOCATE operation can also be used to extend the size of a file 2812 if the region specified by aa_offset and aa_length extends beyond the 2813 current file size. In that case any data outside of the previous 2814 file size will return zeroes when read before data is written to it. 2816 It is not required that the server allocate the space to the file 2817 before returning success. The allocation can be deferred, however, 2818 it must be guaranteed that it will not fail for lack of space. The 2819 deferral does not result in an asynchronous reply. 2821 The ALLOCATE operation will result in the space_used attribute and 2822 space_freed attributes being increased by the number of bytes 2823 reserved unless they were previously reserved or written and not 2824 shared. 2826 15.2. Operation 60: COPY - Initiate a server-side copy 2828 15.2.1. ARGUMENT 2829 struct COPY4args { 2830 /* SAVED_FH: source file */ 2831 /* CURRENT_FH: destination file */ 2832 stateid4 ca_src_stateid; 2833 stateid4 ca_dst_stateid; 2834 offset4 ca_src_offset; 2835 offset4 ca_dst_offset; 2836 length4 ca_count; 2837 bool ca_consecutive; 2838 bool ca_synchronous; 2839 netloc4 ca_source_server<>; 2840 }; 2842 15.2.2. RESULT 2844 struct write_response4 { 2845 stateid4 wr_callback_id<1>; 2846 length4 wr_count; 2847 stable_how4 wr_committed; 2848 verifier4 wr_writeverf; 2849 }; 2851 struct COPY4res { 2852 nfsstat4 cr_status; 2853 write_response4 cr_response; 2854 bool cr_consecutive; 2855 bool cr_synchronous; 2856 }; 2858 15.2.3. DESCRIPTION 2860 The COPY operation is used for both intra-server and inter-server 2861 copies. In both cases, the COPY is always sent from the client to 2862 the destination server of the file copy. The COPY operation requests 2863 that a file be copied from the location specified by the SAVED_FH 2864 value to the location specified by the CURRENT_FH. 2866 The SAVED_FH must be a regular file. If SAVED_FH is not a regular 2867 file, the operation MUST fail and return NFS4ERR_WRONG_TYPE. 2869 In order to set SAVED_FH to the source file handle, the compound 2870 procedure requesting the COPY will include a sub-sequence of 2871 operations such as 2872 PUTFH source-fh 2873 SAVEFH 2875 If the request is for a server-to-server copy, the source-fh is a 2876 filehandle from the source server and the compound procedure is being 2877 executed on the destination server. In this case, the source-fh is a 2878 foreign filehandle on the server receiving the COPY request. If 2879 either PUTFH or SAVEFH checked the validity of the filehandle, the 2880 operation would likely fail and return NFS4ERR_STALE. 2882 If a server supports the server-to-server COPY feature, a PUTFH 2883 followed by a SAVEFH MUST NOT return NFS4ERR_STALE for either 2884 operation. These restrictions do not pose substantial difficulties 2885 for servers. The CURRENT_FH and SAVED_FH may be validated in the 2886 context of the operation referencing them and an NFS4ERR_STALE error 2887 returned for an invalid file handle at that point. 2889 For an intra-server copy, both the ca_src_stateid and ca_dst_stateid 2890 MUST refer to either open or locking states provided earlier by the 2891 server. If either stateid is invalid, then the operation MUST fail. 2892 If the request is for a inter-server copy, then the ca_src_stateid 2893 can be ignored. If ca_dst_stateid is invalid, then the operation 2894 MUST fail. 2896 The CURRENT_FH specifies the destination of the copy operation. The 2897 CURRENT_FH MUST be a regular file and not a directory. Note, the 2898 file MUST exist before the COPY operation begins. It is the 2899 responsibility of the client to create the file if necessary, 2900 regardless of the actual copy protocol used. If the file cannot be 2901 created in the destination file system (due to file name 2902 restrictions, such as case or length), the COPY operation MUST NOT be 2903 called. 2905 The ca_src_offset is the offset within the source file from which the 2906 data will be read, the ca_dst_offset is the offset within the 2907 destination file to which the data will be written, and the ca_count 2908 is the number of bytes that will be copied. An offset of 0 (zero) 2909 specifies the start of the file. A count of 0 (zero) requests that 2910 all bytes from ca_src_offset through EOF be copied to the 2911 destination. If concurrent modifications to the source file overlap 2912 with the source file region being copied, the data copied may include 2913 all, some, or none of the modifications. The client can use standard 2914 NFS operations (e.g., OPEN with OPEN4_SHARE_DENY_WRITE or mandatory 2915 byte range locks) to protect against concurrent modifications if the 2916 client is concerned about this. If the source file's end of file is 2917 being modified in parallel with a copy that specifies a count of 0 2918 (zero) bytes, the amount of data copied is implementation dependent 2919 (clients may guard against this case by specifying a non-zero count 2920 value or preventing modification of the source file as mentioned 2921 above). 2923 If the source offset or the source offset plus count is greater than 2924 or equal to the size of the source file, the operation will fail with 2925 NFS4ERR_INVAL. The destination offset or destination offset plus 2926 count may be greater than the size of the destination file. This 2927 allows for the client to issue parallel copies to implement 2928 operations such as 2930 % cat file1 file2 file3 file4 > dest 2932 If the ca_source_server list is specified, then this is an inter- 2933 server copy operation and the source file is on a remote server. The 2934 client is expected to have previously issued a successful COPY_NOTIFY 2935 request to the remote source server. The ca_source_server list MUST 2936 be the same as the COPY_NOTIFY response's cnr_source_server list. If 2937 the client includes the entries from the COPY_NOTIFY response's 2938 cnr_source_server list in the ca_source_server list, the source 2939 server can indicate a specific copy protocol for the destination 2940 server to use by returning a URL, which specifies both a protocol 2941 service and server name. Server-to-server copy protocol 2942 considerations are described in Section 4.7 and Section 4.10.1. 2944 If ca_consecutive is set, then the client has specified that the copy 2945 protocol selected MUST copy bytes in consecutive order from 2946 ca_src_offset to ca_count. If the destination server cannot meet 2947 this requirement, then it MUST return an error of 2948 NFS4ERR_OFFLOAD_NO_REQS and set cr_consecutive to be false. 2949 Likewise, if ca_synchronous is set, then the client has required that 2950 the copy protocol selected MUST perform a synchronous copy. If the 2951 destination server cannot meet this requirement, then it MUST return 2952 an error of NFS4ERR_OFFLOAD_NO_REQS and set cr_synchronous to be 2953 false. 2955 If both are set by the client, then the destination SHOULD try to 2956 determine if it can respond to both requirements at the same time. 2957 If it cannot make that determination, it must set to false the one it 2958 can and set to true the other. The client, upon getting an 2959 NFS4ERR_OFFLOAD_NO_REQS error, has to examine both cr_consecutive and 2960 cr_synchronous against the respective values of ca_consecutive and 2961 ca_synchronous to determine the possible requirement not met. It 2962 MUST be prepared for the destination server not being able to 2963 determine both requirements at the same time. 2965 Upon receiving the NFS4ERR_OFFLOAD_NO_REQS error, the client has to 2966 determine if it wants to either re-request the copy with a relaxed 2967 set of requirements or if it wants to revert to manually copying the 2968 data. If it decides to manually copy the data and this is a remote 2969 copy, then the client is responsible for informing the source that 2970 the earlier COPY_NOTIFY is no longer valid by sending it an 2971 OFFLOAD_CANCEL. 2973 The copying of any and all attributes on the source file is the 2974 responsibility of both the client and the copy protocol. Any 2975 attribute which is both exposed via the NFS protocol on the source 2976 file and set SHOULD be copied to the destination file. Any attribute 2977 supported by the destination server that is not set on the source 2978 file SHOULD be left unset. If the client cannot copy an attribute 2979 from the source to destination, it MAY fail the copy transaction. 2981 Metadata attributes not exposed via the NFS protocol SHOULD be copied 2982 to the destination file where appropriate via the copy protocol. 2983 Note that if the copy protocol is NFSv4.x, then these attributes will 2984 be lost. 2986 The destination file's named attributes are not duplicated from the 2987 source file. After the copy process completes, the client MAY 2988 attempt to duplicate named attributes using standard NFSv4 2989 operations. However, the destination file's named attribute 2990 capabilities MAY be different from the source file's named attribute 2991 capabilities. 2993 If the operation does not result in an immediate failure, the server 2994 will return NFS4_OK, and the CURRENT_FH will remain the destination's 2995 filehandle. 2997 If the wr_callback_id is returned, this indicates that the operation 2998 was initiated and a CB_OFFLOAD callback will deliver the final 2999 results of the operation. The wr_callback_id stateid is termed a 3000 copy stateid in this context. The server is given the option of 3001 returning the results in a callback because the data may require a 3002 relatively long period of time to copy. 3004 If no wr_callback_id is returned, the operation completed 3005 synchronously and no callback will be issued by the server. The 3006 completion status of the operation is indicated by cr_status. 3008 If the copy completes successfully, either synchronously or 3009 asynchronously, the data copied from the source file to the 3010 destination file MUST appear identical to the NFS client. However, 3011 the NFS server's on disk representation of the data in the source 3012 file and destination file MAY differ. For example, the NFS server 3013 might encrypt, compress, deduplicate, or otherwise represent the on 3014 disk data in the source and destination file differently. 3016 If a failure does occur for a synchronous copy, wr_count will be set 3017 to the number of bytes copied to the destination file before the 3018 error occurred. If cr_consecutive is true, then the bytes were 3019 copied in order. If the failure occured for an asynchronous copy, 3020 then the client will have gotten the notification of the consecutive 3021 copy order when it got the copy stateid. It will be able to 3022 determine the bytes copied from the coa_bytes_copied in the 3023 CB_OFFLOAD argument. 3025 In either case, if cr_consecutive was not true, there is no assurance 3026 as to exactly which bytes in the range were copied. The client MUST 3027 assume that there exists a mixture of the original contents of the 3028 range and the new bytes. If the COPY wrote past the end of the file 3029 on the destination, then the last byte written to will determine the 3030 new file size. The contents of any block not written to and past the 3031 original size of the file will be as if a normal WRITE extended the 3032 file. 3034 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a future 3035 copy 3037 15.3.1. ARGUMENT 3039 struct COPY_NOTIFY4args { 3040 /* CURRENT_FH: source file */ 3041 stateid4 cna_src_stateid; 3042 netloc4 cna_destination_server; 3043 }; 3045 15.3.2. RESULT 3047 struct COPY_NOTIFY4resok { 3048 nfstime4 cnr_lease_time; 3049 netloc4 cnr_source_server<>; 3050 }; 3052 union COPY_NOTIFY4res switch (nfsstat4 cnr_status) { 3053 case NFS4_OK: 3054 COPY_NOTIFY4resok resok4; 3055 default: 3056 void; 3057 }; 3059 15.3.3. DESCRIPTION 3061 This operation is used for an inter-server copy. A client sends this 3062 operation in a COMPOUND request to the source server to authorize a 3063 destination server identified by cna_destination_server to read the 3064 file specified by CURRENT_FH on behalf of the given user. 3066 The cna_src_stateid MUST refer to either open or locking states 3067 provided earlier by the server. If it is invalid, then the operation 3068 MUST fail. 3070 The cna_destination_server MUST be specified using the netloc4 3071 network location format. The server is not required to resolve the 3072 cna_destination_server address before completing this operation. 3074 If this operation succeeds, the source server will allow the 3075 cna_destination_server to copy the specified file on behalf of the 3076 given user as long as both of the following conditions are met: 3078 o The destination server begins reading the source file before the 3079 cnr_lease_time expires. If the cnr_lease_time expires while the 3080 destination server is still reading the source file, the 3081 destination server is allowed to finish reading the file. 3083 o The client has not issued a COPY_REVOKE for the same combination 3084 of user, filehandle, and destination server. 3086 The cnr_lease_time is chosen by the source server. A cnr_lease_time 3087 of 0 (zero) indicates an infinite lease. To avoid the need for 3088 synchronized clocks, copy lease times are granted by the server as a 3089 time delta. To renew the copy lease time the client should resend 3090 the same copy notification request to the source server. 3092 A successful response will also contain a list of netloc4 network 3093 location formats called cnr_source_server, on which the source is 3094 willing to accept connections from the destination. These might not 3095 be reachable from the client and might be located on networks to 3096 which the client has no connection. 3098 For a copy only involving one server (the source and destination are 3099 on the same server), this operation is unnecessary. 3101 15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID 3102 15.4.1. ARGUMENT 3104 /* new */ 3105 const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; 3107 15.4.2. RESULT 3109 Unchanged 3111 15.4.3. MOTIVATION 3113 Enterprise applications require guarantees that an operation has 3114 either aborted or completed. NFSv4.1 provides this guarantee as long 3115 as the session is alive: simply send a SEQUENCE operation on the same 3116 slot with a new sequence number, and the successful return of 3117 SEQUENCE indicates the previous operation has completed. However, if 3118 the session is lost, there is no way to know when any in progress 3119 operations have aborted or completed. In hindsight, the NFSv4.1 3120 specification should have mandated that DESTROY_SESSION either abort 3121 or complete all outstanding operations. 3123 15.4.4. DESCRIPTION 3125 A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability 3126 when it sends an EXCHANGE_ID operation. The server SHOULD set this 3127 capability in the EXCHANGE_ID reply whether the client requests it or 3128 not. It is the server's return that determines whether this 3129 capability is in effect. When it is in effect, the following will 3130 occur: 3132 o The server will not reply to any DESTROY_SESSION invoked with the 3133 client ID until all operations in progress are completed or 3134 aborted. 3136 o The server will not reply to subsequent EXCHANGE_ID invoked on the 3137 same client owner with a new verifier until all operations in 3138 progress on the client ID's session are completed or aborted. 3140 o The NFS server SHOULD support client ID trunking, and if it does 3141 and the EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a 3142 session ID created on one node of the storage cluster MUST be 3143 destroyable via DESTROY_SESSION. In addition, DESTROY_CLIENTID 3144 and an EXCHANGE_ID with a new verifier affects all sessions 3145 regardless what node the sessions were created on. 3147 15.5. Operation 62: DEALLOCATE - Unreserve Space in a Region of a File 3149 15.5.1. ARGUMENT 3151 struct DEALLOCATE4args { 3152 /* CURRENT_FH: file */ 3153 stateid4 da_stateid; 3154 offset4 da_offset; 3155 length4 da_length; 3156 }; 3158 15.5.2. RESULT 3160 struct DEALLOCATE4res { 3161 nfsstat4 dr_status; 3162 }; 3164 15.5.3. DESCRIPTION 3166 Whenever a client wishes to unreserve space for a region in a file it 3167 calls the DEALLOCATE operation with the current filehandle set to the 3168 filehandle of the file in question, and the start offset and length 3169 in bytes of the region set in aa_offset and aa_length respectively. 3170 If no space was allocated or reserved for all or parts of the region, 3171 the DEALLOCATE operation will have no effect for the region that 3172 already is in unreserved state. All further reads from the region 3173 passed to DEALLOCATE MUST return zeros until overwritten. The 3174 filehandle specified must be that of a regular file. 3176 Situations may arise where da_offset and/or da_offset + da_length 3177 will not be aligned to a boundary for which the server does 3178 allocations or deallocations. For most file systems, this is the 3179 block size of the file system. In such a case, the server can 3180 deallocate as many bytes as it can in the region. The blocks that 3181 cannot be deallocated MUST be zeroed. 3183 DEALLOCATE will result in the space_used attribute being decreased by 3184 the number of bytes that were deallocated. The space_freed attribute 3185 may or may not decrease, depending on the support and whether the 3186 blocks backing the specified range were shared or not. The size 3187 attribute will remain unchanged. 3189 15.6. Operation 63: IO_ADVISE - Application I/O access pattern hints 3191 15.6.1. ARGUMENT 3193 enum IO_ADVISE_type4 { 3194 IO_ADVISE4_NORMAL = 0, 3195 IO_ADVISE4_SEQUENTIAL = 1, 3196 IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, 3197 IO_ADVISE4_RANDOM = 3, 3198 IO_ADVISE4_WILLNEED = 4, 3199 IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, 3200 IO_ADVISE4_DONTNEED = 6, 3201 IO_ADVISE4_NOREUSE = 7, 3202 IO_ADVISE4_READ = 8, 3203 IO_ADVISE4_WRITE = 9, 3204 IO_ADVISE4_INIT_PROXIMITY = 10 3205 }; 3207 struct IO_ADVISE4args { 3208 /* CURRENT_FH: file */ 3209 stateid4 iaa_stateid; 3210 offset4 iaa_offset; 3211 length4 iaa_count; 3212 bitmap4 iaa_hints; 3213 }; 3215 15.6.2. RESULT 3217 struct IO_ADVISE4resok { 3218 bitmap4 ior_hints; 3219 }; 3221 union IO_ADVISE4res switch (nfsstat4 ior_status) { 3222 case NFS4_OK: 3223 IO_ADVISE4resok resok4; 3224 default: 3225 void; 3226 }; 3228 15.6.3. DESCRIPTION 3230 The IO_ADVISE operation sends an I/O access pattern hint to the 3231 server for the owner of the stateid for a given byte range specified 3232 by iar_offset and iar_count. The byte range specified by iaa_offset 3233 and iaa_count need not currently exist in the file, but the iaa_hints 3234 will apply to the byte range when it does exist. If iaa_count is 0, 3235 all data following iaa_offset is specified. The server MAY ignore 3236 the advice. 3238 The following are the allowed hints for a stateid holder: 3240 IO_ADVISE4_NORMAL There is no advice to give, this is the default 3241 behavior. 3243 IO_ADVISE4_SEQUENTIAL Expects to access the specified data 3244 sequentially from lower offsets to higher offsets. 3246 IO_ADVISE4_SEQUENTIAL_BACKWARDS Expects to access the specified data 3247 sequentially from higher offsets to lower offsets. 3249 IO_ADVISE4_RANDOM Expects to access the specified data in a random 3250 order. 3252 IO_ADVISE4_WILLNEED Expects to access the specified data in the near 3253 future. 3255 IO_ADVISE4_WILLNEED_OPPORTUNISTIC Expects to possibly access the 3256 data in the near future. This is a speculative hint, and 3257 therefore the server should prefetch data or indirect blocks only 3258 if it can be done at a marginal cost. 3260 IO_ADVISE_DONTNEED Expects that it will not access the specified 3261 data in the near future. 3263 IO_ADVISE_NOREUSE Expects to access the specified data once and then 3264 not reuse it thereafter. 3266 IO_ADVISE4_READ Expects to read the specified data in the near 3267 future. 3269 IO_ADVISE4_WRITE Expects to write the specified data in the near 3270 future. 3272 IO_ADVISE4_INIT_PROXIMITY Informs the server that the data in the 3273 byte range remains important to the client. 3275 Since IO_ADVISE is a hint, a server SHOULD NOT return an error and 3276 invalidate a entire Compound request if one of the sent hints in 3277 iar_hints is not supported by the server. Also, the server MUST NOT 3278 return an error if the client sends contradictory hints to the 3279 server, e.g., IO_ADVISE4_SEQUENTIAL and IO_ADVISE4_RANDOM in a single 3280 IO_ADVISE operation. In these cases, the server MUST return success 3281 and a ior_hints value that indicates the hint it intends to 3282 implement. This may mean simply returning IO_ADVISE4_NORMAL. 3284 The ior_hints returned by the server is primarily for debugging 3285 purposes since the server is under no obligation to carry out the 3286 hints that it describes in the ior_hints result. In addition, while 3287 the server may have intended to implement the hints returned in 3288 ior_hints, as time progresses, the server may need to change its 3289 handling of a given file due to several reasons including, but not 3290 limited to, memory pressure, additional IO_ADVISE hints sent by other 3291 clients, and heuristically detected file access patterns. 3293 The server MAY return different advice than what the client 3294 requested. If it does, then this might be due to one of several 3295 conditions, including, but not limited to another client advising of 3296 a different I/O access pattern; a different I/O access pattern from 3297 another client that that the server has heuristically detected; or 3298 the server is not able to support the requested I/O access pattern, 3299 perhaps due to a temporary resource limitation. 3301 Each issuance of the IO_ADVISE operation overrides all previous 3302 issuances of IO_ADVISE for a given byte range. This effectively 3303 follows a strategy of last hint wins for a given stateid and byte 3304 range. 3306 Clients should assume that hints included in an IO_ADVISE operation 3307 will be forgotten once the file is closed. 3309 15.6.4. IMPLEMENTATION 3311 The NFS client may choose to issue an IO_ADVISE operation to the 3312 server in several different instances. 3314 The most obvious is in direct response to an application's execution 3315 of posix_fadvise(). In this case, IO_ADVISE4_WRITE and 3316 IO_ADVISE4_READ may be set based upon the type of file access 3317 specified when the file was opened. 3319 15.6.5. IO_ADVISE4_INIT_PROXIMITY 3321 The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and can be 3322 used to convey that the client has recently accessed the byte range 3323 in its own cache. I.e., it has not accessed it on the server, but it 3324 has locally. When the server reaches resource exhaustion, knowing 3325 which data is more important allows the server to make better choices 3326 about which data to, for example purge from a cache, or move to 3327 secondary storage. It also informs the server which delegations are 3328 more important, since if delegations are working correctly, once 3329 delegated to a client and the client has read the content for that 3330 byte range, a server might never receive another read request for 3331 that byte range. 3333 The IO_ADVISE4_INIT_PROXIMITY hint can also be used in a pNFS setting 3334 to let the client inform the metadata server as to the I/O statistics 3335 between the client and the storage devices. The metadata server is 3336 then free to use this information about client I/O to optimize the 3337 data storage location. 3339 This hint is also useful in the case of NFS clients which are network 3340 booting from a server. If the first client to be booted sends this 3341 hint, then it keeps the cache warm for the remaining clients. 3343 15.6.6. pNFS File Layout Data Type Considerations 3345 The IO_ADVISE considerations for pNFS are very similar to the COMMIT 3346 considerations for pNFS. That is, as with COMMIT, some NFS server 3347 implementations prefer IO_ADVISE be done on the DS, and some prefer 3348 it be done on the MDS. 3350 For the file's layout type, it is proposed that NFSv4.2 include an 3351 additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on 3352 metadata servers running NFSv4.2 or higher. Any file's layout 3353 obtained from a NFSv4.1 metadata server MUST NOT have 3354 NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained with a 3355 NFSv4.2 metadata server MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS set. 3356 However, if the layout utilizes NFSv4.1 storage devices, the 3357 IO_ADVISE operation cannot be sent to them. 3359 If NFL42_UFLG_IO_ADVISE_THRU_MDS is set, the client MUST send the 3360 IO_ADVISE operation to the MDS in order for it to be honored by the 3361 DS. Once the MDS receives the IO_ADVISE operation, it will 3362 communicate the advice to each DS. 3364 If NFL42_UFLG_IO_ADVISE_THRU_MDS is not set, then the client SHOULD 3365 send an IO_ADVISE operation to the appropriate DS for the specified 3366 byte range. While the client MAY always send IO_ADVISE to the MDS, 3367 if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client 3368 should expect that such an IO_ADVISE is futile. Note that a client 3369 SHOULD use the same set of arguments on each IO_ADVISE sent to a DS 3370 for the same open file reference. 3372 The server is not required to support different advice for different 3373 DS's with the same open file reference. 3375 15.6.6.1. Dense and Sparse Packing Considerations 3377 The IO_ADVISE operation MUST use the iar_offset and byte range as 3378 dictated by the presence or absence of NFL4_UFLG_DENSE. 3380 E.g., if NFL4_UFLG_DENSE is present, and a READ or WRITE to the DS 3381 for iaa_offset 0 really means iaa_offset 10000 in the logical file, 3382 then an IO_ADVISE for iaa_offset 0 means iaa_offset 10000. 3384 E.g., if NFL4_UFLG_DENSE is absent, then a READ or WRITE to the DS 3385 for iaa_offset 0 really means iaa_offset 0 in the logical file, then 3386 an IO_ADVISE for iaa_offset 0 means iaa_offset 0 in the logical file. 3388 E.g., if NFL4_UFLG_DENSE is present, the stripe unit is 1000 bytes 3389 and the stripe count is 10, and the dense DS file is serving 3390 iar_offset 0. A READ or WRITE to the DS for iaa_offsets 0, 1000, 3391 2000, and 3000, really mean iaa_offsets 10000, 20000, 30000, and 3392 40000 (implying a stripe count of 10 and a stripe unit of 1000), then 3393 an IO_ADVISE sent to the same DS with an iaa_offset of 500, and an 3394 iaa_count of 3000 means that the IO_ADVISE applies to these byte 3395 ranges of the dense DS file: 3397 - 500 to 999 3398 - 1000 to 1999 3399 - 2000 to 2999 3400 - 3000 to 3499 3402 I.e., the contiguous range 500 to 3499 as specified in IO_ADVISE. 3404 It also applies to these byte ranges of the logical file: 3406 - 10500 to 10999 (500 bytes) 3407 - 20000 to 20999 (1000 bytes) 3408 - 30000 to 30999 (1000 bytes) 3409 - 40000 to 40499 (500 bytes) 3410 (total 3000 bytes) 3412 E.g., if NFL4_UFLG_DENSE is absent, the stripe unit is 250 bytes, the 3413 stripe count is 4, and the sparse DS file is serving iaa_offset 0. 3414 Then a READ or WRITE to the DS for iaa_offsets 0, 1000, 2000, and 3415 3000, really means iaa_offsets 0, 1000, 2000, and 3000 in the logical 3416 file, keeping in mind that on the DS file, byte ranges 250 to 999, 3417 1250 to 1999, 2250 to 2999, and 3250 to 3999 are not accessible. 3418 Then an IO_ADVISE sent to the same DS with an iaa_offset of 500, and 3419 a iaa_count of 3000 means that the IO_ADVISE applies to these byte 3420 ranges of the logical file and the sparse DS file: 3422 - 500 to 999 (500 bytes) - no effect 3423 - 1000 to 1249 (250 bytes) - effective 3424 - 1250 to 1999 (750 bytes) - no effect 3425 - 2000 to 2249 (250 bytes) - effective 3426 - 2250 to 2999 (750 bytes) - no effect 3427 - 3000 to 3249 (250 bytes) - effective 3428 - 3250 to 3499 (250 bytes) - no effect 3429 (subtotal 2250 bytes) - no effect 3430 (subtotal 750 bytes) - effective 3431 (grand total 3000 bytes) - no effect + effective 3433 If neither of the flags NFL42_UFLG_IO_ADVISE_THRU_MDS and 3434 NFL4_UFLG_DENSE are set in the layout, then any IO_ADVISE request 3435 sent to the data server with a byte range that overlaps stripe unit 3436 that the data server does not serve MUST NOT result in the status 3437 NFS4ERR_PNFS_IO_HOLE. Instead, the response SHOULD be successful and 3438 if the server applies IO_ADVISE hints on any stripe units that 3439 overlap with the specified range, those hints SHOULD be indicated in 3440 the response. 3442 15.7. Operation 64: LAYOUTERROR - Provide Errors for the Layout 3444 15.7.1. ARGUMENT 3446 struct layoutupdate4 { 3447 layouttype4 lou_type; 3448 opaque lou_body<>; 3449 }; 3451 struct device_error4 { 3452 deviceid4 de_deviceid; 3453 nfsstat4 de_status; 3454 nfs_opnum4 de_opnum; 3455 }; 3457 struct LAYOUTERROR4args { 3458 /* CURRENT_FH: file */ 3459 offset4 lea_offset; 3460 length4 lea_length; 3461 stateid4 lea_stateid; 3462 device_error4 lea_errors; 3463 }; 3465 15.7.2. RESULT 3467 struct LAYOUTERROR4res { 3468 nfsstat4 ler_status; 3469 }; 3471 15.7.3. DESCRIPTION 3473 The client can use LAYOUTERROR to inform the metadata server about 3474 errors in its interaction with the layout represented by the current 3475 filehandle, client ID (derived from the session ID in the preceding 3476 SEQUENCE operation), byte-range (lea_offset + lea_length), and 3477 lea_stateid. 3479 Each individual device_error4 describes a single error associated 3480 with a storage device, which is identified via de_deviceid. If the 3481 Layout Type supports NFSv4 operations, then the operation which 3482 returned the error is identified via de_opnum. If the Layout Type 3483 does not support NFSv4 operations, then it MAY chose to either map 3484 the operation onto one of the allowed operations which can be sent to 3485 a storage device with the File Layout Type (see Section 3.3) or it 3486 can signal no support for operations by marking de_opnum with the 3487 ILEGAL operation. Finally the NFS error value (nfsstat4) encountered 3488 is provided via de_status and may consist of the following error 3489 codes: 3491 NFS4ERR_NXIO: The client was unable to establish any communication 3492 with the storage device. 3494 NFS4ERR_*: The client was able to establish communication with the 3495 storage device and is returning one of the allowed error codes for 3496 the operation denoted by de_opnum. 3498 Note that while the metadata server may return an error associated 3499 with the layout stateid or the open file, it MUST NOT return an error 3500 in the processing of the errors. If LAYOUTERROR is in a compound 3501 before LAYOUTRETURN, it MUST NOT introduce an error other than what 3502 LAYOUTRETURN would already encounter. 3504 15.7.4. IMPLEMENTATION 3506 There are two broad classes of errors, transient and persistent. The 3507 client SHOULD strive to only use this new mechanism to report 3508 persistent errors. It MUST be able to deal with transient issues by 3509 itself. Also, while the client might consider an issue to be 3510 persistent, it MUST be prepared for the metadata server to consider 3511 such issues to be transient. A prime example of this is if the 3512 metadata server fences off a client from either a stateid or a 3513 filehandle. The client will get an error from the storage device and 3514 might relay either NFS4ERR_ACCESS or NFS4ERR_BAD_STATEID back to the 3515 metadata server, with the belief that this is a hard error. If the 3516 metadata server is informed by the client that there is an error, it 3517 can safely ignore that. For it, the mission is accomplished in that 3518 the client has returned a layout that the metadata server had most 3519 likely recalled. 3521 The client might also need to inform the metadata server that it 3522 cannot reach one or more of the storage devices. While the metadata 3523 server can detect the connectivity of both of these paths: 3525 o metadata server to storage device 3527 o metadata server to client 3529 it cannot determine if the client and storage device path is working. 3530 As with the case of the storage device passing errors to the client, 3531 it must be prepared for the metadata server to consider such outages 3532 as being transitory. 3534 Clients are expected to tolerate transient storage device errors, and 3535 hence clients SHOULD NOT use the LAYOUTERROR error handling for 3536 device access problems that may be transient. The methods by which a 3537 client decides whether a device access problem is transient vs 3538 persistent are implementation-specific, but may include retrying I/Os 3539 to a data server under appropriate conditions. 3541 When an I/O fails to a storage device, the client SHOULD retry the 3542 failed I/O via the metadata server. In this situation, before 3543 retrying the I/O, the client SHOULD return the layout, or the 3544 affected portion thereof, and SHOULD indicate which storage device or 3545 devices was problematic. The client needs to do this when the 3546 storage device is being unresponsive in order to fence off any failed 3547 write attempts, and ensure that they do not end up overwriting any 3548 later data being written through the metadata server. If the client 3549 does not do this, the metadata server MAY issue a layout recall 3550 callback in order to perform the retried I/O. 3552 The client needs to be cognizant that since this error handling is 3553 optional in the metadata server, the metadata server may silently 3554 ignore this functionality. Also, as the metadata server may consider 3555 some issues the client reports to be expected, the client might find 3556 it difficult to detect a metadata server which has not implemented 3557 error handling via LAYOUTERROR. 3559 If an metadata server is aware that a storage device is proving 3560 problematic to a client, the metadata server SHOULD NOT include that 3561 storage device in any pNFS layouts sent to that client. If the 3562 metadata server is aware that a storage device is affecting many 3563 clients, then the metadata server SHOULD NOT include that storage 3564 device in any pNFS layouts sent out. If a client asks for a new 3565 layout for the file from the metadata server, it MUST be prepared for 3566 the metadata server to return that storage device in the layout. The 3567 metadata server might not have any choice in using the storage 3568 device, i.e., there might only be one possible layout for the system. 3569 Also, in the case of existing files, the metadata server might have 3570 no choice in which storage devices to hand out to clients. 3572 The metadata server is not required to indefinitely retain per-client 3573 storage device error information. An metadata server is also not 3574 required to automatically reinstate use of a previously problematic 3575 storage device; administrative intervention may be required instead. 3577 15.8. Operation 65: LAYOUTSTATS - Provide Statistics for the Layout 3579 15.8.1. ARGUMENT 3581 struct layoutupdate4 { 3582 layouttype4 lou_type; 3583 opaque lou_body<>; 3584 }; 3586 struct io_info4 { 3587 uint32_t ii_count; 3588 uint64_t ii_bytes; 3589 }; 3591 struct LAYOUTSTATS4args { 3592 /* CURRENT_FH: file */ 3593 offset4 lsa_offset; 3594 length4 lsa_length; 3595 stateid4 lsa_stateid; 3596 io_info4 lsa_read; 3597 io_info4 lsa_write; 3598 layoutupdate4 lsa_layoutupdate; 3599 }; 3601 15.8.2. RESULT 3602 struct LAYOUTSTATS4res { 3603 nfsstat4 lsr_status; 3604 }; 3606 15.8.3. DESCRIPTION 3608 The client can use LAYOUTSTATS to inform the metadata server about 3609 its interaction with the layout represented by the current 3610 filehandle, client ID (derived from the session ID in the preceding 3611 SEQUENCE operation), byte-range (lea_offset + lea_length), and 3612 lea_stateid. lsa_read and lsa_write allow for non-Layout Type 3613 specific statistices to be reported. The remaining information the 3614 client is presenting is specific to the Layout Type and presented in 3615 the lea_layoutupdate field. Each Layout Type MUST define the 3616 contents of lea_layoutupdate in their respective specifications. 3618 LAYOUTSTATS can be combined with IO_ADVISE (see Section 15.6) to 3619 augment the decision making process of how the metadata server 3620 handles a file. I.e., IO_ADVISE lets the server know that a byte 3621 range has a certain characteristic, but not necessarily the intensity 3622 of that characteristic. 3624 Note that while the metadata server may return an error associated 3625 with the layout stateid or the open file, it MUST NOT return an error 3626 in the processing of the statistics. 3628 15.9. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded Operation 3630 15.9.1. ARGUMENT 3632 struct OFFLOAD_CANCEL4args { 3633 /* CURRENT_FH: source file */ 3634 stateid4 oca_stateid; 3635 }; 3637 15.9.2. RESULT 3639 struct OFFLOAD_CANCEL4res { 3640 nfsstat4 ocr_status; 3641 }; 3643 15.9.3. DESCRIPTION 3645 OFFLOAD_CANCEL is used by the client to terminate an asynchronous 3646 operation, which is identifed both by CURRENT_FH and the oca_stateid. 3647 I.e., there can be multiple offloaded operations acting on the file, 3648 the stateid will identify to the server exactly which one is to be 3649 stopped. 3651 In the context of server-to-server copy, the client can send 3652 OFFLOAD_CANCEL to either the source or destination server, albeit 3653 with a different stateid. The client uses OFFLOAD_CANCEL to inform 3654 the destination to stop the active transfer and uses the stateid it 3655 got back from the COPY operation. The client uses OFFLOAD_CANCEL and 3656 the stateid it used in the COPY_NOTIFY to inform the source to not 3657 allow any more copying from the destination. 3659 OFFLOAD_CANCEL is also useful in situations in which the source 3660 server granted a very long or infinite lease on the destination 3661 server's ability to read the source file and all copy operations on 3662 the source file have been completed. 3664 15.10. Operation 67: OFFLOAD_STATUS - Poll for Status of Asynchronous 3665 Operation 3667 15.10.1. ARGUMENT 3669 struct OFFLOAD_STATUS4args { 3670 /* CURRENT_FH: destination file */ 3671 stateid4 osa_stateid; 3672 }; 3674 15.10.2. RESULT 3676 struct OFFLOAD_STATUS4resok { 3677 length4 osr_count; 3678 nfsstat4 osr_complete<1>; 3679 }; 3681 union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) { 3682 case NFS4_OK: 3683 OFFLOAD_STATUS4resok osr_resok4; 3684 default: 3685 void; 3686 }; 3688 15.10.3. DESCRIPTION 3690 OFFLOAD_STATUS can be used by the client to query the progress of an 3691 asynchronous operation, which is identifed both by CURRENT_FH and the 3692 osa_stateid. If this operation is successful, the number of bytes 3693 processed are returned to the client in the osr_count field. 3695 If the optional osr_complete field is present, the asynchronous 3696 operation has completed. In this case the status value indicates the 3697 result of the asynchronous operation. In all cases, the server will 3698 also deliver the final results of the asynchronous operation in a 3699 CB_OFFLOAD operation. 3701 The failure of this operation does not indicate the result of the 3702 asynchronous operation in any way. 3704 15.11. Operation 68: READ_PLUS - READ Data or Holes from a File 3706 15.11.1. ARGUMENT 3708 struct READ_PLUS4args { 3709 /* CURRENT_FH: file */ 3710 stateid4 rpa_stateid; 3711 offset4 rpa_offset; 3712 count4 rpa_count; 3713 }; 3715 15.11.2. RESULT 3717 struct data_info4 { 3718 offset4 di_offset; 3719 length4 di_length; 3720 }; 3722 struct data4 { 3723 offset4 d_offset; 3724 opaque d_data<>; 3725 }; 3727 union read_plus_content switch (data_content4 rpc_content) { 3728 case NFS4_CONTENT_DATA: 3729 data4 rpc_data; 3730 case NFS4_CONTENT_HOLE: 3731 data_info4 rpc_hole; 3732 default: 3733 void; 3734 }; 3735 /* 3736 * Allow a return of an array of contents. 3737 */ 3738 struct read_plus_res4 { 3739 bool rpr_eof; 3740 read_plus_content rpr_contents<>; 3741 }; 3743 union READ_PLUS4res switch (nfsstat4 rp_status) { 3744 case NFS4_OK: 3745 read_plus_res4 rp_resok4; 3746 default: 3747 void; 3748 }; 3750 15.11.3. DESCRIPTION 3752 The READ_PLUS operation is based upon the NFSv4.1 READ operation (see 3753 Section 18.22 of [RFC5661]) and similarly reads data from the regular 3754 file identified by the current filehandle. 3756 The client provides a rpa_offset of where the READ_PLUS is to start 3757 and a rpa_count of how many bytes are to be read. A rpa_offset of 3758 zero means to read data starting at the beginning of the file. If 3759 rpa_offset is greater than or equal to the size of the file, the 3760 status NFS4_OK is returned with di_length (the data length) set to 3761 zero and eof set to TRUE. 3763 The READ_PLUS result is comprised of an array of rpr_contents, each 3764 of which describe a data_content4 type of data. For NFSv4.2, the 3765 allowed values are data and hole. A server MUST support both the 3766 data type and the hole if it uses READ_PLUS. If it does not want to 3767 support a hole, it MUST use READ. The hole SHOULD be returned in its 3768 entirety - clients must be prepared to get more information than they 3769 requested. Both the start and the end of the hole may exceed what 3770 was requested. The array contents MUST be contiguous in the file. 3772 If the data to be returned is comprised entirely of zeros, then the 3773 server SHOULD return that data as a hole. The di_reserved field is 3774 used to tell the client if a hole is unreserved, that is writes to it 3775 MAY return NFS4ERR_NOSPC, or it is reserved in which cases writes 3776 into the hole MUST NOT return ENOSPC. If the server does not know 3777 the reservations status it may set the di_reserved field to 3778 SPACE_UNKNOWN4. 3780 The server may elect to return adjacent elements of the same type. 3781 For example, if the server has a range of data comprised entirely of 3782 zeros and then a hole, it might want to return two adjacent holes to 3783 the client. 3785 If the client specifies a rpa_count value of zero, the READ_PLUS 3786 succeeds and returns zero bytes of data. In all situations, the 3787 server may choose to return fewer bytes than specified by the client. 3788 The client needs to check for this condition and handle the condition 3789 appropriately. 3791 If the client specifies an rpa_offset and rpa_count value that is 3792 entirely contained within a hole of the file, then the di_offset and 3793 di_length returned MAY be for the entire hole. If the the owner has 3794 a locked byte range covering rpa_offset and rpa_count entirely the 3795 di_offset and di_length MUST NOT be extended outside the locked byte 3796 range. This result is considered valid until the file is changed 3797 (detected via the change attribute). The server MUST provide the 3798 same semantics for the hole as if the client read the region and 3799 received zeroes; the implied holes contents lifetime MUST be exactly 3800 the same as any other read data. 3802 If the client specifies an rpa_offset and rpa_count value that begins 3803 in a non-hole of the file but extends into hole the server should 3804 return an array comprised of both data and a hole. The client MUST 3805 be prepared for the server to return a short read describing just the 3806 data. The client will then issue another READ_PLUS for the remaining 3807 bytes, which the server will respond with information about the hole 3808 in the file. 3810 Except when special stateids are used, the stateid value for a 3811 READ_PLUS request represents a value returned from a previous byte- 3812 range lock or share reservation request or the stateid associated 3813 with a delegation. The stateid identifies the associated owners if 3814 any and is used by the server to verify that the associated locks are 3815 still valid (e.g., have not been revoked). 3817 If the read ended at the end-of-file (formally, in a correctly formed 3818 READ_PLUS operation, if rpa_offset + rpa_count is equal to the size 3819 of the file), or the READ_PLUS operation extends beyond the size of 3820 the file (if rpa_offset + rpa_count is greater than the size of the 3821 file), eof is returned as TRUE; otherwise, it is FALSE. A successful 3822 READ_PLUS of an empty file will always return eof as TRUE. 3824 If the current filehandle is not an ordinary file, an error will be 3825 returned to the client. In the case that the current filehandle 3826 represents an object of type NF4DIR, NFS4ERR_ISDIR is returned. If 3827 the current filehandle designates a symbolic link, NFS4ERR_SYMLINK is 3828 returned. In all other cases, NFS4ERR_WRONG_TYPE is returned. 3830 For a READ_PLUS with a stateid value of all bits equal to zero, the 3831 server MAY allow the READ_PLUS to be serviced subject to mandatory 3832 byte-range locks or the current share deny modes for the file. For a 3833 READ_PLUS with a stateid value of all bits equal to one, the server 3834 MAY allow READ_PLUS operations to bypass locking checks at the 3835 server. 3837 On success, the current filehandle retains its value. 3839 15.11.3.1. Note on Client Support of Arms of the Union 3841 It was decided not to add a means for the client to inform the server 3842 as to which arms of READ_PLUS it would support. In a later minor 3843 version, it may become necessary for the introduction of a new 3844 operation which would allow the client to inform the server as to 3845 whether it supported the new arms of the union of data types 3846 available in READ_PLUS. 3848 15.11.4. IMPLEMENTATION 3850 In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of 3851 [RFC5661] also apply to READ_PLUS. 3853 15.11.4.1. Additional pNFS Implementation Information 3855 With pNFS, the semantics of using READ_PLUS remains the same. Any 3856 data server MAY return a hole result for a READ_PLUS request that it 3857 receives. When a data server chooses to return such a result, it has 3858 the option of returning information for the data stored on that data 3859 server (as defined by the data layout), but it MUST NOT return 3860 results for a byte range that includes data managed by another data 3861 server. 3863 If mandatory locking is enforced, then the data server must also 3864 ensure that to return only information that is within the owner's 3865 locked byte range. 3867 15.11.5. READ_PLUS with Sparse Files Example 3869 The following table describes a sparse file. For each byte range, 3870 the file contains either non-zero data or a hole. In addition, the 3871 server in this example will only create a hole if it is greater than 3872 32K. 3874 +-------------+----------+ 3875 | Byte-Range | Contents | 3876 +-------------+----------+ 3877 | 0-15999 | Hole | 3878 | 16K-31999 | Non-Zero | 3879 | 32K-255999 | Hole | 3880 | 256K-287999 | Non-Zero | 3881 | 288K-353999 | Hole | 3882 | 354K-417999 | Non-Zero | 3883 +-------------+----------+ 3885 Table 5 3887 Under the given circumstances, if a client was to read from the file 3888 with a max read size of 64K, the following will be the results for 3889 the given READ_PLUS calls. This assumes the client has already 3890 opened the file, acquired a valid stateid ('s' in the example), and 3891 just needs to issue READ_PLUS requests. 3893 1. READ_PLUS(s, 0, 64K) --> NFS_OK, eof = false, . Since the first hole is less than the server's 3895 minimum hole size, the first 32K of the file is returned as data 3896 and the remaining 32K is returned as a hole which actually 3897 extends to 256K. 3899 2. READ_PLUS(s, 32K, 64K) --> NFS_OK, eof = false, 3900 The requested range was all zeros, and the current hole begins at 3901 offset 32K and is 224K in length. Note that the client should 3902 not have followed up the previous READ_PLUS request with this one 3903 as the hole information from the previous call extended past what 3904 the client was requesting. 3906 3. READ_PLUS(s, 256K, 64K) --> NFS_OK, eof = false, . Returns an array of the 32K data and 3908 the hole which extends to 354K. 3910 4. READ_PLUS(s, 354K, 64K) --> NFS_OK, eof = true, . Returns the final 64K of data and informs the client 3912 there is no more data in the file. 3914 15.12. Operation 69: SEEK - Find the Next Data or Hole 3916 15.12.1. ARGUMENT 3917 struct SEEK4args { 3918 /* CURRENT_FH: file */ 3919 stateid4 sa_stateid; 3920 offset4 sa_offset; 3921 data_content4 sa_what; 3922 }; 3924 15.12.2. RESULT 3926 struct seek_res4 { 3927 bool sr_eof; 3928 offset4 sr_offset; 3929 }; 3931 union SEEK4res switch (nfsstat4 sa_status) { 3932 case NFS4_OK: 3933 seek_res4 resok4; 3934 default: 3935 void; 3936 }; 3938 15.12.3. DESCRIPTION 3940 SEEK is an operation that allows a client to determine the location 3941 of the next data_content4 in a file. It allows an implementation of 3942 the emerging extension to lseek(2) to allow clients to determine the 3943 next hole whilst in data or the next data whilst in a hole. 3945 From the given sa_offset, find the next data_content4 of type sa_what 3946 in the file. If the server can not find a corresponding sa_what, 3947 then the status will still be NFS4_OK, but sr_eof would be TRUE. If 3948 the server can find the sa_what, then the sr_offset is the start of 3949 that content. 3951 SEEK must follow the same rules for stateids as READ_PLUS 3952 (Section 15.11.3). 3954 15.13. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times to a File 3956 15.13.1. ARGUMENT 3958 enum stable_how4 { 3959 UNSTABLE4 = 0, 3960 DATA_SYNC4 = 1, 3961 FILE_SYNC4 = 2 3962 }; 3963 struct app_data_block4 { 3964 offset4 adb_offset; 3965 length4 adb_block_size; 3966 length4 adb_block_count; 3967 length4 adb_reloff_blocknum; 3968 count4 adb_block_num; 3969 length4 adb_reloff_pattern; 3970 opaque adb_pattern<>; 3971 }; 3973 struct WRITE_SAME4args { 3974 /* CURRENT_FH: file */ 3975 stateid4 wsa_stateid; 3976 stable_how4 wsa_stable; 3977 app_data_block4 wsa_adb; 3978 }; 3980 15.13.2. RESULT 3982 struct write_response4 { 3983 stateid4 wr_callback_id<1>; 3984 length4 wr_count; 3985 stable_how4 wr_committed; 3986 verifier4 wr_writeverf; 3987 }; 3989 union WRITE_SAME4res switch (nfsstat4 wsr_status) { 3990 case NFS4_OK: 3991 write_response4 resok4; 3992 default: 3993 void; 3994 }; 3996 15.13.3. DESCRIPTION 3998 The WRITE_SAME operation writes an application data block to the 3999 regular file identified by the current filehandle (see WRITE SAME 4000 (10) in [T10-SBC2]). The target file is specified by the current 4001 filehandle. The data to be written is specified by an 4002 app_data_block4 structure (Section 8.1.1). The client specifies with 4003 the wsa_stable parameter the method of how the data is to be 4004 processed by the server. It is treated like the stable parameter in 4005 the NFSv4.1 WRITE operation (see Section 18.2 of [RFC5661]). 4007 A successful WRITE_SAME will construct a reply for wr_count, 4008 wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation 4009 results. If wr_callback_id is set, it indicates an asynchronous 4010 reply (see Section 15.13.3.1). 4012 WRITE_SAME has to support all of the errors which are returned by 4013 WRITE plus NFS4ERR_NOTSUPP, i.e., it is an OPTIONAL operation. If 4014 the client supports WRITE_SAME, it MUST support CB_OFFLOAD. 4016 If the server supports ADBs, then it MUST support the WRITE_SAME 4017 operation. The server has no concept of the structure imposed by the 4018 application. It is only when the application writes to a section of 4019 the file does order get imposed. In order to detect corruption even 4020 before the application utilizes the file, the application will want 4021 to initialize a range of ADBs using WRITE_SAME. 4023 When the client invokes the WRITE_SAME operation, it wants to record 4024 the block structure described by the app_data_block4 on to the file. 4026 When the server receives the WRITE_SAME operation, it MUST populate 4027 adb_block_count ADBs in the file starting at adb_offset. The block 4028 size will be given by adb_block_size. The ADBN (if provided) will 4029 start at adb_reloff_blocknum and each block will be monotonically 4030 numbered starting from adb_block_num in the first block. The pattern 4031 (if provided) will be at adb_reloff_pattern of each block and will be 4032 provided in adb_pattern. 4034 The server SHOULD return an asynchronous result if it can determine 4035 the operation will be long running (see Section 15.13.3.1). Once 4036 either the WRITE_SAME finishes synchronously or the server uses 4037 CB_OFFLOAD to inform the client of the asynchronous completion of the 4038 WRITE_SAME, the server MUST return the ADBs to clients as data. 4040 15.13.3.1. Asynchronous Transactions 4042 ADB initialization may lead to server determining to service the 4043 operation asynchronously. If it decides to do so, it sets the 4044 stateid in wr_callback_id to be that of the wsa_stateid. If it does 4045 not set the wr_callback_id, then the result is synchronous. 4047 When the client determines that the reply will be given 4048 asynchronously, it should not assume anything about the contents of 4049 what it wrote until it is informed by the server that the operation 4050 is complete. It can use OFFLOAD_STATUS (Section 15.10) to monitor 4051 the operation and OFFLOAD_CANCEL (Section 15.9) to cancel the 4052 operation. An example of a asynchronous WRITE_SAME is shown in 4053 Figure 6. Note that as with the COPY operation, WRITE_SAME must 4054 provide a stateid for tracking the asynchronous operation. 4056 Client Server 4057 + + 4058 | | 4059 |--- OPEN ---------------------------->| Client opens 4060 |<------------------------------------/| the file 4061 | | 4062 |--- WRITE_SAME ----------------------->| Client initializes 4063 |<------------------------------------/| an ADB 4064 | | 4065 | | 4066 |--- OFFLOAD_STATUS ------------------>| Client may poll 4067 |<------------------------------------/| for status 4068 | | 4069 | . | Multiple OFFLOAD_STATUS 4070 | . | operations may be sent. 4071 | . | 4072 | | 4073 |<-- CB_OFFLOAD -----------------------| Server reports results 4074 |\------------------------------------>| 4075 | | 4076 |--- CLOSE --------------------------->| Client closes 4077 |<------------------------------------/| the file 4078 | | 4079 | | 4081 Figure 6: An asynchronous WRITE_SAME. 4083 When CB_OFFLOAD informs the client of the successful WRITE_SAME, the 4084 write_response4 embedded in the operation will provide the necessary 4085 information that a synchronous WRITE_SAME would have provided. 4087 Regardless of whether the operation is asynchronous or synchronous, 4088 it MUST still support the COMMIT operation semantics as outlined in 4089 Section 18.3 of [RFC5661]. I.e., COMMIT works on one or more WRITE 4090 operations and the WRITE_SAME operation can appear as several WRITE 4091 operations to the server. The client can use locking operations to 4092 control the behavior on the server with respect to long running 4093 asynchronous write operations. 4095 15.13.3.2. Error Handling of a Partially Complete WRITE_SAME 4097 WRITE_SAME will clone adb_block_count copies of the given ADB in 4098 consecutive order in the file starting at adb_offset. An error can 4099 occur after writing the Nth ADB to the file. WRITE_SAME MUST appear 4100 to populate the range of the file as if the client used WRITE to 4101 transfer the instantiated ADBs. I.e., the contents of the range will 4102 be easy for the client to determine in case of a partially complete 4103 WRITE_SAME. 4105 16. NFSv4.2 Callback Operations 4107 16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous 4108 operation 4110 16.1.1. ARGUMENT 4112 struct write_response4 { 4113 stateid4 wr_callback_id<1>; 4114 length4 wr_count; 4115 stable_how4 wr_committed; 4116 verifier4 wr_writeverf; 4117 }; 4119 union offload_info4 switch (nfsstat4 coa_status) { 4120 case NFS4_OK: 4121 write_response4 coa_resok4; 4122 default: 4123 length4 coa_bytes_copied; 4124 }; 4126 struct CB_OFFLOAD4args { 4127 nfs_fh4 coa_fh; 4128 stateid4 coa_stateid; 4129 offload_info4 coa_offload_info; 4130 }; 4132 16.1.2. RESULT 4134 struct CB_OFFLOAD4res { 4135 nfsstat4 cor_status; 4136 }; 4138 16.1.3. DESCRIPTION 4140 CB_OFFLOAD is used to report to the client the results of an 4141 asynchronous operation, e.g., Server Side Copy or WRITE_SAME. The 4142 coa_fh and coa_stateid identify the transaction and the coa_status 4143 indicates success or failure. The coa_resok4.wr_callback_id MUST NOT 4144 be set. If the transaction failed, then the coa_bytes_copied 4145 contains the number of bytes copied before the failure occurred. The 4146 coa_bytes_copied value indicates the number of bytes copied but not 4147 which specific bytes have been copied. 4149 If the client supports any of the following operations: 4151 COPY: for both intra-server and inter-server asynchronous copies 4152 WRITE_SAME: for ADB initialization 4154 then the client is REQUIRED to support the CB_OFFLOAD operation. 4156 There is a potential race between the reply to the original 4157 transaction on the forechannel and the CB_OFFLOAD callback on the 4158 backchannel. Sections 2.10.6.3 and 20.9.3 of [RFC5661] describe how 4159 to handle this type of issue. 4161 Upon success, the coa_resok4.wr_count presents for each operation: 4163 COPY: the total number of bytes copied 4165 WRITE_SAME: the same information that a synchronous WRITE_SAME would 4166 provide 4168 17. IANA Considerations 4170 The IANA Considerations for Labeled NFS are addressed in [Quigley14]. 4172 18. References 4174 18.1. Normative References 4176 [NFSv42xdr] 4177 Haynes, T., "Network File System (NFS) Version 4 Minor 4178 Version 2 External Data Representation Standard (XDR) 4179 Description", April 2014. 4181 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 4182 Resource Identifier (URI): Generic Syntax", STD 66, RFC 4183 3986, January 2005. 4185 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 4186 System (NFS) Version 4 Minor Version 1 Protocol", RFC 4187 5661, January 2010. 4189 [RFC5664] Halevy, B., Welch, B., and J. Zelenka, "Object-Based 4190 Parallel NFS (pNFS) Operations", RFC 5664, January 2010. 4192 [posix_fadvise] 4193 The Open Group, "Section 'posix_fadvise()' of System 4194 Interfaces of The Open Group Base Specifications Issue 6, 4195 IEEE Std 1003.1, 2004 Edition", 2004. 4197 [posix_fallocate] 4198 The Open Group, "Section 'posix_fallocate()' of System 4199 Interfaces of The Open Group Base Specifications Issue 6, 4200 IEEE Std 1003.1, 2004 Edition", 2004. 4202 [rpcsec_gssv3] 4203 Adamson, W. and N. Williams, "Remote Procedure Call (RPC) 4204 Security Version 3", October 2013. 4206 18.2. Informative References 4208 [Ashdown08] 4209 Ashdown, L., "Chapter 15, Validating Database Files and 4210 Backups, of Oracle Database Backup and Recovery User's 4211 Guide 11g Release 1 (11.1)", August 2008. 4213 [Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci- 4214 Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data 4215 Corruption in the Storage Stack", Proceedings of the 6th 4216 USENIX Symposium on File and Storage Technologies (FAST 4217 '08) , 2008. 4219 [I-D.ietf-nfsv4-rfc3530bis] 4220 Haynes, T. and D. Noveck, "Network File System (NFS) 4221 version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-25 (Work 4222 In Progress), February 2013. 4224 [IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream", 4225 2008. 4227 [MLS] "Section 46.6. Multi-Level Security (MLS) of Deployment 4228 Guide: Deployment, configuration and administration of Red 4229 Hat Enterprise Linux 5, Edition 6", 2011. 4231 [McDougall07] 4232 McDougall, R. and J. Mauro, "Section 11.4.3, Detecting 4233 Memory Corruption of Solaris Internals", 2007. 4235 [Quigley14] 4236 Quigley, D., Lu, J., and T. Haynes, "Registry 4237 Specification for Mandatory Access Control (MAC) Security 4238 Label Formats", draft-ietf-nfsv4-lfs-registry-00 (work in 4239 progress), 2014. 4241 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 4242 Requirement Levels", March 1997. 4244 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 4245 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 4246 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 4248 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 4249 RFC 4506, May 2006. 4251 [RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS 4252 (pNFS) Block/Volume Layout", RFC 5663, January 2010. 4254 [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 4255 April 2014. 4257 [RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 4258 9, RFC 959, October 1985. 4260 [Strohm11] 4261 Strohm, R., "Chapter 2, Data Blocks, Extents, and 4262 Segments, of Oracle Database Concepts 11g Release 1 4263 (11.1)", January 2011. 4265 [T10-SBC2] 4266 Elliott, R., Ed., "ANSI INCITS 405-2005, Information 4267 Technology - SCSI Block Commands - 2 (SBC-2)", November 4268 2004. 4270 Appendix A. Acknowledgments 4272 Tom Haynes would like to thank NetApp, Inc. for its funding of his 4273 time on this project. 4275 For the pNFS Access Permissions Check, the original draft was by 4276 Sorin Faibish, David Black, Mike Eisler, and Jason Glasgow. The work 4277 was influenced by discussions with Benny Halevy and Bruce Fields. A 4278 review was done by Tom Haynes. 4280 For the Sharing change attribute implementation details with NFSv4 4281 clients, the original draft was by Trond Myklebust. 4283 For the NFS Server Side Copy, the original draft was by James 4284 Lentini, Mike Eisler, Deepak Kenchammana, Anshul Madan, and Rahul 4285 Iyer. Tom Talpey co-authored an unpublished version of that 4286 document. It was also was reviewed by a number of individuals: 4287 Pranoop Erasani, Tom Haynes, Arthur Lent, Trond Myklebust, Dave 4288 Noveck, Theresa Lingutla-Raj, Manjunath Shankararao, Satyam Vaghani, 4289 and Nico Williams. Anna Schumaker's early prototyping experience 4290 helped us avoid some traps. 4292 For the NFS space reservation operations, the original draft was by 4293 Mike Eisler, James Lentini, Manjunath Shankararao, and Rahul Iyer. 4295 For the sparse file support, the original draft was by Dean 4296 Hildebrand and Marc Eshel. Valuable input and advice was received 4297 from Sorin Faibish, Bruce Fields, Benny Halevy, Trond Myklebust, and 4298 Richard Scheffenegger. 4300 For the Application IO Hints, the original draft was by Dean 4301 Hildebrand, Mike Eisler, Trond Myklebust, and Sam Falkner. Some 4302 early reviewers included Benny Halevy and Pranoop Erasani. 4304 For Labeled NFS, the original draft was by David Quigley, James 4305 Morris, Jarret Lu, and Tom Haynes. Peter Staubach, Trond Myklebust, 4306 Stephen Smalley, Sorin Faibish, Nico Williams, and David Black also 4307 contributed in the final push to get this accepted. 4309 Christoph Hellwig was very helpful in getting the WRITE_SAME 4310 semantics to model more of what T10 was doing for WRITE SAME (10) 4311 [T10-SBC2]. And he led the push to get space reservations to more 4312 closely model the posix_fallocate. 4314 During the review process, Talia Reyes-Ortiz helped the sessions run 4315 smoothly. While many people contributed here and there, the core 4316 reviewers were Andy Adamson, Pranoop Erasani, Bruce Fields, Chuck 4317 Lever, Trond Myklebust, David Noveck, Peter Staubach, and Mike 4318 Kupfer. 4320 Appendix B. RFC Editor Notes 4322 [RFC Editor: please remove this section prior to publishing this 4323 document as an RFC] 4325 [RFC Editor: prior to publishing this document as an RFC, please 4326 replace all occurrences of NFSv42xdr with RFCxxxx where xxxx is the 4327 RFC number of the companion XDR document] 4329 Author's Address 4331 Thomas Haynes 4332 Primary Data, Inc. 4333 4300 El Camino Real Ste 100 4334 Los Altos, CA 94022 4335 USA 4337 Phone: +1 408 215 1519 4338 Email: thomas.haynes@primarydata.com