idnits 2.17.1 draft-ietf-nfsv4-minorversion2-39.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 (September 01, 2015) is 3158 days in the past. Is this intentional? 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 3899 == Missing Reference: '32K' is mentioned on line 3899, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'NFSv42xdr' ** Obsolete normative reference: RFC 5661 (Obsoleted by RFC 8881) == Outdated reference: A later version (-06) exists of draft-ietf-nfsv4-lfs-registry-01 -- Obsolete informational reference (is this intentional?): RFC 2401 (Obsoleted by RFC 4301) -- 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 (~~), 3 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 September 01, 2015 5 Expires: March 4, 2016 7 NFS Version 4 Minor Version 2 8 draft-ietf-nfsv4-minorversion2-39.txt 10 Abstract 12 This Internet-Draft describes NFS version 4 minor version two, 13 describing the protocol extensions made from NFS version 4 minor 14 version 1. Major extensions introduced in NFS version 4 minor 15 version two include: Server Side Copy, Application I/O Advise, Space 16 Reservations, Sparse Files, Application Data Blocks, and Labeled NFS. 18 Requirements Language 20 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 21 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 22 document are to be interpreted as described in RFC 2119 [RFC2119]. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on March 4, 2016. 41 Copyright Notice 43 Copyright (c) 2015 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 59 1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 4 60 1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5 61 1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5 62 1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 5 63 1.4.1. Server Side Copy . . . . . . . . . . . . . . . . . . 5 64 1.4.2. Application I/O Advise . . . . . . . . . . . . . . . 6 65 1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . 6 66 1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6 67 1.4.5. Application Data Block (ADB) Support . . . . . . . . 6 68 1.4.6. Labeled NFS . . . . . . . . . . . . . . . . . . . . . 6 69 1.5. Enhancements to Minor Versioning Model . . . . . . . . . 7 70 2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7 71 3. pNFS considerations for New Operations . . . . . . . . . . . 8 72 3.1. Atomicity for ALLOCATE and DEALLOCATE . . . . . . . . . . 8 73 3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 8 74 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout 75 Type . . . . . . . . . . . . . . . . . . . . . . . . . . 8 76 3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 8 77 4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 9 78 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 9 79 4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 9 80 4.2.1. Copy Operations . . . . . . . . . . . . . . . . . . . 10 81 4.2.2. Requirements for Operations . . . . . . . . . . . . . 10 82 4.3. Requirements for Inter-Server Copy . . . . . . . . . . . 11 83 4.4. Implementation Considerations . . . . . . . . . . . . . . 11 84 4.4.1. Locking the Files . . . . . . . . . . . . . . . . . . 11 85 4.4.2. Client Caches . . . . . . . . . . . . . . . . . . . . 12 86 4.5. Intra-Server Copy . . . . . . . . . . . . . . . . . . . . 12 87 4.6. Inter-Server Copy . . . . . . . . . . . . . . . . . . . . 13 88 4.7. Server-to-Server Copy Protocol . . . . . . . . . . . . . 17 89 4.7.1. Considerations on Selecting a Copy Protocol . . . . . 17 90 4.7.2. Using NFSv4.x as the Copy Protocol . . . . . . . . . 17 91 4.7.3. Using an Alternative Copy Protocol . . . . . . . . . 17 92 4.8. netloc4 - Network Locations . . . . . . . . . . . . . . . 18 93 4.9. Copy Offload Stateids . . . . . . . . . . . . . . . . . . 19 94 4.10. Security Considerations . . . . . . . . . . . . . . . . . 19 95 4.10.1. Inter-Server Copy Security . . . . . . . . . . . . . 20 96 5. Support for Application IO Hints . . . . . . . . . . . . . . 27 97 6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 27 98 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 27 99 6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 28 100 6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 28 101 6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 28 102 6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 29 103 7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 29 104 8. Application Data Block Support . . . . . . . . . . . . . . . 31 105 8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 32 106 8.1.1. Data Block Representation . . . . . . . . . . . . . . 32 107 8.2. An Example of Detecting Corruption . . . . . . . . . . . 33 108 8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 34 109 8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 35 110 9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 35 111 9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 35 112 9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 36 113 9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 37 114 9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 38 115 9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 38 116 9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 38 117 9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 38 118 9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 39 119 9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 39 120 9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 39 121 9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 40 122 9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 40 123 9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 41 124 9.7. Security Considerations for Labeled NFS . . . . . . . . . 42 125 10. Sharing change attribute implementation characteristics with 126 NFSv4 clients . . . . . . . . . . . . . . . . . . . . . . . . 42 127 11. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 43 128 11.1. Error Definitions . . . . . . . . . . . . . . . . . . . 43 129 11.1.1. General Errors . . . . . . . . . . . . . . . . . . . 43 130 11.1.2. Server to Server Copy Errors . . . . . . . . . . . . 43 131 11.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 44 132 11.2. New Operations and Their Valid Errors . . . . . . . . . 44 133 11.3. New Callback Operations and Their Valid Errors . . . . . 48 134 12. New File Attributes . . . . . . . . . . . . . . . . . . . . . 49 135 12.1. New RECOMMENDED Attributes - List and Definition 136 References . . . . . . . . . . . . . . . . . . . . . . . 49 137 12.2. Attribute Definitions . . . . . . . . . . . . . . . . . 50 138 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 52 139 14. Modifications to NFSv4.1 Operations . . . . . . . . . . . . . 56 140 14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID . . . 56 141 14.2. Operation 48: GETDEVICELIST - Get All Device Mappings 142 for a File System . . . . . . . . . . . . . . . . . . . 57 143 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 59 144 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a 145 File . . . . . . . . . . . . . . . . . . . . . . . . . . 59 146 15.2. Operation 60: COPY - Initiate a server-side copy . . . . 60 147 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a 148 future copy . . . . . . . . . . . . . . . . . . . . . . 64 149 15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region 150 of a File . . . . . . . . . . . . . . . . . . . . . . . 66 151 15.5. Operation 63: IO_ADVISE - Application I/O access pattern 152 hints . . . . . . . . . . . . . . . . . . . . . . . . . 68 153 15.6. Operation 64: LAYOUTERROR - Provide Errors for the 154 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 73 155 15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the 156 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 76 157 15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded 158 Operation . . . . . . . . . . . . . . . . . . . . . . . 78 159 15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of 160 Asynchronous Operation . . . . . . . . . . . . . . . . . 79 161 15.10. Operation 68: READ_PLUS - READ Data or Holes from a File 80 162 15.11. Operation 69: SEEK - Find the Next Data or Hole . . . . 85 163 15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times 164 to a File . . . . . . . . . . . . . . . . . . . . . . . 86 165 15.13. Operation 71: CLONE - Clone a range of file into another 166 file . . . . . . . . . . . . . . . . . . . . . . . . . . 90 167 16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 92 168 16.1. Operation 15: CB_OFFLOAD - Report results of an 169 asynchronous operation . . . . . . . . . . . . . . . . . 92 170 17. Security Considerations . . . . . . . . . . . . . . . . . . . 93 171 18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 94 172 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 94 173 19.1. Normative References . . . . . . . . . . . . . . . . . . 94 174 19.2. Informative References . . . . . . . . . . . . . . . . . 94 175 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 96 176 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 97 177 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 97 179 1. Introduction 181 1.1. The NFS Version 4 Minor Version 2 Protocol 183 The NFS version 4 minor version 2 (NFSv4.2) protocol is the third 184 minor version of the NFS version 4 (NFSv4) protocol. The first minor 185 version, NFSv4.0, is described in [RFC7530] and the second minor 186 version, NFSv4.1, is described in [RFC5661]. 188 As a minor version, NFSv4.2 is consistent with the overall goals for 189 NFSv4, but extends the protocol so as to better meet those goals, 190 based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted 191 some additional goals, which motivate some of the major extensions in 192 NFSv4.2. 194 1.2. Scope of This Document 196 This document describes the NFSv4.2 protocol. With respect to 197 NFSv4.0 and NFSv4.1, this document does not: 199 o describe the NFSv4.0 or NFSv4.1 protocols, except where needed to 200 contrast with NFSv4.2 202 o modify the specification of the NFSv4.0 or NFSv4.1 protocols 204 o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any 205 clarifications made here apply to NFSv4.2 and neither of the prior 206 protocols 208 The full External Data Representation (XDR) [RFC4506] for NFSv4.2 is 209 presented in [NFSv42xdr]. 211 1.3. NFSv4.2 Goals 213 A major goal of the design of NFSv4.2 is to take common local file 214 system features and offer them remotely. These features might 216 o already be available on the servers, e.g., sparse files 218 o be under development as a new standard, e.g., SEEK pulls in both 219 SEEK_HOLE and SEEK_DATA 221 o be used by clients with the servers via some proprietary means, 222 e.g., Labeled NFS 224 NFSv4.2 provides means for clients to leverage these features on the 225 server in cases in which that had previously not been possible within 226 the confines of the NFS protocol. 228 1.4. Overview of NFSv4.2 Features 230 1.4.1. Server Side Copy 232 A traditional file copy of a remotely accessed, whether from one 233 server to another or between location in the same server, results in 234 the data being put on the network twice - source to client and then 235 client to destination. New operations are introduced to allow 236 unnecessary traffic to be eliminated: 238 The intra-server copy feature allows the client to request the 239 server to perform the copy internally, avoiding unnecessary 240 network traffic. 242 The inter-server copy feature allows the client to authorize the 243 source and destination servers to interact directly. 245 As such copies can be lengthy, asynchronous support is also provided. 247 1.4.2. Application I/O Advise 249 Applications and clients want to advise the server as to expected I/O 250 behavior. Using IO_ADVISE (see Section 15.5) to communicate future I 251 /O behavior such as whether a file will be accessed sequentially or 252 randomly, and whether a file will or will not be accessed in the near 253 future, allows servers to optimize future I/O requests for a file by, 254 for example, prefetching or evicting data. This operation can be 255 used to support the posix_fadvise function. In addition, it may be 256 helpful to applications such as databases and video editors. 258 1.4.3. Sparse Files 260 Sparse files are ones which have unallocated or uninitialized data 261 blocks as holes in the file. Such holes are typically transferred as 262 0s during I/O. READ_PLUS (see Section 15.10) allows a server to send 263 back to the client metadata describing the hole and DEALLOCATE (see 264 Section 15.4) allows the client to punch holes into a file. In 265 addition, SEEK (see Section 15.11) is provided to scan for the next 266 hole or data from a given location. 268 1.4.4. Space Reservation 270 When a file is sparse, one concern applications have is ensuring that 271 there will always be enough data blocks available for the file during 272 future writes. ALLOCATE (see Section 15.1) allows a client to 273 request a guarantee that space will be available. Also DEALLOCATE 274 (see Section 15.4) allows the client to punch a hole into a file, 275 thus releasing a space reservation. 277 1.4.5. Application Data Block (ADB) Support 279 Some applications treat a file as if it were a disk and as such want 280 to initialize (or format) the file image. We introduce WRITE_SAME 281 (see Section 15.12) to send this metadata to the server to allow it 282 to write the block contents. 284 1.4.6. Labeled NFS 286 While both clients and servers can employ Mandatory Access Control 287 (MAC) security models to enforce data access, there has been no 288 protocol support for interoperability. A new file object attribute, 289 sec_label (see Section 12.2.4) allows for the server to store MAC 290 labels on files, which the client retrieves and uses to enforce data 291 access (see Section 9.6.2). The format of the sec_label accommodates 292 any MAC security system. 294 1.5. Enhancements to Minor Versioning Model 296 In NFSv4.1, the only way to introduce new variants of an operation 297 was to introduce a new operation. I.e., READ becomes either READ2 or 298 READ_PLUS. With the use of discriminated unions as parameters to 299 such functions in NFSv4.2, it is possible to add a new arm in a 300 subsequent minor version. And it is also possible to move such an 301 operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an 302 implementation to adopt each arm of a discriminated union at such a 303 time does not meet the spirit of the minor versioning rules. As 304 such, new arms of a discriminated union MUST follow the same 305 guidelines for minor versioning as operations in NFSv4.1 - i.e., they 306 may not be made REQUIRED. To support this, a new error code, 307 NFS4ERR_UNION_NOTSUPP, allows the server to communicate to the client 308 that the operation is supported, but the specific arm of the 309 discriminated union is not. 311 2. Minor Versioning 313 NFSv4.2 is a minor version of NFSv4 and is built upon NFSv4.1 as 314 documented in [RFC5661] and [RFC5662]. 316 NFSv4.2 does not modify the rules applicable to the NFSv4 versioning 317 process and follows the rules set out in [RFC5661] or in standard- 318 track documents updating that document (e.g., in an RFC based on 319 [NFSv4-Versioning]). 321 NFSv4.2 only defines extensions to NFSv4.1, each of which may be 322 supported (or not) independently. It does not 324 o introduce infrastructural features 326 o make existing features MANDATORY to NOT implement 328 o change the status of existing features (i.e., by changing their 329 status among OPTIONAL, RECOMMENDED, REQUIRED). 331 The following versioning-related considerations should be noted. 333 o When a new case is added to an existing switch, servers need to 334 report non-support of that new case by returning 335 NFS4ERR_UNION_NOTSUPP. 337 o As regards the potential cross-minor-version transfer of stateids, 338 pNFS implementations of the file mapping type may support of use 339 of an NFSv4.2 metadata sever with NFSv4.1 data servers. In this 340 context, a stateid returned by an NFSv4.2 COMPOUND will be used in 341 an NFSv4.1 COMPOUND directed to the data server (see Sections 3.2 342 and 3.3). 344 3. pNFS considerations for New Operations 346 3.1. Atomicity for ALLOCATE and DEALLOCATE 348 Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.4) 349 are sent to the metadata server, which is responsible for 350 coordinating the changes onto the storage devices. In particular, 351 both operations must either fully succeed or fail, it cannot be the 352 case that one storage device succeeds whilst another fails. 354 3.2. Sharing of stateids with NFSv4.1 356 A NFSv4.2 metadata server can hand out a layout to a NFSv4.1 storage 357 device. Section 13.9.1 of [RFC5661] discusses how the client gets a 358 stateid from the metadata server to present to a storage device. 360 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout Type 362 A file layout provided by a NFSv4.2 server may refer either to a 363 storage device that only implements NFSv4.1 as specified in 364 [RFC5661], or to a storage device that implements additions from 365 NFSv4.2, in which case the rules in Section 3.3.1 apply. As the File 366 Layout Type does not provide a means for informing the client as to 367 which minor version a particular storage device is providing, it will 368 have to negotiate this via the normal RPC semantics of major and 369 minor version discovery. 371 3.3.1. Operations Sent to NFSv4.2 Data Servers 373 In addition to the commands listed in [RFC5661], NFSv4.2 data servers 374 MAY accept a COMPOUND containing the following additional operations: 375 IO_ADVISE (see Section 15.5), READ_PLUS (see Section 15.10), 376 WRITE_SAME (see Section 15.12), and SEEK (see Section 15.11), which 377 will be treated like the subset specified as "Operations Sent to 378 NFSv4.1 Data Servers" in Section 13.6 of [RFC5661]. 380 Additional details on the implementation of these operations in a 381 pNFS context are documented in the operation specific sections. 383 4. Server Side Copy 385 4.1. Introduction 387 The server-side copy feature provides a mechanism for the NFS client 388 to perform a file copy on a server or between two servers without the 389 data being transmitted back and forth over the network through the 390 NFS client. Without this feature, an NFS client copies data from one 391 location to another by reading the data from the source server over 392 the network, and then writing the data back over the network to the 393 destination server. 395 If the source object and destination object are on different file 396 servers, the file servers will communicate with one another to 397 perform the copy operation. The server-to-server protocol by which 398 this is accomplished is not defined in this document. 400 4.2. Protocol Overview 402 The server-side copy offload operations support both intra-server and 403 inter-server file copies. An intra-server copy is a copy in which 404 the source file and destination file reside on the same server. In 405 an inter-server copy, the source file and destination file are on 406 different servers. In both cases, the copy may be performed 407 synchronously or asynchronously. 409 Throughout the rest of this document, we refer to the NFS server 410 containing the source file as the "source server" and the NFS server 411 to which the file is transferred as the "destination server". In the 412 case of an intra-server copy, the source server and destination 413 server are the same server. Therefore in the context of an intra- 414 server copy, the terms source server and destination server refer to 415 the single server performing the copy. 417 The new operations are designed to copy files. Other file system 418 objects can be copied by building on these operations or using other 419 techniques. For example, if the user wishes to copy a directory, the 420 client can synthesize a directory copy by first creating the 421 destination directory and then copying the source directory's files 422 to the new destination directory. 424 For the inter-server copy, the operations are defined to be 425 compatible with the traditional copy authentication approach. The 426 client and user are authorized at the source for reading. Then they 427 are authorized at the destination for writing. 429 4.2.1. Copy Operations 431 COPY_NOTIFY: Used by the client to notify the source server of a 432 future file copy from a given destination server for the given 433 user. (Section 15.3) 435 COPY: Used by the client to request a file copy. (Section 15.2) 437 OFFLOAD_CANCEL: Used by the client to terminate an asynchronous file 438 copy. (Section 15.8) 440 OFFLOAD_STATUS: Used by the client to poll the status of an 441 asynchronous file copy. (Section 15.9) 443 CB_OFFLOAD: Used by the destination server to report the results of 444 an asynchronous file copy to the client. (Section 16.1) 446 4.2.2. Requirements for Operations 448 The implementation of server-side copy is OPTIONAL by the client and 449 the server. However, in order to successfully copy a file, some 450 operations MUST be supported by the client and/or server. 452 If a client desires an intra-server file copy, then it MUST support 453 the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then 454 the client MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations. 456 If a client desires an inter-server file copy, then it MUST support 457 the COPY, COPY_NOTIFY, and CB_OFFLOAD operations, and MAY use the 458 OFFLOAD_CANCEL operation. If COPY returns a stateid, then the client 459 MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations. 461 If a server supports intra-server copy, then the server MUST support 462 the COPY operation. If a server's COPY operation returns a stateid, 463 then the server MUST also support these operations: CB_OFFLOAD, 464 OFFLOAD_CANCEL, and OFFLOAD_STATUS. 466 If a source server supports inter-server copy, then the source server 467 MUST support all these operations: COPY_NOTIFY and OFFLOAD_CANCEL. 468 If a destination server supports inter-server copy, then the 469 destination server MUST support the COPY operation. If a destination 470 server's COPY operation returns a stateid, then the destination 471 server MUST also support these operations: CB_OFFLOAD, 472 OFFLOAD_CANCEL, COPY_NOTIFY, and OFFLOAD_STATUS. 474 Each operation is performed in the context of the user identified by 475 the ONC RPC credential of its containing COMPOUND or CB_COMPOUND 476 request. For example, an OFFLOAD_CANCEL operation issued by a given 477 user indicates that a specified COPY operation initiated by the same 478 user be canceled. Therefore an OFFLOAD_CANCEL MUST NOT interfere 479 with a copy of the same file initiated by another user. 481 An NFS server MAY allow an administrative user to monitor or cancel 482 copy operations using an implementation specific interface. 484 4.3. Requirements for Inter-Server Copy 486 Inter-server copy is driven by several requirements: 488 o The specification MUST NOT mandate the server-to-server protocol. 490 o The specification MUST provide guidance for using NFSv4.x as a 491 copy protocol. For those source and destination servers willing 492 to use NFSv4.x, there are specific security considerations that 493 this specification MUST address. 495 o The specification MUST NOT mandate preconfiguration between the 496 source and destination server. Requiring that the source and 497 destination first have a "copying relationship" increases the 498 administrative burden. However the specification MUST NOT 499 preclude implementations that require preconfiguration. 501 o The specification MUST NOT mandate a trust relationship between 502 the source and destination server. The NFSv4 security model 503 requires mutual authentication between a principal on an NFS 504 client and a principal on an NFS server. This model MUST continue 505 with the introduction of COPY. 507 4.4. Implementation Considerations 509 4.4.1. Locking the Files 511 Both the source and destination file may need to be locked to protect 512 the content during the copy operations. A client can achieve this by 513 a combination of OPEN and LOCK operations. I.e., either share or 514 byte range locks might be desired. 516 Note that when the client establishes a lock stateid on the source, 517 the context of that stateid is for the client and not the 518 destination. As such, there might already be an outstanding stateid, 519 issued to the destination as client of the source, with the same 520 value as that provided for the lock stateid. The source MUST equate 521 the lock stateid as that of the client, i.e., when the destination 522 presents it in the context of a inter-server copy, it is on behalf of 523 the client. 525 4.4.2. Client Caches 527 In a traditional copy, if the client is in the process of writing to 528 the file before the copy (and perhaps with a write delegation), it 529 will be straightforward to update the destination server. With an 530 inter-server copy, the source has no insight into the changes cached 531 on the client. The client SHOULD write back the data to the source. 532 If it does not do so, it is possible that the destination will 533 receive a corrupt copy of file. 535 4.5. Intra-Server Copy 537 To copy a file on a single server, the client uses a COPY operation. 538 The server may respond to the copy operation with the final results 539 of the copy or it may perform the copy asynchronously and deliver the 540 results using a CB_OFFLOAD operation callback. If the copy is 541 performed asynchronously, the client may poll the status of the copy 542 using OFFLOAD_STATUS or cancel the copy using OFFLOAD_CANCEL. 544 A synchronous intra-server copy is shown in Figure 1. In this 545 example, the NFS server chooses to perform the copy synchronously. 546 The copy operation is completed, either successfully or 547 unsuccessfully, before the server replies to the client's request. 548 The server's reply contains the final result of the operation. 550 Client Server 551 + + 552 | | 553 |--- OPEN ---------------------------->| Client opens 554 |<------------------------------------/| the source file 555 | | 556 |--- OPEN ---------------------------->| Client opens 557 |<------------------------------------/| the destination file 558 | | 559 |--- COPY ---------------------------->| Client requests 560 |<------------------------------------/| a file copy 561 | | 562 |--- CLOSE --------------------------->| Client closes 563 |<------------------------------------/| the destination file 564 | | 565 |--- CLOSE --------------------------->| Client closes 566 |<------------------------------------/| the source file 567 | | 568 | | 570 Figure 1: A synchronous intra-server copy. 572 An asynchronous intra-server copy is shown in Figure 2. In this 573 example, the NFS server performs the copy asynchronously. The 574 server's reply to the copy request indicates that the copy operation 575 was initiated and the final result will be delivered at a later time. 576 The server's reply also contains a copy stateid. The client may use 577 this copy stateid to poll for status information (as shown) or to 578 cancel the copy using an OFFLOAD_CANCEL. When the server completes 579 the copy, the server performs a callback to the client and reports 580 the results. 582 Client Server 583 + + 584 | | 585 |--- OPEN ---------------------------->| Client opens 586 |<------------------------------------/| the source file 587 | | 588 |--- OPEN ---------------------------->| Client opens 589 |<------------------------------------/| the destination file 590 | | 591 |--- COPY ---------------------------->| Client requests 592 |<------------------------------------/| a file copy 593 | | 594 | | 595 |--- OFFLOAD_STATUS ------------------>| Client may poll 596 |<------------------------------------/| for status 597 | | 598 | . | Multiple OFFLOAD_STATUS 599 | . | operations may be sent. 600 | . | 601 | | 602 |<-- CB_OFFLOAD -----------------------| Server reports results 603 |\------------------------------------>| 604 | | 605 |--- CLOSE --------------------------->| Client closes 606 |<------------------------------------/| the destination file 607 | | 608 |--- CLOSE --------------------------->| Client closes 609 |<------------------------------------/| the source file 610 | | 611 | | 613 Figure 2: An asynchronous intra-server copy. 615 4.6. Inter-Server Copy 617 A copy may also be performed between two servers. The copy protocol 618 is designed to accommodate a variety of network topologies. As shown 619 in Figure 3, the client and servers may be connected by multiple 620 networks. In particular, the servers may be connected by a 621 specialized, high speed network (network 192.0.2.0/24 in the diagram) 622 that does not include the client. The protocol allows the client to 623 setup the copy between the servers (over network 203.0.113.0/24 in 624 the diagram) and for the servers to communicate on the high speed 625 network if they choose to do so. 627 192.0.2.0/24 628 +-------------------------------------+ 629 | | 630 | | 631 | 192.0.2.18 | 192.0.2.56 632 +-------+------+ +------+------+ 633 | Source | | Destination | 634 +-------+------+ +------+------+ 635 | 203.0.113.18 | 203.0.113.56 636 | | 637 | | 638 | 203.0.113.0/24 | 639 +------------------+------------------+ 640 | 641 | 642 | 203.0.113.243 643 +-----+-----+ 644 | Client | 645 +-----------+ 647 Figure 3: An example inter-server network topology. 649 For an inter-server copy, the client notifies the source server that 650 a file will be copied by the destination server using a COPY_NOTIFY 651 operation. The client then initiates the copy by sending the COPY 652 operation to the destination server. The destination server may 653 perform the copy synchronously or asynchronously. 655 A synchronous inter-server copy is shown in Figure 4. In this case, 656 the destination server chooses to perform the copy before responding 657 to the client's COPY request. 659 An asynchronous copy is shown in Figure 5. In this case, the 660 destination server chooses to respond to the client's COPY request 661 immediately and then perform the copy asynchronously. 663 Client Source Destination 664 + + + 665 | | | 666 |--- OPEN --->| | Returns os1 667 |<------------------/| | 668 | | | 669 |--- COPY_NOTIFY --->| | 670 |<------------------/| | 671 | | | 672 |--- OPEN ---------------------------->| Returns os2 673 |<------------------------------------/| 674 | | | 675 |--- COPY ---------------------------->| 676 | | | 677 | | | 678 | |<----- read -----| 679 | |\--------------->| 680 | | | 681 | | . | Multiple reads may 682 | | . | be necessary 683 | | . | 684 | | | 685 | | | 686 |<------------------------------------/| Destination replies 687 | | | to COPY 688 | | | 689 |--- CLOSE --------------------------->| Release open state 690 |<------------------------------------/| 691 | | | 692 |--- CLOSE --->| | Release open state 693 |<------------------/| | 695 Figure 4: A synchronous inter-server copy. 697 Client Source Destination 698 + + + 699 | | | 700 |--- OPEN --->| | Returns os1 701 |<------------------/| | 702 | | | 703 |--- LOCK --->| | Optional, could be done 704 |<------------------/| | with a share lock 705 | | | 706 |--- COPY_NOTIFY --->| | Need to pass in 707 |<------------------/| | os1 or lock state 708 | | | 709 | | | 710 | | | 711 |--- OPEN ---------------------------->| Returns os2 712 |<------------------------------------/| 713 | | | 714 |--- LOCK ---------------------------->| Optional ... 715 |<------------------------------------/| 716 | | | 717 |--- COPY ---------------------------->| Need to pass in 718 |<------------------------------------/| os2 or lock state 719 | | | 720 | | | 721 | |<----- read -----| 722 | |\--------------->| 723 | | | 724 | | . | Multiple reads may 725 | | . | be necessary 726 | | . | 727 | | | 728 | | | 729 |--- OFFLOAD_STATUS ------------------>| Client may poll 730 |<------------------------------------/| for status 731 | | | 732 | | . | Multiple OFFLOAD_STATUS 733 | | . | operations may be sent 734 | | . | 735 | | | 736 | | | 737 | | | 738 |<-- CB_OFFLOAD -----------------------| Destination reports 739 |\------------------------------------>| results 740 | | | 741 |--- LOCKU --------------------------->| Only if LOCK was done 742 |<------------------------------------/| 743 | | | 744 |--- CLOSE --------------------------->| Release open state 745 |<------------------------------------/| 746 | | | 747 |--- LOCKU --->| | Only if LOCK was done 748 |<------------------/| | 749 | | | 750 |--- CLOSE --->| | Release open state 751 |<------------------/| | 752 | | | 754 Figure 5: An asynchronous inter-server copy. 756 4.7. Server-to-Server Copy Protocol 758 The choice of what protocol to use in an inter-server copy is 759 ultimately the destination server's decision. However, the 760 destination server has to be cognizant that it is working on behalf 761 of the client. 763 4.7.1. Considerations on Selecting a Copy Protocol 765 The client can have requirements over both the size of transactions 766 and error recovery semantics. It may want to split the copy up such 767 that each chunk is synchronously transferred. It may want the copy 768 protocol to copy the bytes in consecutive order such that upon an 769 error, the client can restart the copy at the last known good offset. 770 If the destination server cannot meet these requirements, the client 771 may prefer the traditional copy mechanism such that it can meet those 772 requirements. 774 4.7.2. Using NFSv4.x as the Copy Protocol 776 The destination server MAY use standard NFSv4.x (where x >= 1) 777 operations to read the data from the source server. If NFSv4.x is 778 used for the server-to-server copy protocol, the destination server 779 can use the source filehandle and ca_src_stateid provided in the COPY 780 request with standard NFSv4.x operations to read data from the source 781 server. Note that the ca_src_stateid MUST be the cnr_stateid 782 returned from the source via the COPY_NOTIFY. 784 4.7.3. Using an Alternative Copy Protocol 786 In a homogeneous environment, the source and destination servers 787 might be able to perform the file copy extremely efficiently using 788 specialized protocols. For example the source and destination 789 servers might be two nodes sharing a common file system format for 790 the source and destination file systems. Thus the source and 791 destination are in an ideal position to efficiently render the image 792 of the source file to the destination file by replicating the file 793 system formats at the block level. Another possibility is that the 794 source and destination might be two nodes sharing a common storage 795 area network, and thus there is no need to copy any data at all, and 796 instead ownership of the file and its contents might simply be re- 797 assigned to the destination. To allow for these possibilities, the 798 destination server is allowed to use a server-to-server copy protocol 799 of its choice. 801 In a heterogeneous environment, using a protocol other than NFSv4.x 802 (e.g., HTTP [RFC2616] or FTP [RFC959]) presents some challenges. In 803 particular, the destination server is presented with the challenge of 804 accessing the source file given only an NFSv4.x filehandle. 806 One option for protocols that identify source files with path names 807 is to use an ASCII hexadecimal representation of the source 808 filehandle as the file name. 810 Another option for the source server is to use URLs to direct the 811 destination server to a specialized service. For example, the 812 response to COPY_NOTIFY could include the URL ftp:// 813 s1.example.com:9999/_FH/0x12345, where 0x12345 is the ASCII 814 hexadecimal representation of the source filehandle. When the 815 destination server receives the source server's URL, it would use 816 "_FH/0x12345" as the file name to pass to the FTP server listening on 817 port 9999 of s1.example.com. On port 9999 there would be a special 818 instance of the FTP service that understands how to convert NFS 819 filehandles to an open file descriptor (in many operating systems, 820 this would require a new system call, one which is the inverse of the 821 makefh() function that the pre-NFSv4 MOUNT service needs). 823 Authenticating and identifying the destination server to the source 824 server is also a challenge. Recommendations for how to accomplish 825 this are given in Section 4.10.1.3. 827 4.8. netloc4 - Network Locations 829 The server-side copy operations specify network locations using the 830 netloc4 data type shown below: 832 834 enum netloc_type4 { 835 NL4_NAME = 1, 836 NL4_URL = 2, 837 NL4_NETADDR = 3 838 }; 839 union netloc4 switch (netloc_type4 nl_type) { 840 case NL4_NAME: utf8str_cis nl_name; 841 case NL4_URL: utf8str_cis nl_url; 842 case NL4_NETADDR: netaddr4 nl_addr; 843 }; 845 847 If the netloc4 is of type NL4_NAME, the nl_name field MUST be 848 specified as a UTF-8 string. The nl_name is expected to be resolved 849 to a network address via DNS, LDAP, NIS, /etc/hosts, or some other 850 means. If the netloc4 is of type NL4_URL, a server URL [RFC3986] 851 appropriate for the server-to-server copy operation is specified as a 852 UTF-8 string. If the netloc4 is of type NL4_NETADDR, the nl_addr 853 field MUST contain a valid netaddr4 as defined in Section 3.3.9 of 854 [RFC5661]. 856 When netloc4 values are used for an inter-server copy as shown in 857 Figure 3, their values may be evaluated on the source server, 858 destination server, and client. The network environment in which 859 these systems operate should be configured so that the netloc4 values 860 are interpreted as intended on each system. 862 4.9. Copy Offload Stateids 864 A server may perform a copy offload operation asynchronously. An 865 asynchronous copy is tracked using a copy offload stateid. Copy 866 offload stateids are included in the COPY, OFFLOAD_CANCEL, 867 OFFLOAD_STATUS, and CB_OFFLOAD operations. 869 A copy offload stateid will be valid until either (A) the client or 870 server restarts or (B) the client returns the resource by issuing a 871 OFFLOAD_CANCEL operation or the client replies to a CB_OFFLOAD 872 operation. 874 A copy offload stateid's seqid MUST NOT be 0. In the context of a 875 copy offload operation, it is ambiguous to indicate the most recent 876 copy offload operation using a stateid with seqid of 0. Therefore a 877 copy offload stateid with seqid of 0 MUST be considered invalid. 879 4.10. Security Considerations 881 The security considerations pertaining to NFSv4.1 [RFC5661] apply to 882 this section. And as such, the standard security mechanisms used by 883 the protocol can be used to secure the server-to-server operations. 885 NFSv4 clients and servers supporting the inter-server copy operations 886 described in this chapter are REQUIRED to implement the mechanism 887 described in Section 4.10.1.1, and to support rejecting COPY_NOTIFY 888 requests that do not use RPCSEC_GSS with privacy. If the server-to- 889 server copy protocol is ONC RPC based, the servers are also REQUIRED 890 to implement [rpcsec_gssv3] including the RPCSEC_GSSv3 copy_to_auth, 891 copy_from_auth, and copy_confirm_auth structured privileges. This 892 requirement to implement is not a requirement to use; for example, a 893 server may depending on configuration also allow COPY_NOTIFY requests 894 that use only AUTH_SYS. 896 4.10.1. Inter-Server Copy Security 898 4.10.1.1. Inter-Server Copy via ONC RPC with RPCSEC_GSSv3 900 When the client sends a COPY_NOTIFY to the source server to expect 901 the destination to attempt to copy data from the source server, it is 902 expected that this copy is being done on behalf of the principal 903 (called the "user principal") that sent the RPC request that encloses 904 the COMPOUND procedure that contains the COPY_NOTIFY operation. The 905 user principal is identified by the RPC credentials. A mechanism 906 that allows the user principal to authorize the destination server to 907 perform the copy, that lets the source server properly authenticate 908 the destination's copy, and does not allow the destination server to 909 exceed this authorization, is necessary. 911 An approach that sends delegated credentials of the client's user 912 principal to the destination server is not used for the following 913 reason. If the client's user delegated its credentials, the 914 destination would authenticate as the user principal. If the 915 destination were using the NFSv4 protocol to perform the copy, then 916 the source server would authenticate the destination server as the 917 user principal, and the file copy would securely proceed. However, 918 this approach would allow the destination server to copy other files. 919 The user principal would have to trust the destination server to not 920 do so. This is counter to the requirements, and therefore is not 921 considered. 923 Instead, a feature of the RPCSEC_GSSv3 [rpcsec_gssv3] protocol can be 924 used: RPC application defined structured privilege assertion. This 925 features allow the destination server to authenticate to the source 926 server as acting on behalf of the user principal, and to authorize 927 the destination server to perform READs of the file to be copied from 928 the source on behalf of the user principal. Once the copy is 929 complete, the client can destroy the RPCSEC_GSSv3 handles to end the 930 authorization of both the source and destination servers to copy. 932 We define three RPCSEC_GSSv3 structured privilege assertions that 933 work in tandem to authorize the copy: 935 copy_from_auth: A user principal is authorizing a source principal 936 ("nfs@") to allow a destination principal 937 ("nfs@") to setup the copy_confirm_auth privilege 938 required to copy a file from the source to the destination on 939 behalf of the user principal. This privilege is established on 940 the source server before the user principal sends a COPY_NOTIFY 941 operation to the source server, and the resultant RPCSEC_GSSv3 942 context is used to secure the COPY_NOTIFY operation. 944 946 struct copy_from_auth_priv { 947 secret4 cfap_shared_secret; 948 netloc4 cfap_destination; 949 /* the NFSv4 user name that the user principal maps to */ 950 utf8str_mixed cfap_username; 951 }; 953 955 cfp_shared_secret is an automatically generated random number 956 secret value. 958 copy_to_auth: A user principal is authorizing a destination 959 principal ("nfs@") to setup a copy_confirm_auth 960 privilege with a source principal ("nfs@") to allow it to 961 copy a file from the source to the destination on behalf of the 962 user principal. This privilege is established on the destination 963 server before the user principal sends a COPY operation to the 964 destination server, and the resultant RPCSEC_GSSv3 context is used 965 to secure the COPY operation. 967 969 struct copy_to_auth_priv { 970 /* equal to cfap_shared_secret */ 971 secret4 ctap_shared_secret; 972 netloc4 ctap_source<>; 973 /* the NFSv4 user name that the user principal maps to */ 974 utf8str_mixed ctap_username; 975 }; 977 979 ctap_shared_secret is the automatically generated secret value 980 used to establish the copy_from_auth privilege with the source 981 principal. See Section 4.10.1.1.1. 983 copy_confirm_auth: A destination principal ("nfs@") is 984 confirming with the source principal ("nfs@") that it is 985 authorized to copy data from the source. This privilege is 986 established on the destination server before the file is copied 987 from the source to the destination. The resultant RPCSEC_GSSv3 988 context is used to secure the READ operations from the source to 989 the destination server. 991 993 struct copy_confirm_auth_priv { 994 /* equal to GSS_GetMIC() of cfap_shared_secret */ 995 opaque ccap_shared_secret_mic<>; 996 /* the NFSv4 user name that the user principal maps to */ 997 utf8str_mixed ccap_username; 998 }; 1000 1002 4.10.1.1.1. Establishing a Security Context 1004 When the user principal wants to COPY a file between two servers, if 1005 it has not established copy_from_auth and copy_to_auth privileges on 1006 the servers, it establishes them: 1008 o As noted in [rpcsec_gssv3] the client uses an existing 1009 RPCSEC_GSSv3 context termed the "parent" handle to establish and 1010 protect RPCSEC_GSSv3 structured privilege assertion exchanges. 1011 The copy_from_auth privilege will use the context established 1012 between the user principal and the source server used to OPEN the 1013 source file as the RPCSEC_GSSv3 parent handle. The copy_to_auth 1014 privilege will use the context established between the user 1015 principal and the destination server used to OPEN the destination 1016 file as the RPCSEC_GSSv3 parent handle. 1018 o A random number is generated to use as a secret to be shared 1019 between the two servers. This shared secret will be placed in the 1020 cfap_shared_secret and ctap_shared_secret fields of the 1021 appropriate privilege data types, copy_from_auth_priv and 1022 copy_to_auth_priv. Because of this shared_secret the 1023 RPCSEC_GSS3_CREATE control messages for copy_from_auth and 1024 copy_to_auth MUST use a QOP of rpc_gss_svc_privacy. 1026 o An instance of copy_from_auth_priv is filled in with the shared 1027 secret, the destination server, and the NFSv4 user id of the user 1028 principal and is placed in rpc_gss3_create_args 1029 assertions[0].privs.privilege. The string "copy_from_auth" is 1030 placed in assertions[0].privs.name. The source server unwraps the 1031 rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and verifies that 1032 the NFSv4 user id being asserted matches the source server's 1033 mapping of the user principal. If it does, the privilege is 1034 established on the source server as: <"copy_from_auth", user id, 1035 destination>. The field "handle" in a successful reply is the 1036 RPCSEC_GSSv3 copy_from_auth "child" handle that the client will 1037 use on COPY_NOTIFY requests to the source server. 1039 o An instance of copy_to_auth_priv is filled in with the shared 1040 secret, the cnr_source_server list returned by COPY_NOTIFY, and 1041 the NFSv4 user id of the user principal. The copy_to_auth_priv 1042 instance is placed in rpc_gss3_create_args 1043 assertions[0].privs.privilege. The string "copy_to_auth" is 1044 placed in assertions[0].privs.name. The destination server 1045 unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and 1046 verifies that the NFSv4 user id being asserted matches the 1047 destination server's mapping of the user principal. If it does, 1048 the privilege is established on the destination server as: 1049 <"copy_to_auth", user id, source list>. The field "handle" in a 1050 successful reply is the RPCSEC_GSSv3 copy_to_auth "child" handle 1051 that the client will use on COPY requests to the destination 1052 server involving the source server. 1054 As noted in [rpcsec_gssv3] Section 2.3.1 "Create Request", both the 1055 client and the source server should associate the RPCSEC_GSSv3 1056 "child" handle with the parent RPCSEC_GSSv3 handle used to create the 1057 RPCSEC_GSSv3 child handle. 1059 4.10.1.1.2. Starting a Secure Inter-Server Copy 1061 When the client sends a COPY_NOTIFY request to the source server, it 1062 uses the privileged "copy_from_auth" RPCSEC_GSSv3 handle. 1063 cna_destination_server in COPY_NOTIFY MUST be the same as 1064 cfap_destination specified in copy_from_auth_priv. Otherwise, 1065 COPY_NOTIFY will fail with NFS4ERR_ACCESS. The source server 1066 verifies that the privilege <"copy_from_auth", user id, destination> 1067 exists, and annotates it with the source filehandle, if the user 1068 principal has read access to the source file, and if administrative 1069 policies give the user principal and the NFS client read access to 1070 the source file (i.e., if the ACCESS operation would grant read 1071 access). Otherwise, COPY_NOTIFY will fail with NFS4ERR_ACCESS. 1073 When the client sends a COPY request to the destination server, it 1074 uses the privileged "copy_to_auth" RPCSEC_GSSv3 handle. 1075 ca_source_server list in COPY MUST be the same as ctap_source list 1076 specified in copy_to_auth_priv. Otherwise, COPY will fail with 1077 NFS4ERR_ACCESS. The destination server verifies that the privilege 1078 <"copy_to_auth", user id, source list> exists, and annotates it with 1079 the source and destination filehandles. If the COPY returns a 1080 wr_callback_id, then this is an asynchronous copy and the 1081 wr_callback_id must also must be annotated to the copy_to_auth 1082 privilege. If the client has failed to establish the "copy_to_auth" 1083 privilege it will reject the request with NFS4ERR_PARTNER_NO_AUTH. 1085 If either the COPY_NOTIFY, or the COPY operations fail, the 1086 associated "copy_from_auth" and "copy_to_auth" RPCSEC_GSSv3 handles 1087 MUST be destroyed. 1089 4.10.1.1.3. Securing ONC RPC Server-to-Server Copy Protocols 1091 After a destination server has a "copy_to_auth" privilege established 1092 on it, and it receives a COPY request, if it knows it will use an ONC 1093 RPC protocol to copy data, it will establish a "copy_confirm_auth" 1094 privilege on the source server prior to responding to the COPY 1095 operation as follows: 1097 o Before establishing an RPCSEC_GSSv3 context, a parent context 1098 needs to exist between nfs@ as the initiator 1099 principal, and nfs@ as the target principal. If NFS is to 1100 be used as the copy protocol, this means that the destination 1101 server must mount the source server using RPCSEC_GSSv3. 1103 o An instance of copy_confirm_auth_priv is filled in with 1104 information from the established "copy_to_auth" privilege. The 1105 value of the field ccap_shared_secret_mic is a GSS_GetMIC() of the 1106 ctap_shared_secret in the copy_to_auth privilege using the parent 1107 handle context. The field ccap_username is the mapping of the 1108 user principal to an NFSv4 user name ("user"@"domain" form), and 1109 MUST be the same as the ctap_username in the copy_to_auth 1110 privilege. The copy_confirm_auth_priv instance is placed in 1111 rpc_gss3_create_args assertions[0].privs.privilege. The string 1112 "copy_confirm_auth" is placed in assertions[0].privs.name. 1114 o The RPCSEC_GSS3_CREATE copy_from_auth message is sent to the 1115 source server with a QOP of rpc_gss_svc_privacy. The source 1116 server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload 1117 and verifies the cap_shared_secret_mic by calling GSS_VerifyMIC() 1118 using the parent context on the cfap_shared_secret from the 1119 established "copy_from_auth" privilege, and verifies the that the 1120 ccap_username equals the cfap_username. 1122 o If all verification succeeds, the "copy_confirm_auth" privilege is 1123 established on the source server as < "copy_confirm_auth", 1124 shared_secret_mic, user id> Because the shared secret has been 1125 verified, the resultant copy_confirm_auth RPCSEC_GSSv3 child 1126 handle is noted to be acting on behalf of the user principal. 1128 o If the source server fails to verify the copy_from_auth privilege 1129 the COPY operation will be rejected with NFS4ERR_PARTNER_NO_AUTH, 1130 causing in turn the client to destroy the associated 1131 copy_from_auth and copy_to_auth RPCSEC_GSSv3 structured privilege 1132 assertion handles. 1134 o All subsequent ONC RPC READ requests sent from the destination to 1135 copy data from the source to the destination will use the 1136 RPCSEC_GSSv3 copy_confirm_auth child handle. 1138 Note that the use of the "copy_confirm_auth" privilege accomplishes 1139 the following: 1141 o If a protocol like NFS is being used, with export policies, export 1142 policies can be overridden in case the destination server as-an- 1143 NFS-client is not authorized 1145 o Manual configuration to allow a copy relationship between the 1146 source and destination is not needed. 1148 4.10.1.1.4. Maintaining a Secure Inter-Server Copy 1150 If the client determines that either the copy_from_auth or the 1151 copy_to_auth handle becomes invalid during a copy, then the copy MUST 1152 be aborted by the client sending an OFFLOAD_CANCEL to both the source 1153 and destination servers and destroying the respective copy related 1154 context handles as described in Section 4.10.1.1.5. 1156 4.10.1.1.5. Finishing or Stopping a Secure Inter-Server Copy 1158 Under normal operation, the client MUST destroy the copy_from_auth 1159 and the copy_to_auth RPCSEC_GSSv3 handle once the COPY operation 1160 returns for a synchronous inter-server copy or a CB_OFFLOAD reports 1161 the result of an asynchronous copy. 1163 The copy_confirm_auth privilege constructed from information held by 1164 the copy_to_auth privilege, and MUST be destroyed by the destination 1165 server (via an RPCSEC_GSS3_DESTROY call) when the copy_to_auth 1166 RPCSEC_GSSv3 handle is destroyed. 1168 The copy_confirm_auth RPCSEC_GSS3 handle is associated with a 1169 copy_from_auth RPCSEC_GSS3 handle on the source server via the shared 1170 secret and MUST be locally destroyed (there is no RPCSEC_GSS3_DESTROY 1171 as the source server is not the initiator) when the copy_from_auth 1172 RPCSEC_GSSv3 handle is destroyed. 1174 If the client sends an OFFLOAD_CANCEL to the source server to rescind 1175 the destination server's synchronous copy privilege, it uses the 1176 privileged "copy_from_auth" RPCSEC_GSSv3 handle and the 1177 cra_destination_server in OFFLOAD_CANCEL MUST be the same as the name 1178 of the destination server specified in copy_from_auth_priv. The 1179 source server will then delete the <"copy_from_auth", user id, 1180 destination> privilege and fail any subsequent copy requests sent 1181 under the auspices of this privilege from the destination server. 1182 The client MUST destroy both the "copy_from_auth" and the 1183 "copy_to_auth" RPCSEC_GSSv3 handles. 1185 If the client sends an OFFLOAD_STATUS to the destination server to 1186 check on the status of an asynchronous copy, it uses the privileged 1187 "copy_to_auth" RPCSEC_GSSv3 handle and the osa_stateid in 1188 OFFLOAD_STATUS MUST be the same as the wr_callback_id specified in 1189 the "copy_to_auth" privilege stored on the destination server. 1191 If the client sends an OFFLOAD_CANCEL to the destination server to 1192 cancel an asynchronous copy, it uses the privileged "copy_to_auth" 1193 RPCSEC_GSSv3 handle and the oaa_stateid in OFFLOAD_CANCEL MUST be the 1194 same as the wr_callback_id specified in the "copy_to_auth" privilege 1195 stored on the destination server. The destination server will then 1196 delete the <"copy_to_auth", user id, source list, nounce, nounce MIC, 1197 context handle, handle version> privilege and the associated 1198 "copy_confirm_auth" RPCSEC_GSSv3 handle. The client MUST destroy 1199 both the copy_to_auth and copy_from_auth RPCSEC_GSSv3 handles. 1201 4.10.1.2. Inter-Server Copy via ONC RPC without RPCSEC_GSS 1203 ONC RPC security flavors other than RPCSEC_GSS MAY be used with the 1204 server-side copy offload operations described in this chapter. In 1205 particular, host-based ONC RPC security flavors such as AUTH_NONE and 1206 AUTH_SYS MAY be used. If a host-based security flavor is used, a 1207 minimal level of protection for the server-to-server copy protocol is 1208 possible. 1210 In the absence of a strong security mechanism designed for the 1211 purpose, the challenge is how the source server and destination 1212 server identify themselves to each other, especially in the presence 1213 of multi-homed source and destination servers. In a multi-homed 1214 environment, the destination server might not contact the source 1215 server from the same network address specified by the client in the 1216 COPY_NOTIFY. The cnr_stateid returned from the COPY_NOTIFY can be 1217 used to uiniquely identify the destination server to the source 1218 server. The use of cnr_stateid provides initial authentication of 1219 the destination server, but cannot defend against man-in-the-middle 1220 attacks after authentication or an eavesdropper that observes the 1221 opaque stateid on the wire. Other secure communication techniques 1222 (e.g., IPsec) are necessary to block these attacks. 1224 Servers SHOULD reject COPY_NOTIFY requests that do not use RPCSEC_GSS 1225 with privacy, thus ensuring the cnr_stateid in the COPY_NOTIFY reply 1226 is encrypted. For the same reason, clients SHOULD send COPY requests 1227 to the destination using RPCSEC_GSS with privacy. 1229 4.10.1.3. Inter-Server Copy without ONC RPC 1231 The same techniques as Section 4.10.1.2, using unique URLs for each 1232 destination server, can be used for other protocols (e.g., HTTP 1233 [RFC2616] and FTP [RFC959]) as well. 1235 5. Support for Application IO Hints 1237 Applications can issue client I/O hints via posix_fadvise() 1238 [posix_fadvise] to the NFS client. While this can help the NFS 1239 client optimize I/O and caching for a file, it does not allow the NFS 1240 server and its exported file system to do likewise. We add an 1241 IO_ADVISE procedure (Section 15.5) to communicate the client file 1242 access patterns to the NFS server. The NFS server upon receiving a 1243 IO_ADVISE operation MAY choose to alter its I/O and caching behavior, 1244 but is under no obligation to do so. 1246 Application specific NFS clients such as those used by hypervisors 1247 and databases can also leverage application hints to communicate 1248 their specialized requirements. 1250 6. Sparse Files 1252 6.1. Introduction 1254 A sparse file is a common way of representing a large file without 1255 having to utilize all of the disk space for it. Consequently, a 1256 sparse file uses less physical space than its size indicates. This 1257 means the file contains 'holes', byte ranges within the file that 1258 contain no data. Most modern file systems support sparse files, 1259 including most UNIX file systems and NTFS, but notably not Apple's 1260 HFS+. Common examples of sparse files include Virtual Machine (VM) 1261 OS/disk images, database files, log files, and even checkpoint 1262 recovery files most commonly used by the HPC community. 1264 In addition many modern file systems support the concept of 1265 'unwritten' or 'uninitialized' blocks, which have uninitialized space 1266 allocated to them on disk, but will return zeros until data is 1267 written to them. Such functionality is already present in the data 1268 model of the pNFS Block/Volume Layout (see [RFC5663]). Uninitialized 1269 blocks can thought as holes inside a space reservation window. 1271 If an application reads a hole in a sparse file, the file system must 1272 return all zeros to the application. For local data access there is 1273 little penalty, but with NFS these zeroes must be transferred back to 1274 the client. If an application uses the NFS client to read data into 1275 memory, this wastes time and bandwidth as the application waits for 1276 the zeroes to be transferred. 1278 A sparse file is typically created by initializing the file to be all 1279 zeros - nothing is written to the data in the file, instead the hole 1280 is recorded in the metadata for the file. So a 8G disk image might 1281 be represented initially by a couple hundred bits in the inode and 1282 nothing on the disk. If the VM then writes 100M to a file in the 1283 middle of the image, there would now be two holes represented in the 1284 metadata and 100M in the data. 1286 No new operation is needed to allow the creation of a sparsely 1287 populated file, when a file is created and a write occurs past the 1288 current size of the file, the non-allocated region will either be a 1289 hole or filled with zeros. The choice of behavior is dictated by the 1290 underlying file system and is transparent to the application. What 1291 is needed are the abilities to read sparse files and to punch holes 1292 to reinitialize the contents of a file. 1294 Two new operations DEALLOCATE (Section 15.4) and READ_PLUS 1295 (Section 15.10) are introduced. DEALLOCATE allows for the hole 1296 punching. I.e., an application might want to reset the allocation 1297 and reservation status of a range of the file. READ_PLUS supports 1298 all the features of READ but includes an extension to support sparse 1299 files. READ_PLUS is guaranteed to perform no worse than READ, and 1300 can dramatically improve performance with sparse files. READ_PLUS 1301 does not depend on pNFS protocol features, but can be used by pNFS to 1302 support sparse files. 1304 6.2. Terminology 1306 Regular file: An object of file type NF4REG or NF4NAMEDATTR. 1308 Sparse file: A Regular file that contains one or more holes. 1310 Hole: A byte range within a Sparse file that contains regions of all 1311 zeroes. A hole might or might not have space allocated or 1312 reserved to it. 1314 6.3. New Operations 1316 6.3.1. READ_PLUS 1318 READ_PLUS is a new variant of the NFSv4.1 READ operation [RFC5661]. 1319 Besides being able to support all of the data semantics of the READ 1320 operation, it can also be used by the client and server to 1321 efficiently transfer holes. Note that as the client has no a priori 1322 knowledge of whether a hole is present or not, if the client supports 1323 READ_PLUS and so does the server, then it should always use the 1324 READ_PLUS operation in preference to the READ operation. 1326 READ_PLUS extends the response with a new arm representing holes to 1327 avoid returning data for portions of the file which are initialized 1328 to zero and may or may not contain a backing store. Returning data 1329 blocks of uninitialized data wastes computational and network 1330 resources, thus reducing performance. 1332 When a client sends a READ operation, it is not prepared to accept a 1333 READ_PLUS-style response providing a compact encoding of the scope of 1334 holes. If a READ occurs on a sparse file, then the server must 1335 expand such data to be raw bytes. If a READ occurs in the middle of 1336 a hole, the server can only send back bytes starting from that 1337 offset. By contrast, if a READ_PLUS occurs in the middle of a hole, 1338 the server can send back a range which starts before the offset and 1339 extends past the range. 1341 6.3.2. DEALLOCATE 1343 DEALLOCATE can be used to hole punch, which allows the client to 1344 avoid the transfer of a repetitive pattern of zeros across the 1345 network. 1347 7. Space Reservation 1349 Applications want to be able to reserve space for a file, report the 1350 amount of actual disk space a file occupies, and free-up the backing 1351 space of a file when it is not required. 1353 One example is the posix_fallocate ([posix_fallocate]) which allows 1354 applications to ask for space reservations from the operating system, 1355 usually to provide a better file layout and reduce overhead for 1356 random or slow growing file appending workloads. 1358 Another example is space reservation for virtual disks in a 1359 hypervisor. In virtualized environments, virtual disk files are 1360 often stored on NFS mounted volumes. When a hypervisor creates a 1361 virtual disk file, it often tries to preallocate the space for the 1362 file so that there are no future allocation related errors during the 1363 operation of the virtual machine. Such errors prevent a virtual 1364 machine from continuing execution and result in downtime. 1366 Currently, in order to achieve such a guarantee, applications zero 1367 the entire file. The initial zeroing allocates the backing blocks 1368 and all subsequent writes are overwrites of already allocated blocks. 1369 This approach is not only inefficient in terms of the amount of I/O 1370 done, it is also not guaranteed to work on file systems that are log 1371 structured or deduplicated. An efficient way of guaranteeing space 1372 reservation would be beneficial to such applications. 1374 The new ALLOCATE operation (see Section 15.1) allows a client to 1375 request a guarantee that space will be available. The ALLOCATE 1376 operation guarantees that any future writes to the region it was 1377 successfully called for will not fail with NFS4ERR_NOSPC. 1379 Another useful feature is the ability to report the number of blocks 1380 that would be freed when a file is deleted. Currently, NFS reports 1381 two size attributes: 1383 size The logical file size of the file. 1385 space_used The size in bytes that the file occupies on disk 1387 While these attributes are sufficient for space accounting in 1388 traditional file systems, they prove to be inadequate in modern file 1389 systems that support block sharing. In such file systems, multiple 1390 inodes can point to a single block with a block reference count to 1391 guard against premature freeing. Having a way to tell the number of 1392 blocks that would be freed if the file was deleted would be useful to 1393 applications that wish to migrate files when a volume is low on 1394 space. 1396 Since virtual disks represent a hard drive in a virtual machine, a 1397 virtual disk can be viewed as a file system within a file. Since not 1398 all blocks within a file system are in use, there is an opportunity 1399 to reclaim blocks that are no longer in use. A call to deallocate 1400 blocks could result in better space efficiency. Lesser space MAY be 1401 consumed for backups after block deallocation. 1403 The following operations and attributes can be used to resolve these 1404 issues: 1406 space_freed This attribute specifies the space freed when a file is 1407 deleted, taking block sharing into consideration. 1409 DEALLOCATE This operation delallocates the blocks backing a region 1410 of the file. 1412 If space_used of a file is interpreted to mean the size in bytes of 1413 all disk blocks pointed to by the inode of the file, then shared 1414 blocks get double counted, over-reporting the space utilization. 1415 This also has the adverse effect that the deletion of a file with 1416 shared blocks frees up less than space_used bytes. 1418 On the other hand, if space_used is interpreted to mean the size in 1419 bytes of those disk blocks unique to the inode of the file, then 1420 shared blocks are not counted in any file, resulting in under- 1421 reporting of the space utilization. 1423 For example, two files A and B have 10 blocks each. Let 6 of these 1424 blocks be shared between them. Thus, the combined space utilized by 1425 the two files is 14 * BLOCK_SIZE bytes. In the former case, the 1426 combined space utilization of the two files would be reported as 20 * 1427 BLOCK_SIZE. However, deleting either would only result in 4 * 1428 BLOCK_SIZE being freed. Conversely, the latter interpretation would 1429 report that the space utilization is only 8 * BLOCK_SIZE. 1431 Adding another size attribute, space_freed (see Section 12.2.2), is 1432 helpful in solving this problem. space_freed is the number of blocks 1433 that are allocated to the given file that would be freed on its 1434 deletion. In the example, both A and B would report space_freed as 4 1435 * BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B 1436 will report space_freed as 10 * BLOCK_SIZE as the deletion of B would 1437 result in the deallocation of all 10 blocks. 1439 The addition of these attributes does not solve the problem of space 1440 being over-reported. However, over-reporting is better than under- 1441 reporting. 1443 8. Application Data Block Support 1445 At the OS level, files are contained on disk blocks. Applications 1446 are also free to impose structure on the data contained in a file and 1447 we can define an Application Data Block (ADB) to be such a structure. 1448 From the application's viewpoint, it only wants to handle ADBs and 1449 not raw bytes (see [Strohm11]). An ADB is typically comprised of two 1450 sections: header and data. The header describes the characteristics 1451 of the block and can provide a means to detect corruption in the data 1452 payload. The data section is typically initialized to all zeros. 1454 The format of the header is application specific, but there are two 1455 main components typically encountered: 1457 1. An Application Data Block Number (ADBN) which allows the 1458 application to determine which data block is being referenced. 1459 This is useful when the client is not storing the blocks in 1460 contiguous memory, i.e., a logical block number. 1462 2. Fields to describe the state of the ADB and a means to detect 1463 block corruption. For both pieces of data, a useful property is 1464 that allowed values be unique in that if passed across the 1465 network, corruption due to translation between big and little 1466 endian architectures are detectable. For example, 0xF0DEDEF0 has 1467 the same bit pattern in both architectures. 1469 Applications already impose structures on files [Strohm11] and detect 1470 corruption in data blocks [Ashdown08]. What they are not able to do 1471 is efficiently transfer and store ADBs. To initialize a file with 1472 ADBs, the client must send each full ADB to the server and that must 1473 be stored on the server. 1475 In this section, we define a framework for transferring the ADB from 1476 client to server and present one approach to detecting corruption in 1477 a given ADB implementation. 1479 8.1. Generic Framework 1481 We want the representation of the ADB to be flexible enough to 1482 support many different applications. The most basic approach is no 1483 imposition of a block at all, which means we are working with the raw 1484 bytes. Such an approach would be useful for storing holes, punching 1485 holes, etc. In more complex deployments, a server might be 1486 supporting multiple applications, each with their own definition of 1487 the ADB. One might store the ADBN at the start of the block and then 1488 have a guard pattern to detect corruption [McDougall07]. The next 1489 might store the ADBN at an offset of 100 bytes within the block and 1490 have no guard pattern at all, i.e., existing applications might 1491 already have well defined formats for their data blocks. 1493 The guard pattern can be used to represent the state of the block, to 1494 protect against corruption, or both. Again, it needs to be able to 1495 be placed anywhere within the ADB. 1497 We need to be able to represent the starting offset of the block and 1498 the size of the block. Note that nothing prevents the application 1499 from defining different sized blocks in a file. 1501 8.1.1. Data Block Representation 1503 1505 struct app_data_block4 { 1506 offset4 adb_offset; 1507 length4 adb_block_size; 1508 length4 adb_block_count; 1509 length4 adb_reloff_blocknum; 1510 count4 adb_block_num; 1511 length4 adb_reloff_pattern; 1512 opaque adb_pattern<>; 1513 }; 1515 1517 The app_data_block4 structure captures the abstraction presented for 1518 the ADB. The additional fields present are to allow the transmission 1519 of adb_block_count ADBs at one time. We also use adb_block_num to 1520 convey the ADBN of the first block in the sequence. Each ADB will 1521 contain the same adb_pattern string. 1523 As both adb_block_num and adb_pattern are optional, if either 1524 adb_reloff_pattern or adb_reloff_blocknum is set to NFS4_UINT64_MAX, 1525 then the corresponding field is not set in any of the ADB. 1527 8.2. An Example of Detecting Corruption 1529 In this section, we define an ADB format in which corruption can be 1530 detected. Note that this is just one possible format and means to 1531 detect corruption. 1533 Consider a very basic implementation of an operating system's disk 1534 blocks. A block is either data or it is an indirect block which 1535 allows for files to be larger than one block. It is desired to be 1536 able to initialize a block. Lastly, to quickly unlink a file, a 1537 block can be marked invalid. The contents remain intact - which 1538 would enable this OS application to undelete a file. 1540 The application defines 4k sized data blocks, with an 8 byte block 1541 counter occurring at offset 0 in the block, and with the guard 1542 pattern occurring at offset 8 inside the block. Furthermore, the 1543 guard pattern can take one of four states: 1545 0xfeedface - This is the FREE state and indicates that the ADB 1546 format has been applied. 1548 0xcafedead - This is the DATA state and indicates that real data 1549 has been written to this block. 1551 0xe4e5c001 - This is the INDIRECT state and indicates that the 1552 block contains block counter numbers that are chained off of this 1553 block. 1555 0xba1ed4a3 - This is the INVALID state and indicates that the block 1556 contains data whose contents are garbage. 1558 Finally, it also defines an 8 byte checksum [Baira08] starting at 1559 byte 16 which applies to the remaining contents of the block. If the 1560 state is FREE, then that checksum is trivially zero. As such, the 1561 application has no need to transfer the checksum implicitly inside 1562 the ADB - it need not make the transfer layer aware of the fact that 1563 there is a checksum (see [Ashdown08] for an example of checksums used 1564 to detect corruption in application data blocks). 1566 Corruption in each ADB can thus be detected: 1568 o If the guard pattern is anything other than one of the allowed 1569 values, including all zeros. 1571 o If the guard pattern is FREE and any other byte in the remainder 1572 of the ADB is anything other than zero. 1574 o If the guard pattern is anything other than FREE, then if the 1575 stored checksum does not match the computed checksum. 1577 o If the guard pattern is INDIRECT and one of the stored indirect 1578 block numbers has a value greater than the number of ADBs in the 1579 file. 1581 o If the guard pattern is INDIRECT and one of the stored indirect 1582 block numbers is a duplicate of another stored indirect block 1583 number. 1585 As can be seen, the application can detect errors based on the 1586 combination of the guard pattern state and the checksum. But also, 1587 the application can detect corruption based on the state and the 1588 contents of the ADB. This last point is important in validating the 1589 minimum amount of data we incorporated into our generic framework. 1590 I.e., the guard pattern is sufficient in allowing applications to 1591 design their own corruption detection. 1593 Finally, it is important to note that none of these corruption checks 1594 occur in the transport layer. The server and client components are 1595 totally unaware of the file format and might report everything as 1596 being transferred correctly even in the case the application detects 1597 corruption. 1599 8.3. Example of READ_PLUS 1601 The hypothetical application presented in Section 8.2 can be used to 1602 illustrate how READ_PLUS would return an array of results. A file is 1603 created and initialized with 100 4k ADBs in the FREE state with the 1604 WRITE_SAME operation (see Section 15.12): 1606 WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface} 1608 Further, assume the application writes a single ADB at 16k, changing 1609 the guard pattern to 0xcafedead, we would then have in memory: 1611 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00 1612 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00 1613 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00 1614 12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00 1615 16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00 1616 20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00 1617 24k -> (28k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00 1618 ... 1619 396k -> (400k - 1) : 00 00 00 63 fe ed fa ce 00 00 ... 00 00 1621 And when the client did a READ_PLUS of 64k at the start of the file, 1622 it could get back a result of data: 1624 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00 1625 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00 1626 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00 1627 12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00 1628 16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00 1629 20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00 1630 24k -> (24k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00 1631 ... 1632 62k -> (64k - 1) : 00 00 00 15 fe ed fa ce 00 00 ... 00 00 1634 8.4. An Example of Zeroing Space 1636 A simpler use case for WRITE_SAME are applications that want to 1637 efficiently zero out a file, but do not want to modify space 1638 reservations. This can easily be achieved by a call to WRITE_SAME 1639 without a ADB block numbers and pattern, e.g.: 1641 WRITE_SAME {0, 1k, 10000, 0, 0, 0, 0} 1643 9. Labeled NFS 1645 9.1. Introduction 1647 Access control models such as Unix permissions or Access Control 1648 Lists are commonly referred to as Discretionary Access Control (DAC) 1649 models. These systems base their access decisions on user identity 1650 and resource ownership. In contrast Mandatory Access Control (MAC) 1651 models base their access control decisions on the label on the 1652 subject (usually a process) and the object it wishes to access 1653 [RFC7204]. These labels may contain user identity information but 1654 usually contain additional information. In DAC systems users are 1655 free to specify the access rules for resources that they own. MAC 1656 models base their security decisions on a system wide policy 1657 established by an administrator or organization which the users do 1658 not have the ability to override. In this section, we add a MAC 1659 model to NFSv4.2. 1661 First we provide a method for transporting and storing security label 1662 data on NFSv4 file objects. Security labels have several semantics 1663 that are met by NFSv4 recommended attributes such as the ability to 1664 set the label value upon object creation. Access control on these 1665 attributes are done through a combination of two mechanisms. As with 1666 other recommended attributes on file objects the usual DAC checks 1667 (ACLs and permission bits) will be performed to ensure that proper 1668 file ownership is enforced. In addition a MAC system MAY be employed 1669 on the client, server, or both to enforce additional policy on what 1670 subjects may modify security label information. 1672 Second, we describe a method for the client to determine if an NFSv4 1673 file object security label has changed. A client which needs to know 1674 if a label on a file or set of files is going to change SHOULD 1675 request a delegation on each labeled file. In order to change such a 1676 security label, the server will have to recall delegations on any 1677 file affected by the label change, so informing clients of the label 1678 change. 1680 An additional useful feature would be modification to the RPC layer 1681 used by NFSv4 to allow RPC calls to carry security labels and enable 1682 full mode enforcement as described in Section 9.6.1. Such 1683 modifications are outside the scope of this document (see 1684 [rpcsec_gssv3]). 1686 9.2. Definitions 1688 Label Format Specifier (LFS): is an identifier used by the client to 1689 establish the syntactic format of the security label and the 1690 semantic meaning of its components. These specifiers exist in a 1691 registry associated with documents describing the format and 1692 semantics of the label. 1694 Label Format Registry: is the IANA registry (see [Quigley14]) 1695 containing all registered LFSes along with references to the 1696 documents that describe the syntactic format and semantics of the 1697 security label. 1699 Policy Identifier (PI): is an optional part of the definition of a 1700 Label Format Specifier which allows for clients and server to 1701 identify specific security policies. 1703 Object: is a passive resource within the system that we wish to be 1704 protected. Objects can be entities such as files, directories, 1705 pipes, sockets, and many other system resources relevant to the 1706 protection of the system state. 1708 Subject: is an active entity usually a process which is requesting 1709 access to an object. 1711 MAC-Aware: is a server which can transmit and store object labels. 1713 MAC-Functional: is a client or server which is Labeled NFS enabled. 1714 Such a system can interpret labels and apply policies based on the 1715 security system. 1717 Multi-Level Security (MLS): is a traditional model where objects are 1718 given a sensitivity level (Unclassified, Secret, Top Secret, etc) 1719 and a category set (see [BL73], [RFC1108], and [RFC2401]). 1721 9.3. MAC Security Attribute 1723 MAC models base access decisions on security attributes bound to 1724 subjects and objects. This information can range from a user 1725 identity for an identity based MAC model, sensitivity levels for 1726 Multi-level security, or a type for Type Enforcement. These models 1727 base their decisions on different criteria but the semantics of the 1728 security attribute remain the same. The semantics required by the 1729 security attributes are listed below: 1731 o MUST provide flexibility with respect to the MAC model. 1733 o MUST provide the ability to atomically set security information 1734 upon object creation. 1736 o MUST provide the ability to enforce access control decisions both 1737 on the client and the server. 1739 o MUST NOT expose an object to either the client or server name 1740 space before its security information has been bound to it. 1742 NFSv4 implements the security attribute as a recommended attribute. 1743 These attributes have a fixed format and semantics, which conflicts 1744 with the flexible nature of the security attribute. To resolve this 1745 the security attribute consists of two components. The first 1746 component is a LFS as defined in [Quigley14] to allow for 1747 interoperability between MAC mechanisms. The second component is an 1748 opaque field which is the actual security attribute data. To allow 1749 for various MAC models, NFSv4 should be used solely as a transport 1750 mechanism for the security attribute. It is the responsibility of 1751 the endpoints to consume the security attribute and make access 1752 decisions based on their respective models. In addition, creation of 1753 objects through OPEN and CREATE allows for the security attribute to 1754 be specified upon creation. By providing an atomic create and set 1755 operation for the security attribute it is possible to enforce the 1756 second and fourth requirements. The recommended attribute 1757 FATTR4_SEC_LABEL (see Section 12.2.4) will be used to satisfy this 1758 requirement. 1760 9.3.1. Delegations 1762 In the event that a security attribute is changed on the server while 1763 a client holds a delegation on the file, both the server and the 1764 client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661]) 1765 with respect to attribute changes. It SHOULD flush all changes back 1766 to the server and relinquish the delegation. 1768 9.3.2. Permission Checking 1770 It is not feasible to enumerate all possible MAC models and even 1771 levels of protection within a subset of these models. This means 1772 that the NFSv4 client and servers cannot be expected to directly make 1773 access control decisions based on the security attribute. Instead 1774 NFSv4 should defer permission checking on this attribute to the host 1775 system. These checks are performed in addition to existing DAC and 1776 ACL checks outlined in the NFSv4 protocol. Section 9.6 gives a 1777 specific example of how the security attribute is handled under a 1778 particular MAC model. 1780 9.3.3. Object Creation 1782 When creating files in NFSv4 the OPEN and CREATE operations are used. 1783 One of the parameters to these operations is an fattr4 structure 1784 containing the attributes the file is to be created with. This 1785 allows NFSv4 to atomically set the security attribute of files upon 1786 creation. When a client is MAC-Functional it must always provide the 1787 initial security attribute upon file creation. In the event that the 1788 server is MAC-Functional as well, it should determine by policy 1789 whether it will accept the attribute from the client or instead make 1790 the determination itself. If the client is not MAC-Functional, then 1791 the MAC-Functional server must decide on a default label. A more in 1792 depth explanation can be found in Section 9.6. 1794 9.3.4. Existing Objects 1796 Note that under the MAC model, all objects must have labels. 1797 Therefore, if an existing server is upgraded to include Labeled NFS 1798 support, then it is the responsibility of the security system to 1799 define the behavior for existing objects. 1801 9.3.5. Label Changes 1803 Consider a guest mode system (Section 9.6.2) in which the clients 1804 enforce MAC checks and the server has only a DAC security system 1805 which stores the labels along with the file data. In this type of 1806 system, a user with the appropriate DAC credentials on a client with 1807 poorly configured or disabled MAC labeling enforcement is allowed 1808 access to the file label (and data) on the server and can change the 1809 label. 1811 Clients which need to know if a label on a file or set of files has 1812 changed SHOULD request a delegation on each labeled file so that a 1813 label change by another client will be known via the process 1814 described in Section 9.3.1 which must be followed: the delegation 1815 will be recalled, which effectively notifies the client of the 1816 change. 1818 Note that the MAC security policies on a client can be such that the 1819 client does not have access to the file unless it has a delegation. 1821 9.4. pNFS Considerations 1823 The new FATTR4_SEC_LABEL attribute is metadata information and as 1824 such the DS is not aware of the value contained on the MDS. 1825 Fortunately, the NFSv4.1 protocol [RFC5661] already has provisions 1826 for doing access level checks from the DS to the MDS. In order for 1827 the DS to validate the subject label presented by the client, it 1828 SHOULD utilize this mechanism. 1830 9.5. Discovery of Server Labeled NFS Support 1832 The server can easily determine that a client supports Labeled NFS 1833 when it queries for the FATTR4_SEC_LABEL label for an object. The 1834 client might need to discover which LFS the server supports. 1836 The following compound MUST NOT be denied by any MAC label check: 1838 PUTROOTFH, GETATTR {FATTR4_SEC_LABEL} 1840 Note that the server might have imposed a security flavor on the root 1841 that precludes such access. I.e., if the server requires kerberized 1842 access and the client presents a compound with AUTH_SYS, then the 1843 server is allowed to return NFS4ERR_WRONGSEC in this case. But if 1844 the client presents a correct security flavor, then the server MUST 1845 return the FATTR4_SEC_LABEL attribute with the supported LFS filled 1846 in. 1848 9.6. MAC Security NFS Modes of Operation 1850 A system using Labeled NFS may operate in two modes. The first mode 1851 provides the most protection and is called "full mode". In this mode 1852 both the client and server implement a MAC model allowing each end to 1853 make an access control decision. The remaining mode is called the 1854 "guest mode" and in this mode one end of the connection is not 1855 implementing a MAC model and thus offers less protection than full 1856 mode. 1858 9.6.1. Full Mode 1860 Full mode environments consist of MAC-Functional NFSv4 servers and 1861 clients and may be composed of mixed MAC models and policies. The 1862 system requires that both the client and server have an opportunity 1863 to perform an access control check based on all relevant information 1864 within the network. The file object security attribute is provided 1865 using the mechanism described in Section 9.3. 1867 Fully MAC-Functional NFSv4 servers are not possible in the absence of 1868 RPCSEC_GSSv3 [rpcsec_gssv3] support for subject label transport. 1869 However, servers may make decisions based on the RPC credential 1870 information available. 1872 9.6.1.1. Initial Labeling and Translation 1874 The ability to create a file is an action that a MAC model may wish 1875 to mediate. The client is given the responsibility to determine the 1876 initial security attribute to be placed on a file. This allows the 1877 client to make a decision as to the acceptable security attributes to 1878 create a file with before sending the request to the server. Once 1879 the server receives the creation request from the client it may 1880 choose to evaluate if the security attribute is acceptable. 1882 Security attributes on the client and server may vary based on MAC 1883 model and policy. To handle this the security attribute field has an 1884 LFS component. This component is a mechanism for the host to 1885 identify the format and meaning of the opaque portion of the security 1886 attribute. A full mode environment may contain hosts operating in 1887 several different LFSes. In this case a mechanism for translating 1888 the opaque portion of the security attribute is needed. The actual 1889 translation function will vary based on MAC model and policy and is 1890 out of the scope of this document. If a translation is unavailable 1891 for a given LFS then the request MUST be denied. Another recourse is 1892 to allow the host to provide a fallback mapping for unknown security 1893 attributes. 1895 9.6.1.2. Policy Enforcement 1897 In full mode access control decisions are made by both the clients 1898 and servers. When a client makes a request it takes the security 1899 attribute from the requesting process and makes an access control 1900 decision based on that attribute and the security attribute of the 1901 object it is trying to access. If the client denies that access an 1902 RPC call to the server is never made. If however the access is 1903 allowed the client will make a call to the NFS server. 1905 When the server receives the request from the client it uses any 1906 credential information conveyed in the RPC request and the attributes 1907 of the object the client is trying to access to make an access 1908 control decision. If the server's policy allows this access it will 1909 fulfill the client's request, otherwise it will return 1910 NFS4ERR_ACCESS. 1912 Future protocol extensions may also allow the server to factor into 1913 the decision a security label extracted from the RPC request. 1915 Implementations MAY validate security attributes supplied over the 1916 network to ensure that they are within a set of attributes permitted 1917 from a specific peer, and if not, reject them. Note that a system 1918 may permit a different set of attributes to be accepted from each 1919 peer. 1921 9.6.1.3. Limited Server 1923 A Limited Server mode (see Section 4.2 of [RFC7204]) consists of a 1924 server which is label aware, but does not enforce policies. Such a 1925 server will store and retrieve all object labels presented by 1926 clients, utilize the methods described in Section 9.3.5 to allow the 1927 clients to detect changing labels, but may not factor the label into 1928 access decisions. Instead, it will expect the clients to enforce all 1929 such access locally. 1931 9.6.2. Guest Mode 1933 Guest mode implies that either the client or the server does not 1934 handle labels. If the client is not Labeled NFS aware, then it will 1935 not offer subject labels to the server. The server is the only 1936 entity enforcing policy, and may selectively provide standard NFS 1937 services to clients based on their authentication credentials and/or 1938 associated network attributes (e.g., IP address, network interface). 1939 The level of trust and access extended to a client in this mode is 1940 configuration-specific. If the server is not Labeled NFS aware, then 1941 it will not return object labels to the client. Clients in this 1942 environment are may consist of groups implementing different MAC 1943 model policies. The system requires that all clients in the 1944 environment be responsible for access control checks. 1946 9.7. Security Considerations for Labeled NFS 1948 This entire chapter deals with security issues. 1950 Depending on the level of protection the MAC system offers there may 1951 be a requirement to tightly bind the security attribute to the data. 1953 When only one of the client or server enforces labels, it is 1954 important to realize that the other side is not enforcing MAC 1955 protections. Alternate methods might be in use to handle the lack of 1956 MAC support and care should be taken to identify and mitigate threats 1957 from possible tampering outside of these methods. 1959 An example of this is that a server that modifies READDIR or LOOKUP 1960 results based on the client's subject label might want to always 1961 construct the same subject label for a client which does not present 1962 one. This will prevent a non-Labeled NFS client from mixing entries 1963 in the directory cache. 1965 10. Sharing change attribute implementation characteristics with NFSv4 1966 clients 1968 Although both the NFSv4 [RFC7530] and NFSv4.1 protocol [RFC5661], 1969 define the change attribute as being mandatory to implement, there is 1970 little in the way of guidance as to its construction. The only 1971 mandated constraint is that the value must change whenever the file 1972 data or metadata change. 1974 While this allows for a wide range of implementations, it also leaves 1975 the client with no way to determine which is the most recent value 1976 for the change attribute in a case where several RPC calls have been 1977 issued in parallel. In other words if two COMPOUNDs, both containing 1978 WRITE and GETATTR requests for the same file, have been issued in 1979 parallel, how does the client determine which of the two change 1980 attribute values returned in the replies to the GETATTR requests 1981 correspond to the most recent state of the file? In some cases, the 1982 only recourse may be to send another COMPOUND containing a third 1983 GETATTR that is fully serialized with the first two. 1985 NFSv4.2 avoids this kind of inefficiency by allowing the server to 1986 share details about how the change attribute is expected to evolve, 1987 so that the client may immediately determine which, out of the 1988 several change attribute values returned by the server, is the most 1989 recent. change_attr_type is defined as a new recommended attribute 1990 (see Section 12.2.3), and is per file system. 1992 11. Error Values 1994 NFS error numbers are assigned to failed operations within a Compound 1995 (COMPOUND or CB_COMPOUND) request. A Compound request contains a 1996 number of NFS operations that have their results encoded in sequence 1997 in a Compound reply. The results of successful operations will 1998 consist of an NFS4_OK status followed by the encoded results of the 1999 operation. If an NFS operation fails, an error status will be 2000 entered in the reply and the Compound request will be terminated. 2002 11.1. Error Definitions 2004 Protocol Error Definitions 2006 +-------------------------+--------+------------------+ 2007 | Error | Number | Description | 2008 +-------------------------+--------+------------------+ 2009 | NFS4ERR_BADLABEL | 10093 | Section 11.1.3.1 | 2010 | NFS4ERR_OFFLOAD_DENIED | 10091 | Section 11.1.2.1 | 2011 | NFS4ERR_OFFLOAD_NO_REQS | 10094 | Section 11.1.2.2 | 2012 | NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 11.1.2.3 | 2013 | NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 11.1.2.4 | 2014 | NFS4ERR_UNION_NOTSUPP | 10090 | Section 11.1.1.1 | 2015 | NFS4ERR_WRONG_LFS | 10092 | Section 11.1.3.2 | 2016 +-------------------------+--------+------------------+ 2018 Table 1 2020 11.1.1. General Errors 2022 This section deals with errors that are applicable to a broad set of 2023 different purposes. 2025 11.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090) 2027 One of the arguments to the operation is a discriminated union and 2028 while the server supports the given operation, it does not support 2029 the selected arm of the discriminated union. 2031 11.1.2. Server to Server Copy Errors 2033 These errors deal with the interaction between server to server 2034 copies. 2036 11.1.2.1. NFS4ERR_OFFLOAD_DENIED (Error Code 10091) 2038 The copy offload operation is supported by both the source and the 2039 destination, but the destination is not allowing it for this file. 2040 If the client sees this error, it should fall back to the normal copy 2041 semantics. 2043 11.1.2.2. NFS4ERR_OFFLOAD_NO_REQS (Error Code 10094) 2045 The copy offload operation is supported by both the source and the 2046 destination, but the destination can not meet the client requirements 2047 for either consecutive byte copy or synchronous copy. If the client 2048 sees this error, it should either relax the requirements (if any) or 2049 fall back to the normal copy semantics. 2051 11.1.2.3. NFS4ERR_PARTNER_NO_AUTH (Error Code 10089) 2053 The source server does not authorize a server-to-server copy offload 2054 operation. This may be due to the client's failure to send the 2055 COPY_NOTIFY operation to the source server, the source server 2056 receiving a server-to-server copy offload request after the copy 2057 lease time expired, or for some other permission problem. 2059 11.1.2.4. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088) 2061 The remote server does not support the server-to-server copy offload 2062 protocol. 2064 11.1.3. Labeled NFS Errors 2066 These errors are used in Labeled NFS. 2068 11.1.3.1. NFS4ERR_BADLABEL (Error Code 10093) 2070 The label specified is invalid in some manner. 2072 11.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092) 2074 The LFS specified in the subject label is not compatible with the LFS 2075 in the object label. 2077 11.2. New Operations and Their Valid Errors 2079 This section contains a table that gives the valid error returns for 2080 each new NFSv4.2 protocol operation. The error code NFS4_OK 2081 (indicating no error) is not listed but should be understood to be 2082 returnable by all new operations. The error values for all other 2083 operations are defined in Section 15.2 of [RFC5661]. 2085 Valid Error Returns for Each New Protocol Operation 2087 +----------------+--------------------------------------------------+ 2088 | Operation | Errors | 2089 +----------------+--------------------------------------------------+ 2090 | ALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2091 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2092 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2093 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2094 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2095 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2096 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, | 2097 | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | 2098 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2099 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2100 | | NFS4ERR_REP_TOO_BIG, | 2101 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2102 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2103 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2104 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2105 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2106 | CLONE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2107 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2108 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2109 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2110 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2111 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2112 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, | 2113 | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOTSUPP, | 2114 | | NFS4ERR_NOSPC, NFS4ERR_OLD_STATEID, | 2115 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2116 | | NFS4ERR_REP_TOO_BIG, | 2117 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2118 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2119 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2120 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2121 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE, | 2122 | | NFS4ERR_XDEV | 2123 | COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2124 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2125 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2126 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2127 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2128 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2129 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | 2130 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2131 | | NFS4ERR_NOSPC, NFS4ERR_OFFLOAD_DENIED, | 2132 | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | 2133 | | NFS4ERR_OP_NOT_IN_SESSION, | 2134 | | NFS4ERR_PARTNER_NO_AUTH, | 2135 | | NFS4ERR_PARTNER_NOTSUPP, NFS4ERR_PNFS_IO_HOLE, | 2136 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2137 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2138 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2139 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2140 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2141 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2142 | COPY_NOTIFY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2143 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2144 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2145 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2146 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2147 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2148 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2149 | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | 2150 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | 2151 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2152 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2153 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2154 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2155 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2156 | | NFS4ERR_WRONG_TYPE | 2157 | DEALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2158 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2159 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2160 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2161 | | NFS4ERR_FBIG, NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, | 2162 | | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, | 2163 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2164 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2165 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2166 | | NFS4ERR_REP_TOO_BIG, | 2167 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2168 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2169 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2170 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2171 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2172 | GETDEVICELIST | NFS4ERR_NOTSUPP | 2173 | LAYOUTERROR | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2174 | | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, | 2175 | | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, | 2176 | | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, | 2177 | | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, | 2178 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2179 | | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, | 2180 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2181 | | NFS4ERR_REP_TOO_BIG, | 2182 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2183 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2184 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2185 | | NFS4ERR_TOO_MANY_OPS, | 2186 | | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, | 2187 | | NFS4ERR_WRONG_TYPE | 2188 | LAYOUTSTATS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2189 | | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, | 2190 | | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, | 2191 | | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, | 2192 | | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, | 2193 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2194 | | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, | 2195 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2196 | | NFS4ERR_REP_TOO_BIG, | 2197 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2198 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2199 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2200 | | NFS4ERR_TOO_MANY_OPS, | 2201 | | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, | 2202 | | NFS4ERR_WRONG_TYPE | 2203 | OFFLOAD_CANCEL | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2204 | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | 2205 | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | 2206 | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | 2207 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2208 | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | 2209 | OFFLOAD_STATUS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | 2210 | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | 2211 | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | 2212 | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | 2213 | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | 2214 | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | 2215 | READ_PLUS | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2216 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2217 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2218 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2219 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2220 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2221 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2222 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2223 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2224 | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, | 2225 | | NFS4ERR_REP_TOO_BIG, | 2226 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2227 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2228 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2229 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2230 | | NFS4ERR_WRONG_TYPE | 2231 | SEEK | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2232 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2233 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2234 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, | 2235 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2236 | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | 2237 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2238 | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | 2239 | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | 2240 | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, | 2241 | | NFS4ERR_REP_TOO_BIG, | 2242 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2243 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2244 | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | 2245 | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | 2246 | | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE | 2247 | WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | 2248 | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | 2249 | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | 2250 | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | 2251 | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | 2252 | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | 2253 | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | 2254 | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | 2255 | | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, | 2256 | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | 2257 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | 2258 | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | 2259 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, | 2260 | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | 2261 | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | 2262 | | NFS4ERR_STALE, NFS4ERR_SYMLINK, | 2263 | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | 2264 +----------------+--------------------------------------------------+ 2266 Table 2 2268 11.3. New Callback Operations and Their Valid Errors 2270 This section contains a table that gives the valid error returns for 2271 each new NFSv4.2 callback operation. The error code NFS4_OK 2272 (indicating no error) is not listed but should be understood to be 2273 returnable by all new callback operations. The error values for all 2274 other callback operations are defined in Section 15.3 of [RFC5661]. 2276 Valid Error Returns for Each New Protocol Callback Operation 2278 +------------+------------------------------------------------------+ 2279 | Callback | Errors | 2280 | Operation | | 2281 +------------+------------------------------------------------------+ 2282 | CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, | 2283 | | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, | 2284 | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, | 2285 | | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, | 2286 | | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, | 2287 | | NFS4ERR_TOO_MANY_OPS | 2288 +------------+------------------------------------------------------+ 2290 Table 3 2292 12. New File Attributes 2294 12.1. New RECOMMENDED Attributes - List and Definition References 2296 The list of new RECOMMENDED attributes appears in Table 4. The 2297 meaning of the columns of the table are: 2299 Name: The name of the attribute. 2301 Id: The number assigned to the attribute. In the event of conflicts 2302 between the assigned number and [NFSv42xdr], the latter is likely 2303 authoritative, but should be resolved with Errata to this document 2304 and/or [NFSv42xdr]. See [IESG08] for the Errata process. 2306 Data Type: The XDR data type of the attribute. 2308 Acc: Access allowed to the attribute. 2310 R means read-only (GETATTR may retrieve, SETATTR may not set). 2312 W means write-only (SETATTR may set, GETATTR may not retrieve). 2314 R W means read/write (GETATTR may retrieve, SETATTR may set). 2316 Defined in: The section of this specification that describes the 2317 attribute. 2319 +------------------+----+-------------------+-----+----------------+ 2320 | Name | Id | Data Type | Acc | Defined in | 2321 +------------------+----+-------------------+-----+----------------+ 2322 | clone_blksize | 77 | length4 | R | Section 12.2.1 | 2323 | space_freed | 78 | length4 | R | Section 12.2.2 | 2324 | change_attr_type | 79 | change_attr_type4 | R | Section 12.2.3 | 2325 | sec_label | 80 | sec_label4 | R W | Section 12.2.4 | 2326 +------------------+----+-------------------+-----+----------------+ 2328 Table 4 2330 12.2. Attribute Definitions 2332 12.2.1. Attribute 77: clone_blksize 2334 The clone_blksize attribute indicates the granularity of a CLONE 2335 operation. 2337 12.2.2. Attribute 78: space_freed 2339 space_freed gives the number of bytes freed if the file is deleted. 2340 This attribute is read only and is of type length4. It is a per file 2341 attribute. 2343 12.2.3. Attribute 79: change_attr_type 2345 2347 enum change_attr_type4 { 2348 NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, 2349 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, 2350 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, 2351 NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, 2352 NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 2353 }; 2355 2357 change_attr_type is a per file system attribute which enables the 2358 NFSv4.2 server to provide additional information about how it expects 2359 the change attribute value to evolve after the file data, or metadata 2360 has changed. While Section 5.4 of [RFC5661] discusses per file 2361 system attributes, it is expected that the value of change_attr_type 2362 not depend on the value of "homogeneous" and only changes in the 2363 event of a migration. 2365 NFS4_CHANGE_TYPE_IS_UNDEFINED: The change attribute does not take 2366 values that fit into any of these categories. 2368 NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR: The change attribute value MUST 2369 monotonically increase for every atomic change to the file 2370 attributes, data, or directory contents. 2372 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER: The change attribute value MUST 2373 be incremented by one unit for every atomic change to the file 2374 attributes, data, or directory contents. This property is 2375 preserved when writing to pNFS data servers. 2377 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute 2378 value MUST be incremented by one unit for every atomic change to 2379 the file attributes, data, or directory contents. In the case 2380 where the client is writing to pNFS data servers, the number of 2381 increments is not guaranteed to exactly match the number of 2382 writes. 2384 NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is 2385 implemented as suggested in [RFC7530] in terms of the 2386 time_metadata attribute. 2388 If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR, 2389 NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or 2390 NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at 2391 the very least that the change attribute is monotonically increasing, 2392 which is sufficient to resolve the question of which value is the 2393 most recent. 2395 If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then 2396 by inspecting the value of the 'time_delta' attribute it additionally 2397 has the option of detecting rogue server implementations that use 2398 time_metadata in violation of the spec. 2400 If the client sees NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, it has the 2401 ability to predict what the resulting change attribute value should 2402 be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This 2403 again allows it to detect changes made in parallel by another client. 2404 The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the 2405 same, but only if the client is not doing pNFS WRITEs. 2407 Finally, if the server does not support change_attr_type or if 2408 NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an 2409 effort to implement the change attribute in terms of the 2410 time_metadata attribute. 2412 12.2.4. Attribute 80: sec_label 2414 2416 typedef uint32_t policy4; 2418 struct labelformat_spec4 { 2419 policy4 lfs_lfs; 2420 policy4 lfs_pi; 2421 }; 2423 struct sec_label4 { 2424 labelformat_spec4 slai_lfs; 2425 opaque slai_data<>; 2426 }; 2428 2430 The FATTR4_SEC_LABEL contains an array of two components with the 2431 first component being an LFS. It serves to provide the receiving end 2432 with the information necessary to translate the security attribute 2433 into a form that is usable by the endpoint. Label Formats assigned 2434 an LFS may optionally choose to include a Policy Identifier field to 2435 allow for complex policy deployments. The LFS and Label Format 2436 Registry are described in detail in [Quigley14]. The translation 2437 used to interpret the security attribute is not specified as part of 2438 the protocol as it may depend on various factors. The second 2439 component is an opaque section which contains the data of the 2440 attribute. This component is dependent on the MAC model to interpret 2441 and enforce. 2443 In particular, it is the responsibility of the LFS specification to 2444 define a maximum size for the opaque section, slai_data<>. When 2445 creating or modifying a label for an object, the client needs to be 2446 guaranteed that the server will accept a label that is sized 2447 correctly. By both client and server being part of a specific MAC 2448 model, the client will be aware of the size. 2450 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL 2452 The following tables summarize the operations of the NFSv4.2 protocol 2453 and the corresponding designation of REQUIRED, RECOMMENDED, and 2454 OPTIONAL to implement or MUST NOT implement. The designation of MUST 2455 NOT implement is reserved for those operations that were defined in 2456 either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2. 2458 For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation 2459 for operations sent by the client is for the server implementation. 2461 The client is generally required to implement the operations needed 2462 for the operating environment for which it serves. For example, a 2463 read-only NFSv4.2 client would have no need to implement the WRITE 2464 operation and is not required to do so. 2466 The REQUIRED or OPTIONAL designation for callback operations sent by 2467 the server is for both the client and server. Generally, the client 2468 has the option of creating the backchannel and sending the operations 2469 on the fore channel that will be a catalyst for the server sending 2470 callback operations. A partial exception is CB_RECALL_SLOT; the only 2471 way the client can avoid supporting this operation is by not creating 2472 a backchannel. 2474 Since this is a summary of the operations and their designation, 2475 there are subtleties that are not presented here. Therefore, if 2476 there is a question of the requirements of implementation, the 2477 operation descriptions themselves must be consulted along with other 2478 relevant explanatory text within this either specification or that of 2479 NFSv4.1 [RFC5661]. 2481 The abbreviations used in the second and third columns of the table 2482 are defined as follows. 2484 REQ: REQUIRED to implement 2486 REC: RECOMMENDED to implement 2488 OPT: OPTIONAL to implement 2490 MNI: MUST NOT implement 2492 For the NFSv4.2 features that are OPTIONAL, the operations that 2493 support those features are OPTIONAL, and the server MUST return 2494 NFS4ERR_NOTSUPP in response to the client's use of those operations, 2495 when those operations are not implemented by the server. If an 2496 OPTIONAL feature is supported, it is possible that a set of 2497 operations related to the feature become REQUIRED to implement. The 2498 third column of the table designates the feature(s) and if the 2499 operation is REQUIRED or OPTIONAL in the presence of support for the 2500 feature. 2502 The OPTIONAL features identified and their abbreviations are as 2503 follows: 2505 pNFS: Parallel NFS 2507 FDELG: File Delegations 2508 DDELG: Directory Delegations 2510 COPYra: Intra-server Server Side Copy 2512 COPYer: Inter-server Server Side Copy 2514 ADB: Application Data Blocks 2516 Operations 2518 +----------------------+---------------------+----------------------+ 2519 | Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, | 2520 | | or MNI | or OPT) | 2521 +----------------------+---------------------+----------------------+ 2522 | ALLOCATE | OPT | | 2523 | ACCESS | REQ | | 2524 | BACKCHANNEL_CTL | REQ | | 2525 | BIND_CONN_TO_SESSION | REQ | | 2526 | CLONE | OPT | | 2527 | CLOSE | REQ | | 2528 | COMMIT | REQ | | 2529 | COPY | OPT | COPYer (REQ), COPYra | 2530 | | | (REQ) | 2531 | COPY_NOTIFY | OPT | COPYer (REQ) | 2532 | DEALLOCATE | OPT | | 2533 | CREATE | REQ | | 2534 | CREATE_SESSION | REQ | | 2535 | DELEGPURGE | OPT | FDELG (REQ) | 2536 | DELEGRETURN | OPT | FDELG, DDELG, pNFS | 2537 | | | (REQ) | 2538 | DESTROY_CLIENTID | REQ | | 2539 | DESTROY_SESSION | REQ | | 2540 | EXCHANGE_ID | REQ | | 2541 | FREE_STATEID | REQ | | 2542 | GETATTR | REQ | | 2543 | GETDEVICEINFO | OPT | pNFS (REQ) | 2544 | GETDEVICELIST | MNI | pNFS (MNI) | 2545 | GETFH | REQ | | 2546 | GET_DIR_DELEGATION | OPT | DDELG (REQ) | 2547 | LAYOUTCOMMIT | OPT | pNFS (REQ) | 2548 | LAYOUTGET | OPT | pNFS (REQ) | 2549 | LAYOUTRETURN | OPT | pNFS (REQ) | 2550 | LAYOUTERROR | OPT | pNFS (OPT) | 2551 | LAYOUTSTATS | OPT | pNFS (OPT) | 2552 | LINK | OPT | | 2553 | LOCK | REQ | | 2554 | LOCKT | REQ | | 2555 | LOCKU | REQ | | 2556 | LOOKUP | REQ | | 2557 | LOOKUPP | REQ | | 2558 | NVERIFY | REQ | | 2559 | OFFLOAD_CANCEL | OPT | COPYer (REQ), COPYra | 2560 | | | (REQ) | 2561 | OFFLOAD_STATUS | OPT | COPYer (REQ), COPYra | 2562 | | | (REQ) | 2563 | OPEN | REQ | | 2564 | OPENATTR | OPT | | 2565 | OPEN_CONFIRM | MNI | | 2566 | OPEN_DOWNGRADE | REQ | | 2567 | PUTFH | REQ | | 2568 | PUTPUBFH | REQ | | 2569 | PUTROOTFH | REQ | | 2570 | READ | REQ | | 2571 | READDIR | REQ | | 2572 | READLINK | OPT | | 2573 | READ_PLUS | OPT | | 2574 | RECLAIM_COMPLETE | REQ | | 2575 | RELEASE_LOCKOWNER | MNI | | 2576 | REMOVE | REQ | | 2577 | RENAME | REQ | | 2578 | RENEW | MNI | | 2579 | RESTOREFH | REQ | | 2580 | SAVEFH | REQ | | 2581 | SECINFO | REQ | | 2582 | SECINFO_NO_NAME | REC | pNFS file layout | 2583 | | | (REQ) | 2584 | SEEK | OPT | | 2585 | SEQUENCE | REQ | | 2586 | SETATTR | REQ | | 2587 | SETCLIENTID | MNI | | 2588 | SETCLIENTID_CONFIRM | MNI | | 2589 | SET_SSV | REQ | | 2590 | TEST_STATEID | REQ | | 2591 | VERIFY | REQ | | 2592 | WANT_DELEGATION | OPT | FDELG (OPT) | 2593 | WRITE | REQ | | 2594 | WRITE_SAME | OPT | ADB (REQ) | 2595 +----------------------+---------------------+----------------------+ 2596 Callback Operations 2598 +-------------------------+------------------+----------------------+ 2599 | Operation | REQ, REC, OPT, | Feature (REQ, REC, | 2600 | | or MNI | or OPT) | 2601 +-------------------------+------------------+----------------------+ 2602 | CB_OFFLOAD | OPT | COPYer (REQ), COPYra | 2603 | | | (REQ) | 2604 | CB_GETATTR | OPT | FDELG (REQ) | 2605 | CB_LAYOUTRECALL | OPT | pNFS (REQ) | 2606 | CB_NOTIFY | OPT | DDELG (REQ) | 2607 | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | 2608 | CB_NOTIFY_LOCK | OPT | | 2609 | CB_PUSH_DELEG | OPT | FDELG (OPT) | 2610 | CB_RECALL | OPT | FDELG, DDELG, pNFS | 2611 | | | (REQ) | 2612 | CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS | 2613 | | | (REQ) | 2614 | CB_RECALL_SLOT | REQ | | 2615 | CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) | 2616 | CB_SEQUENCE | OPT | FDELG, DDELG, pNFS | 2617 | | | (REQ) | 2618 | CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS | 2619 | | | (REQ) | 2620 +-------------------------+------------------+----------------------+ 2622 14. Modifications to NFSv4.1 Operations 2624 14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID 2626 14.1.1. ARGUMENT 2628 2630 /* new */ 2631 const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; 2633 2635 14.1.2. RESULT 2637 Unchanged 2639 14.1.3. MOTIVATION 2641 Enterprise applications require guarantees that an operation has 2642 either aborted or completed. NFSv4.1 provides this guarantee as long 2643 as the session is alive: simply send a SEQUENCE operation on the same 2644 slot with a new sequence number, and the successful return of 2645 SEQUENCE indicates the previous operation has completed. However, if 2646 the session is lost, there is no way to know when any in progress 2647 operations have aborted or completed. In hindsight, the NFSv4.1 2648 specification should have mandated that DESTROY_SESSION either abort 2649 or complete all outstanding operations. 2651 14.1.4. DESCRIPTION 2653 A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability 2654 when it sends an EXCHANGE_ID operation. The server SHOULD set this 2655 capability in the EXCHANGE_ID reply whether the client requests it or 2656 not. It is the server's return that determines whether this 2657 capability is in effect. When it is in effect, the following will 2658 occur: 2660 o The server will not reply to any DESTROY_SESSION invoked with the 2661 client ID until all operations in progress are completed or 2662 aborted. 2664 o The server will not reply to subsequent EXCHANGE_ID invoked on the 2665 same client owner with a new verifier until all operations in 2666 progress on the client ID's session are completed or aborted. 2668 o In implementations where the NFS server is deployed as a cluster, 2669 it does support client ID trunking, and the 2670 EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a session 2671 ID created on one node of the storage cluster MUST be destroyable 2672 via DESTROY_SESSION. In addition, DESTROY_CLIENTID and an 2673 EXCHANGE_ID with a new verifier affects all sessions regardless 2674 what node the sessions were created on. 2676 14.2. Operation 48: GETDEVICELIST - Get All Device Mappings for a File 2677 System 2679 14.2.1. ARGUMENT 2681 2682 struct GETDEVICELIST4args { 2683 /* CURRENT_FH: object belonging to the file system */ 2684 layouttype4 gdla_layout_type; 2686 /* number of deviceIDs to return */ 2687 count4 gdla_maxdevices; 2689 nfs_cookie4 gdla_cookie; 2690 verifier4 gdla_cookieverf; 2691 }; 2693 2695 14.2.2. RESULT 2697 2699 struct GETDEVICELIST4resok { 2700 nfs_cookie4 gdlr_cookie; 2701 verifier4 gdlr_cookieverf; 2702 deviceid4 gdlr_deviceid_list<>; 2703 bool gdlr_eof; 2704 }; 2706 union GETDEVICELIST4res switch (nfsstat4 gdlr_status) { 2707 case NFS4_OK: 2708 GETDEVICELIST4resok gdlr_resok4; 2709 default: 2710 void; 2711 }; 2713 2715 14.2.3. MOTIVATION 2717 The GETDEVICELIST operation was introduced in [RFC5661] specifically 2718 to request a list of devices at filesystem mount time from block 2719 layout type servers. However use of the GETDEVICELIST operation 2720 introduces a race condition versus notification about changes to pNFS 2721 device IDs as provided by CB_NOTIFY_DEVICEID. Implementation 2722 experience with block layout servers has shown there is no need for 2723 GETDEVICELIST. Clients have to be able to request new devices using 2724 GETDEVICEINFO at any time in response either to a new deviceid in 2725 LAYOUTGET results or to the CB_NOTIFY_DEVICEID callback operation. 2727 14.2.4. DESCRIPTION 2729 Clients and servers MUST NOT implement the GETDEVICELIST operation. 2731 15. NFSv4.2 Operations 2733 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a File 2735 15.1.1. ARGUMENT 2737 2739 struct ALLOCATE4args { 2740 /* CURRENT_FH: file */ 2741 stateid4 aa_stateid; 2742 offset4 aa_offset; 2743 length4 aa_length; 2744 }; 2746 2748 15.1.2. RESULT 2750 2752 struct ALLOCATE4res { 2753 nfsstat4 ar_status; 2754 }; 2756 2758 15.1.3. DESCRIPTION 2760 Whenever a client wishes to reserve space for a region in a file it 2761 calls the ALLOCATE operation with the current filehandle set to the 2762 filehandle of the file in question, and the start offset and length 2763 in bytes of the region set in aa_offset and aa_length respectively. 2765 CURRENT_FH must be a regular file. If CURRENT_FH is not a regular 2766 file, the operation MUST fail and return NFS4ERR_WRONG_TYPE. 2768 The aa_stateid MUST refer to a stateid that is valid for a WRITE 2769 operation and follows the rules for stateids in Sections 8.2.5 and 2770 18.32.3 of [RFC5661]. 2772 The server will ensure that backing blocks are reserved to the region 2773 specified by aa_offset and aa_length, and that no future writes into 2774 this region will return NFS4ERR_NOSPC. If the region lies partially 2775 or fully outside the current file size the file size will be set to 2776 aa_offset + aa_length implicitly. If the server cannot guarantee 2777 this, it must return NFS4ERR_NOSPC. 2779 The ALLOCATE operation can also be used to extend the size of a file 2780 if the region specified by aa_offset and aa_length extends beyond the 2781 current file size. In that case any data outside of the previous 2782 file size will return zeroes when read before data is written to it. 2784 It is not required that the server allocate the space to the file 2785 before returning success. The allocation can be deferred, however, 2786 it must be guaranteed that it will not fail for lack of space. The 2787 deferral does not result in an asynchronous reply. 2789 The ALLOCATE operation will result in the space_used attribute and 2790 space_freed attributes being increased by the number of bytes 2791 reserved unless they were previously reserved or written and not 2792 shared. 2794 15.2. Operation 60: COPY - Initiate a server-side copy 2796 15.2.1. ARGUMENT 2798 2800 struct COPY4args { 2801 /* SAVED_FH: source file */ 2802 /* CURRENT_FH: destination file */ 2803 stateid4 ca_src_stateid; 2804 stateid4 ca_dst_stateid; 2805 offset4 ca_src_offset; 2806 offset4 ca_dst_offset; 2807 length4 ca_count; 2808 bool ca_consecutive; 2809 bool ca_synchronous; 2810 netloc4 ca_source_server<>; 2811 }; 2813 2815 15.2.2. RESULT 2817 2818 struct write_response4 { 2819 stateid4 wr_callback_id<1>; 2820 length4 wr_count; 2821 stable_how4 wr_committed; 2822 verifier4 wr_writeverf; 2823 }; 2825 struct copy_requirements4 { 2826 bool cr_consecutive; 2827 bool cr_synchronous; 2828 }; 2830 struct COPY4resok { 2831 write_response4 cr_response; 2832 copy_requirements4 cr_requirements; 2833 }; 2835 union COPY4res switch (nfsstat4 cr_status) { 2836 case NFS4_OK: 2837 COPY4resok cr_resok4; 2838 case NFS4ERR_OFFLOAD_NO_REQS: 2839 copy_requirements4 cr_requirements; 2840 default: 2841 void; 2842 }; 2844 2846 15.2.3. DESCRIPTION 2848 The COPY operation is used for both intra-server and inter-server 2849 copies. In both cases, the COPY is always sent from the client to 2850 the destination server of the file copy. The COPY operation requests 2851 that a range in the file specified by SAVED_FH is copied to a range 2852 in the file specified by CURRENT_FH. 2854 Both SAVED_FH and CURRENT_FH must be regular files. If either 2855 SAVED_FH or CURRENT_FH is not a regular file, the operation MUST fail 2856 and return NFS4ERR_WRONG_TYPE. 2858 SAVED_FH and CURRENT_FH must be different files. If SAVED_FH and 2859 CURRENT_FH refer to the same file, the operation MUST fail with 2860 NFS4ERR_INVAL. 2862 If the request is for an inter-server-to-server copy, the source-fh 2863 is a filehandle from the source server and the compound procedure is 2864 being executed on the destination server. In this case, the source- 2865 fh is a foreign filehandle on the server receiving the COPY request. 2866 If either PUTFH or SAVEFH checked the validity of the filehandle, the 2867 operation would likely fail and return NFS4ERR_STALE. 2869 If a server supports the inter-server-to-server COPY feature, a PUTFH 2870 followed by a SAVEFH MUST NOT return NFS4ERR_STALE for either 2871 operation. These restrictions do not pose substantial difficulties 2872 for servers. CURRENT_FH and SAVED_FH may be validated in the context 2873 of the operation referencing them and an NFS4ERR_STALE error returned 2874 for an invalid file handle at that point. 2876 The ca_dst_stateid MUST refer to a stateid that is valid for a WRITE 2877 operation and follows the rules for stateids in Sections 8.2.5 and 2878 18.32.3 of [RFC5661]. For an inter-server copy, the ca_src_stateid 2879 MUST be the cnr_stateid returned from the earlier COPY_NOTIFY 2880 operation, while for an intra-server copy ca_src_stateid MUST refer 2881 to a stateid that is valid for a READ operations and follows the 2882 rules for stateids in Sections 8.2.5 and 18.22.3 of [RFC5661]. If 2883 either stateid is invalid, then the operation MUST fail. 2885 The ca_src_offset is the offset within the source file from which the 2886 data will be read, the ca_dst_offset is the offset within the 2887 destination file to which the data will be written, and the ca_count 2888 is the number of bytes that will be copied. An offset of 0 (zero) 2889 specifies the start of the file. A count of 0 (zero) requests that 2890 all bytes from ca_src_offset through EOF be copied to the 2891 destination. If concurrent modifications to the source file overlap 2892 with the source file region being copied, the data copied may include 2893 all, some, or none of the modifications. The client can use standard 2894 NFS operations (e.g., OPEN with OPEN4_SHARE_DENY_WRITE or mandatory 2895 byte range locks) to protect against concurrent modifications if the 2896 client is concerned about this. If the source file's end of file is 2897 being modified in parallel with a copy that specifies a count of 0 2898 (zero) bytes, the amount of data copied is implementation dependent 2899 (clients may guard against this case by specifying a non-zero count 2900 value or preventing modification of the source file as mentioned 2901 above). 2903 If the source offset or the source offset plus count is greater than 2904 the size of the source file, the operation MUST fail with 2905 NFS4ERR_INVAL. The destination offset or destination offset plus 2906 count may be greater than the size of the destination file. This 2907 allows for the client to issue parallel copies to implement 2908 operations such as 2910 2912 % cat file1 file2 file3 file4 > dest 2914 2916 If the ca_source_server list is specified, then this is an inter- 2917 server copy operation and the source file is on a remote server. The 2918 client is expected to have previously issued a successful COPY_NOTIFY 2919 request to the remote source server. The ca_source_server list MUST 2920 be the same as the COPY_NOTIFY response's cnr_source_server list. If 2921 the client includes the entries from the COPY_NOTIFY response's 2922 cnr_source_server list in the ca_source_server list, the source 2923 server can indicate a specific copy protocol for the destination 2924 server to use by returning a URL, which specifies both a protocol 2925 service and server name. Server-to-server copy protocol 2926 considerations are described in Section 4.7 and Section 4.10.1. 2928 If ca_consecutive is set, then the client has specified that the copy 2929 protocol selected MUST copy bytes in consecutive order from 2930 ca_src_offset to ca_count. If the destination server cannot meet 2931 this requirement, then it MUST return an error of 2932 NFS4ERR_OFFLOAD_NO_REQS and set cr_consecutive to be false. 2933 Likewise, if ca_synchronous is set, then the client has required that 2934 the copy protocol selected MUST perform a synchronous copy. If the 2935 destination server cannot meet this requirement, then it MUST return 2936 an error of NFS4ERR_OFFLOAD_NO_REQS and set cr_synchronous to be 2937 false. 2939 If both are set by the client, then the destination SHOULD try to 2940 determine if it can respond to both requirements at the same time. 2941 If it cannot make that determination, it must set to false the one it 2942 can and set to true the other. The client, upon getting an 2943 NFS4ERR_OFFLOAD_NO_REQS error, has to examine both cr_consecutive and 2944 cr_synchronous against the respective values of ca_consecutive and 2945 ca_synchronous to determine the possible requirement not met. It 2946 MUST be prepared for the destination server not being able to 2947 determine both requirements at the same time. 2949 Upon receiving the NFS4ERR_OFFLOAD_NO_REQS error, the client has to 2950 determine if it wants to either re-request the copy with a relaxed 2951 set of requirements or if it wants to revert to manually copying the 2952 data. If it decides to manually copy the data and this is a remote 2953 copy, then the client is responsible for informing the source that 2954 the earlier COPY_NOTIFY is no longer valid by sending it an 2955 OFFLOAD_CANCEL. 2957 If the operation does not result in an immediate failure, the server 2958 will return NFS4_OK. 2960 If the wr_callback_id is returned, this indicates that an 2961 asynchronous COPY operation was initiated and a CB_OFFLOAD callback 2962 will deliver the final results of the operation. The wr_callback_id 2963 stateid is termed a copy stateid in this context. The server is 2964 given the option of returning the results in a callback because the 2965 data may require a relatively long period of time to copy. 2967 If no wr_callback_id is returned, the operation completed 2968 synchronously and no callback will be issued by the server. The 2969 completion status of the operation is indicated by cr_status. 2971 If the copy completes successfully, either synchronously or 2972 asynchronously, the data copied from the source file to the 2973 destination file MUST appear identical to the NFS client. However, 2974 the NFS server's on disk representation of the data in the source 2975 file and destination file MAY differ. For example, the NFS server 2976 might encrypt, compress, deduplicate, or otherwise represent the on 2977 disk data in the source and destination file differently. 2979 If a failure does occur for a synchronous copy, wr_count will be set 2980 to the number of bytes copied to the destination file before the 2981 error occurred. If cr_consecutive is true, then the bytes were 2982 copied in order. If the failure occurred for an asynchronous copy, 2983 then the client will have gotten the notification of the consecutive 2984 copy order when it got the copy stateid. It will be able to 2985 determine the bytes copied from the coa_bytes_copied in the 2986 CB_OFFLOAD argument. 2988 In either case, if cr_consecutive was not true, there is no assurance 2989 as to exactly which bytes in the range were copied. The client MUST 2990 assume that there exists a mixture of the original contents of the 2991 range and the new bytes. If the COPY wrote past the end of the file 2992 on the destination, then the last byte written to will determine the 2993 new file size. The contents of any block not written to and past the 2994 original size of the file will be as if a normal WRITE extended the 2995 file. 2997 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a future 2998 copy 3000 15.3.1. ARGUMENT 3002 3003 struct COPY_NOTIFY4args { 3004 /* CURRENT_FH: source file */ 3005 stateid4 cna_src_stateid; 3006 netloc4 cna_destination_server; 3007 }; 3009 3011 15.3.2. RESULT 3013 3015 struct COPY_NOTIFY4resok { 3016 nfstime4 cnr_lease_time; 3017 stateid4 cnr_stateid; 3018 netloc4 cnr_source_server<>; 3019 }; 3021 union COPY_NOTIFY4res switch (nfsstat4 cnr_status) { 3022 case NFS4_OK: 3023 COPY_NOTIFY4resok resok4; 3024 default: 3025 void; 3026 }; 3028 3030 15.3.3. DESCRIPTION 3032 This operation is used for an inter-server copy. A client sends this 3033 operation in a COMPOUND request to the source server to authorize a 3034 destination server identified by cna_destination_server to read the 3035 file specified by CURRENT_FH on behalf of the given user. 3037 The cna_src_stateid MUST refer to either open or locking states 3038 provided earlier by the server. If it is invalid, then the operation 3039 MUST fail. 3041 The cna_destination_server MUST be specified using the netloc4 3042 network location format. The server is not required to resolve the 3043 cna_destination_server address before completing this operation. 3045 If this operation succeeds, the source server will allow the 3046 cna_destination_server to copy the specified file on behalf of the 3047 given user as long as both of the following conditions are met: 3049 o The destination server begins reading the source file before the 3050 cnr_lease_time expires. If the cnr_lease_time expires while the 3051 destination server is still reading the source file, the 3052 destination server is allowed to finish reading the file. 3054 o The client has not issued a OFFLOAD_CANCEL for the same 3055 combination of user, filehandle, and destination server. 3057 The cnr_lease_time is chosen by the source server. A cnr_lease_time 3058 of 0 (zero) indicates an infinite lease. To avoid the need for 3059 synchronized clocks, copy lease times are granted by the server as a 3060 time delta. To renew the copy lease time the client should resend 3061 the same copy notification request to the source server. 3063 The cnr_stateid is a copy stateid which uniquely describes the state 3064 needed on the source server to track the proposed copy. As defined 3065 in Section 8.2 of [RFC5661], a stateid is tied to the current 3066 filehandle and if the same stateid is presented by two different 3067 clients, it may refer to different state. As the source does not 3068 know which netloc4 network location the destinaton might use to 3069 establish the copy operation, it can use the cnr_stateid to identify 3070 that the destination is operating on behalf of the client. Thus the 3071 source server MUST construct copy stateids such that they are 3072 distinct from all other stateids handed out to clients. These copy 3073 stateids MUST denote the same set of locks as each of the earlier 3074 delegation, locking, and open states for the client on the given file 3075 (see Section 4.4.1). 3077 A successful response will also contain a list of netloc4 network 3078 location formats called cnr_source_server, on which the source is 3079 willing to accept connections from the destination. These might not 3080 be reachable from the client and might be located on networks to 3081 which the client has no connection. 3083 For a copy only involving one server (the source and destination are 3084 on the same server), this operation is unnecessary. 3086 15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region of a File 3088 15.4.1. ARGUMENT 3090 3091 struct DEALLOCATE4args { 3092 /* CURRENT_FH: file */ 3093 stateid4 da_stateid; 3094 offset4 da_offset; 3095 length4 da_length; 3096 }; 3098 3100 15.4.2. RESULT 3102 3104 struct DEALLOCATE4res { 3105 nfsstat4 dr_status; 3106 }; 3108 3110 15.4.3. DESCRIPTION 3112 Whenever a client wishes to unreserve space for a region in a file it 3113 calls the DEALLOCATE operation with the current filehandle set to the 3114 filehandle of the file in question, and the start offset and length 3115 in bytes of the region set in da_offset and da_length respectively. 3116 If no space was allocated or reserved for all or parts of the region, 3117 the DEALLOCATE operation will have no effect for the region that 3118 already is in unreserved state. All further reads from the region 3119 passed to DEALLOCATE MUST return zeros until overwritten. 3121 CURRENT_FH must be a regular file. If CURRENT_FH is not a regular 3122 file, the operation MUST fail and return NFS4ERR_WRONG_TYPE. 3124 The da_stateid MUST refer to a stateid that is valid for a WRITE 3125 operation and follows the rules for stateids in Sections 8.2.5 and 3126 18.32.3 of [RFC5661]. 3128 Situations may arise where da_offset and/or da_offset + da_length 3129 will not be aligned to a boundary for which the server does 3130 allocations or deallocations. For most file systems, this is the 3131 block size of the file system. In such a case, the server can 3132 deallocate as many bytes as it can in the region. The blocks that 3133 cannot be deallocated MUST be zeroed. 3135 DEALLOCATE will result in the space_used attribute being decreased by 3136 the number of bytes that were deallocated. The space_freed attribute 3137 may or may not decrease, depending on the support and whether the 3138 blocks backing the specified range were shared or not. The size 3139 attribute will remain unchanged. 3141 15.5. Operation 63: IO_ADVISE - Application I/O access pattern hints 3143 15.5.1. ARGUMENT 3145 3147 enum IO_ADVISE_type4 { 3148 IO_ADVISE4_NORMAL = 0, 3149 IO_ADVISE4_SEQUENTIAL = 1, 3150 IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, 3151 IO_ADVISE4_RANDOM = 3, 3152 IO_ADVISE4_WILLNEED = 4, 3153 IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, 3154 IO_ADVISE4_DONTNEED = 6, 3155 IO_ADVISE4_NOREUSE = 7, 3156 IO_ADVISE4_READ = 8, 3157 IO_ADVISE4_WRITE = 9, 3158 IO_ADVISE4_INIT_PROXIMITY = 10 3159 }; 3161 struct IO_ADVISE4args { 3162 /* CURRENT_FH: file */ 3163 stateid4 iaa_stateid; 3164 offset4 iaa_offset; 3165 length4 iaa_count; 3166 bitmap4 iaa_hints; 3167 }; 3169 3171 15.5.2. RESULT 3173 3174 struct IO_ADVISE4resok { 3175 bitmap4 ior_hints; 3176 }; 3178 union IO_ADVISE4res switch (nfsstat4 ior_status) { 3179 case NFS4_OK: 3180 IO_ADVISE4resok resok4; 3181 default: 3182 void; 3183 }; 3185 3187 15.5.3. DESCRIPTION 3189 The IO_ADVISE operation sends an I/O access pattern hint to the 3190 server for the owner of the stateid for a given byte range specified 3191 by iar_offset and iar_count. The byte range specified by iaa_offset 3192 and iaa_count need not currently exist in the file, but the iaa_hints 3193 will apply to the byte range when it does exist. If iaa_count is 0, 3194 all data following iaa_offset is specified. The server MAY ignore 3195 the advice. 3197 The following are the allowed hints for a stateid holder: 3199 IO_ADVISE4_NORMAL There is no advice to give, this is the default 3200 behavior. 3202 IO_ADVISE4_SEQUENTIAL Expects to access the specified data 3203 sequentially from lower offsets to higher offsets. 3205 IO_ADVISE4_SEQUENTIAL_BACKWARDS Expects to access the specified data 3206 sequentially from higher offsets to lower offsets. 3208 IO_ADVISE4_RANDOM Expects to access the specified data in a random 3209 order. 3211 IO_ADVISE4_WILLNEED Expects to access the specified data in the near 3212 future. 3214 IO_ADVISE4_WILLNEED_OPPORTUNISTIC Expects to possibly access the 3215 data in the near future. This is a speculative hint, and 3216 therefore the server should prefetch data or indirect blocks only 3217 if it can be done at a marginal cost. 3219 IO_ADVISE_DONTNEED Expects that it will not access the specified 3220 data in the near future. 3222 IO_ADVISE_NOREUSE Expects to access the specified data once and then 3223 not reuse it thereafter. 3225 IO_ADVISE4_READ Expects to read the specified data in the near 3226 future. 3228 IO_ADVISE4_WRITE Expects to write the specified data in the near 3229 future. 3231 IO_ADVISE4_INIT_PROXIMITY Informs the server that the data in the 3232 byte range remains important to the client. 3234 Since IO_ADVISE is a hint, a server SHOULD NOT return an error and 3235 invalidate a entire Compound request if one of the sent hints in 3236 iar_hints is not supported by the server. Also, the server MUST NOT 3237 return an error if the client sends contradictory hints to the 3238 server, e.g., IO_ADVISE4_SEQUENTIAL and IO_ADVISE4_RANDOM in a single 3239 IO_ADVISE operation. In these cases, the server MUST return success 3240 and a ior_hints value that indicates the hint it intends to 3241 implement. This may mean simply returning IO_ADVISE4_NORMAL. 3243 The ior_hints returned by the server is primarily for debugging 3244 purposes since the server is under no obligation to carry out the 3245 hints that it describes in the ior_hints result. In addition, while 3246 the server may have intended to implement the hints returned in 3247 ior_hints, as time progresses, the server may need to change its 3248 handling of a given file due to several reasons including, but not 3249 limited to, memory pressure, additional IO_ADVISE hints sent by other 3250 clients, and heuristically detected file access patterns. 3252 The server MAY return different advice than what the client 3253 requested. If it does, then this might be due to one of several 3254 conditions, including, but not limited to another client advising of 3255 a different I/O access pattern; a different I/O access pattern from 3256 another client that that the server has heuristically detected; or 3257 the server is not able to support the requested I/O access pattern, 3258 perhaps due to a temporary resource limitation. 3260 Each issuance of the IO_ADVISE operation overrides all previous 3261 issuances of IO_ADVISE for a given byte range. This effectively 3262 follows a strategy of last hint wins for a given stateid and byte 3263 range. 3265 Clients should assume that hints included in an IO_ADVISE operation 3266 will be forgotten once the file is closed. 3268 15.5.4. IMPLEMENTATION 3270 The NFS client may choose to issue an IO_ADVISE operation to the 3271 server in several different instances. 3273 The most obvious is in direct response to an application's execution 3274 of posix_fadvise(). In this case, IO_ADVISE4_WRITE and 3275 IO_ADVISE4_READ may be set based upon the type of file access 3276 specified when the file was opened. 3278 15.5.5. IO_ADVISE4_INIT_PROXIMITY 3280 The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and can be 3281 used to convey that the client has recently accessed the byte range 3282 in its own cache. I.e., it has not accessed it on the server, but it 3283 has locally. When the server reaches resource exhaustion, knowing 3284 which data is more important allows the server to make better choices 3285 about which data to, for example purge from a cache, or move to 3286 secondary storage. It also informs the server which delegations are 3287 more important, since if delegations are working correctly, once 3288 delegated to a client and the client has read the content for that 3289 byte range, a server might never receive another read request for 3290 that byte range. 3292 The IO_ADVISE4_INIT_PROXIMITY hint can also be used in a pNFS setting 3293 to let the client inform the metadata server as to the I/O statistics 3294 between the client and the storage devices. The metadata server is 3295 then free to use this information about client I/O to optimize the 3296 data storage location. 3298 This hint is also useful in the case of NFS clients which are network 3299 booting from a server. If the first client to be booted sends this 3300 hint, then it keeps the cache warm for the remaining clients. 3302 15.5.6. pNFS File Layout Data Type Considerations 3304 The IO_ADVISE considerations for pNFS are very similar to the COMMIT 3305 considerations for pNFS. That is, as with COMMIT, some NFS server 3306 implementations prefer IO_ADVISE be done on the DS, and some prefer 3307 it be done on the MDS. 3309 For the file's layout type, it is proposed that NFSv4.2 include an 3310 additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on 3311 metadata servers running NFSv4.2 or higher. Any file's layout 3312 obtained from a NFSv4.1 metadata server MUST NOT have 3313 NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained with a 3314 NFSv4.2 metadata server MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS set. 3316 However, if the layout utilizes NFSv4.1 storage devices, the 3317 IO_ADVISE operation cannot be sent to them. 3319 If NFL42_UFLG_IO_ADVISE_THRU_MDS is set, the client MUST send the 3320 IO_ADVISE operation to the MDS in order for it to be honored by the 3321 DS. Once the MDS receives the IO_ADVISE operation, it will 3322 communicate the advice to each DS. 3324 If NFL42_UFLG_IO_ADVISE_THRU_MDS is not set, then the client SHOULD 3325 send an IO_ADVISE operation to the appropriate DS for the specified 3326 byte range. While the client MAY always send IO_ADVISE to the MDS, 3327 if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client 3328 should expect that such an IO_ADVISE is futile. Note that a client 3329 SHOULD use the same set of arguments on each IO_ADVISE sent to a DS 3330 for the same open file reference. 3332 The server is not required to support different advice for different 3333 DS's with the same open file reference. 3335 15.5.6.1. Dense and Sparse Packing Considerations 3337 The IO_ADVISE operation MUST use the iar_offset and byte range as 3338 dictated by the presence or absence of NFL4_UFLG_DENSE. 3340 E.g., if NFL4_UFLG_DENSE is present, and a READ or WRITE to the DS 3341 for iaa_offset 0 really means iaa_offset 10000 in the logical file, 3342 then an IO_ADVISE for iaa_offset 0 means iaa_offset 10000. 3344 E.g., if NFL4_UFLG_DENSE is absent, then a READ or WRITE to the DS 3345 for iaa_offset 0 really means iaa_offset 0 in the logical file, then 3346 an IO_ADVISE for iaa_offset 0 means iaa_offset 0 in the logical file. 3348 E.g., if NFL4_UFLG_DENSE is present, the stripe unit is 1000 bytes 3349 and the stripe count is 10, and the dense DS file is serving 3350 iar_offset 0. A READ or WRITE to the DS for iaa_offsets 0, 1000, 3351 2000, and 3000, really mean iaa_offsets 10000, 20000, 30000, and 3352 40000 (implying a stripe count of 10 and a stripe unit of 1000), then 3353 an IO_ADVISE sent to the same DS with an iaa_offset of 500, and an 3354 iaa_count of 3000 means that the IO_ADVISE applies to these byte 3355 ranges of the dense DS file: 3357 - 500 to 999 3358 - 1000 to 1999 3359 - 2000 to 2999 3360 - 3000 to 3499 3362 I.e., the contiguous range 500 to 3499 as specified in IO_ADVISE. 3364 It also applies to these byte ranges of the logical file: 3366 - 10500 to 10999 (500 bytes) 3367 - 20000 to 20999 (1000 bytes) 3368 - 30000 to 30999 (1000 bytes) 3369 - 40000 to 40499 (500 bytes) 3370 (total 3000 bytes) 3372 E.g., if NFL4_UFLG_DENSE is absent, the stripe unit is 250 bytes, the 3373 stripe count is 4, and the sparse DS file is serving iaa_offset 0. 3374 Then a READ or WRITE to the DS for iaa_offsets 0, 1000, 2000, and 3375 3000, really means iaa_offsets 0, 1000, 2000, and 3000 in the logical 3376 file, keeping in mind that on the DS file, byte ranges 250 to 999, 3377 1250 to 1999, 2250 to 2999, and 3250 to 3999 are not accessible. 3378 Then an IO_ADVISE sent to the same DS with an iaa_offset of 500, and 3379 a iaa_count of 3000 means that the IO_ADVISE applies to these byte 3380 ranges of the logical file and the sparse DS file: 3382 - 500 to 999 (500 bytes) - no effect 3383 - 1000 to 1249 (250 bytes) - effective 3384 - 1250 to 1999 (750 bytes) - no effect 3385 - 2000 to 2249 (250 bytes) - effective 3386 - 2250 to 2999 (750 bytes) - no effect 3387 - 3000 to 3249 (250 bytes) - effective 3388 - 3250 to 3499 (250 bytes) - no effect 3389 (subtotal 2250 bytes) - no effect 3390 (subtotal 750 bytes) - effective 3391 (grand total 3000 bytes) - no effect + effective 3393 If neither of the flags NFL42_UFLG_IO_ADVISE_THRU_MDS and 3394 NFL4_UFLG_DENSE are set in the layout, then any IO_ADVISE request 3395 sent to the data server with a byte range that overlaps stripe unit 3396 that the data server does not serve MUST NOT result in the status 3397 NFS4ERR_PNFS_IO_HOLE. Instead, the response SHOULD be successful and 3398 if the server applies IO_ADVISE hints on any stripe units that 3399 overlap with the specified range, those hints SHOULD be indicated in 3400 the response. 3402 15.6. Operation 64: LAYOUTERROR - Provide Errors for the Layout 3404 15.6.1. ARGUMENT 3406 3407 struct device_error4 { 3408 deviceid4 de_deviceid; 3409 nfsstat4 de_status; 3410 nfs_opnum4 de_opnum; 3411 }; 3413 struct LAYOUTERROR4args { 3414 /* CURRENT_FH: file */ 3415 offset4 lea_offset; 3416 length4 lea_length; 3417 stateid4 lea_stateid; 3418 device_error4 lea_errors<>; 3419 }; 3421 3423 15.6.2. RESULT 3425 3427 struct LAYOUTERROR4res { 3428 nfsstat4 ler_status; 3429 }; 3431 3433 15.6.3. DESCRIPTION 3435 The client can use LAYOUTERROR to inform the metadata server about 3436 errors in its interaction with the layout represented by the current 3437 filehandle, client ID (derived from the session ID in the preceding 3438 SEQUENCE operation), byte-range (lea_offset + lea_length), and 3439 lea_stateid. 3441 Each individual device_error4 describes a single error associated 3442 with a storage device, which is identified via de_deviceid. If the 3443 Layout Type supports NFSv4 operations, then the operation which 3444 returned the error is identified via de_opnum. If the Layout Type 3445 does not support NFSv4 operations, then it MAY chose to either map 3446 the operation onto one of the allowed operations which can be sent to 3447 a storage device with the File Layout Type (see Section 3.3) or it 3448 can signal no support for operations by marking de_opnum with the 3449 ILLEGAL operation. Finally the NFS error value (nfsstat4) 3450 encountered is provided via de_status and may consist of the 3451 following error codes: 3453 NFS4ERR_NXIO: The client was unable to establish any communication 3454 with the storage device. 3456 NFS4ERR_*: The client was able to establish communication with the 3457 storage device and is returning one of the allowed error codes for 3458 the operation denoted by de_opnum. 3460 Note that while the metadata server may return an error associated 3461 with the layout stateid or the open file, it MUST NOT return an error 3462 in the processing of the errors. If LAYOUTERROR is in a compound 3463 before LAYOUTRETURN, it MUST NOT introduce an error other than what 3464 LAYOUTRETURN would already encounter. 3466 15.6.4. IMPLEMENTATION 3468 There are two broad classes of errors, transient and persistent. The 3469 client SHOULD strive to only use this new mechanism to report 3470 persistent errors. It MUST be able to deal with transient issues by 3471 itself. Also, while the client might consider an issue to be 3472 persistent, it MUST be prepared for the metadata server to consider 3473 such issues to be transient. A prime example of this is if the 3474 metadata server fences off a client from either a stateid or a 3475 filehandle. The client will get an error from the storage device and 3476 might relay either NFS4ERR_ACCESS or NFS4ERR_BAD_STATEID back to the 3477 metadata server, with the belief that this is a hard error. If the 3478 metadata server is informed by the client that there is an error, it 3479 can safely ignore that. For it, the mission is accomplished in that 3480 the client has returned a layout that the metadata server had most 3481 likely recalled. 3483 The client might also need to inform the metadata server that it 3484 cannot reach one or more of the storage devices. While the metadata 3485 server can detect the connectivity of both of these paths: 3487 o metadata server to storage device 3489 o metadata server to client 3491 it cannot determine if the client and storage device path is working. 3492 As with the case of the storage device passing errors to the client, 3493 it must be prepared for the metadata server to consider such outages 3494 as being transitory. 3496 Clients are expected to tolerate transient storage device errors, and 3497 hence clients SHOULD NOT use the LAYOUTERROR error handling for 3498 device access problems that may be transient. The methods by which a 3499 client decides whether a device access problem is transient vs 3500 persistent are implementation-specific, but may include retrying I/Os 3501 to a data server under appropriate conditions. 3503 When an I/O fails to a storage device, the client SHOULD retry the 3504 failed I/O via the metadata server. In this situation, before 3505 retrying the I/O, the client SHOULD return the layout, or the 3506 affected portion thereof, and SHOULD indicate which storage device or 3507 devices was problematic. The client needs to do this when the 3508 storage device is being unresponsive in order to fence off any failed 3509 write attempts, and ensure that they do not end up overwriting any 3510 later data being written through the metadata server. If the client 3511 does not do this, the metadata server MAY issue a layout recall 3512 callback in order to perform the retried I/O. 3514 The client needs to be cognizant that since this error handling is 3515 optional in the metadata server, the metadata server may silently 3516 ignore this functionality. Also, as the metadata server may consider 3517 some issues the client reports to be expected, the client might find 3518 it difficult to detect a metadata server which has not implemented 3519 error handling via LAYOUTERROR. 3521 If an metadata server is aware that a storage device is proving 3522 problematic to a client, the metadata server SHOULD NOT include that 3523 storage device in any pNFS layouts sent to that client. If the 3524 metadata server is aware that a storage device is affecting many 3525 clients, then the metadata server SHOULD NOT include that storage 3526 device in any pNFS layouts sent out. If a client asks for a new 3527 layout for the file from the metadata server, it MUST be prepared for 3528 the metadata server to return that storage device in the layout. The 3529 metadata server might not have any choice in using the storage 3530 device, i.e., there might only be one possible layout for the system. 3531 Also, in the case of existing files, the metadata server might have 3532 no choice in which storage devices to hand out to clients. 3534 The metadata server is not required to indefinitely retain per-client 3535 storage device error information. An metadata server is also not 3536 required to automatically reinstate use of a previously problematic 3537 storage device; administrative intervention may be required instead. 3539 15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the Layout 3541 15.7.1. ARGUMENT 3543 3544 struct layoutupdate4 { 3545 layouttype4 lou_type; 3546 opaque lou_body<>; 3547 }; 3549 struct io_info4 { 3550 uint64_t ii_count; 3551 uint64_t ii_bytes; 3552 }; 3554 struct LAYOUTSTATS4args { 3555 /* CURRENT_FH: file */ 3556 offset4 lsa_offset; 3557 length4 lsa_length; 3558 stateid4 lsa_stateid; 3559 io_info4 lsa_read; 3560 io_info4 lsa_write; 3561 deviceid4 lsa_deviceid; 3562 layoutupdate4 lsa_layoutupdate; 3563 }; 3565 3567 15.7.2. RESULT 3569 3571 struct LAYOUTSTATS4res { 3572 nfsstat4 lsr_status; 3573 }; 3575 3577 15.7.3. DESCRIPTION 3579 The client can use LAYOUTSTATS to inform the metadata server about 3580 its interaction with the layout represented by the current 3581 filehandle, client ID (derived from the session ID in the preceding 3582 SEQUENCE operation), byte-range (lsa_offset and lsa_length), and 3583 lsa_stateid. lsa_read and lsa_write allow for non-Layout Type 3584 specific statistics to be reported. lsa_deviceid allows the client 3585 to specify to which storage device the statistics apply. The 3586 remaining information the client is presenting is specific to the 3587 Layout Type and presented in the lsa_layoutupdate field. Each Layout 3588 Type MUST define the contents of lsa_layoutupdate in their respective 3589 specifications. 3591 LAYOUTSTATS can be combined with IO_ADVISE (see Section 15.5) to 3592 augment the decision making process of how the metadata server 3593 handles a file. I.e., IO_ADVISE lets the server know that a byte 3594 range has a certain characteristic, but not necessarily the intensity 3595 of that characteristic. 3597 The statistics are cumulative, i.e., multiple LAYOUTSTATS updates can 3598 be in flight at the same time. The metadata server can examine the 3599 packet's timestamp to order the different calls. The first 3600 LAYOUTSTATS sent by the client SHOULD be from the opening of the 3601 file. The choice of how often to update the metadata server is made 3602 by the client. 3604 Note that while the metadata server may return an error associated 3605 with the layout stateid or the open file, it MUST NOT return an error 3606 in the processing of the statistics. 3608 15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded Operation 3610 15.8.1. ARGUMENT 3612 3614 struct OFFLOAD_CANCEL4args { 3615 /* CURRENT_FH: file to cancel */ 3616 stateid4 oca_stateid; 3617 }; 3619 3621 15.8.2. RESULT 3623 3625 struct OFFLOAD_CANCEL4res { 3626 nfsstat4 ocr_status; 3627 }; 3629 3631 15.8.3. DESCRIPTION 3633 OFFLOAD_CANCEL is used by the client to terminate an asynchronous 3634 operation, which is identified both by CURRENT_FH and the 3635 oca_stateid. I.e., there can be multiple offloaded operations acting 3636 on the file, the stateid will identify to the server exactly which 3637 one is to be stopped. Currently there are only two operations which 3638 can decide to be asynchronous: COPY and WRITE_SAME. 3640 In the context of server-to-server copy, the client can send 3641 OFFLOAD_CANCEL to either the source or destination server, albeit 3642 with a different stateid. The client uses OFFLOAD_CANCEL to inform 3643 the destination to stop the active transfer and uses the stateid it 3644 got back from the COPY operation. The client uses OFFLOAD_CANCEL and 3645 the stateid it used in the COPY_NOTIFY to inform the source to not 3646 allow any more copying from the destination. 3648 OFFLOAD_CANCEL is also useful in situations in which the source 3649 server granted a very long or infinite lease on the destination 3650 server's ability to read the source file and all copy operations on 3651 the source file have been completed. 3653 15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of Asynchronous 3654 Operation 3656 15.9.1. ARGUMENT 3658 3660 struct OFFLOAD_STATUS4args { 3661 /* CURRENT_FH: destination file */ 3662 stateid4 osa_stateid; 3663 }; 3665 3667 15.9.2. RESULT 3669 3670 struct OFFLOAD_STATUS4resok { 3671 length4 osr_count; 3672 nfsstat4 osr_complete<1>; 3673 }; 3675 union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) { 3676 case NFS4_OK: 3677 OFFLOAD_STATUS4resok osr_resok4; 3678 default: 3679 void; 3680 }; 3682 3684 15.9.3. DESCRIPTION 3686 OFFLOAD_STATUS can be used by the client to query the progress of an 3687 asynchronous operation, which is identified both by CURRENT_FH and 3688 the osa_stateid. If this operation is successful, the number of 3689 bytes processed are returned to the client in the osr_count field. 3691 If the optional osr_complete field is present, the asynchronous 3692 operation has completed. In this case the status value indicates the 3693 result of the asynchronous operation. In all cases, the server will 3694 also deliver the final results of the asynchronous operation in a 3695 CB_OFFLOAD operation. 3697 The failure of this operation does not indicate the result of the 3698 asynchronous operation in any way. 3700 15.10. Operation 68: READ_PLUS - READ Data or Holes from a File 3702 15.10.1. ARGUMENT 3704 3706 struct READ_PLUS4args { 3707 /* CURRENT_FH: file */ 3708 stateid4 rpa_stateid; 3709 offset4 rpa_offset; 3710 count4 rpa_count; 3711 }; 3713 3715 15.10.2. RESULT 3717 3719 enum data_content4 { 3720 NFS4_CONTENT_DATA = 0, 3721 NFS4_CONTENT_HOLE = 1 3722 }; 3724 struct data_info4 { 3725 offset4 di_offset; 3726 length4 di_length; 3727 }; 3729 struct data4 { 3730 offset4 d_offset; 3731 opaque d_data<>; 3732 }; 3734 union read_plus_content switch (data_content4 rpc_content) { 3735 case NFS4_CONTENT_DATA: 3736 data4 rpc_data; 3737 case NFS4_CONTENT_HOLE: 3738 data_info4 rpc_hole; 3739 default: 3740 void; 3741 }; 3743 /* 3744 * Allow a return of an array of contents. 3745 */ 3746 struct read_plus_res4 { 3747 bool rpr_eof; 3748 read_plus_content rpr_contents<>; 3749 }; 3751 union READ_PLUS4res switch (nfsstat4 rp_status) { 3752 case NFS4_OK: 3753 read_plus_res4 rp_resok4; 3754 default: 3755 void; 3756 }; 3758 3760 15.10.3. DESCRIPTION 3762 The READ_PLUS operation is based upon the NFSv4.1 READ operation (see 3763 Section 18.22 of [RFC5661]) and similarly reads data from the regular 3764 file identified by the current filehandle. 3766 The client provides a rpa_offset of where the READ_PLUS is to start 3767 and a rpa_count of how many bytes are to be read. A rpa_offset of 3768 zero means to read data starting at the beginning of the file. If 3769 rpa_offset is greater than or equal to the size of the file, the 3770 status NFS4_OK is returned with di_length (the data length) set to 3771 zero and eof set to TRUE. 3773 The READ_PLUS result is comprised of an array of rpr_contents, each 3774 of which describe a data_content4 type of data. For NFSv4.2, the 3775 allowed values are data and hole. A server MUST support both the 3776 data type and the hole if it uses READ_PLUS. If it does not want to 3777 support a hole, it MUST use READ. The array contents MUST be 3778 contiguous in the file. 3780 Holes SHOULD be returned in their entirety - clients must be prepared 3781 to get more information than they requested. Both the start and the 3782 end of the hole may exceed what was requested. If data to be 3783 returned is comprised entirely of zeros, then the server SHOULD 3784 return that data as a hole instead. 3786 The server may elect to return adjacent elements of the same type. 3787 For example, if the server has a range of data comprised entirely of 3788 zeros and then a hole, it might want to return two adjacent holes to 3789 the client. 3791 If the client specifies a rpa_count value of zero, the READ_PLUS 3792 succeeds and returns zero bytes of data. In all situations, the 3793 server may choose to return fewer bytes than specified by the client. 3794 The client needs to check for this condition and handle the condition 3795 appropriately. 3797 If the client specifies an rpa_offset and rpa_count value that is 3798 entirely contained within a hole of the file, then the di_offset and 3799 di_length returned MAY be for the entire hole. If the the owner has 3800 a locked byte range covering rpa_offset and rpa_count entirely the 3801 di_offset and di_length MUST NOT be extended outside the locked byte 3802 range. This result is considered valid until the file is changed 3803 (detected via the change attribute). The server MUST provide the 3804 same semantics for the hole as if the client read the region and 3805 received zeroes; the implied holes contents lifetime MUST be exactly 3806 the same as any other read data. 3808 If the client specifies an rpa_offset and rpa_count value that begins 3809 in a non-hole of the file but extends into hole the server should 3810 return an array comprised of both data and a hole. The client MUST 3811 be prepared for the server to return a short read describing just the 3812 data. The client will then issue another READ_PLUS for the remaining 3813 bytes, which the server will respond with information about the hole 3814 in the file. 3816 Except when special stateids are used, the stateid value for a 3817 READ_PLUS request represents a value returned from a previous byte- 3818 range lock or share reservation request or the stateid associated 3819 with a delegation. The stateid identifies the associated owners if 3820 any and is used by the server to verify that the associated locks are 3821 still valid (e.g., have not been revoked). 3823 If the read ended at the end-of-file (formally, in a correctly formed 3824 READ_PLUS operation, if rpa_offset + rpa_count is equal to the size 3825 of the file), or the READ_PLUS operation extends beyond the size of 3826 the file (if rpa_offset + rpa_count is greater than the size of the 3827 file), eof is returned as TRUE; otherwise, it is FALSE. A successful 3828 READ_PLUS of an empty file will always return eof as TRUE. 3830 If the current filehandle is not an ordinary file, an error will be 3831 returned to the client. In the case that the current filehandle 3832 represents an object of type NF4DIR, NFS4ERR_ISDIR is returned. If 3833 the current filehandle designates a symbolic link, NFS4ERR_SYMLINK is 3834 returned. In all other cases, NFS4ERR_WRONG_TYPE is returned. 3836 For a READ_PLUS with a stateid value of all bits equal to zero, the 3837 server MAY allow the READ_PLUS to be serviced subject to mandatory 3838 byte-range locks or the current share deny modes for the file. For a 3839 READ_PLUS with a stateid value of all bits equal to one, the server 3840 MAY allow READ_PLUS operations to bypass locking checks at the 3841 server. 3843 On success, the current filehandle retains its value. 3845 15.10.3.1. Note on Client Support of Arms of the Union 3847 It was decided not to add a means for the client to inform the server 3848 as to which arms of READ_PLUS it would support. In a later minor 3849 version, it may become necessary for the introduction of a new 3850 operation which would allow the client to inform the server as to 3851 whether it supported the new arms of the union of data types 3852 available in READ_PLUS. 3854 15.10.4. IMPLEMENTATION 3856 In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of 3857 [RFC5661] also apply to READ_PLUS. 3859 15.10.4.1. Additional pNFS Implementation Information 3861 With pNFS, the semantics of using READ_PLUS remains the same. Any 3862 data server MAY return a hole result for a READ_PLUS request that it 3863 receives. When a data server chooses to return such a result, it has 3864 the option of returning information for the data stored on that data 3865 server (as defined by the data layout), but it MUST NOT return 3866 results for a byte range that includes data managed by another data 3867 server. 3869 If mandatory locking is enforced, then the data server must also 3870 ensure that to return only information that is within the owner's 3871 locked byte range. 3873 15.10.5. READ_PLUS with Sparse Files Example 3875 The following table describes a sparse file. For each byte range, 3876 the file contains either non-zero data or a hole. In addition, the 3877 server in this example will only create a hole if it is greater than 3878 32K. 3880 +-------------+----------+ 3881 | Byte-Range | Contents | 3882 +-------------+----------+ 3883 | 0-15999 | Hole | 3884 | 16K-31999 | Non-Zero | 3885 | 32K-255999 | Hole | 3886 | 256K-287999 | Non-Zero | 3887 | 288K-353999 | Hole | 3888 | 354K-417999 | Non-Zero | 3889 +-------------+----------+ 3891 Table 5 3893 Under the given circumstances, if a client was to read from the file 3894 with a max read size of 64K, the following will be the results for 3895 the given READ_PLUS calls. This assumes the client has already 3896 opened the file, acquired a valid stateid ('s' in the example), and 3897 just needs to issue READ_PLUS requests. 3899 1. READ_PLUS(s, 0, 64K) --> NFS_OK, eof = false, . Since the first hole is less than the server's 3901 minimum hole size, the first 32K of the file is returned as data 3902 and the remaining 32K is returned as a hole which actually 3903 extends to 256K. 3905 2. READ_PLUS(s, 32K, 64K) --> NFS_OK, eof = false, 3906 The requested range was all zeros, and the current hole begins at 3907 offset 32K and is 224K in length. Note that the client should 3908 not have followed up the previous READ_PLUS request with this one 3909 as the hole information from the previous call extended past what 3910 the client was requesting. 3912 3. READ_PLUS(s, 256K, 64K) --> NFS_OK, eof = false, . Returns an array of the 32K data and 3914 the hole which extends to 354K. 3916 4. READ_PLUS(s, 354K, 64K) --> NFS_OK, eof = true, . Returns the final 64K of data and informs the client 3918 there is no more data in the file. 3920 15.11. Operation 69: SEEK - Find the Next Data or Hole 3922 15.11.1. ARGUMENT 3924 3926 enum data_content4 { 3927 NFS4_CONTENT_DATA = 0, 3928 NFS4_CONTENT_HOLE = 1 3929 }; 3931 struct SEEK4args { 3932 /* CURRENT_FH: file */ 3933 stateid4 sa_stateid; 3934 offset4 sa_offset; 3935 data_content4 sa_what; 3936 }; 3938 3940 15.11.2. RESULT 3942 3944 struct seek_res4 { 3945 bool sr_eof; 3946 offset4 sr_offset; 3947 }; 3948 union SEEK4res switch (nfsstat4 sa_status) { 3949 case NFS4_OK: 3950 seek_res4 resok4; 3951 default: 3952 void; 3953 }; 3955 3957 15.11.3. DESCRIPTION 3959 SEEK is an operation that allows a client to determine the location 3960 of the next data_content4 in a file. It allows an implementation of 3961 the emerging extension to lseek(2) to allow clients to determine the 3962 next hole whilst in data or the next data whilst in a hole. 3964 From the given sa_offset, find the next data_content4 of type sa_what 3965 in the file. If the server can not find a corresponding sa_what, 3966 then the status will still be NFS4_OK, but sr_eof would be TRUE. If 3967 the server can find the sa_what, then the sr_offset is the start of 3968 that content. If the sa_offset is beyond the end of the file, then 3969 SEEK MUST return NFS4ERR_NXIO. 3971 All files MUST have a virtual hole at the end of the file. I.e., if 3972 a filesystem does not support sparse files, then a compound with 3973 {SEEK 0 NFS4_CONTENT_HOLE;} would return a result of {SEEK 1 X;} 3974 where 'X' was the size of the file. 3976 SEEK must follow the same rules for stateids as READ_PLUS 3977 (Section 15.10.3). 3979 15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times to a File 3981 15.12.1. ARGUMENT 3983 3985 enum stable_how4 { 3986 UNSTABLE4 = 0, 3987 DATA_SYNC4 = 1, 3988 FILE_SYNC4 = 2 3989 }; 3990 struct app_data_block4 { 3991 offset4 adb_offset; 3992 length4 adb_block_size; 3993 length4 adb_block_count; 3994 length4 adb_reloff_blocknum; 3995 count4 adb_block_num; 3996 length4 adb_reloff_pattern; 3997 opaque adb_pattern<>; 3998 }; 4000 struct WRITE_SAME4args { 4001 /* CURRENT_FH: file */ 4002 stateid4 wsa_stateid; 4003 stable_how4 wsa_stable; 4004 app_data_block4 wsa_adb; 4005 }; 4007 4009 15.12.2. RESULT 4011 4013 struct write_response4 { 4014 stateid4 wr_callback_id<1>; 4015 length4 wr_count; 4016 stable_how4 wr_committed; 4017 verifier4 wr_writeverf; 4018 }; 4020 union WRITE_SAME4res switch (nfsstat4 wsr_status) { 4021 case NFS4_OK: 4022 write_response4 resok4; 4023 default: 4024 void; 4025 }; 4027 4029 15.12.3. DESCRIPTION 4031 The WRITE_SAME operation writes an application data block to the 4032 regular file identified by the current filehandle (see WRITE SAME 4033 (10) in [T10-SBC2]). The target file is specified by the current 4034 filehandle. The data to be written is specified by an 4035 app_data_block4 structure (Section 8.1.1). The client specifies with 4036 the wsa_stable parameter the method of how the data is to be 4037 processed by the server. It is treated like the stable parameter in 4038 the NFSv4.1 WRITE operation (see Section 18.2 of [RFC5661]). 4040 A successful WRITE_SAME will construct a reply for wr_count, 4041 wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation 4042 results. If wr_callback_id is set, it indicates an asynchronous 4043 reply (see Section 15.12.3.1). 4045 WRITE_SAME has to support all of the errors which are returned by 4046 WRITE plus NFS4ERR_NOTSUPP, i.e., it is an OPTIONAL operation. If 4047 the client supports WRITE_SAME, it MUST support CB_OFFLOAD. 4049 If the server supports ADBs, then it MUST support the WRITE_SAME 4050 operation. The server has no concept of the structure imposed by the 4051 application. It is only when the application writes to a section of 4052 the file does order get imposed. In order to detect corruption even 4053 before the application utilizes the file, the application will want 4054 to initialize a range of ADBs using WRITE_SAME. 4056 When the client invokes the WRITE_SAME operation, it wants to record 4057 the block structure described by the app_data_block4 on to the file. 4059 When the server receives the WRITE_SAME operation, it MUST populate 4060 adb_block_count ADBs in the file starting at adb_offset. The block 4061 size will be given by adb_block_size. The ADBN (if provided) will 4062 start at adb_reloff_blocknum and each block will be monotonically 4063 numbered starting from adb_block_num in the first block. The pattern 4064 (if provided) will be at adb_reloff_pattern of each block and will be 4065 provided in adb_pattern. 4067 The server SHOULD return an asynchronous result if it can determine 4068 the operation will be long running (see Section 15.12.3.1). Once 4069 either the WRITE_SAME finishes synchronously or the server uses 4070 CB_OFFLOAD to inform the client of the asynchronous completion of the 4071 WRITE_SAME, the server MUST return the ADBs to clients as data. 4073 15.12.3.1. Asynchronous Transactions 4075 ADB initialization may lead to server determining to service the 4076 operation asynchronously. If it decides to do so, it sets the 4077 stateid in wr_callback_id to be that of the wsa_stateid. If it does 4078 not set the wr_callback_id, then the result is synchronous. 4080 When the client determines that the reply will be given 4081 asynchronously, it should not assume anything about the contents of 4082 what it wrote until it is informed by the server that the operation 4083 is complete. It can use OFFLOAD_STATUS (Section 15.9) to monitor the 4084 operation and OFFLOAD_CANCEL (Section 15.8) to cancel the operation. 4085 An example of a asynchronous WRITE_SAME is shown in Figure 6. Note 4086 that as with the COPY operation, WRITE_SAME must provide a stateid 4087 for tracking the asynchronous operation. 4089 Client Server 4090 + + 4091 | | 4092 |--- OPEN ---------------------------->| Client opens 4093 |<------------------------------------/| the file 4094 | | 4095 |--- WRITE_SAME ----------------------->| Client initializes 4096 |<------------------------------------/| an ADB 4097 | | 4098 | | 4099 |--- OFFLOAD_STATUS ------------------>| Client may poll 4100 |<------------------------------------/| for status 4101 | | 4102 | . | Multiple OFFLOAD_STATUS 4103 | . | operations may be sent. 4104 | . | 4105 | | 4106 |<-- CB_OFFLOAD -----------------------| Server reports results 4107 |\------------------------------------>| 4108 | | 4109 |--- CLOSE --------------------------->| Client closes 4110 |<------------------------------------/| the file 4111 | | 4112 | | 4114 Figure 6: An asynchronous WRITE_SAME. 4116 When CB_OFFLOAD informs the client of the successful WRITE_SAME, the 4117 write_response4 embedded in the operation will provide the necessary 4118 information that a synchronous WRITE_SAME would have provided. 4120 Regardless of whether the operation is asynchronous or synchronous, 4121 it MUST still support the COMMIT operation semantics as outlined in 4122 Section 18.3 of [RFC5661]. I.e., COMMIT works on one or more WRITE 4123 operations and the WRITE_SAME operation can appear as several WRITE 4124 operations to the server. The client can use locking operations to 4125 control the behavior on the server with respect to long running 4126 asynchronous write operations. 4128 15.12.3.2. Error Handling of a Partially Complete WRITE_SAME 4130 WRITE_SAME will clone adb_block_count copies of the given ADB in 4131 consecutive order in the file starting at adb_offset. An error can 4132 occur after writing the Nth ADB to the file. WRITE_SAME MUST appear 4133 to populate the range of the file as if the client used WRITE to 4134 transfer the instantiated ADBs. I.e., the contents of the range will 4135 be easy for the client to determine in case of a partially complete 4136 WRITE_SAME. 4138 15.13. Operation 71: CLONE - Clone a range of file into another file 4140 15.13.1. ARGUMENT 4142 4144 struct CLONE4args { 4145 /* SAVED_FH: source file */ 4146 /* CURRENT_FH: destination file */ 4147 stateid4 cl_src_stateid; 4148 stateid4 cl_dst_stateid; 4149 offset4 cl_src_offset; 4150 offset4 cl_dst_offset; 4151 length4 cl_count; 4152 }; 4154 4156 15.13.2. RESULT 4158 4160 struct CLONE4res { 4161 nfsstat4 cl_status; 4162 }; 4164 4166 15.13.3. DESCRIPTION 4168 The CLONE operation is used to clone file content from a source file 4169 specified by the SAVED_FH value into a destination file specified by 4170 CURRENT_FH without actually copying the data, e.g., by using a copy- 4171 on-write mechanism. 4173 Both SAVED_FH and CURRENT_FH must be regular files. If either 4174 SAVED_FH or CURRENT_FH is not a regular file, the operation MUST fail 4175 and return NFS4ERR_WRONG_TYPE. 4177 SAVED_FH and CURRENT_FH must be different files. If SAVED_FH and 4178 CURRENT_FH refer to the same file, the operation MUST fail with 4179 NFS4ERR_INVAL. 4181 The ca_dst_stateid MUST refer to a stateid that is valid for a WRITE 4182 operation and follows the rules for stateids in Sections 8.2.5 and 4183 18.32.3 of [RFC5661]. The ca_src_stateid MUST refer to a stateid 4184 that is valid for a READ operations and follows the rules for 4185 stateids in Sections 8.2.5 and 18.22.3 of [RFC5661]. If either 4186 stateid is invalid, then the operation MUST fail. 4188 The cl_src_offset is the starting offset within the source file from 4189 which the data to be cloned will be obtained and the cl_dst_offset is 4190 the starting offset of the target region into which the cloned data 4191 will be placed. An offset of 0 (zero) indicates the start of the 4192 respective file. The number of bytes to be cloned is obtained from 4193 cl_count, except that a cl_count of 0 (zero) indicates that the 4194 number of bytes to be cloned is the count of bytes between 4195 cl_src_offset and the EOF of the source file. Both cl_src_offset and 4196 cl_dst_offset must be aligned to the clone block size Section 12.2.1. 4197 The number of bytes to be cloned must be a multiple of the clone 4198 block size, except in the case in which cl_src_offset plus the number 4199 of bytes to be cloned is equal to the source file size. 4201 If the source offset or the source offset plus count is greater than 4202 the size of the source file, the operation MUST fail with 4203 NFS4ERR_INVAL. The destination offset or destination offset plus 4204 count may be greater than the size of the destination file. 4206 If the target area of the clone operation ends beyond the end of the 4207 destination file, the offset at the end of the target area will 4208 determine the new size of the destination file. The contents of any 4209 block not part of the target area will be the same as if the file 4210 size were extended by a WRITE. 4212 If the area to be cloned is not a multiple of the clone block size 4213 and the size of the destination file is past the end of the target 4214 area, the area between the end of the target area and the next 4215 multiple o the clone block size wlll be zeroed. 4217 The CLONE operation is atomic in that other operations may not see 4218 see any intermediate states between the state of the two files before 4219 the operation and that after the operation. READs of the destination 4220 file will never see some blocks of the target area cloned without all 4221 of them being cloned. WRITEs of the source area will either have no 4222 effect on the data of the target file or be fully reflected in the 4223 target area of the destination file. 4225 The completion status of the operation is indicated by cr_status. 4227 16. NFSv4.2 Callback Operations 4229 16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous 4230 operation 4232 16.1.1. ARGUMENT 4234 4236 struct write_response4 { 4237 stateid4 wr_callback_id<1>; 4238 length4 wr_count; 4239 stable_how4 wr_committed; 4240 verifier4 wr_writeverf; 4241 }; 4243 union offload_info4 switch (nfsstat4 coa_status) { 4244 case NFS4_OK: 4245 write_response4 coa_resok4; 4246 default: 4247 length4 coa_bytes_copied; 4248 }; 4250 struct CB_OFFLOAD4args { 4251 nfs_fh4 coa_fh; 4252 stateid4 coa_stateid; 4253 offload_info4 coa_offload_info; 4254 }; 4256 4258 16.1.2. RESULT 4260 4262 struct CB_OFFLOAD4res { 4263 nfsstat4 cor_status; 4264 }; 4266 4268 16.1.3. DESCRIPTION 4270 CB_OFFLOAD is used to report to the client the results of an 4271 asynchronous operation, e.g., Server Side Copy or WRITE_SAME. The 4272 coa_fh and coa_stateid identify the transaction and the coa_status 4273 indicates success or failure. The coa_resok4.wr_callback_id MUST NOT 4274 be set. If the transaction failed, then the coa_bytes_copied 4275 contains the number of bytes copied before the failure occurred. The 4276 coa_bytes_copied value indicates the number of bytes copied but not 4277 which specific bytes have been copied. 4279 If the client supports any of the following operations: 4281 COPY: for both intra-server and inter-server asynchronous copies 4283 WRITE_SAME: for ADB initialization 4285 then the client is REQUIRED to support the CB_OFFLOAD operation. 4287 There is a potential race between the reply to the original 4288 transaction on the forechannel and the CB_OFFLOAD callback on the 4289 backchannel. Sections 2.10.6.3 and 20.9.3 of [RFC5661] describe how 4290 to handle this type of issue. 4292 Upon success, the coa_resok4.wr_count presents for each operation: 4294 COPY: the total number of bytes copied 4296 WRITE_SAME: the same information that a synchronous WRITE_SAME would 4297 provide 4299 17. Security Considerations 4301 NFSv4.2 has all of the security concerns present in NFSv4.1 (see 4302 Section 21 of [RFC5661]) and those present in the Server Side Copy 4303 (see Section 4.10) and in Labeled NFS (see Section 9.7). 4305 18. IANA Considerations 4307 The IANA Considerations for Labeled NFS are addressed in [Quigley14]. 4309 19. References 4311 19.1. Normative References 4313 [NFSv42xdr] 4314 Haynes, T., "Network File System (NFS) Version 4 Minor 4315 Version 2 External Data Representation Standard (XDR) 4316 Description", December 2014. 4318 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 4319 Resource Identifier (URI): Generic Syntax", STD 66, RFC 4320 3986, January 2005. 4322 [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File 4323 System (NFS) Version 4 Minor Version 1 Protocol", RFC 4324 5661, January 2010. 4326 [RFC5662] Shepler, S., Eisler, M., and D. Noveck, "Network File 4327 System (NFS) Version 4 Minor Version 1 External Data 4328 Representation Standard (XDR) Description", RFC 5662, 4329 January 2010. 4331 [posix_fadvise] 4332 The Open Group, "Section 'posix_fadvise()' of System 4333 Interfaces of The Open Group Base Specifications Issue 6, 4334 IEEE Std 1003.1, 2004 Edition", 2004. 4336 [posix_fallocate] 4337 The Open Group, "Section 'posix_fallocate()' of System 4338 Interfaces of The Open Group Base Specifications Issue 6, 4339 IEEE Std 1003.1, 2004 Edition", 2004. 4341 [rpcsec_gssv3] 4342 Adamson, W. and N. Williams, "Remote Procedure Call (RPC) 4343 Security Version 3", December 2014. 4345 19.2. Informative References 4347 [Ashdown08] 4348 Ashdown, L., "Chapter 15, Validating Database Files and 4349 Backups, of Oracle Database Backup and Recovery User's 4350 Guide 11g Release 1 (11.1)", August 2008. 4352 [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: 4353 Mathematical Foundations and Model", Technical Report 4354 M74-244, The MITRE Corporation, Bedford, MA, May 1973. 4356 [Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci- 4357 Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data 4358 Corruption in the Storage Stack", Proceedings of the 6th 4359 USENIX Symposium on File and Storage Technologies (FAST 4360 '08) , 2008. 4362 [IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream", 4363 2008. 4365 [McDougall07] 4366 McDougall, R. and J. Mauro, "Section 11.4.3, Detecting 4367 Memory Corruption of Solaris Internals", 2007. 4369 [NFSv4-Versioning] 4370 Haynes, T. and D. Noveck, "NFSv4 Version Management", 4371 November 2014. 4373 [Quigley14] 4374 Quigley, D., Lu, J., and T. Haynes, "Registry 4375 Specification for Mandatory Access Control (MAC) Security 4376 Label Formats", draft-ietf-nfsv4-lfs-registry-01 (work in 4377 progress), September 2014. 4379 [RFC1108] Kent, S., "Security Options for the Internet Protocol", 4380 RFC 1108, November 1991. 4382 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 4383 Requirement Levels", March 1997. 4385 [RFC2401] Kent, S. and R. Atkinson, "Security Architecture for the 4386 Internet Protocol", RFC 2401, November 1998. 4388 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 4389 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 4390 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 4392 [RFC4506] Eisler, M., "XDR: External Data Representation Standard", 4393 RFC 4506, May 2006. 4395 [RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS 4396 (pNFS) Block/Volume Layout", RFC 5663, January 2010. 4398 [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, 4399 April 2014. 4401 [RFC7530] Haynes, T. and D. Noveck, "Network File System (NFS) 4402 version 4 Protocol", RFC 7530, March 2015. 4404 [RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 4405 9, RFC 959, October 1985. 4407 [Strohm11] 4408 Strohm, R., "Chapter 2, Data Blocks, Extents, and 4409 Segments, of Oracle Database Concepts 11g Release 1 4410 (11.1)", January 2011. 4412 [T10-SBC2] 4413 Elliott, R., Ed., "ANSI INCITS 405-2005, Information 4414 Technology - SCSI Block Commands - 2 (SBC-2)", November 4415 2004. 4417 Appendix A. Acknowledgments 4419 Tom Haynes would like to thank NetApp, Inc. for its funding of his 4420 time on this project. 4422 For the Sharing change attribute implementation characteristics with 4423 NFSv4 clients, the original draft was by Trond Myklebust. 4425 For the NFS Server Side Copy, the original draft was by James 4426 Lentini, Mike Eisler, Deepak Kenchammana, Anshul Madan, and Rahul 4427 Iyer. Tom Talpey co-authored an unpublished version of that 4428 document. It was also was reviewed by a number of individuals: 4429 Pranoop Erasani, Tom Haynes, Arthur Lent, Trond Myklebust, Dave 4430 Noveck, Theresa Lingutla-Raj, Manjunath Shankararao, Satyam Vaghani, 4431 and Nico Williams. Anna Schumaker's early prototyping experience 4432 helped us avoid some traps. Also, both Olga Kornievskaia and Andy 4433 Adamson brought implementation experience to the use of copy stateids 4434 in inter-server copy. Jorge Mora was able to optimize the handling 4435 of errors for the result of COPY. 4437 For the NFS space reservation operations, the original draft was by 4438 Mike Eisler, James Lentini, Manjunath Shankararao, and Rahul Iyer. 4440 For the sparse file support, the original draft was by Dean 4441 Hildebrand and Marc Eshel. Valuable input and advice was received 4442 from Sorin Faibish, Bruce Fields, Benny Halevy, Trond Myklebust, and 4443 Richard Scheffenegger. 4445 For the Application IO Hints, the original draft was by Dean 4446 Hildebrand, Mike Eisler, Trond Myklebust, and Sam Falkner. Some 4447 early reviewers included Benny Halevy and Pranoop Erasani. 4449 For Labeled NFS, the original draft was by David Quigley, James 4450 Morris, Jarret Lu, and Tom Haynes. Peter Staubach, Trond Myklebust, 4451 Stephen Smalley, Sorin Faibish, Nico Williams, and David Black also 4452 contributed in the final push to get this accepted. 4454 Christoph Hellwig was very helpful in getting the WRITE_SAME 4455 semantics to model more of what T10 was doing for WRITE SAME (10) 4456 [T10-SBC2]. And he led the push to get space reservations to more 4457 closely model the posix_fallocate. 4459 Andy Adamson picked up the RPCSEC_GSSv3 work, which enabled both 4460 Labeled NFS and Server Side Copy to be present more secure options. 4462 Christoph Hellwig provided the update to GETDEVICELIST. 4464 During the review process, Talia Reyes-Ortiz helped the sessions run 4465 smoothly. While many people contributed here and there, the core 4466 reviewers were Andy Adamson, Pranoop Erasani, Bruce Fields, Chuck 4467 Lever, Trond Myklebust, David Noveck, Peter Staubach, and Mike 4468 Kupfer. 4470 Appendix B. RFC Editor Notes 4472 [RFC Editor: please remove this section prior to publishing this 4473 document as an RFC] 4475 [RFC Editor: prior to publishing this document as an RFC, please 4476 replace all occurrences of NFSv42xdr with RFCxxxx where xxxx is the 4477 RFC number of the companion XDR document] 4479 Author's Address 4481 Thomas Haynes 4482 Primary Data, Inc. 4483 4300 El Camino Real Ste 100 4484 Los Altos, CA 94022 4485 USA 4487 Phone: +1 408 215 1519 4488 Email: thomas.haynes@primarydata.com