draft-ietf-nfsv4-minorversion2-27.txt   draft-ietf-nfsv4-minorversion2-28.txt 
NFSv4 T. Haynes NFSv4 T. Haynes
Internet-Draft Primary Data Internet-Draft Primary Data
Intended status: Standards Track September 20, 2014 Intended status: Standards Track November 24, 2014
Expires: March 24, 2015 Expires: May 28, 2015
NFS Version 4 Minor Version 2 NFS Version 4 Minor Version 2
draft-ietf-nfsv4-minorversion2-27.txt draft-ietf-nfsv4-minorversion2-28.txt
Abstract Abstract
This Internet-Draft describes NFS version 4 minor version two, This Internet-Draft describes NFS version 4 minor version two,
focusing mainly on the protocol extensions made from NFS version 4 describing the protocol extensions made from NFS version 4 minor
minor version 0 and NFS version 4 minor version 1. Major extensions version 1. Major extensions introduced in NFS version 4 minor
introduced in NFS version 4 minor version two include: Server Side version two include: Server Side Copy, Application I/O Advise, Space
Copy, Application I/O Advise, Space Reservations, Sparse Files, Reservations, Sparse Files, Application Data Blocks, and Labeled NFS.
Application Data Blocks, and Labeled NFS.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
skipping to change at page 1, line 41 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 24, 2015. This Internet-Draft will expire on May 28, 2015.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 25 skipping to change at page 2, line 24
1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 4 1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 4
1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5 1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5
1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5 1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5
1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 5 1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 5
1.4.1. Server Side Copy . . . . . . . . . . . . . . . . . . 5 1.4.1. Server Side Copy . . . . . . . . . . . . . . . . . . 5
1.4.2. Application I/O Advise . . . . . . . . . . . . . . . 6 1.4.2. Application I/O Advise . . . . . . . . . . . . . . . 6
1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . 6 1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . 6
1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6 1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6
1.4.5. Application Data Block (ADB) Support . . . . . . . . 6 1.4.5. Application Data Block (ADB) Support . . . . . . . . 6
1.4.6. Labeled NFS . . . . . . . . . . . . . . . . . . . . . 6 1.4.6. Labeled NFS . . . . . . . . . . . . . . . . . . . . . 6
1.5. Differences from NFSv4.1 . . . . . . . . . . . . . . . . 7 1.5. Enhancements to Minor Versioning Model . . . . . . . . . 7
2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7 2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7
3. pNFS considerations for New Operations . . . . . . . . . . . 10 3. pNFS considerations for New Operations . . . . . . . . . . . 8
3.1. Atomicity for ALLOCATE and DEALLOCATE . . . . . . . . . . 10 3.1. Atomicity for ALLOCATE and DEALLOCATE . . . . . . . . . . 8
3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 11 3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 8
3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout
Type . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Type . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 11 3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 8
4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 11 4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 9
4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 11 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 9
4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 12 4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 9
4.2.1. Copy Operations . . . . . . . . . . . . . . . . . . . 12 4.2.1. Copy Operations . . . . . . . . . . . . . . . . . . . 10
4.2.2. Requirements for Operations . . . . . . . . . . . . . 13 4.2.2. Requirements for Operations . . . . . . . . . . . . . 10
4.3. Requirements for Inter-Server Copy . . . . . . . . . . . 13 4.3. Requirements for Inter-Server Copy . . . . . . . . . . . 11
4.4. Implementation Considerations . . . . . . . . . . . . . . 14 4.4. Implementation Considerations . . . . . . . . . . . . . . 11
4.4.1. Locking the Files . . . . . . . . . . . . . . . . . . 14 4.4.1. Locking the Files . . . . . . . . . . . . . . . . . . 11
4.4.2. Client Caches . . . . . . . . . . . . . . . . . . . . 14 4.4.2. Client Caches . . . . . . . . . . . . . . . . . . . . 12
4.5. Intra-Server Copy . . . . . . . . . . . . . . . . . . . . 14 4.5. Intra-Server Copy . . . . . . . . . . . . . . . . . . . . 12
4.6. Inter-Server Copy . . . . . . . . . . . . . . . . . . . . 16 4.6. Inter-Server Copy . . . . . . . . . . . . . . . . . . . . 13
4.7. Server-to-Server Copy Protocol . . . . . . . . . . . . . 20 4.7. Server-to-Server Copy Protocol . . . . . . . . . . . . . 17
4.7.1. Considerations on Selecting a Copy Protocol . . . . . 20 4.7.1. Considerations on Selecting a Copy Protocol . . . . . 17
4.7.2. Using NFSv4.x as the Copy Protocol . . . . . . . . . 20 4.7.2. Using NFSv4.x as the Copy Protocol . . . . . . . . . 17
4.7.3. Using an Alternative Copy Protocol . . . . . . . . . 20 4.7.3. Using an Alternative Copy Protocol . . . . . . . . . 17
4.8. netloc4 - Network Locations . . . . . . . . . . . . . . . 21 4.8. netloc4 - Network Locations . . . . . . . . . . . . . . . 18
4.9. Copy Offload Stateids . . . . . . . . . . . . . . . . . . 22 4.9. Copy Offload Stateids . . . . . . . . . . . . . . . . . . 19
4.10. Security Considerations . . . . . . . . . . . . . . . . . 22 4.10. Security Considerations . . . . . . . . . . . . . . . . . 19
4.10.1. Inter-Server Copy Security . . . . . . . . . . . . . 22 4.10.1. Inter-Server Copy Security . . . . . . . . . . . . . 19
5. Support for Application IO Hints . . . . . . . . . . . . . . 27
5. Support for Application IO Hints . . . . . . . . . . . . . . 32 6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 27
6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 27
6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 32 6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 29
6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 34 6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 29
6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 34 6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 29
6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 34 6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 29
6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 34 7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 29
7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 34 8. Application Data Block Support . . . . . . . . . . . . . . . 31
7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 35 8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 32
8. Application Data Block Support . . . . . . . . . . . . . . . 37 8.1.1. Data Block Representation . . . . . . . . . . . . . . 33
8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 37 8.2. An Example of Detecting Corruption . . . . . . . . . . . 33
8.1.1. Data Block Representation . . . . . . . . . . . . . . 38 8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 35
8.2. An Example of Detecting Corruption . . . . . . . . . . . 38 8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 35
8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 40 9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 36
8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 41 9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 36
9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 41 9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 36
9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 41 9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 37
9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 42 9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 38
9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 42 9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 38
9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 43 9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 38
9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 43 9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 39
9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 44 9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 39
9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 44 9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 39
9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 44 9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 39
9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 44 9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 40
9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 45 9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 40
9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 45 9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 42
9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 45 9.7. Security Considerations for Labeled NFS . . . . . . . . . 42
9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 47
9.7. Security Considerations . . . . . . . . . . . . . . . . . 47
10. Sharing change attribute implementation details with NFSv4 10. Sharing change attribute implementation details with NFSv4
clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 48 11. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 43
11. Security Considerations . . . . . . . . . . . . . . . . . . . 48 11.1. Error Definitions . . . . . . . . . . . . . . . . . . . 43
12. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 48 11.1.1. General Errors . . . . . . . . . . . . . . . . . . . 43
12.1. Error Definitions . . . . . . . . . . . . . . . . . . . 49 11.1.2. Server to Server Copy Errors . . . . . . . . . . . . 44
12.1.1. General Errors . . . . . . . . . . . . . . . . . . . 49 11.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 44
12.1.2. Server to Server Copy Errors . . . . . . . . . . . . 49 11.2. New Operations and Their Valid Errors . . . . . . . . . 45
12.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 50 11.3. New Callback Operations and Their Valid Errors . . . . . 48
12.2. New Operations and Their Valid Errors . . . . . . . . . 50 12. New File Attributes . . . . . . . . . . . . . . . . . . . . . 49
12.3. New Callback Operations and Their Valid Errors . . . . . 54 12.1. New RECOMMENDED Attributes - List and Definition
13. New File Attributes . . . . . . . . . . . . . . . . . . . . . 54 References . . . . . . . . . . . . . . . . . . . . . . . 49
13.1. New RECOMMENDED Attributes - List and Definition 12.2. Attribute Definitions . . . . . . . . . . . . . . . . . 50
References . . . . . . . . . . . . . . . . . . . . . . . 54 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 52
13.2. Attribute Definitions . . . . . . . . . . . . . . . . . 55 14. Modifications to NFSv4.1 Operations . . . . . . . . . . . . . 56
14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 57 14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID . . . 56
15. Modifications to NFSv4.1 Operations . . . . . . . . . . . . . 61 14.2. Operation 48: GETDEVICELIST - Get All Device Mappings
15.1. Operation 42: EXCHANGE_ID - Instantiate Client ID . . . 61 for a File System . . . . . . . . . . . . . . . . . . . 57
15.2. Operation 48: GETDEVICELIST - Get All Device Mappings 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 58
for a File System . . . . . . . . . . . . . . . . . . . 62 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a
16. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 63 File . . . . . . . . . . . . . . . . . . . . . . . . . . 58
16.1. Operation 59: ALLOCATE - Reserve Space in A Region of a 15.2. Operation 60: COPY - Initiate a server-side copy . . . . 59
File . . . . . . . . . . . . . . . . . . . . . . . . . . 63 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a
16.2. Operation 60: COPY - Initiate a server-side copy . . . . 64 future copy . . . . . . . . . . . . . . . . . . . . . . 63
16.3. Operation 61: COPY_NOTIFY - Notify a source server of a 15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region
future copy . . . . . . . . . . . . . . . . . . . . . . 69 of a File . . . . . . . . . . . . . . . . . . . . . . . 65
16.4. Operation 62: DEALLOCATE - Unreserve Space in a Region 15.5. Operation 63: IO_ADVISE - Application I/O access pattern
of a File . . . . . . . . . . . . . . . . . . . . . . . 70 hints . . . . . . . . . . . . . . . . . . . . . . . . . 66
16.5. Operation 63: IO_ADVISE - Application I/O access pattern 15.6. Operation 64: LAYOUTERROR - Provide Errors for the
hints . . . . . . . . . . . . . . . . . . . . . . . . . 71 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 71
16.6. Operation 64: LAYOUTERROR - Provide Errors for the 15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the
Layout . . . . . . . . . . . . . . . . . . . . . . . . . 77 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 74
16.7. Operation 65: LAYOUTSTATS - Provide Statistics for the 15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded
Layout . . . . . . . . . . . . . . . . . . . . . . . . . 80 Operation . . . . . . . . . . . . . . . . . . . . . . . 75
16.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded 15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of
Operation . . . . . . . . . . . . . . . . . . . . . . . 81 Asynchronous Operation . . . . . . . . . . . . . . . . . 76
16.9. Operation 67: OFFLOAD_STATUS - Poll for Status of 15.10. Operation 68: READ_PLUS - READ Data or Holes from a File 77
Asynchronous Operation . . . . . . . . . . . . . . . . . 82 15.11. Operation 69: SEEK - Find the Next Data or Hole . . . . 82
16.10. Operation 68: READ_PLUS - READ Data or Holes from a File 83 15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times
16.11. Operation 69: SEEK - Find the Next Data or Hole . . . . 88 to a File . . . . . . . . . . . . . . . . . . . . . . . 83
16.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times 16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 86
to a File . . . . . . . . . . . . . . . . . . . . . . . 89 16.1. Operation 15: CB_OFFLOAD - Report results of an
17. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 92 asynchronous operation . . . . . . . . . . . . . . . . . 86
17.1. Operation 15: CB_OFFLOAD - Report results of an 17. Security Considerations . . . . . . . . . . . . . . . . . . . 87
asynchronous operation . . . . . . . . . . . . . . . . . 92 18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 88
18. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 94 19. References . . . . . . . . . . . . . . . . . . . . . . . . . 88
19. References . . . . . . . . . . . . . . . . . . . . . . . . . 94 19.1. Normative References . . . . . . . . . . . . . . . . . . 88
19.1. Normative References . . . . . . . . . . . . . . . . . . 94 19.2. Informative References . . . . . . . . . . . . . . . . . 88
19.2. Informative References . . . . . . . . . . . . . . . . . 94 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 90
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 96 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 91
Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 97 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 91
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 97
1. Introduction 1. Introduction
1.1. The NFS Version 4 Minor Version 2 Protocol 1.1. The NFS Version 4 Minor Version 2 Protocol
The NFS version 4 minor version 2 (NFSv4.2) protocol is the third The NFS version 4 minor version 2 (NFSv4.2) protocol is the third
minor version of the NFS version 4 (NFSv4) protocol. The first minor minor version of the NFS version 4 (NFSv4) protocol. The first minor
version, NFSv4.0, is described in [I-D.ietf-nfsv4-rfc3530bis] and the version, NFSv4.0, is described in [I-D.ietf-nfsv4-rfc3530bis] and the
second minor version, NFSv4.1, is described in [RFC5661]. second minor version, NFSv4.1, is described in [RFC5661].
skipping to change at page 5, line 25 skipping to change at page 5, line 23
o modify the specification of the NFSv4.0 or NFSv4.1 protocols o modify the specification of the NFSv4.0 or NFSv4.1 protocols
o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any
clarifications made here apply to NFSv4.2 and neither of the prior clarifications made here apply to NFSv4.2 and neither of the prior
protocols protocols
The full XDR for NFSv4.2 is presented in [NFSv42xdr]. The full XDR for NFSv4.2 is presented in [NFSv42xdr].
1.3. NFSv4.2 Goals 1.3. NFSv4.2 Goals
The goal of the design of NFSv4.2 is to take common local file system A major goal of the design of NFSv4.2 is to take common local file
features and offer them remotely. These features might system features and offer them remotely. These features might
o already be available on the servers, e.g., sparse files o already be available on the servers, e.g., sparse files
o be under development as a new standard, e.g., SEEK pulls in both o be under development as a new standard, e.g., SEEK pulls in both
SEEK_HOLE and SEEK_DATA SEEK_HOLE and SEEK_DATA
o be used by clients with the servers via some proprietary means, o be used by clients with the servers via some proprietary means,
e.g., Labeled NFS e.g., Labeled NFS
but the clients are not able to leverage them on the server within NFSv4.2 provides means for clients to leverage these features on the
server in cases in which that had previously not been possible within
the confines of the NFS protocol. the confines of the NFS protocol.
1.4. Overview of NFSv4.2 Features 1.4. Overview of NFSv4.2 Features
1.4.1. Server Side Copy 1.4.1. Server Side Copy
A traditional file copy from one server to another results in the A traditional file copy of a remotely accessed, whether from one
data being put on the network twice - source to client and then server to another or between location in the same server, results in
client to destination. New operations are introduced to allow the the data being put on the network twice - source to client and then
client to authorize the two servers to interact directly. As this client to destination. New operations are introduced to allow
copy can be lengthy, asynchronous support is also provided. unnecessary traffic to be eliminated:
The intra-server copy feature allows the client to request the
server to perform the copy internally, avoiding unnecessary
network traffic.
The inter-server copy feature allows the client to authorize the
source and destination servers to interact directly.
As such copies can be lengthy, asynchronous support is also provided.
1.4.2. Application I/O Advise 1.4.2. Application I/O Advise
Applications and clients want to advise the server as to expected I/O Applications and clients want to advise the server as to expected I/O
behavior. Using IO_ADVISE (see Section 16.5) to communicate future I behavior. Using IO_ADVISE (see Section 15.5) to communicate future I
/O behavior such as whether a file will be accessed sequentially or /O behavior such as whether a file will be accessed sequentially or
randomly, and whether a file will or will not be accessed in the near randomly, and whether a file will or will not be accessed in the near
future, allows servers to optimize future I/O requests for a file by, future, allows servers to optimize future I/O requests for a file by,
for example, prefetching or evicting data. This operation can be for example, prefetching or evicting data. This operation can be
used to support the posix_fadvise function as well as other used to support the posix_fadvise function. In addition, it may be
applications such as databases and video editors. helpful to applications such as databases and video editors.
1.4.3. Sparse Files 1.4.3. Sparse Files
Sparse files are ones which have unallocated or uninitialized data Sparse files are ones which have unallocated or uninitialized data
blocks as holes in the file. Such holes are typically transferred as blocks as holes in the file. Such holes are typically transferred as
0s during I/O. READ_PLUS (see Section 16.10) allows a server to send 0s during I/O. READ_PLUS (see Section 15.10) allows a server to send
back to the client metadata describing the hole and DEALLOCATE (see back to the client metadata describing the hole and DEALLOCATE (see
Section 16.4) allows the client to punch holes into a file. In Section 15.4) allows the client to punch holes into a file. In
addition, SEEK (see Section 16.11) is provided to scan for the next addition, SEEK (see Section 15.11) is provided to scan for the next
hole or data from a given location. hole or data from a given location.
1.4.4. Space Reservation 1.4.4. Space Reservation
When a file is sparse, one concern applications have is ensuring that When a file is sparse, one concern applications have is ensuring that
there will always be enough data blocks available for the file during there will always be enough data blocks available for the file during
future writes. ALLOCATE (see Section 16.1) allows a client to future writes. ALLOCATE (see Section 15.1) allows a client to
request a guarantee that space will be available. And DEALLOCATE request a guarantee that space will be available. Also DEALLOCATE
(see Section 16.4) allows the client to punch a hole into a file, (see Section 15.4) allows the client to punch a hole into a file,
thus releasing a space reservation. thus releasing a space reservation.
1.4.5. Application Data Block (ADB) Support 1.4.5. Application Data Block (ADB) Support
Some applications treat a file as if it were a disk and as such want Some applications treat a file as if it were a disk and as such want
to initialize (or format) the file image. We introduce WRITE_SAME to initialize (or format) the file image. We introduce WRITE_SAME
(see Section 16.12) to send this metadata to the server to allow it (see Section 15.12) to send this metadata to the server to allow it
to write the block contents. to write the block contents.
1.4.6. Labeled NFS 1.4.6. Labeled NFS
While both clients and servers can employ Mandatory Access Control While both clients and servers can employ Mandatory Access Control
(MAC) security models to enforce data access, there has been no (MAC) security models to enforce data access, there has been no
protocol support for interoperability. A new file object attribute, protocol support for interoperability. A new file object attribute,
sec_label (see Section 13.2.2) allows for the server to store MAC sec_label (see Section 12.2.2) allows for the server to store MAC
labels on files, which the client retrieves and uses to enforce data labels on files, which the client retrieves and uses to enforce data
access (see Section 9.6.2). The format of the sec_label accommodates access (see Section 9.6.2). The format of the sec_label accommodates
any MAC security system. any MAC security system.
1.5. Differences from NFSv4.1 1.5. Enhancements to Minor Versioning Model
In NFSv4.1, the only way to introduce new variants of an operation In NFSv4.1, the only way to introduce new variants of an operation
was to introduce a new operation. I.e., READ becomes either READ2 or was to introduce a new operation. I.e., READ becomes either READ2 or
READ_PLUS. With the use of discriminated unions as parameters to READ_PLUS. With the use of discriminated unions as parameters to
such functions in NFSv4.2, it is possible to add a new arm in a such functions in NFSv4.2, it is possible to add a new arm in a
subsequent minor version. And it is also possible to move such an subsequent minor version. And it is also possible to move such an
operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an
implementation to adopt each arm of a discriminated union at such a implementation to adopt each arm of a discriminated union at such a
time does not meet the spirit of the minor versioning rules. As time does not meet the spirit of the minor versioning rules. As
such, new arms of a discriminated union MUST follow the same such, new arms of a discriminated union MUST follow the same
guidelines for minor versioning as operations in NFSv4.1 - i.e., they guidelines for minor versioning as operations in NFSv4.1 - i.e., they
may not be made REQUIRED. To support this, a new error code, may not be made REQUIRED. To support this, a new error code,
NFS4ERR_UNION_NOTSUPP, allows the server to communicate to the client NFS4ERR_UNION_NOTSUPP, allows the server to communicate to the client
that the operation is supported, but the specific arm of the that the operation is supported, but the specific arm of the
discriminated union is not. discriminated union is not.
2. Minor Versioning 2. Minor Versioning
To address the requirement of an NFS protocol that can evolve as the NFSv4.2 is a minor version of NFSv4 and is built upon NFSv4.1 as
need arises, the NFSv4 protocol contains the rules and framework to documented in [RFC5661] and [RFC5662].
allow for future minor changes or versioning.
The base assumption with respect to minor versioning is that any
future accepted minor version will be documented in one or more
Standards Track RFCs. Minor version 0 of the NFSv4 protocol is
represented by [I-D.ietf-nfsv4-rfc3530bis], minor version 1 by
[RFC5661], and minor version 2 by this document. The COMPOUND and
CB_COMPOUND procedures support the encoding of the minor version
being requested by the client.
The following items represent the basic rules for the development of
minor versions. Note that a future minor version may modify or add
to the following rules as part of the minor version definition.
1. Procedures are not added or deleted.
To maintain the general RPC model, NFSv4 minor versions will not
add to or delete procedures from the NFS program.
2. Minor versions may add operations to the COMPOUND and
CB_COMPOUND procedures.
The addition of operations to the COMPOUND and CB_COMPOUND
procedures does not affect the RPC model.
* Minor versions may append attributes to the bitmap4 that
represents sets of attributes and to the fattr4 that
represents sets of attribute values.
This allows for the expansion of the attribute model to allow
for future growth or adaptation.
* Minor version X must append any new attributes after the last
documented attribute.
Since attribute results are specified as an opaque array of
per-attribute, XDR-encoded results, the complexity of adding
new attributes in the midst of the current definitions would
be too burdensome.
3. Minor versions must not modify the structure of an existing
operation's arguments or results.
Again, the complexity of handling multiple structure definitions
for a single operation is too burdensome. New operations should
be added instead of modifying existing structures for a minor
version.
This rule does not preclude the following adaptations in a minor
version:
* adding bits to flag fields, such as new attributes to
GETATTR's bitmap4 data type, and providing corresponding
variants of opaque arrays, such as a notify4 used together
with such bitmaps
* adding bits to existing attributes like ACLs that have flag
words
* extending enumerated types (including NFS4ERR_*) with new
values
* adding cases to a switched union
4. Note that when adding new cases to a switched union, a minor
version must not make new cases be REQUIRED. While the
encapsulating operation may be REQUIRED, the new cases (the
specific arm of the discriminated union) is not. The error code
NFS4ERR_UNION_NOTSUPP is used to notify the client when the
server does not support such a case.
5. Minor versions must not modify the structure of existing
attributes.
6. Minor versions must not delete operations.
This prevents the potential reuse of a particular operation
"slot" in a future minor version.
7. Minor versions must not delete attributes.
8. Minor versions must not delete flag bits or enumeration values.
9. Minor versions may declare an operation MUST NOT be implemented.
Specifying that an operation MUST NOT be implemented is
equivalent to obsoleting an operation. For the client, it means
that the operation MUST NOT be sent to the server. For the
server, an NFS error can be returned as opposed to "dropping"
the request as an XDR decode error. This approach allows for
the obsolescence of an operation while maintaining its structure
so that a future minor version can reintroduce the operation.
1. Minor versions may declare that an attribute MUST NOT be
implemented.
2. Minor versions may declare that a flag bit or enumeration
value MUST NOT be implemented.
10. Minor versions may declare an operation to be OBSOLESCENT, which NFSv4.2 does not modify the rules applicable to the NFSv4 versioning
indicates an intention to remove the operation (i.e., make it process and follows the rules set out in [RFC5661] or in standard-
MANDATORY TO NOT implement) in a subsequent minor version. Such track documents updating that document (e.g., in an RFC based on
labeling is separate from the question of whether the operation [NFSv4-Versioning]).
is REQUIRED or RECOMMENDED or OPTIONAL in the current minor
version. An operation may be both REQUIRED for the given minor
version and marked OBSOLESCENT, with the expectation that it
will be MANDATORY TO NOT implement in the next (or other
subsequent) minor version.
11. Note that the early notification of operation obsolescence is NFSv4.2 only defines extensions to NFSv4.1, each of which may be
put in place to mitigate the effects of design and supported (or not) independently. It does not
implementation mistakes, and to allow protocol development to
adapt to unexpected changes in the pace of implementation. Even
if an operation is marked OBSOLESCENT in a given minor version,
it may end up not being marked MANDATORY TO NOT implement in the
next minor version. In unusual circumstances, it might not be
marked OBSOLESCENT in a subsequent minor version, and never
become MANDATORY TO NOT implement.
12. Minor versions may downgrade features from REQUIRED to o introduce infrastructural features
RECOMMENDED, from RECOMMENDED to OPTIONAL, or from OPTIONAL to
MANDATORY TO NOT implement. Also, if a feature was marked as
OBSOLESCENT in the prior minor version, it may be downgraded
from REQUIRED to OPTIONAL from RECOMMENDED to MANDATORY TO NOT
implement, or from REQUIRED to MANDATORY TO NOT implement.
13. Minor versions may upgrade features from OPTIONAL to o make existing features MANDATORY to NOT implement
RECOMMENDED, or RECOMMENDED to REQUIRED. Also, if a feature was
marked as OBSOLESCENT in the prior minor version, it may be
upgraded to not be OBSOLESCENT.
14. A client and server that support minor version X SHOULD support o change the status of existing features (i.e., by changing their
minor versions 0 through X-1 as well. status among OPTIONAL, RECOMMENDED, REQUIRED).
15. Except for infrastructural changes, a minor version must not The following versioning-related considerations should be noted.
introduce REQUIRED new features.
This rule allows for the introduction of new functionality and o When a new case is added to an existing switch, servers need to
forces the use of implementation experience before designating a report non-support of that new case by returning
feature as REQUIRED. On the other hand, some classes of NFS4ERR_UNION_NOTSUPP.
features are infrastructural and have broad effects. Allowing
infrastructural features to be RECOMMENDED or OPTIONAL
complicates implementation of the minor version.
16. Unless explicitly documented in a minor version standard's o As regards the potential cross-minor-version transfer of stateids,
document, a client MUST NOT attempt to use a stateid, pNFS implementations of the file mapping type may support of use
filehandle, or similar returned object from the COMPOUND of an NFSv4.2 metadata sever with NFSv4.1 data servers. In this
procedure with minor version X for another COMPOUND procedure context, a stateid returned by an NFSv4.2 COMPOUND will be used in
with minor version Y, where X != Y. an NFSv4.1 COMPOUND directed to the data server (see Sections 3.2
and 3.3).
3. pNFS considerations for New Operations 3. pNFS considerations for New Operations
3.1. Atomicity for ALLOCATE and DEALLOCATE 3.1. Atomicity for ALLOCATE and DEALLOCATE
Both ALLOCATE (see Section 16.1) and DEALLOCATE (see Section 16.4) Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.4)
are sent to the metadata server, which is responsible for are sent to the metadata server, which is responsible for
coordinating the changes onto the storage devices. In particular, coordinating the changes onto the storage devices. In particular,
both operations must either fully succeed or fail, it cannot be the both operations must either fully succeed or fail, it cannot be the
case that one storage device succeeds whilst another fails. case that one storage device succeeds whilst another fails.
3.2. Sharing of stateids with NFSv4.1 3.2. Sharing of stateids with NFSv4.1
A NFSv4.2 metadata server can hand out a layout to a NFSv4.1 storage A NFSv4.2 metadata server can hand out a layout to a NFSv4.1 storage
device. Section 13.9.1 of [RFC5661] discusses how the client gets a device. Section 13.9.1 of [RFC5661] discusses how the client gets a
stateid from the metadata server to present to a storage device. stateid from the metadata server to present to a storage device.
skipping to change at page 11, line 26 skipping to change at page 8, line 43
NFSv4.2, in which case the rules in Section 3.3.1 apply. As the File NFSv4.2, in which case the rules in Section 3.3.1 apply. As the File
Layout Type does not provide a means for informing the client as to Layout Type does not provide a means for informing the client as to
which minor version a particular storage device is providing, it will which minor version a particular storage device is providing, it will
have to negotiate this via the normal RPC semantics of major and have to negotiate this via the normal RPC semantics of major and
minor version discovery. minor version discovery.
3.3.1. Operations Sent to NFSv4.2 Data Servers 3.3.1. Operations Sent to NFSv4.2 Data Servers
In addition to the commands listed in [RFC5661], NFSv4.2 data servers In addition to the commands listed in [RFC5661], NFSv4.2 data servers
MAY accept a COMPOUND containing the following additional operations: MAY accept a COMPOUND containing the following additional operations:
IO_ADVISE (see Section 16.5), READ_PLUS (see Section 16.10), IO_ADVISE (see Section 15.5), READ_PLUS (see Section 15.10),
WRITE_SAME (see Section 16.12), and SEEK (see Section 16.11), which WRITE_SAME (see Section 15.12), and SEEK (see Section 15.11), which
will be treated like the subset specified as "Operations Sent to will be treated like the subset specified as "Operations Sent to
NFSv4.1 Data Servers" in Section 13.6 of [RFC5661]. NFSv4.1 Data Servers" in Section 13.6 of [RFC5661].
Additional details on the implementation of these operations in a Additional details on the implementation of these operations in a
pNFS context are documented in the operation specific sections. pNFS context are documented in the operation specific sections.
4. Server Side Copy 4. Server Side Copy
4.1. Introduction 4.1. Introduction
skipping to change at page 12, line 38 skipping to change at page 10, line 9
For the inter-server copy, the operations are defined to be For the inter-server copy, the operations are defined to be
compatible with the traditional copy authentication approach. The compatible with the traditional copy authentication approach. The
client and user are authorized at the source for reading. Then they client and user are authorized at the source for reading. Then they
are authorized at the destination for writing. are authorized at the destination for writing.
4.2.1. Copy Operations 4.2.1. Copy Operations
COPY_NOTIFY: Used by the client to notify the source server of a COPY_NOTIFY: Used by the client to notify the source server of a
future file copy from a given destination server for the given future file copy from a given destination server for the given
user. (Section 16.3) user. (Section 15.3)
COPY: Used by the client to request a file copy. (Section 16.2) COPY: Used by the client to request a file copy. (Section 15.2)
OFFLOAD_CANCEL: Used by the client to terminate an asynchronous file OFFLOAD_CANCEL: Used by the client to terminate an asynchronous file
copy. (Section 16.8) copy. (Section 15.8)
OFFLOAD_STATUS: Used by the client to poll the status of an OFFLOAD_STATUS: Used by the client to poll the status of an
asynchronous file copy. (Section 16.9) asynchronous file copy. (Section 15.9)
CB_OFFLOAD: Used by the destination server to report the results of CB_OFFLOAD: Used by the destination server to report the results of
an asynchronous file copy to the client. (Section 17.1) an asynchronous file copy to the client. (Section 16.1)
4.2.2. Requirements for Operations 4.2.2. Requirements for Operations
The implementation of server-side copy is OPTIONAL by the client and The implementation of server-side copy is OPTIONAL by the client and
the server. However, in order to successfully copy a file, some the server. However, in order to successfully copy a file, some
operations MUST be supported by the client and/or server. operations MUST be supported by the client and/or server.
If a client desires an intra-server file copy, then it MUST support If a client desires an intra-server file copy, then it MUST support
the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then
the client MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations. the client MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations.
skipping to change at page 14, line 41 skipping to change at page 12, line 11
the lock stateid as that of the client, i.e., when the destination the lock stateid as that of the client, i.e., when the destination
presents it in the context of a inter-server copy, it is on behalf of presents it in the context of a inter-server copy, it is on behalf of
the client. the client.
4.4.2. Client Caches 4.4.2. Client Caches
In a traditional copy, if the client is in the process of writing to In a traditional copy, if the client is in the process of writing to
the file before the copy (and perhaps with a write delegation), it the file before the copy (and perhaps with a write delegation), it
will be straightforward to update the destination server. With an will be straightforward to update the destination server. With an
inter-server copy, the source has no insight into the changes cached inter-server copy, the source has no insight into the changes cached
on the client. The client SHOULD write back the data to the source on the client. The client SHOULD write back the data to the source.
or be prepared for the destination to get a corrupt copy of the file. If it does not do so, it is possible that the destination will
receive a corrupt copy of file.
4.5. Intra-Server Copy 4.5. Intra-Server Copy
To copy a file on a single server, the client uses a COPY operation. To copy a file on a single server, the client uses a COPY operation.
The server may respond to the copy operation with the final results The server may respond to the copy operation with the final results
of the copy or it may perform the copy asynchronously and deliver the of the copy or it may perform the copy asynchronously and deliver the
results using a CB_OFFLOAD operation callback. If the copy is results using a CB_OFFLOAD operation callback. If the copy is
performed asynchronously, the client may poll the status of the copy performed asynchronously, the client may poll the status of the copy
using OFFLOAD_STATUS or cancel the copy using OFFLOAD_CANCEL. using OFFLOAD_STATUS or cancel the copy using OFFLOAD_CANCEL.
skipping to change at page 23, line 21 skipping to change at page 20, line 21
reason. If the client's user delegated its credentials, the reason. If the client's user delegated its credentials, the
destination would authenticate as the user principal. If the destination would authenticate as the user principal. If the
destination were using the NFSv4 protocol to perform the copy, then destination were using the NFSv4 protocol to perform the copy, then
the source server would authenticate the destination server as the the source server would authenticate the destination server as the
user principal, and the file copy would securely proceed. However, user principal, and the file copy would securely proceed. However,
this approach would allow the destination server to copy other files. this approach would allow the destination server to copy other files.
The user principal would have to trust the destination server to not The user principal would have to trust the destination server to not
do so. This is counter to the requirements, and therefore is not do so. This is counter to the requirements, and therefore is not
considered. considered.
Instead, a combination of two features of the RPCSEC_GSSv3 Instead, a feature of the RPCSEC_GSSv3 [rpcsec_gssv3] protocol can be
[rpcsec_gssv3] protocol can be used: compound authentication and RPC used: RPC application defined structured privilege assertion. This
application defined structured privilege assertions. These features features allow the destination server to authenticate to the source
allow the destination server to authenticate to the source server as server as acting on behalf of the user principal, and to authorize
acting on behalf of the user principal, and to authorize the the destination server to perform READs of the file to be copied from
destination server to perform READs of the file to be copied from the the source on behalf of the user principal. Once the copy is
source on behalf of the user principal. Once the copy is complete, complete, the client can destroy the RPCSEC_GSSv3 handles to end the
the client can destroy the RPCSEC_GSSv3 handles to end the
authorization of both the source and destination servers to copy. authorization of both the source and destination servers to copy.
RPCSEC_GSSv3 introduces the notion of RPC application defined We define three RPCSEC_GSSv3 structured privilege assertions that
structured privileges. We define three structured privileges that
work in tandem to authorize the copy: work in tandem to authorize the copy:
copy_from_auth: A user principal is authorizing a source principal copy_from_auth: A user principal is authorizing a source principal
("nfs@<source>") to allow a destination principal ("nfs@<source>") to allow a destination principal
("nfs@<destination>") to setup the copy_confirm_auth privilege ("nfs@<destination>") to setup the copy_confirm_auth privilege
required to copy a file from the source to the destination on required to copy a file from the source to the destination on
behalf of the user principal. This privilege is established on behalf of the user principal. This privilege is established on
the source server before the user principal sends a COPY_NOTIFY the source server before the user principal sends a COPY_NOTIFY
operation to the source server, and the resultant RPCSEC_GSSv3 operation to the source server, and the resultant RPCSEC_GSSv3
context is used to secure the COPY_NOTIFY operation. context is used to secure the COPY_NOTIFY operation.
skipping to change at page 24, line 19 skipping to change at page 21, line 17
privilege with a source principal ("nfs@<source>") to allow it to privilege with a source principal ("nfs@<source>") to allow it to
copy a file from the source to the destination on behalf of the copy a file from the source to the destination on behalf of the
user principal. This privilege is established on the destination user principal. This privilege is established on the destination
server before the user principal sends a COPY operation to the server before the user principal sends a COPY operation to the
destination server, and the resultant RPCSEC_GSSv3 context is used destination server, and the resultant RPCSEC_GSSv3 context is used
to secure the COPY operation. to secure the COPY operation.
struct copy_to_auth_priv { struct copy_to_auth_priv {
/* equal to cfap_shared_secret */ /* equal to cfap_shared_secret */
secret4 ctap_shared_secret; secret4 ctap_shared_secret;
netloc4 ctap_source; netloc4 ctap_source<>;
/* the NFSv4 user name that the user principal maps to */ /* the NFSv4 user name that the user principal maps to */
utf8str_mixed ctap_username; utf8str_mixed ctap_username;
/*
* user principal RPCSEC_GSSv1 (or v2) handle shared
* with the source server
*/
opaque ctap_handle<>;
int ctap_handle_vers;
/* A nounce and a mic of the nounce using ctap_handle */
opaque ctap_nounce<>;
opaque ctap_nounce_mic<>;
}; };
ctap_shared_secret is the automatically generated secret value ctap_shared_secret is the automatically generated secret value
used to establish the copy_from_auth privilege with the source used to establish the copy_from_auth privilege with the source
principal. ctap_handle, ctap_handle_vers, ctap_nounce, and principal. See Section 4.10.1.1.1.
ctap_nounce_mic are used to construct the compound authentication
portion of the copy_confirm_auth RPCSEC_GSSv3 context between the
destination server and the source server (See Section 4.10.1.1.1).
copy_confirm_auth: A destination principal ("nfs@<destination>") is copy_confirm_auth: A destination principal ("nfs@<destination>") is
confirming with the source principal ("nfs@<source>") that it is confirming with the source principal ("nfs@<source>") that it is
authorized to copy data from the source. Note that besides the authorized to copy data from the source. This privilege is
rpc_gss3_privs payload (struct copy_confirm_auth_priv), the established on the destination server before the file is copied
copy_confirm_auth RPCSEC_GSS3_CREATE message also contains an from the source to the destination. The resultant RPCSEC_GSSv3
rpc_gss3_gss_binding payload so that the copy is done on behalf of context is used to secure the READ operations from the source to
the user principal. This privilege is established on the the destination server.
destination server before the file is copied from the source to
the destination. The resultant RPCSEC_GSSv3 context is used to
secure the READ operations from the source to the destination
server.
struct copy_confirm_auth_priv { struct copy_confirm_auth_priv {
/* equal to GSS_GetMIC() of cfap_shared_secret */ /* equal to GSS_GetMIC() of cfap_shared_secret */
opaque ccap_shared_secret_mic<>; opaque ccap_shared_secret_mic<>;
/* the NFSv4 user name that the user principal maps to */ /* the NFSv4 user name that the user principal maps to */
utf8str_mixed ccap_username; utf8str_mixed ccap_username;
}; };
4.10.1.1.1. Establishing a Security Context 4.10.1.1.1. Establishing a Security Context
The RPCSEC_GSSv3 compound authentication feature allows a server to
act on behalf of a user if the server identifies the user and trusts
the client. In the inter-server server side copy case, the server is
the source server, and the client is the destination server acting as
a client when performing the copy.
The user principal is not required (nor expected) to have an
RPCSEC_GSS secured connection and context between the destination
server (acting as a client) and the source server. The user
principal does have an RPCSEC_GSS secured connection and context
between the client and the source server established for the OPEN of
the file to be copied.
We use the RPCSEC_GSS context established between the user principal
and the source server to OPEN the file to be copied to provide the
the necessary user principal identification to the source server from
the destination server (acting as a client). This is accomplished by
sending the user principal identification information: e.g., the
rpc_gss3_gss_binding fields, in the copy_to_auth privilege
established between the client and the destination server. This same
information is then placed in the rpc_gss3_gss_binding fields of the
copy_confirm_auth RPCSEC_GSS3_CREATE message sent from the
destination server (acting as a client) to the source server.
When the user principal wants to COPY a file between two servers, if When the user principal wants to COPY a file between two servers, if
it has not established copy_from_auth and copy_to_auth privileges on it has not established copy_from_auth and copy_to_auth privileges on
the servers, it establishes them: the servers, it establishes them:
o As noted in [rpcsec_gssv3] the client uses an existing o As noted in [rpcsec_gssv3] the client uses an existing
RPCSEC_GSSv1 (or v2) context termed the "parent" handle to RPCSEC_GSSv3 context termed the "parent" handle to establish and
establish and protect RPCSEC_GSSv3 exchanges. The copy_from_auth protect RPCSEC_GSSv3 structured privilege assertion exchanges.
The copy_from_auth privilege will use the context established
between the user principal and the source server used to OPEN the
source file as the RPCSEC_GSSv3 parent handle. The copy_to_auth
privilege will use the context established between the user privilege will use the context established between the user
principal and the source server used to OPEN the source file as principal and the destination server used to OPEN the destination
the RPCSEC_GSSv3 parent handle. The copy_to_auth privilege will file as the RPCSEC_GSSv3 parent handle.
use the context established between the user principal and the
destination server used to OPEN the destination file as the
RPCSEC_GSSv3 parent handle.
o A random number is generated to use as a secret to be shared o A random number is generated to use as a secret to be shared
between the two servers. This shared secret will be placed in the between the two servers. This shared secret will be placed in the
cfap_shared_secret and ctap_shared_secret fields of the cfap_shared_secret and ctap_shared_secret fields of the
appropriate privilege data types, copy_from_auth_priv and appropriate privilege data types, copy_from_auth_priv and
copy_to_auth_priv. Because of this shared_secret the copy_to_auth_priv. Because of this shared_secret the
RPCSEC_GSS3_CREATE control messages for copy_from_auth and RPCSEC_GSS3_CREATE control messages for copy_from_auth and
copy_to_auth MUST use a QOP of rpc_gss_svc_privacy. copy_to_auth MUST use a QOP of rpc_gss_svc_privacy.
o An instance of copy_from_auth_priv is filled in with the shared o An instance of copy_from_auth_priv is filled in with the shared
secret, the destination server, and the NFSv4 user id of the user secret, the destination server, and the NFSv4 user id of the user
principal and is placed in rpc_gss3_create_args principal and is placed in rpc_gss3_create_args
assertions[0].assertion.privs.privilege. The string assertions[0].assertion.privs.privilege. The string
"copy_from_auth" is placed in assertions[0].assertion.privs.name. "copy_from_auth" is placed in assertions[0].assertion.privs.name.
The field assertions[0].critical is set to TRUE. The source The source server unwraps the rpc_gss_svc_privacy
server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload RPCSEC_GSS3_CREATE payload and verifies that the NFSv4 user id
and verifies that the NFSv4 user id being asserted matches the being asserted matches the source server's mapping of the user
source server's mapping of the user principal. If it does, the principal. If it does, the privilege is established on the source
privilege is established on the source server as: server as: <"copy_from_auth", user id, destination>. The field
<"copy_from_auth", user id, destination>. The field "handle" in a "handle" in a successful reply is the RPCSEC_GSSv3 copy_from_auth
successful reply is the RPCSEC_GSSv3 "child" handle that the "child" handle that the client will use on COPY_NOTIFY requests to
client will use on COPY_NOTIFY requests to the source server the source server.
involving the destination server.
granted_assertions[0].assertion.privs.name will be equal to
"copy_from_auth".
o An instance of copy_to_auth_priv is filled in with the shared o An instance of copy_to_auth_priv is filled in with the shared
secret, the cnr_source_server list returned by COPY_NOTIFY, and secret, the cnr_source_server list returned by COPY_NOTIFY, and
the NFSv4 user id of the user principal. The next four fields are the NFSv4 user id of the user principal. The copy_to_auth_priv
passed in the copy_to_auth privilege to be used by the instance is placed in rpc_gss3_create_args
copy_confirm_auth rpc_gss3_gss_binding fields as explained above. assertions[0].assertion.privs.privilege. The string
A nounce is created, and GSS_MIC() is invoked on the nounce using "copy_to_auth" is placed in assertions[0].assertion.privs.name.
the RPCSEC_GSSv1 (or v2) context shared between user principal and The destination server unwraps the rpc_gss_svc_privacy
the source server. The nounce, nounce MIC, context handle used to RPCSEC_GSS3_CREATE payload and verifies that the NFSv4 user id
create the nounce MIC, and the context handle version are added to being asserted matches the destination server's mapping of the
the copy_to_auth_priv instance which is placed in user principal. If it does, the privilege is established on the
rpc_gss3_create_args assertions[0].assertion.privs.privilege. The destination server as: <"copy_to_auth", user id, source list>.
string "copy_to_auth" is placed in The field "handle" in a successful reply is the RPCSEC_GSSv3
assertions[0].assertion.privs.name. The field copy_to_auth "child" handle that the client will use on COPY
assertions[0].critical is set to TRUE. The destination server requests to the destination server involving the source server.
unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and
verifies that the NFSv4 user id being asserted matches the
destination server's mapping of the user principal. If it does,
the privilege is established on the destination server as:
<"copy_to_auth", user id, source list, nounce, nounce MIC, context
handle, handle version>. The field "handle" in a successful reply
is the RPCSEC_GSSv3 "child" handle that the client will use on
COPY requests to the destination server involving the source
server. granted_assertions[0].assertion.privs.name will be equal
to "copy_to_auth".
As noted in [rpcsec_gssv3] Section 2.3.1 "Create Request", both the As noted in [rpcsec_gssv3] Section 2.3.1 "Create Request", both the
client and the source server should associate the RPCSEC_GSSv3 client and the source server should associate the RPCSEC_GSSv3
"child" handle with the parent RPCSEC_GSSv1 (or v2) handle used to "child" handle with the parent RPCSEC_GSSv3 handle used to create the
create the RPCSEC_GSSv3 child handle. RPCSEC_GSSv3 child handle.
4.10.1.1.2. Starting a Secure Inter-Server Copy 4.10.1.1.2. Starting a Secure Inter-Server Copy
When the client sends a COPY_NOTIFY request to the source server, it When the client sends a COPY_NOTIFY request to the source server, it
uses the privileged "copy_from_auth" RPCSEC_GSSv3 handle. uses the privileged "copy_from_auth" RPCSEC_GSSv3 handle.
cna_destination_server in COPY_NOTIFY MUST be the same as cna_destination_server in COPY_NOTIFY MUST be the same as
cfap_destination specified in copy_from_auth_priv. Otherwise, cfap_destination specified in copy_from_auth_priv. Otherwise,
COPY_NOTIFY will fail with NFS4ERR_ACCESS. The source server COPY_NOTIFY will fail with NFS4ERR_ACCESS. The source server
verifies that the privilege <"copy_from_auth", user id, destination> verifies that the privilege <"copy_from_auth", user id, destination>
exists, and annotates it with the source filehandle, if the user exists, and annotates it with the source filehandle, if the user
principal has read access to the source file, and if administrative principal has read access to the source file, and if administrative
policies give the user principal and the NFS client read access to policies give the user principal and the NFS client read access to
the source file (i.e., if the ACCESS operation would grant read the source file (i.e., if the ACCESS operation would grant read
access). Otherwise, COPY_NOTIFY will fail with NFS4ERR_ACCESS. access). Otherwise, COPY_NOTIFY will fail with NFS4ERR_ACCESS.
When the client sends a COPY request to the destination server, it When the client sends a COPY request to the destination server, it
uses the privileged "copy_to_auth" RPCSEC_GSSv3 handle. uses the privileged "copy_to_auth" RPCSEC_GSSv3 handle.
ca_source_server list in COPY MUST be the same as ctap_source list ca_source_server list in COPY MUST be the same as ctap_source list
specified in copy_to_auth_priv. Otherwise, COPY will fail with specified in copy_to_auth_priv. Otherwise, COPY will fail with
NFS4ERR_ACCESS. The destination server verifies that the privilege NFS4ERR_ACCESS. The destination server verifies that the privilege
<"copy_to_auth", user id, source list, nounce, nounce MIC, context <"copy_to_auth", user id, source list> exists, and annotates it with
handle, handle version> exists, and annotates it with the source and the source and destination filehandles. If the COPY returns a
destination filehandles. If the COPY returns a wr_callback_id, then wr_callback_id, then this is an asynchronous copy and the
this is an asynchronous copy and the wr_callback_id must also must be wr_callback_id must also must be annotated to the copy_to_auth
annotated to the copy_to_auth privilege. If the client has failed to privilege. If the client has failed to establish the "copy_to_auth"
establish the "copy_to_auth" privilege it will reject the request privilege it will reject the request with NFS4ERR_PARTNER_NO_AUTH.
with NFS4ERR_PARTNER_NO_AUTH.
If either the COPY_NOTIFY, or the COPY operations fail, the If either the COPY_NOTIFY, or the COPY operations fail, the
associated "copy_from_auth" and "copy_to_auth" RPCSEC_GSSv3 handles associated "copy_from_auth" and "copy_to_auth" RPCSEC_GSSv3 handles
MUST be destroyed. MUST be destroyed.
4.10.1.1.3. Securing ONC RPC Server-to-Server Copy Protocols 4.10.1.1.3. Securing ONC RPC Server-to-Server Copy Protocols
After a destination server has a "copy_to_auth" privilege established After a destination server has a "copy_to_auth" privilege established
on it, and it receives a COPY request, if it knows it will use an ONC on it, and it receives a COPY request, if it knows it will use an ONC
RPC protocol to copy data, it will establish a "copy_confirm_auth" RPC protocol to copy data, it will establish a "copy_confirm_auth"
privilege on the source server prior to responding to the COPY privilege on the source server prior to responding to the COPY
operation as follows: operation as follows:
o Before establishing an RPCSEC_GSSv3 context, a parent context o Before establishing an RPCSEC_GSSv3 context, a parent context
needs to exist between nfs@<destination> as the initiator needs to exist between nfs@<destination> as the initiator
principal, and nfs@<source> as the target principal. If NFS is to principal, and nfs@<source> as the target principal. If NFS is to
be used as the copy protocol, this means that the destination be used as the copy protocol, this means that the destination
server must mount the source server using RPCSEC_GSS. server must mount the source server using RPCSEC_GSSv3.
o An instance of copy_confirm_auth_priv is filled in with o An instance of copy_confirm_auth_priv is filled in with
information from the established "copy_to_auth" privilege. The information from the established "copy_to_auth" privilege. The
value of the field ccap_shared_secret_mic is a GSS_GetMIC() of the value of the field ccap_shared_secret_mic is a GSS_GetMIC() of the
ctap_shared_secret in the copy_to_auth privilege using the parent ctap_shared_secret in the copy_to_auth privilege using the parent
handle context. The field ccap_username is the mapping of the handle context. The field ccap_username is the mapping of the
user principal to an NFSv4 user name ("user"@"domain" form), and user principal to an NFSv4 user name ("user"@"domain" form), and
MUST be the same as the ctap_username in the copy_to_auth MUST be the same as the ctap_username in the copy_to_auth
privilege. The copy_confirm_auth_priv instance is placed in privilege. The copy_confirm_auth_priv instance is placed in
rpc_gss3_create_args assertions[0].assertion.privs.privilege. The rpc_gss3_create_args assertions[0].assertion.privs.privilege. The
string "copy_confirm_auth" is placed in string "copy_confirm_auth" is placed in
assertions[0].assertion.privs.name. The field assertions[0].assertion.privs.name.
assertions[0].critical is set to TRUE.
o The copy_confirm_auth RPCSEC_GSS3_CREATE call also includes a
compound authentication component. The rpc_gss3_gss_binding
fields are filled in with information from the established
"copy_to_auth" privilege (see Section 4.10.1.1.1). The
ctap_handle_vers, ctap_handle, ctap_nounce, and ctap_nounce_mic
are assigned to the vers, handle, nounce, and mic fields of an
rpc_gss3_gss_binding instance respectively.
o The RPCSEC_GSS3_CREATE copy_from_auth message is sent to the o The RPCSEC_GSS3_CREATE copy_from_auth message is sent to the
source server with a QOP of rpc_gss_svc_privacy. The source source server with a QOP of rpc_gss_svc_privacy. The source
server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload server unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload
and verifies the cap_shared_secret_mic by calling GSS_VerifyMIC() and verifies the cap_shared_secret_mic by calling GSS_VerifyMIC()
using the parent context on the cfap_shared_secret from the using the parent context on the cfap_shared_secret from the
established "copy_from_auth" privilege, and verifies the that the established "copy_from_auth" privilege, and verifies the that the
ccap_username equals the cfap_username. The source server then ccap_username equals the cfap_username.
locates the ctap_handle in it's GSS context cache and verifies
that the handle belongs to the user principal that maps to the
ccap_username and that the cached handle version equals
ctap_handle_vers. The ctap_nounce_mic is verified by calling
GSS_VerifyMIC() on the ctap_nounce using the cached handle
context. If all verification succeeds, the "copy_confirm_auth"
privilege is established on the source server as <
"copy_confirm_auth", shared_secret_mic, user id, nounce, nounce
MIC, context handle, context handle version>, and the resultant
child handle is noted to be acting on behalf of the user
principal. If the source server fails to verify either the
privilege or the compound_binding, the COPY operation will be
rejected with NFS4ERR_PARTNER_NO_AUTH.
o All subsequent ONC RPC requests sent from the destination to copy o If all verification succeeds, the "copy_confirm_auth" privilege is
data from the source to the destination will use the RPCSEC_GSSv3 established on the source server as < "copy_confirm_auth",
handle returned by the source's RPCSEC_GSS3_CREATE response. Note shared_secret_mic, user id> Because the shared secret has been
that as per the Compound Authentication section of [rpcsec_gssv3] verified, the resultant copy_confirm_auth RPCSEC_GSSv3 child
the resultant RPCSEC_GSSv3 context handle is bound to the user handle is noted to be acting on behalf of the user principal.
principal RPCSEC_GSS context and so it MUST be treated by servers
as authenticating the user principal. o If the source server fails to verify the copy_from_auth privilege
the COPY operation will be rejected with NFS4ERR_PARTNER_NO_AUTH,
causing in turn the client to destroy the associated
copy_from_auth and copy_to_auth RPCSEC_GSSv3 structured privilege
assertion handles.
o All subsequent ONC RPC READ requests sent from the destination to
copy data from the source to the destination will use the
RPCSEC_GSSv3 copy_confirm_auth child handle.
Note that the use of the "copy_confirm_auth" privilege accomplishes Note that the use of the "copy_confirm_auth" privilege accomplishes
the following: the following:
o If a protocol like NFS is being used, with export policies, export o If a protocol like NFS is being used, with export policies, export
policies can be overridden in case the destination server as-an- policies can be overridden in case the destination server as-an-
NFS-client is not authorized NFS-client is not authorized
o Manual configuration to allow a copy relationship between the o Manual configuration to allow a copy relationship between the
source and destination is not needed. source and destination is not needed.
4.10.1.1.4. Maintaining a Secure Inter-Server Copy 4.10.1.1.4. Maintaining a Secure Inter-Server Copy
The secure inter-server copy depends upon both the source server and If the client determines that either the copy_from_auth or the
the destination server keeping the copy_from_auth and copy_to_auth copy_to_auth handle becomes invalid during a copy, then the copy MUST
RPCSEC_GSS3 context handles valid during the copy. The client SHOULD be aborted by the client sending an OFFLOAD_CANCEL to both the source
use the copy_from_auth RPCSEC_GSS3 context handle for the NFSv4 lease and destination servers and destroying the respective copy related
renewing operation to the source server, and the copy_to_auth context handles as described in Section 4.10.1.1.5.
RPCSEC_GSS3 context handle for the NFSv4 lease renewing operation to
the destination server during the copy to periodically determine the
continued validity of the respective GSS3 handles. A periodic RPC
NULL call can also be used for this purpose.
If the client determines that either handle becomes invalid during a
copy, then the copy MUST be aborted by the client sending an
OFFLOAD_CANCEL to both the source and destination servers and
destroying the respective copy related context handles as described
in Section 4.10.1.1.5.
4.10.1.1.5. Finishing or Stopping a Secure Inter-Server Copy 4.10.1.1.5. Finishing or Stopping a Secure Inter-Server Copy
Under normal operation, the client MUST destroy the copy_from_auth Under normal operation, the client MUST destroy the copy_from_auth
and the copy_to_auth RPCSEC_GSSv3 handle once the COPY operation and the copy_to_auth RPCSEC_GSSv3 handle once the COPY operation
returns for a synchronous inter-server copy or a CB_OFFLOAD reports returns for a synchronous inter-server copy or a CB_OFFLOAD reports
the result of an asynchronous copy. the result of an asynchronous copy.
The copy_confirm_auth privilege and compound authentication The copy_confirm_auth privilege constructed from information held by
RPCSEC_GSSv3 handle is constructed from information held by the the copy_to_auth privilege, and MUST be destroyed by the destination
copy_to_auth privilege, and MUST be destroyed by the destination
server (via an RPCSEC_GSS3_DESTROY call) when the copy_to_auth server (via an RPCSEC_GSS3_DESTROY call) when the copy_to_auth
RPCSEC_GSSv3 handle is destroyed. RPCSEC_GSSv3 handle is destroyed.
The copy_confirm_auth RPCSEC_GSS3 handle is associated with a The copy_confirm_auth RPCSEC_GSS3 handle is associated with a
copy_from_auth RPCSEC_GSS3 handle on the source server via the shared copy_from_auth RPCSEC_GSS3 handle on the source server via the shared
secret and MUST be locally destroyed (there is no RPCSEC_GSS3_DESTROY secret and MUST be locally destroyed (there is no RPCSEC_GSS3_DESTROY
as the source server is not the initiator) when the copy_from_auth as the source server is not the initiator) when the copy_from_auth
RPCSEC_GSSv3 handle is destroyed. RPCSEC_GSSv3 handle is destroyed.
If the client sends an OFFLOAD_CANCEL to the source server to rescind If the client sends an OFFLOAD_CANCEL to the source server to rescind
skipping to change at page 32, line 36 skipping to change at page 27, line 36
The same techniques as Section 4.10.1.2, using unique URLs for each The same techniques as Section 4.10.1.2, using unique URLs for each
destination server, can be used for other protocols (e.g., HTTP destination server, can be used for other protocols (e.g., HTTP
[RFC2616] and FTP [RFC959]) as well. [RFC2616] and FTP [RFC959]) as well.
5. Support for Application IO Hints 5. Support for Application IO Hints
Applications can issue client I/O hints via posix_fadvise() Applications can issue client I/O hints via posix_fadvise()
[posix_fadvise] to the NFS client. While this can help the NFS [posix_fadvise] to the NFS client. While this can help the NFS
client optimize I/O and caching for a file, it does not allow the NFS client optimize I/O and caching for a file, it does not allow the NFS
server and its exported file system to do likewise. We add an server and its exported file system to do likewise. We add an
IO_ADVISE procedure (Section 16.5) to communicate the client file IO_ADVISE procedure (Section 15.5) to communicate the client file
access patterns to the NFS server. The NFS server upon receiving a access patterns to the NFS server. The NFS server upon receiving a
IO_ADVISE operation MAY choose to alter its I/O and caching behavior, IO_ADVISE operation MAY choose to alter its I/O and caching behavior,
but is under no obligation to do so. but is under no obligation to do so.
Application specific NFS clients such as those used by hypervisors Application specific NFS clients such as those used by hypervisors
and databases can also leverage application hints to communicate and databases can also leverage application hints to communicate
their specialized requirements. their specialized requirements.
6. Sparse Files 6. Sparse Files
skipping to change at page 33, line 40 skipping to change at page 28, line 40
metadata and 100M in the data. metadata and 100M in the data.
No new operation is needed to allow the creation of a sparsely No new operation is needed to allow the creation of a sparsely
populated file, when a file is created and a write occurs past the populated file, when a file is created and a write occurs past the
current size of the file, the non-allocated region will either be a current size of the file, the non-allocated region will either be a
hole or filled with zeros. The choice of behavior is dictated by the hole or filled with zeros. The choice of behavior is dictated by the
underlying file system and is transparent to the application. What underlying file system and is transparent to the application. What
is needed are the abilities to read sparse files and to punch holes is needed are the abilities to read sparse files and to punch holes
to reinitialize the contents of a file. to reinitialize the contents of a file.
Two new operations DEALLOCATE (Section 16.4) and READ_PLUS Two new operations DEALLOCATE (Section 15.4) and READ_PLUS
(Section 16.10) are introduced. DEALLOCATE allows for the hole (Section 15.10) are introduced. DEALLOCATE allows for the hole
punching. I.e., an application might want to reset the allocation punching. I.e., an application might want to reset the allocation
and reservation status of a range of the file. READ_PLUS supports and reservation status of a range of the file. READ_PLUS supports
all the features of READ but includes an extension to support sparse all the features of READ but includes an extension to support sparse
files. READ_PLUS is guaranteed to perform no worse than READ, and files. READ_PLUS is guaranteed to perform no worse than READ, and
can dramatically improve performance with sparse files. READ_PLUS can dramatically improve performance with sparse files. READ_PLUS
does not depend on pNFS protocol features, but can be used by pNFS to does not depend on pNFS protocol features, but can be used by pNFS to
support sparse files. support sparse files.
6.2. Terminology 6.2. Terminology
skipping to change at page 34, line 33 skipping to change at page 29, line 33
knowledge of whether a hole is present or not, if the client supports knowledge of whether a hole is present or not, if the client supports
READ_PLUS and so does the server, then it should always use the READ_PLUS and so does the server, then it should always use the
READ_PLUS operation in preference to the READ operation. READ_PLUS operation in preference to the READ operation.
READ_PLUS extends the response with a new arm representing holes to READ_PLUS extends the response with a new arm representing holes to
avoid returning data for portions of the file which are initialized avoid returning data for portions of the file which are initialized
to zero and may or may not contain a backing store. Returning data to zero and may or may not contain a backing store. Returning data
blocks of uninitialized data wastes computational and network blocks of uninitialized data wastes computational and network
resources, thus reducing performance. resources, thus reducing performance.
If the client sends a READ operation, it is explicitly stating that When a client sends a READ operation, it is not prepared to accept a
it is not supporting sparse files. So if a READ occurs on a sparse READ_PLUS-style response providing a compact encoding of the scope of
file, then the server must expand such data to be raw bytes. If a holes. If a READ occurs on a sparse file, then the server must
READ occurs in the middle of a hole, the server can only send back expand such data to be raw bytes. If a READ occurs in the middle of
bytes starting from that offset. In contrast, if a READ_PLUS occurs a hole, the server can only send back bytes starting from that
in the middle of a hole, the server can send back a range which offset. By contrast, if a READ_PLUS occurs in the middle of a hole,
starts before the offset and extends past the range. the server can send back a range which starts before the offset and
extends past the range.
6.3.2. DEALLOCATE 6.3.2. DEALLOCATE
DEALLOCATE can be used to hole punch, which allows the client to DEALLOCATE can be used to hole punch, which allows the client to
avoid the transfer of a repetitive pattern of zeros across the avoid the transfer of a repetitive pattern of zeros across the
network. network.
7. Space Reservation 7. Space Reservation
7.1. Introduction
Applications want to be able to reserve space for a file, report the Applications want to be able to reserve space for a file, report the
amount of actual disk space a file occupies, and free-up the backing amount of actual disk space a file occupies, and free-up the backing
space of a file when it is not required. space of a file when it is not required.
One example is the posix_fallocate ([posix_fallocate]) which allows One example is the posix_fallocate ([posix_fallocate]) which allows
applications to ask for space reservations from the operating system, applications to ask for space reservations from the operating system,
usually to provide a better file layout and reduce overhead for usually to provide a better file layout and reduce overhead for
random or slow growing file appending workloads. random or slow growing file appending workloads.
skipping to change at page 35, line 31 skipping to change at page 30, line 26
machine from continuing execution and result in downtime. machine from continuing execution and result in downtime.
Currently, in order to achieve such a guarantee, applications zero Currently, in order to achieve such a guarantee, applications zero
the entire file. The initial zeroing allocates the backing blocks the entire file. The initial zeroing allocates the backing blocks
and all subsequent writes are overwrites of already allocated blocks. and all subsequent writes are overwrites of already allocated blocks.
This approach is not only inefficient in terms of the amount of I/O This approach is not only inefficient in terms of the amount of I/O
done, it is also not guaranteed to work on file systems that are log done, it is also not guaranteed to work on file systems that are log
structured or deduplicated. An efficient way of guaranteeing space structured or deduplicated. An efficient way of guaranteeing space
reservation would be beneficial to such applications. reservation would be beneficial to such applications.
The new ALLOCATE operation (see Section 16.1) allows a client to The new ALLOCATE operation (see Section 15.1) allows a client to
request a guarantee that space will be available. The ALLOCATE request a guarantee that space will be available. The ALLOCATE
operation guarantees that any future writes to the region it was operation guarantees that any future writes to the region it was
successfully called for will not fail with NFS4ERR_NOSPC. successfully called for will not fail with NFS4ERR_NOSPC.
Another useful feature is the ability to report the number of blocks Another useful feature is the ability to report the number of blocks
that would be freed when a file is deleted. Currently, NFS reports that would be freed when a file is deleted. Currently, NFS reports
two size attributes: two size attributes:
size The logical file size of the file. size The logical file size of the file.
skipping to change at page 36, line 40 skipping to change at page 31, line 35
reporting of the space utilization. reporting of the space utilization.
For example, two files A and B have 10 blocks each. Let 6 of these For example, two files A and B have 10 blocks each. Let 6 of these
blocks be shared between them. Thus, the combined space utilized by blocks be shared between them. Thus, the combined space utilized by
the two files is 14 * BLOCK_SIZE bytes. In the former case, the the two files is 14 * BLOCK_SIZE bytes. In the former case, the
combined space utilization of the two files would be reported as 20 * combined space utilization of the two files would be reported as 20 *
BLOCK_SIZE. However, deleting either would only result in 4 * BLOCK_SIZE. However, deleting either would only result in 4 *
BLOCK_SIZE being freed. Conversely, the latter interpretation would BLOCK_SIZE being freed. Conversely, the latter interpretation would
report that the space utilization is only 8 * BLOCK_SIZE. report that the space utilization is only 8 * BLOCK_SIZE.
Adding another size attribute, space_freed (see Section 13.2.3), is Adding another size attribute, space_freed (see Section 12.2.3), is
helpful in solving this problem. space_freed is the number of blocks helpful in solving this problem. space_freed is the number of blocks
that are allocated to the given file that would be freed on its that are allocated to the given file that would be freed on its
deletion. In the example, both A and B would report space_freed as 4 deletion. In the example, both A and B would report space_freed as 4
* BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B * BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B
will report space_freed as 10 * BLOCK_SIZE as the deletion of B would will report space_freed as 10 * BLOCK_SIZE as the deletion of B would
result in the deallocation of all 10 blocks. result in the deallocation of all 10 blocks.
The addition of this problem does not solve the problem of space The addition of these attributes does not solve the problem of space
being over-reported. However, over-reporting is better than under- being over-reported. However, over-reporting is better than under-
reporting. reporting.
8. Application Data Block Support 8. Application Data Block Support
At the OS level, files are contained on disk blocks. Applications At the OS level, files are contained on disk blocks. Applications
are also free to impose structure on the data contained in a file and are also free to impose structure on the data contained in a file and
we can define an Application Data Block (ADB) to be such a structure. we can define an Application Data Block (ADB) to be such a structure.
From the application's viewpoint, it only wants to handle ADBs and From the application's viewpoint, it only wants to handle ADBs and
not raw bytes (see [Strohm11]). An ADB is typically comprised of two not raw bytes (see [Strohm11]). An ADB is typically comprised of two
sections: header and data. The header describes the characteristics sections: header and data. The header describes the characteristics
of the block and can provide a means to detect corruption in the data of the block and can provide a means to detect corruption in the data
payload. The data section is typically initialized to all zeros. payload. The data section is typically initialized to all zeros.
The format of the header is application specific, but there are two The format of the header is application specific, but there are two
main components typically encountered: main components typically encountered:
1. An Application Data Block Number (ADBN) which allows the 1. An Application Data Block Number (ADBN) which allows the
skipping to change at page 40, line 19 skipping to change at page 35, line 12
occur in the transport layer. The server and client components are occur in the transport layer. The server and client components are
totally unaware of the file format and might report everything as totally unaware of the file format and might report everything as
being transferred correctly even in the case the application detects being transferred correctly even in the case the application detects
corruption. corruption.
8.3. Example of READ_PLUS 8.3. Example of READ_PLUS
The hypothetical application presented in Section 8.2 can be used to The hypothetical application presented in Section 8.2 can be used to
illustrate how READ_PLUS would return an array of results. A file is illustrate how READ_PLUS would return an array of results. A file is
created and initialized with 100 4k ADBs in the FREE state with the created and initialized with 100 4k ADBs in the FREE state with the
WRITE_SAME operation (see Section 16.12): WRITE_SAME operation (see Section 15.12):
WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface} WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface}
Further, assume the application writes a single ADB at 16k, changing Further, assume the application writes a single ADB at 16k, changing
the guard pattern to 0xcafedead, we would then have in memory: the guard pattern to 0xcafedead, we would then have in memory:
0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00
4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00
8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00
12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00 12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00
skipping to change at page 43, line 31 skipping to change at page 38, line 23
interoperability between MAC mechanisms. The second component is an interoperability between MAC mechanisms. The second component is an
opaque field which is the actual security attribute data. To allow opaque field which is the actual security attribute data. To allow
for various MAC models, NFSv4 should be used solely as a transport for various MAC models, NFSv4 should be used solely as a transport
mechanism for the security attribute. It is the responsibility of mechanism for the security attribute. It is the responsibility of
the endpoints to consume the security attribute and make access the endpoints to consume the security attribute and make access
decisions based on their respective models. In addition, creation of decisions based on their respective models. In addition, creation of
objects through OPEN and CREATE allows for the security attribute to objects through OPEN and CREATE allows for the security attribute to
be specified upon creation. By providing an atomic create and set be specified upon creation. By providing an atomic create and set
operation for the security attribute it is possible to enforce the operation for the security attribute it is possible to enforce the
second and fourth requirements. The recommended attribute second and fourth requirements. The recommended attribute
FATTR4_SEC_LABEL (see Section 13.2.2) will be used to satisfy this FATTR4_SEC_LABEL (see Section 12.2.2) will be used to satisfy this
requirement. requirement.
9.3.1. Delegations 9.3.1. Delegations
In the event that a security attribute is changed on the server while In the event that a security attribute is changed on the server while
a client holds a delegation on the file, both the server and the a client holds a delegation on the file, both the server and the
client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661]) client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661])
with respect to attribute changes. It SHOULD flush all changes back with respect to attribute changes. It SHOULD flush all changes back
to the server and relinquish the delegation. to the server and relinquish the delegation.
skipping to change at page 47, line 30 skipping to change at page 42, line 20
entity enforcing policy, and may selectively provide standard NFS entity enforcing policy, and may selectively provide standard NFS
services to clients based on their authentication credentials and/or services to clients based on their authentication credentials and/or
associated network attributes (e.g., IP address, network interface). associated network attributes (e.g., IP address, network interface).
The level of trust and access extended to a client in this mode is The level of trust and access extended to a client in this mode is
configuration-specific. If the server is not Labeled NFS aware, then configuration-specific. If the server is not Labeled NFS aware, then
it will not return object labels to the client. Clients in this it will not return object labels to the client. Clients in this
environment are may consist of groups implementing different MAC environment are may consist of groups implementing different MAC
model policies. The system requires that all clients in the model policies. The system requires that all clients in the
environment be responsible for access control checks. environment be responsible for access control checks.
9.7. Security Considerations 9.7. Security Considerations for Labeled NFS
This entire chapter deals with security issues. This entire chapter deals with security issues.
Depending on the level of protection the MAC system offers there may Depending on the level of protection the MAC system offers there may
be a requirement to tightly bind the security attribute to the data. be a requirement to tightly bind the security attribute to the data.
When only one of the client or server enforces labels, it is When only one of the client or server enforces labels, it is
important to realize that the other side is not enforcing MAC important to realize that the other side is not enforcing MAC
protections. Alternate methods might be in use to handle the lack of protections. Alternate methods might be in use to handle the lack of
MAC support and care should be taken to identify and mitigate threats MAC support and care should be taken to identify and mitigate threats
from possible tampering outside of these methods. from possible tampering outside of these methods.
An example of this is that a server that modifies READDIR or LOOKUP An example of this is that a server that modifies READDIR or LOOKUP
results based on the client's subject label might want to always results based on the client's subject label might want to always
construct the same subject label for a client which does not present construct the same subject label for a client which does not present
one. This will prevent a non-Labeled NFS client from mixing entries one. This will prevent a non-Labeled NFS client from mixing entries
in the directory cache. in the directory cache.
10. Sharing change attribute implementation details with NFSv4 clients 10. Sharing change attribute implementation details with NFSv4 clients
10.1. Introduction
Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1 Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1
protocol [RFC5661], define the change attribute as being mandatory to protocol [RFC5661], define the change attribute as being mandatory to
implement, there is little in the way of guidance. The only mandated implement, there is little in the way of guidance as to its
feature is that the value must change whenever the file data or construction. The only mandated constraint is that the value must
metadata change. change whenever the file data or metadata change.
While this allows for a wide range of implementations, it also leaves While this allows for a wide range of implementations, it also leaves
the client with a conundrum: how does it determine which is the most the client with no way to determine which is the most recent value
recent value for the change attribute in a case where several RPC for the change attribute in a case where several RPC calls have been
calls have been issued in parallel? In other words if two COMPOUNDs, issued in parallel. In other words if two COMPOUNDs, both containing
both containing WRITE and GETATTR requests for the same file, have WRITE and GETATTR requests for the same file, have been issued in
been issued in parallel, how does the client determine which of the parallel, how does the client determine which of the two change
two change attribute values returned in the replies to the GETATTR attribute values returned in the replies to the GETATTR requests
requests correspond to the most recent state of the file? In some correspond to the most recent state of the file? In some cases, the
cases, the only recourse may be to send another COMPOUND containing a only recourse may be to send another COMPOUND containing a third
third GETATTR that is fully serialized with the first two. GETATTR that is fully serialized with the first two.
NFSv4.2 avoids this kind of inefficiency by allowing the server to NFSv4.2 avoids this kind of inefficiency by allowing the server to
share details about how the change attribute is expected to evolve, share details about how the change attribute is expected to evolve,
so that the client may immediately determine which, out of the so that the client may immediately determine which, out of the
several change attribute values returned by the server, is the most several change attribute values returned by the server, is the most
recent. change_attr_type is defined as a new recommended attribute recent. change_attr_type is defined as a new recommended attribute
(see Section 13.2.1), and is per file system. (see Section 12.2.1), and is per file system.
11. Security Considerations
NFSv4.2 has all of the security concerns present in NFSv4.1 (see
Section 21 of [RFC5661]) and those present in the Server Side Copy
(see Section 4.10) and in Labeled NFS (see Section 9.7).
12. Error Values 11. Error Values
NFS error numbers are assigned to failed operations within a Compound NFS error numbers are assigned to failed operations within a Compound
(COMPOUND or CB_COMPOUND) request. A Compound request contains a (COMPOUND or CB_COMPOUND) request. A Compound request contains a
number of NFS operations that have their results encoded in sequence number of NFS operations that have their results encoded in sequence
in a Compound reply. The results of successful operations will in a Compound reply. The results of successful operations will
consist of an NFS4_OK status followed by the encoded results of the consist of an NFS4_OK status followed by the encoded results of the
operation. If an NFS operation fails, an error status will be operation. If an NFS operation fails, an error status will be
entered in the reply and the Compound request will be terminated. entered in the reply and the Compound request will be terminated.
12.1. Error Definitions 11.1. Error Definitions
Protocol Error Definitions Protocol Error Definitions
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
| Error | Number | Description | | Error | Number | Description |
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
| NFS4ERR_BADLABEL | 10093 | Section 12.1.3.1 | | NFS4ERR_BADLABEL | 10093 | Section 11.1.3.1 |
| NFS4ERR_OFFLOAD_DENIED | 10091 | Section 12.1.2.1 | | NFS4ERR_OFFLOAD_DENIED | 10091 | Section 11.1.2.1 |
| NFS4ERR_OFFLOAD_NO_REQS | 10094 | Section 12.1.2.2 | | NFS4ERR_OFFLOAD_NO_REQS | 10094 | Section 11.1.2.2 |
| NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 12.1.2.3 | | NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 11.1.2.3 |
| NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 12.1.2.4 | | NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 11.1.2.4 |
| NFS4ERR_UNION_NOTSUPP | 10090 | Section 12.1.1.1 | | NFS4ERR_UNION_NOTSUPP | 10090 | Section 11.1.1.1 |
| NFS4ERR_WRONG_LFS | 10092 | Section 12.1.3.2 | | NFS4ERR_WRONG_LFS | 10092 | Section 11.1.3.2 |
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
Table 1 Table 1
12.1.1. General Errors 11.1.1. General Errors
This section deals with errors that are applicable to a broad set of This section deals with errors that are applicable to a broad set of
different purposes. different purposes.
12.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090) 11.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090)
One of the arguments to the operation is a discriminated union and One of the arguments to the operation is a discriminated union and
while the server supports the given operation, it does not support while the server supports the given operation, it does not support
the selected arm of the discriminated union. the selected arm of the discriminated union.
12.1.2. Server to Server Copy Errors 11.1.2. Server to Server Copy Errors
These errors deal with the interaction between server to server These errors deal with the interaction between server to server
copies. copies.
12.1.2.1. NFS4ERR_OFFLOAD_DENIED (Error Code 10091) 11.1.2.1. NFS4ERR_OFFLOAD_DENIED (Error Code 10091)
The copy offload operation is supported by both the source and the The copy offload operation is supported by both the source and the
destination, but the destination is not allowing it for this file. destination, but the destination is not allowing it for this file.
If the client sees this error, it should fall back to the normal copy If the client sees this error, it should fall back to the normal copy
semantics. semantics.
12.1.2.2. NFS4ERR_OFFLOAD_NO_REQS (Error Code 10094) 11.1.2.2. NFS4ERR_OFFLOAD_NO_REQS (Error Code 10094)
The copy offload operation is supported by both the source and the The copy offload operation is supported by both the source and the
destination, but the destination can not meet the client requirements destination, but the destination can not meet the client requirements
for either consecutive byte copy or synchronous copy. If the client for either consecutive byte copy or synchronous copy. If the client
sees this error, it should either relax the requirements (if any) or sees this error, it should either relax the requirements (if any) or
fall back to the normal copy semantics. fall back to the normal copy semantics.
12.1.2.3. NFS4ERR_PARTNER_NO_AUTH (Error Code 10089) 11.1.2.3. NFS4ERR_PARTNER_NO_AUTH (Error Code 10089)
The source server does not authorize a server-to-server copy offload The source server does not authorize a server-to-server copy offload
operation. This may be due to the client's failure to send the operation. This may be due to the client's failure to send the
COPY_NOTIFY operation to the source server, the source server COPY_NOTIFY operation to the source server, the source server
receiving a server-to-server copy offload request after the copy receiving a server-to-server copy offload request after the copy
lease time expired, or for some other permission problem. lease time expired, or for some other permission problem.
12.1.2.4. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088) 11.1.2.4. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088)
The remote server does not support the server-to-server copy offload The remote server does not support the server-to-server copy offload
protocol. protocol.
12.1.3. Labeled NFS Errors 11.1.3. Labeled NFS Errors
These errors are used in Labeled NFS. These errors are used in Labeled NFS.
12.1.3.1. NFS4ERR_BADLABEL (Error Code 10093) 11.1.3.1. NFS4ERR_BADLABEL (Error Code 10093)
The label specified is invalid in some manner. The label specified is invalid in some manner.
12.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092) 11.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092)
The LFS specified in the subject label is not compatible with the LFS The LFS specified in the subject label is not compatible with the LFS
in the object label. in the object label.
12.2. New Operations and Their Valid Errors 11.2. New Operations and Their Valid Errors
This section contains a table that gives the valid error returns for This section contains a table that gives the valid error returns for
each new NFSv4.2 protocol operation. The error code NFS4_OK each new NFSv4.2 protocol operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be (indicating no error) is not listed but should be understood to be
returnable by all new operations. The error values for all other returnable by all new operations. The error values for all other
operations are defined in Section 15.2 of [RFC5661]. operations are defined in Section 15.2 of [RFC5661].
Valid Error Returns for Each New Protocol Operation Valid Error Returns for Each New Protocol Operation
+----------------+--------------------------------------------------+ +----------------+--------------------------------------------------+
skipping to change at page 53, line 39 skipping to change at page 48, line 18
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, | | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, | | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, | | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, |
| | NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE | | | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE |
| SEQUENCE | NFS4ERR_BADSESSION, NFS4ERR_BADSLOT, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_HIGH_SLOT, |
| | NFS4ERR_CONN_NOT_BOUND_TO_SESSION, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SEQUENCE_POS, NFS4ERR_SEQ_FALSE_RETRY, |
| | NFS4ERR_SEQ_MISORDERED, NFS4ERR_TOO_MANY_OPS |
| WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, | | | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
skipping to change at page 54, line 21 skipping to change at page 48, line 39
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, | | | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
+----------------+--------------------------------------------------+ +----------------+--------------------------------------------------+
Table 2 Table 2
12.3. New Callback Operations and Their Valid Errors 11.3. New Callback Operations and Their Valid Errors
This section contains a table that gives the valid error returns for This section contains a table that gives the valid error returns for
each new NFSv4.2 callback operation. The error code NFS4_OK each new NFSv4.2 callback operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be (indicating no error) is not listed but should be understood to be
returnable by all new callback operations. The error values for all returnable by all new callback operations. The error values for all
other callback operations are defined in Section 15.3 of [RFC5661]. other callback operations are defined in Section 15.3 of [RFC5661].
Valid Error Returns for Each New Protocol Callback Operation Valid Error Returns for Each New Protocol Callback Operation
+------------+------------------------------------------------------+ +------------+------------------------------------------------------+
skipping to change at page 54, line 45 skipping to change at page 49, line 21
| CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, | | CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, | | | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, |
| | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, | | | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_TOO_MANY_OPS | | | NFS4ERR_TOO_MANY_OPS |
+------------+------------------------------------------------------+ +------------+------------------------------------------------------+
Table 3 Table 3
13. New File Attributes 12. New File Attributes
13.1. New RECOMMENDED Attributes - List and Definition References 12.1. New RECOMMENDED Attributes - List and Definition References
The list of new RECOMMENDED attributes appears in Table 4. The The list of new RECOMMENDED attributes appears in Table 4. The
meaning of the columns of the table are: meaning of the columns of the table are:
Name: The name of the attribute. Name: The name of the attribute.
Id: The number assigned to the attribute. In the event of conflicts Id: The number assigned to the attribute. In the event of conflicts
between the assigned number and [NFSv42xdr], the latter is likely between the assigned number and [NFSv42xdr], the latter is likely
authoritative, but should be resolved with Errata to this document authoritative, but should be resolved with Errata to this document
and/or [NFSv42xdr]. See [IESG08] for the Errata process. and/or [NFSv42xdr]. See [IESG08] for the Errata process.
skipping to change at page 55, line 28 skipping to change at page 50, line 8
W means write-only (SETATTR may set, GETATTR may not retrieve). W means write-only (SETATTR may set, GETATTR may not retrieve).
R W means read/write (GETATTR may retrieve, SETATTR may set). R W means read/write (GETATTR may retrieve, SETATTR may set).
Defined in: The section of this specification that describes the Defined in: The section of this specification that describes the
attribute. attribute.
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| Name | Id | Data Type | Acc | Defined in | | Name | Id | Data Type | Acc | Defined in |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| space_freed | 77 | length4 | R | Section 13.2.3 | | space_freed | 77 | length4 | R | Section 12.2.3 |
| change_attr_type | 78 | change_attr_type4 | R | Section 13.2.1 | | change_attr_type | 78 | change_attr_type4 | R | Section 12.2.1 |
| sec_label | 79 | sec_label4 | R W | Section 13.2.2 | | sec_label | 79 | sec_label4 | R W | Section 12.2.2 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
Table 4 Table 4
13.2. Attribute Definitions 12.2. Attribute Definitions
13.2.1. Attribute 78: change_attr_type 12.2.1. Attribute 78: change_attr_type
enum change_attr_type4 { enum change_attr_type4 {
NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0, NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR = 0,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER = 1,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2, NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS = 2,
NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3, NFS4_CHANGE_TYPE_IS_TIME_METADATA = 3,
NFS4_CHANGE_TYPE_IS_UNDEFINED = 4 NFS4_CHANGE_TYPE_IS_UNDEFINED = 4
}; };
change_attr_type is a per file system attribute which enables the change_attr_type is a per file system attribute which enables the
skipping to change at page 57, line 7 skipping to change at page 51, line 33
be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This
again allows it to detect changes made in parallel by another client. again allows it to detect changes made in parallel by another client.
The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the
same, but only if the client is not doing pNFS WRITEs. same, but only if the client is not doing pNFS WRITEs.
Finally, if the server does not support change_attr_type or if Finally, if the server does not support change_attr_type or if
NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an
effort to implement the change attribute in terms of the effort to implement the change attribute in terms of the
time_metadata attribute. time_metadata attribute.
13.2.2. Attribute 79: sec_label 12.2.2. Attribute 79: sec_label
typedef uint32_t policy4; typedef uint32_t policy4;
struct labelformat_spec4 { struct labelformat_spec4 {
policy4 lfs_lfs; policy4 lfs_lfs;
policy4 lfs_pi; policy4 lfs_pi;
}; };
struct sec_label4 { struct sec_label4 {
labelformat_spec4 slai_lfs; labelformat_spec4 slai_lfs;
skipping to change at page 57, line 41 skipping to change at page 52, line 18
attribute. This component is dependent on the MAC model to interpret attribute. This component is dependent on the MAC model to interpret
and enforce. and enforce.
In particular, it is the responsibility of the LFS specification to In particular, it is the responsibility of the LFS specification to
define a maximum size for the opaque section, slai_data<>. When define a maximum size for the opaque section, slai_data<>. When
creating or modifying a label for an object, the client needs to be creating or modifying a label for an object, the client needs to be
guaranteed that the server will accept a label that is sized guaranteed that the server will accept a label that is sized
correctly. By both client and server being part of a specific MAC correctly. By both client and server being part of a specific MAC
model, the client will be aware of the size. model, the client will be aware of the size.
13.2.3. Attribute 77: space_freed 12.2.3. Attribute 77: space_freed
space_freed gives the number of bytes freed if the file is deleted. space_freed gives the number of bytes freed if the file is deleted.
This attribute is read only and is of type length4. It is a per file This attribute is read only and is of type length4. It is a per file
attribute. attribute.
14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL 13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL
The following tables summarize the operations of the NFSv4.2 protocol The following tables summarize the operations of the NFSv4.2 protocol
and the corresponding designation of REQUIRED, RECOMMENDED, and and the corresponding designation of REQUIRED, RECOMMENDED, and
OPTIONAL to implement or either OBSOLESCENT or MUST NOT implement. OPTIONAL to implement or MUST NOT implement. The designation of MUST
NOT implement is reserved for those operations that were defined in
The designation of OBSOLESCENT is reserved for those operations which either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2.
are defined in either NFSv4.0 or NFSv4.1 and are intended to be
classified as MUST NOT be implemented in NFSv4.3. The designation of
MUST NOT implement is reserved for those operations that were defined
in either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2.
For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation For the most part, the REQUIRED, RECOMMENDED, or OPTIONAL designation
for operations sent by the client is for the server implementation. for operations sent by the client is for the server implementation.
The client is generally required to implement the operations needed The client is generally required to implement the operations needed
for the operating environment for which it serves. For example, a for the operating environment for which it serves. For example, a
read-only NFSv4.2 client would have no need to implement the WRITE read-only NFSv4.2 client would have no need to implement the WRITE
operation and is not required to do so. operation and is not required to do so.
The REQUIRED or OPTIONAL designation for callback operations sent by The REQUIRED or OPTIONAL designation for callback operations sent by
the server is for both the client and server. Generally, the client the server is for both the client and server. Generally, the client
skipping to change at page 58, line 36 skipping to change at page 53, line 10
Since this is a summary of the operations and their designation, Since this is a summary of the operations and their designation,
there are subtleties that are not presented here. Therefore, if there are subtleties that are not presented here. Therefore, if
there is a question of the requirements of implementation, the there is a question of the requirements of implementation, the
operation descriptions themselves must be consulted along with other operation descriptions themselves must be consulted along with other
relevant explanatory text within this either specification or that of relevant explanatory text within this either specification or that of
NFSv4.1 [RFC5661]. NFSv4.1 [RFC5661].
The abbreviations used in the second and third columns of the table The abbreviations used in the second and third columns of the table
are defined as follows. are defined as follows.
REQ REQUIRED to implement REQ: REQUIRED to implement
REC RECOMMENDED to implement
OPT OPTIONAL to implement REC: RECOMMENDED to implement
MNI MUST NOT implement OPT: OPTIONAL to implement
OBS Also OBSOLESCENT for future versions. MNI: MUST NOT implement
For the NFSv4.2 features that are OPTIONAL, the operations that For the NFSv4.2 features that are OPTIONAL, the operations that
support those features are OPTIONAL, and the server would return support those features are OPTIONAL, and the server MUST return
NFS4ERR_NOTSUPP in response to the client's use of those operations. NFS4ERR_NOTSUPP in response to the client's use of those operations,
If an OPTIONAL feature is supported, it is possible that a set of when those operations are not implemented by the server. If an
OPTIONAL feature is supported, it is possible that a set of
operations related to the feature become REQUIRED to implement. The operations related to the feature become REQUIRED to implement. The
third column of the table designates the feature(s) and if the third column of the table designates the feature(s) and if the
operation is REQUIRED or OPTIONAL in the presence of support for the operation is REQUIRED or OPTIONAL in the presence of support for the
feature. feature.
The OPTIONAL features identified and their abbreviations are as The OPTIONAL features identified and their abbreviations are as
follows: follows:
pNFS Parallel NFS pNFS: Parallel NFS
FDELG File Delegations FDELG: File Delegations
DDELG Directory Delegations DDELG: Directory Delegations
COPY Server Side Copy COPYra: Intra-server Server Side Copy
ADB Application Data Blocks COPYer: Inter-server Server Side Copy
ADB: Application Data Blocks
Operations Operations
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, | | Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, |
| | or MNI | or OPT) | | | or MNI | or OPT) |
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| ALLOCATE | OPT | | | ALLOCATE | OPT | |
| ACCESS | REQ | | | ACCESS | REQ | |
| BACKCHANNEL_CTL | REQ | | | BACKCHANNEL_CTL | REQ | |
| BIND_CONN_TO_SESSION | REQ | | | BIND_CONN_TO_SESSION | REQ | |
| CLOSE | REQ | | | CLOSE | REQ | |
| COMMIT | REQ | | | COMMIT | REQ | |
| COPY | OPT | COPY (REQ) | | COPY | OPT | COPYer (REQ), COPYra |
| COPY_NOTIFY | OPT | COPY (REQ) | | | | (REQ) |
| COPY_NOTIFY | OPT | COPYer (REQ) |
| DEALLOCATE | OPT | | | DEALLOCATE | OPT | |
| CREATE | REQ | | | CREATE | REQ | |
| CREATE_SESSION | REQ | | | CREATE_SESSION | REQ | |
| DELEGPURGE | OPT | FDELG (REQ) | | DELEGPURGE | OPT | FDELG (REQ) |
| DELEGRETURN | OPT | FDELG, DDELG, pNFS | | DELEGRETURN | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
| DESTROY_CLIENTID | REQ | | | DESTROY_CLIENTID | REQ | |
| DESTROY_SESSION | REQ | | | DESTROY_SESSION | REQ | |
| EXCHANGE_ID | REQ | | | EXCHANGE_ID | REQ | |
| FREE_STATEID | REQ | | | FREE_STATEID | REQ | |
skipping to change at page 60, line 13 skipping to change at page 54, line 37
| LAYOUTRETURN | OPT | pNFS (REQ) | | LAYOUTRETURN | OPT | pNFS (REQ) |
| LAYOUTERROR | OPT | pNFS (OPT) | | LAYOUTERROR | OPT | pNFS (OPT) |
| LAYOUTSTATS | OPT | pNFS (OPT) | | LAYOUTSTATS | OPT | pNFS (OPT) |
| LINK | OPT | | | LINK | OPT | |
| LOCK | REQ | | | LOCK | REQ | |
| LOCKT | REQ | | | LOCKT | REQ | |
| LOCKU | REQ | | | LOCKU | REQ | |
| LOOKUP | REQ | | | LOOKUP | REQ | |
| LOOKUPP | REQ | | | LOOKUPP | REQ | |
| NVERIFY | REQ | | | NVERIFY | REQ | |
| OFFLOAD_CANCEL | OPT | COPY (REQ) | | OFFLOAD_CANCEL | OPT | COPYer (REQ), COPYra |
| OFFLOAD_STATUS | OPT | COPY (REQ) | | | | (REQ) |
| OFFLOAD_STATUS | OPT | COPYer (REQ), COPYra |
| | | (REQ) |
| OPEN | REQ | | | OPEN | REQ | |
| OPENATTR | OPT | | | OPENATTR | OPT | |
| OPEN_CONFIRM | MNI | | | OPEN_CONFIRM | MNI | |
| OPEN_DOWNGRADE | REQ | | | OPEN_DOWNGRADE | REQ | |
| PUTFH | REQ | | | PUTFH | REQ | |
| PUTPUBFH | REQ | | | PUTPUBFH | REQ | |
| PUTROOTFH | REQ | | | PUTROOTFH | REQ | |
| READ | REQ | | | READ | REQ | |
| READDIR | REQ | | | READDIR | REQ | |
| READLINK | OPT | | | READLINK | OPT | |
skipping to change at page 61, line 4 skipping to change at page 55, line 25
| SETATTR | REQ | | | SETATTR | REQ | |
| SETCLIENTID | MNI | | | SETCLIENTID | MNI | |
| SETCLIENTID_CONFIRM | MNI | | | SETCLIENTID_CONFIRM | MNI | |
| SET_SSV | REQ | | | SET_SSV | REQ | |
| TEST_STATEID | REQ | | | TEST_STATEID | REQ | |
| VERIFY | REQ | | | VERIFY | REQ | |
| WANT_DELEGATION | OPT | FDELG (OPT) | | WANT_DELEGATION | OPT | FDELG (OPT) |
| WRITE | REQ | | | WRITE | REQ | |
| WRITE_SAME | OPT | ADB (REQ) | | WRITE_SAME | OPT | ADB (REQ) |
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
Callback Operations Callback Operations
+-------------------------+-------------------+---------------------+ +-------------------------+------------------+----------------------+
| Operation | REQ, REC, OPT, or | Feature (REQ, REC, | | Operation | REQ, REC, OPT, | Feature (REQ, REC, |
| | MNI | or OPT) | | | or MNI | or OPT) |
+-------------------------+-------------------+---------------------+ +-------------------------+------------------+----------------------+
| CB_OFFLOAD | OPT | COPY (REQ) | | CB_OFFLOAD | OPT | COPYer (REQ), COPYra |
| CB_GETATTR | OPT | FDELG (REQ) | | | | (REQ) |
| CB_LAYOUTRECALL | OPT | pNFS (REQ) | | CB_GETATTR | OPT | FDELG (REQ) |
| CB_NOTIFY | OPT | DDELG (REQ) | | CB_LAYOUTRECALL | OPT | pNFS (REQ) |
| CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | | CB_NOTIFY | OPT | DDELG (REQ) |
| CB_NOTIFY_LOCK | OPT | | | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) |
| CB_PUSH_DELEG | OPT | FDELG (OPT) | | CB_NOTIFY_LOCK | OPT | |
| CB_RECALL | OPT | FDELG, DDELG, pNFS | | CB_PUSH_DELEG | OPT | FDELG (OPT) |
| | | (REQ) | | CB_RECALL | OPT | FDELG, DDELG, pNFS |
| CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS | | | | (REQ) |
| | | (REQ) | | CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS |
| CB_RECALL_SLOT | REQ | | | | | (REQ) |
| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) | | CB_RECALL_SLOT | REQ | |
| CB_SEQUENCE | OPT | FDELG, DDELG, pNFS | | CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) |
| | | (REQ) | | CB_SEQUENCE | OPT | FDELG, DDELG, pNFS |
| CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS | | | | (REQ) |
| | | (REQ) | | CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS |
+-------------------------+-------------------+---------------------+ | | | (REQ) |
+-------------------------+------------------+----------------------+
15. Modifications to NFSv4.1 Operations 14. Modifications to NFSv4.1 Operations
15.1. Operation 42: EXCHANGE_ID - Instantiate Client ID 14.1. Operation 42: EXCHANGE_ID - Instantiate Client ID
15.1.1. ARGUMENT 14.1.1. ARGUMENT
/* new */ /* new */
const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004;
15.1.2. RESULT 14.1.2. RESULT
Unchanged Unchanged
15.1.3. MOTIVATION 14.1.3. MOTIVATION
Enterprise applications require guarantees that an operation has Enterprise applications require guarantees that an operation has
either aborted or completed. NFSv4.1 provides this guarantee as long either aborted or completed. NFSv4.1 provides this guarantee as long
as the session is alive: simply send a SEQUENCE operation on the same as the session is alive: simply send a SEQUENCE operation on the same
slot with a new sequence number, and the successful return of slot with a new sequence number, and the successful return of
SEQUENCE indicates the previous operation has completed. However, if SEQUENCE indicates the previous operation has completed. However, if
the session is lost, there is no way to know when any in progress the session is lost, there is no way to know when any in progress
operations have aborted or completed. In hindsight, the NFSv4.1 operations have aborted or completed. In hindsight, the NFSv4.1
specification should have mandated that DESTROY_SESSION either abort specification should have mandated that DESTROY_SESSION either abort
or complete all outstanding operations. or complete all outstanding operations.
15.1.4. DESCRIPTION 14.1.4. DESCRIPTION
A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability
when it sends an EXCHANGE_ID operation. The server SHOULD set this when it sends an EXCHANGE_ID operation. The server SHOULD set this
capability in the EXCHANGE_ID reply whether the client requests it or capability in the EXCHANGE_ID reply whether the client requests it or
not. It is the server's return that determines whether this not. It is the server's return that determines whether this
capability is in effect. When it is in effect, the following will capability is in effect. When it is in effect, the following will
occur: occur:
o The server will not reply to any DESTROY_SESSION invoked with the o The server will not reply to any DESTROY_SESSION invoked with the
client ID until all operations in progress are completed or client ID until all operations in progress are completed or
aborted. aborted.
o The server will not reply to subsequent EXCHANGE_ID invoked on the o The server will not reply to subsequent EXCHANGE_ID invoked on the
same client owner with a new verifier until all operations in same client owner with a new verifier until all operations in
progress on the client ID's session are completed or aborted. progress on the client ID's session are completed or aborted.
o The NFS server SHOULD support client ID trunking, and if it does o In implementations where the NFS server is deployed as a cluster,
and the EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a it does support client ID trunking, and the
session ID created on one node of the storage cluster MUST be EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a session
destroyable via DESTROY_SESSION. In addition, DESTROY_CLIENTID ID created on one node of the storage cluster MUST be destroyable
and an EXCHANGE_ID with a new verifier affects all sessions via DESTROY_SESSION. In addition, DESTROY_CLIENTID and an
regardless what node the sessions were created on. EXCHANGE_ID with a new verifier affects all sessions regardless
what node the sessions were created on.
15.2. Operation 48: GETDEVICELIST - Get All Device Mappings for a File 14.2. Operation 48: GETDEVICELIST - Get All Device Mappings for a File
System System
15.2.1. ARGUMENT 14.2.1. ARGUMENT
struct GETDEVICELIST4args { struct GETDEVICELIST4args {
/* CURRENT_FH: object belonging to the file system */ /* CURRENT_FH: object belonging to the file system */
layouttype4 gdla_layout_type; layouttype4 gdla_layout_type;
/* number of deviceIDs to return */ /* number of deviceIDs to return */
count4 gdla_maxdevices; count4 gdla_maxdevices;
nfs_cookie4 gdla_cookie; nfs_cookie4 gdla_cookie;
verifier4 gdla_cookieverf; verifier4 gdla_cookieverf;
}; };
15.2.2. RESULT 14.2.2. RESULT
struct GETDEVICELIST4resok { struct GETDEVICELIST4resok {
nfs_cookie4 gdlr_cookie; nfs_cookie4 gdlr_cookie;
verifier4 gdlr_cookieverf; verifier4 gdlr_cookieverf;
deviceid4 gdlr_deviceid_list<>; deviceid4 gdlr_deviceid_list<>;
bool gdlr_eof; bool gdlr_eof;
}; };
union GETDEVICELIST4res switch (nfsstat4 gdlr_status) { union GETDEVICELIST4res switch (nfsstat4 gdlr_status) {
case NFS4_OK: case NFS4_OK:
GETDEVICELIST4resok gdlr_resok4; GETDEVICELIST4resok gdlr_resok4;
default: default:
void; void;
}; };
15.2.3. MOTIVATION 14.2.3. MOTIVATION
The GETDEVICELIST operation was introduced in [RFC5661] specificly to The GETDEVICELIST operation was introduced in [RFC5661] specifically
request a list of devices at filesystem mount time from block layout to request a list of devices at filesystem mount time from block
type servers. However use of the GETDEVICELIST operation introduces layout type servers. However use of the GETDEVICELIST operation
a race condition versus notification about changes to pNFS device IDs introduces a race condition versus notification about changes to pNFS
as provided by CB_NOTIFY_DEVICEID. Implementation experience with device IDs as provided by CB_NOTIFY_DEVICEID. Implementation
block layout servers has shown there is no need for GETDEVICELIST. experience with block layout servers has shown there is no need for
Clients have to be able to request new devices using GETDEVICEINFO at GETDEVICELIST. Clients have to be able to request new devices using
any time in response either to a new deviceid in LAYOUTGET results or GETDEVICEINFO at any time in response either to a new deviceid in
to the CB_NOTIFY_DEVICEID callback operation. LAYOUTGET results or to the CB_NOTIFY_DEVICEID callback operation.
15.2.4. DESCRIPTION 14.2.4. DESCRIPTION
Clients and servers MUST NOT implement the GETDEVICELIST operation. Clients and servers MUST NOT implement the GETDEVICELIST operation.
16. NFSv4.2 Operations 15. NFSv4.2 Operations
16.1. Operation 59: ALLOCATE - Reserve Space in A Region of a File 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a File
16.1.1. ARGUMENT 15.1.1. ARGUMENT
struct ALLOCATE4args { struct ALLOCATE4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 aa_stateid; stateid4 aa_stateid;
offset4 aa_offset; offset4 aa_offset;
length4 aa_length; length4 aa_length;
}; };
16.1.2. RESULT 15.1.2. RESULT
struct ALLOCATE4res { struct ALLOCATE4res {
nfsstat4 ar_status; nfsstat4 ar_status;
}; };
16.1.3. DESCRIPTION 15.1.3. DESCRIPTION
Whenever a client wishes to reserve space for a region in a file it Whenever a client wishes to reserve space for a region in a file it
calls the ALLOCATE operation with the current filehandle set to the calls the ALLOCATE operation with the current filehandle set to the
filehandle of the file in question, and the start offset and length filehandle of the file in question, and the start offset and length
in bytes of the region set in aa_offset and aa_length respectively. in bytes of the region set in aa_offset and aa_length respectively.
The server will ensure that backing blocks are reserved to the region The server will ensure that backing blocks are reserved to the region
specified by aa_offset and aa_length, and that no future writes into specified by aa_offset and aa_length, and that no future writes into
this region will return NFS4ERR_NOSPC. If the region lies partially this region will return NFS4ERR_NOSPC. If the region lies partially
or fully outside the current file size the file size will be set to or fully outside the current file size the file size will be set to
skipping to change at page 64, line 40 skipping to change at page 59, line 10
It is not required that the server allocate the space to the file It is not required that the server allocate the space to the file
before returning success. The allocation can be deferred, however, before returning success. The allocation can be deferred, however,
it must be guaranteed that it will not fail for lack of space. The it must be guaranteed that it will not fail for lack of space. The
deferral does not result in an asynchronous reply. deferral does not result in an asynchronous reply.
The ALLOCATE operation will result in the space_used attribute and The ALLOCATE operation will result in the space_used attribute and
space_freed attributes being increased by the number of bytes space_freed attributes being increased by the number of bytes
reserved unless they were previously reserved or written and not reserved unless they were previously reserved or written and not
shared. shared.
16.2. Operation 60: COPY - Initiate a server-side copy 15.2. Operation 60: COPY - Initiate a server-side copy
15.2.1. ARGUMENT
16.2.1. ARGUMENT
struct COPY4args { struct COPY4args {
/* SAVED_FH: source file */ /* SAVED_FH: source file */
/* CURRENT_FH: destination file */ /* CURRENT_FH: destination file */
stateid4 ca_src_stateid; stateid4 ca_src_stateid;
stateid4 ca_dst_stateid; stateid4 ca_dst_stateid;
offset4 ca_src_offset; offset4 ca_src_offset;
offset4 ca_dst_offset; offset4 ca_dst_offset;
length4 ca_count; length4 ca_count;
bool ca_consecutive; bool ca_consecutive;
bool ca_synchronous; bool ca_synchronous;
netloc4 ca_source_server<>; netloc4 ca_source_server<>;
}; };
16.2.2. RESULT 15.2.2. RESULT
struct write_response4 { struct write_response4 {
stateid4 wr_callback_id<1>; stateid4 wr_callback_id<1>;
length4 wr_count; length4 wr_count;
stable_how4 wr_committed; stable_how4 wr_committed;
verifier4 wr_writeverf; verifier4 wr_writeverf;
}; };
struct COPY4res { struct COPY4res {
nfsstat4 cr_status; nfsstat4 cr_status;
write_response4 cr_response; write_response4 cr_response;
bool cr_consecutive; bool cr_consecutive;
bool cr_synchronous; bool cr_synchronous;
}; };
16.2.3. DESCRIPTION 15.2.3. DESCRIPTION
The COPY operation is used for both intra-server and inter-server The COPY operation is used for both intra-server and inter-server
copies. In both cases, the COPY is always sent from the client to copies. In both cases, the COPY is always sent from the client to
the destination server of the file copy. The COPY operation requests the destination server of the file copy. The COPY operation requests
that a file be copied from the location specified by the SAVED_FH that a file be copied from the location specified by the SAVED_FH
value to the location specified by the CURRENT_FH. value to the location specified by the CURRENT_FH.
The SAVED_FH must be a regular file. If SAVED_FH is not a regular The SAVED_FH must be a regular file. If SAVED_FH is not a regular
file, the operation MUST fail and return NFS4ERR_WRONG_TYPE. file, the operation MUST fail and return NFS4ERR_WRONG_TYPE.
skipping to change at page 69, line 23 skipping to change at page 63, line 35
In either case, if cr_consecutive was not true, there is no assurance In either case, if cr_consecutive was not true, there is no assurance
as to exactly which bytes in the range were copied. The client MUST as to exactly which bytes in the range were copied. The client MUST
assume that there exists a mixture of the original contents of the assume that there exists a mixture of the original contents of the
range and the new bytes. If the COPY wrote past the end of the file range and the new bytes. If the COPY wrote past the end of the file
on the destination, then the last byte written to will determine the on the destination, then the last byte written to will determine the
new file size. The contents of any block not written to and past the new file size. The contents of any block not written to and past the
original size of the file will be as if a normal WRITE extended the original size of the file will be as if a normal WRITE extended the
file. file.
16.3. Operation 61: COPY_NOTIFY - Notify a source server of a future 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a future
copy copy
16.3.1. ARGUMENT 15.3.1. ARGUMENT
struct COPY_NOTIFY4args { struct COPY_NOTIFY4args {
/* CURRENT_FH: source file */ /* CURRENT_FH: source file */
stateid4 cna_src_stateid; stateid4 cna_src_stateid;
netloc4 cna_destination_server; netloc4 cna_destination_server;
}; };
16.3.2. RESULT 15.3.2. RESULT
struct COPY_NOTIFY4resok { struct COPY_NOTIFY4resok {
nfstime4 cnr_lease_time; nfstime4 cnr_lease_time;
netloc4 cnr_source_server<>; netloc4 cnr_source_server<>;
}; };
union COPY_NOTIFY4res switch (nfsstat4 cnr_status) { union COPY_NOTIFY4res switch (nfsstat4 cnr_status) {
case NFS4_OK: case NFS4_OK:
COPY_NOTIFY4resok resok4; COPY_NOTIFY4resok resok4;
default: default:
void; void;
}; };
16.3.3. DESCRIPTION 15.3.3. DESCRIPTION
This operation is used for an inter-server copy. A client sends this This operation is used for an inter-server copy. A client sends this
operation in a COMPOUND request to the source server to authorize a operation in a COMPOUND request to the source server to authorize a
destination server identified by cna_destination_server to read the destination server identified by cna_destination_server to read the
file specified by CURRENT_FH on behalf of the given user. file specified by CURRENT_FH on behalf of the given user.
The cna_src_stateid MUST refer to either open or locking states The cna_src_stateid MUST refer to either open or locking states
provided earlier by the server. If it is invalid, then the operation provided earlier by the server. If it is invalid, then the operation
MUST fail. MUST fail.
skipping to change at page 70, line 47 skipping to change at page 65, line 11
A successful response will also contain a list of netloc4 network A successful response will also contain a list of netloc4 network
location formats called cnr_source_server, on which the source is location formats called cnr_source_server, on which the source is
willing to accept connections from the destination. These might not willing to accept connections from the destination. These might not
be reachable from the client and might be located on networks to be reachable from the client and might be located on networks to
which the client has no connection. which the client has no connection.
For a copy only involving one server (the source and destination are For a copy only involving one server (the source and destination are
on the same server), this operation is unnecessary. on the same server), this operation is unnecessary.
16.4. Operation 62: DEALLOCATE - Unreserve Space in a Region of a File 15.4. Operation 62: DEALLOCATE - Unreserve Space in a Region of a File
16.4.1. ARGUMENT
15.4.1. ARGUMENT
struct DEALLOCATE4args { struct DEALLOCATE4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 da_stateid; stateid4 da_stateid;
offset4 da_offset; offset4 da_offset;
length4 da_length; length4 da_length;
}; };
16.4.2. RESULT 15.4.2. RESULT
struct DEALLOCATE4res { struct DEALLOCATE4res {
nfsstat4 dr_status; nfsstat4 dr_status;
}; };
16.4.3. DESCRIPTION 15.4.3. DESCRIPTION
Whenever a client wishes to unreserve space for a region in a file it Whenever a client wishes to unreserve space for a region in a file it
calls the DEALLOCATE operation with the current filehandle set to the calls the DEALLOCATE operation with the current filehandle set to the
filehandle of the file in question, and the start offset and length filehandle of the file in question, and the start offset and length
in bytes of the region set in da_offset and da_length respectively. in bytes of the region set in da_offset and da_length respectively.
If no space was allocated or reserved for all or parts of the region, If no space was allocated or reserved for all or parts of the region,
the DEALLOCATE operation will have no effect for the region that the DEALLOCATE operation will have no effect for the region that
already is in unreserved state. All further reads from the region already is in unreserved state. All further reads from the region
passed to DEALLOCATE MUST return zeros until overwritten. The passed to DEALLOCATE MUST return zeros until overwritten. The
filehandle specified must be that of a regular file. filehandle specified must be that of a regular file.
skipping to change at page 71, line 44 skipping to change at page 66, line 8
block size of the file system. In such a case, the server can block size of the file system. In such a case, the server can
deallocate as many bytes as it can in the region. The blocks that deallocate as many bytes as it can in the region. The blocks that
cannot be deallocated MUST be zeroed. cannot be deallocated MUST be zeroed.
DEALLOCATE will result in the space_used attribute being decreased by DEALLOCATE will result in the space_used attribute being decreased by
the number of bytes that were deallocated. The space_freed attribute the number of bytes that were deallocated. The space_freed attribute
may or may not decrease, depending on the support and whether the may or may not decrease, depending on the support and whether the
blocks backing the specified range were shared or not. The size blocks backing the specified range were shared or not. The size
attribute will remain unchanged. attribute will remain unchanged.
16.5. Operation 63: IO_ADVISE - Application I/O access pattern hints 15.5. Operation 63: IO_ADVISE - Application I/O access pattern hints
16.5.1. ARGUMENT
15.5.1. ARGUMENT
enum IO_ADVISE_type4 { enum IO_ADVISE_type4 {
IO_ADVISE4_NORMAL = 0, IO_ADVISE4_NORMAL = 0,
IO_ADVISE4_SEQUENTIAL = 1, IO_ADVISE4_SEQUENTIAL = 1,
IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2,
IO_ADVISE4_RANDOM = 3, IO_ADVISE4_RANDOM = 3,
IO_ADVISE4_WILLNEED = 4, IO_ADVISE4_WILLNEED = 4,
IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5,
IO_ADVISE4_DONTNEED = 6, IO_ADVISE4_DONTNEED = 6,
IO_ADVISE4_NOREUSE = 7, IO_ADVISE4_NOREUSE = 7,
skipping to change at page 72, line 28 skipping to change at page 66, line 34
}; };
struct IO_ADVISE4args { struct IO_ADVISE4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 iaa_stateid; stateid4 iaa_stateid;
offset4 iaa_offset; offset4 iaa_offset;
length4 iaa_count; length4 iaa_count;
bitmap4 iaa_hints; bitmap4 iaa_hints;
}; };
16.5.2. RESULT 15.5.2. RESULT
struct IO_ADVISE4resok { struct IO_ADVISE4resok {
bitmap4 ior_hints; bitmap4 ior_hints;
}; };
union IO_ADVISE4res switch (nfsstat4 ior_status) { union IO_ADVISE4res switch (nfsstat4 ior_status) {
case NFS4_OK: case NFS4_OK:
IO_ADVISE4resok resok4; IO_ADVISE4resok resok4;
default: default:
void; void;
}; };
16.5.3. DESCRIPTION 15.5.3. DESCRIPTION
The IO_ADVISE operation sends an I/O access pattern hint to the The IO_ADVISE operation sends an I/O access pattern hint to the
server for the owner of the stateid for a given byte range specified server for the owner of the stateid for a given byte range specified
by iar_offset and iar_count. The byte range specified by iaa_offset by iar_offset and iar_count. The byte range specified by iaa_offset
and iaa_count need not currently exist in the file, but the iaa_hints and iaa_count need not currently exist in the file, but the iaa_hints
will apply to the byte range when it does exist. If iaa_count is 0, will apply to the byte range when it does exist. If iaa_count is 0,
all data following iaa_offset is specified. The server MAY ignore all data following iaa_offset is specified. The server MAY ignore
the advice. the advice.
The following are the allowed hints for a stateid holder: The following are the allowed hints for a stateid holder:
skipping to change at page 74, line 30 skipping to change at page 68, line 39
perhaps due to a temporary resource limitation. perhaps due to a temporary resource limitation.
Each issuance of the IO_ADVISE operation overrides all previous Each issuance of the IO_ADVISE operation overrides all previous
issuances of IO_ADVISE for a given byte range. This effectively issuances of IO_ADVISE for a given byte range. This effectively
follows a strategy of last hint wins for a given stateid and byte follows a strategy of last hint wins for a given stateid and byte
range. range.
Clients should assume that hints included in an IO_ADVISE operation Clients should assume that hints included in an IO_ADVISE operation
will be forgotten once the file is closed. will be forgotten once the file is closed.
16.5.4. IMPLEMENTATION 15.5.4. IMPLEMENTATION
The NFS client may choose to issue an IO_ADVISE operation to the The NFS client may choose to issue an IO_ADVISE operation to the
server in several different instances. server in several different instances.
The most obvious is in direct response to an application's execution The most obvious is in direct response to an application's execution
of posix_fadvise(). In this case, IO_ADVISE4_WRITE and of posix_fadvise(). In this case, IO_ADVISE4_WRITE and
IO_ADVISE4_READ may be set based upon the type of file access IO_ADVISE4_READ may be set based upon the type of file access
specified when the file was opened. specified when the file was opened.
16.5.5. IO_ADVISE4_INIT_PROXIMITY 15.5.5. IO_ADVISE4_INIT_PROXIMITY
The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and can be The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and can be
used to convey that the client has recently accessed the byte range used to convey that the client has recently accessed the byte range
in its own cache. I.e., it has not accessed it on the server, but it in its own cache. I.e., it has not accessed it on the server, but it
has locally. When the server reaches resource exhaustion, knowing has locally. When the server reaches resource exhaustion, knowing
which data is more important allows the server to make better choices which data is more important allows the server to make better choices
about which data to, for example purge from a cache, or move to about which data to, for example purge from a cache, or move to
secondary storage. It also informs the server which delegations are secondary storage. It also informs the server which delegations are
more important, since if delegations are working correctly, once more important, since if delegations are working correctly, once
delegated to a client and the client has read the content for that delegated to a client and the client has read the content for that
skipping to change at page 75, line 15 skipping to change at page 69, line 29
The IO_ADVISE4_INIT_PROXIMITY hint can also be used in a pNFS setting The IO_ADVISE4_INIT_PROXIMITY hint can also be used in a pNFS setting
to let the client inform the metadata server as to the I/O statistics to let the client inform the metadata server as to the I/O statistics
between the client and the storage devices. The metadata server is between the client and the storage devices. The metadata server is
then free to use this information about client I/O to optimize the then free to use this information about client I/O to optimize the
data storage location. data storage location.
This hint is also useful in the case of NFS clients which are network This hint is also useful in the case of NFS clients which are network
booting from a server. If the first client to be booted sends this booting from a server. If the first client to be booted sends this
hint, then it keeps the cache warm for the remaining clients. hint, then it keeps the cache warm for the remaining clients.
16.5.6. pNFS File Layout Data Type Considerations 15.5.6. pNFS File Layout Data Type Considerations
The IO_ADVISE considerations for pNFS are very similar to the COMMIT The IO_ADVISE considerations for pNFS are very similar to the COMMIT
considerations for pNFS. That is, as with COMMIT, some NFS server considerations for pNFS. That is, as with COMMIT, some NFS server
implementations prefer IO_ADVISE be done on the DS, and some prefer implementations prefer IO_ADVISE be done on the DS, and some prefer
it be done on the MDS. it be done on the MDS.
For the file's layout type, it is proposed that NFSv4.2 include an For the file's layout type, it is proposed that NFSv4.2 include an
additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on additional hint NFL42_CARE_IO_ADVISE_THRU_MDS which is valid only on
metadata servers running NFSv4.2 or higher. Any file's layout metadata servers running NFSv4.2 or higher. Any file's layout
obtained from a NFSv4.1 metadata server MUST NOT have obtained from a NFSv4.1 metadata server MUST NOT have
skipping to change at page 75, line 47 skipping to change at page 70, line 12
send an IO_ADVISE operation to the appropriate DS for the specified send an IO_ADVISE operation to the appropriate DS for the specified
byte range. While the client MAY always send IO_ADVISE to the MDS, byte range. While the client MAY always send IO_ADVISE to the MDS,
if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client
should expect that such an IO_ADVISE is futile. Note that a client should expect that such an IO_ADVISE is futile. Note that a client
SHOULD use the same set of arguments on each IO_ADVISE sent to a DS SHOULD use the same set of arguments on each IO_ADVISE sent to a DS
for the same open file reference. for the same open file reference.
The server is not required to support different advice for different The server is not required to support different advice for different
DS's with the same open file reference. DS's with the same open file reference.
16.5.6.1. Dense and Sparse Packing Considerations 15.5.6.1. Dense and Sparse Packing Considerations
The IO_ADVISE operation MUST use the iar_offset and byte range as The IO_ADVISE operation MUST use the iar_offset and byte range as
dictated by the presence or absence of NFL4_UFLG_DENSE. dictated by the presence or absence of NFL4_UFLG_DENSE.
E.g., if NFL4_UFLG_DENSE is present, and a READ or WRITE to the DS E.g., if NFL4_UFLG_DENSE is present, and a READ or WRITE to the DS
for iaa_offset 0 really means iaa_offset 10000 in the logical file, for iaa_offset 0 really means iaa_offset 10000 in the logical file,
then an IO_ADVISE for iaa_offset 0 means iaa_offset 10000. then an IO_ADVISE for iaa_offset 0 means iaa_offset 10000.
E.g., if NFL4_UFLG_DENSE is absent, then a READ or WRITE to the DS E.g., if NFL4_UFLG_DENSE is absent, then a READ or WRITE to the DS
for iaa_offset 0 really means iaa_offset 0 in the logical file, then for iaa_offset 0 really means iaa_offset 0 in the logical file, then
skipping to change at page 77, line 25 skipping to change at page 71, line 31
If neither of the flags NFL42_UFLG_IO_ADVISE_THRU_MDS and If neither of the flags NFL42_UFLG_IO_ADVISE_THRU_MDS and
NFL4_UFLG_DENSE are set in the layout, then any IO_ADVISE request NFL4_UFLG_DENSE are set in the layout, then any IO_ADVISE request
sent to the data server with a byte range that overlaps stripe unit sent to the data server with a byte range that overlaps stripe unit
that the data server does not serve MUST NOT result in the status that the data server does not serve MUST NOT result in the status
NFS4ERR_PNFS_IO_HOLE. Instead, the response SHOULD be successful and NFS4ERR_PNFS_IO_HOLE. Instead, the response SHOULD be successful and
if the server applies IO_ADVISE hints on any stripe units that if the server applies IO_ADVISE hints on any stripe units that
overlap with the specified range, those hints SHOULD be indicated in overlap with the specified range, those hints SHOULD be indicated in
the response. the response.
16.6. Operation 64: LAYOUTERROR - Provide Errors for the Layout 15.6. Operation 64: LAYOUTERROR - Provide Errors for the Layout
16.6.1. ARGUMENT 15.6.1. ARGUMENT
struct device_error4 { struct device_error4 {
deviceid4 de_deviceid; deviceid4 de_deviceid;
nfsstat4 de_status; nfsstat4 de_status;
nfs_opnum4 de_opnum; nfs_opnum4 de_opnum;
}; };
struct LAYOUTERROR4args { struct LAYOUTERROR4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
offset4 lea_offset; offset4 lea_offset;
length4 lea_length; length4 lea_length;
stateid4 lea_stateid; stateid4 lea_stateid;
device_error4 lea_errors; device_error4 lea_errors;
}; };
16.6.2. RESULT 15.6.2. RESULT
struct LAYOUTERROR4res { struct LAYOUTERROR4res {
nfsstat4 ler_status; nfsstat4 ler_status;
}; };
16.6.3. DESCRIPTION 15.6.3. DESCRIPTION
The client can use LAYOUTERROR to inform the metadata server about The client can use LAYOUTERROR to inform the metadata server about
errors in its interaction with the layout represented by the current errors in its interaction with the layout represented by the current
filehandle, client ID (derived from the session ID in the preceding filehandle, client ID (derived from the session ID in the preceding
SEQUENCE operation), byte-range (lea_offset + lea_length), and SEQUENCE operation), byte-range (lea_offset + lea_length), and
lea_stateid. lea_stateid.
Each individual device_error4 describes a single error associated Each individual device_error4 describes a single error associated
with a storage device, which is identified via de_deviceid. If the with a storage device, which is identified via de_deviceid. If the
Layout Type supports NFSv4 operations, then the operation which Layout Type supports NFSv4 operations, then the operation which
skipping to change at page 78, line 38 skipping to change at page 72, line 44
NFS4ERR_*: The client was able to establish communication with the NFS4ERR_*: The client was able to establish communication with the
storage device and is returning one of the allowed error codes for storage device and is returning one of the allowed error codes for
the operation denoted by de_opnum. the operation denoted by de_opnum.
Note that while the metadata server may return an error associated Note that while the metadata server may return an error associated
with the layout stateid or the open file, it MUST NOT return an error with the layout stateid or the open file, it MUST NOT return an error
in the processing of the errors. If LAYOUTERROR is in a compound in the processing of the errors. If LAYOUTERROR is in a compound
before LAYOUTRETURN, it MUST NOT introduce an error other than what before LAYOUTRETURN, it MUST NOT introduce an error other than what
LAYOUTRETURN would already encounter. LAYOUTRETURN would already encounter.
16.6.4. IMPLEMENTATION 15.6.4. IMPLEMENTATION
There are two broad classes of errors, transient and persistent. The There are two broad classes of errors, transient and persistent. The
client SHOULD strive to only use this new mechanism to report client SHOULD strive to only use this new mechanism to report
persistent errors. It MUST be able to deal with transient issues by persistent errors. It MUST be able to deal with transient issues by
itself. Also, while the client might consider an issue to be itself. Also, while the client might consider an issue to be
persistent, it MUST be prepared for the metadata server to consider persistent, it MUST be prepared for the metadata server to consider
such issues to be transient. A prime example of this is if the such issues to be transient. A prime example of this is if the
metadata server fences off a client from either a stateid or a metadata server fences off a client from either a stateid or a
filehandle. The client will get an error from the storage device and filehandle. The client will get an error from the storage device and
might relay either NFS4ERR_ACCESS or NFS4ERR_BAD_STATEID back to the might relay either NFS4ERR_ACCESS or NFS4ERR_BAD_STATEID back to the
skipping to change at page 80, line 15 skipping to change at page 74, line 23
metadata server might not have any choice in using the storage metadata server might not have any choice in using the storage
device, i.e., there might only be one possible layout for the system. device, i.e., there might only be one possible layout for the system.
Also, in the case of existing files, the metadata server might have Also, in the case of existing files, the metadata server might have
no choice in which storage devices to hand out to clients. no choice in which storage devices to hand out to clients.
The metadata server is not required to indefinitely retain per-client The metadata server is not required to indefinitely retain per-client
storage device error information. An metadata server is also not storage device error information. An metadata server is also not
required to automatically reinstate use of a previously problematic required to automatically reinstate use of a previously problematic
storage device; administrative intervention may be required instead. storage device; administrative intervention may be required instead.
16.7. Operation 65: LAYOUTSTATS - Provide Statistics for the Layout 15.7. Operation 65: LAYOUTSTATS - Provide Statistics for the Layout
16.7.1. ARGUMENT 15.7.1. ARGUMENT
struct layoutupdate4 { struct layoutupdate4 {
layouttype4 lou_type; layouttype4 lou_type;
opaque lou_body<>; opaque lou_body<>;
}; };
struct io_info4 { struct io_info4 {
uint32_t ii_count; uint32_t ii_count;
uint64_t ii_bytes; uint64_t ii_bytes;
}; };
skipping to change at page 80, line 39 skipping to change at page 74, line 47
struct LAYOUTSTATS4args { struct LAYOUTSTATS4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
offset4 lsa_offset; offset4 lsa_offset;
length4 lsa_length; length4 lsa_length;
stateid4 lsa_stateid; stateid4 lsa_stateid;
io_info4 lsa_read; io_info4 lsa_read;
io_info4 lsa_write; io_info4 lsa_write;
layoutupdate4 lsa_layoutupdate; layoutupdate4 lsa_layoutupdate;
}; };
16.7.2. RESULT 15.7.2. RESULT
struct LAYOUTSTATS4res { struct LAYOUTSTATS4res {
nfsstat4 lsr_status; nfsstat4 lsr_status;
}; };
16.7.3. DESCRIPTION 15.7.3. DESCRIPTION
The client can use LAYOUTSTATS to inform the metadata server about The client can use LAYOUTSTATS to inform the metadata server about
its interaction with the layout represented by the current its interaction with the layout represented by the current
filehandle, client ID (derived from the session ID in the preceding filehandle, client ID (derived from the session ID in the preceding
SEQUENCE operation), byte-range (lea_offset + lea_length), and SEQUENCE operation), byte-range (lea_offset + lea_length), and
lea_stateid. lsa_read and lsa_write allow for non-Layout Type lea_stateid. lsa_read and lsa_write allow for non-Layout Type
specific statistics to be reported. The remaining information the specific statistics to be reported. The remaining information the
client is presenting is specific to the Layout Type and presented in client is presenting is specific to the Layout Type and presented in
the lea_layoutupdate field. Each Layout Type MUST define the the lea_layoutupdate field. Each Layout Type MUST define the
contents of lea_layoutupdate in their respective specifications. contents of lea_layoutupdate in their respective specifications.
LAYOUTSTATS can be combined with IO_ADVISE (see Section 16.5) to LAYOUTSTATS can be combined with IO_ADVISE (see Section 15.5) to
augment the decision making process of how the metadata server augment the decision making process of how the metadata server
handles a file. I.e., IO_ADVISE lets the server know that a byte handles a file. I.e., IO_ADVISE lets the server know that a byte
range has a certain characteristic, but not necessarily the intensity range has a certain characteristic, but not necessarily the intensity
of that characteristic. of that characteristic.
The client MUST reset the statistics after getting a successfully The client MUST reset the statistics after getting a successfully
reply from the metadata server. The first LAYOUTSTATS sent by the reply from the metadata server. The first LAYOUTSTATS sent by the
client SHOULD be from the opening of the file. The choice of how client SHOULD be from the opening of the file. The choice of how
often to update the metadata server is made by the client. often to update the metadata server is made by the client.
Note that while the metadata server may return an error associated Note that while the metadata server may return an error associated
with the layout stateid or the open file, it MUST NOT return an error with the layout stateid or the open file, it MUST NOT return an error
in the processing of the statistics. in the processing of the statistics.
16.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded Operation 15.8. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded Operation
16.8.1. ARGUMENT 15.8.1. ARGUMENT
struct OFFLOAD_CANCEL4args { struct OFFLOAD_CANCEL4args {
/* CURRENT_FH: file to cancel */ /* CURRENT_FH: file to cancel */
stateid4 oca_stateid; stateid4 oca_stateid;
}; };
16.8.2. RESULT 15.8.2. RESULT
struct OFFLOAD_CANCEL4res { struct OFFLOAD_CANCEL4res {
nfsstat4 ocr_status; nfsstat4 ocr_status;
}; };
16.8.3. DESCRIPTION 15.8.3. DESCRIPTION
OFFLOAD_CANCEL is used by the client to terminate an asynchronous OFFLOAD_CANCEL is used by the client to terminate an asynchronous
operation, which is identified both by CURRENT_FH and the operation, which is identified both by CURRENT_FH and the
oca_stateid. I.e., there can be multiple offloaded operations acting oca_stateid. I.e., there can be multiple offloaded operations acting
on the file, the stateid will identify to the server exactly which on the file, the stateid will identify to the server exactly which
one is to be stopped. Currently there are only two operations which one is to be stopped. Currently there are only two operations which
can decide to be asynchronous: COPY and WRITE_SAME. can decide to be asynchronous: COPY and WRITE_SAME.
In the context of server-to-server copy, the client can send In the context of server-to-server copy, the client can send
OFFLOAD_CANCEL to either the source or destination server, albeit OFFLOAD_CANCEL to either the source or destination server, albeit
skipping to change at page 82, line 27 skipping to change at page 76, line 27
the destination to stop the active transfer and uses the stateid it the destination to stop the active transfer and uses the stateid it
got back from the COPY operation. The client uses OFFLOAD_CANCEL and got back from the COPY operation. The client uses OFFLOAD_CANCEL and
the stateid it used in the COPY_NOTIFY to inform the source to not the stateid it used in the COPY_NOTIFY to inform the source to not
allow any more copying from the destination. allow any more copying from the destination.
OFFLOAD_CANCEL is also useful in situations in which the source OFFLOAD_CANCEL is also useful in situations in which the source
server granted a very long or infinite lease on the destination server granted a very long or infinite lease on the destination
server's ability to read the source file and all copy operations on server's ability to read the source file and all copy operations on
the source file have been completed. the source file have been completed.
16.9. Operation 67: OFFLOAD_STATUS - Poll for Status of Asynchronous 15.9. Operation 67: OFFLOAD_STATUS - Poll for Status of Asynchronous
Operation Operation
16.9.1. ARGUMENT 15.9.1. ARGUMENT
struct OFFLOAD_STATUS4args { struct OFFLOAD_STATUS4args {
/* CURRENT_FH: destination file */ /* CURRENT_FH: destination file */
stateid4 osa_stateid; stateid4 osa_stateid;
}; };
16.9.2. RESULT 15.9.2. RESULT
struct OFFLOAD_STATUS4resok { struct OFFLOAD_STATUS4resok {
length4 osr_count; length4 osr_count;
nfsstat4 osr_complete<1>; nfsstat4 osr_complete<1>;
}; };
union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) { union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) {
case NFS4_OK: case NFS4_OK:
OFFLOAD_STATUS4resok osr_resok4; OFFLOAD_STATUS4resok osr_resok4;
default: default:
void; void;
}; };
16.9.3. DESCRIPTION 15.9.3. DESCRIPTION
OFFLOAD_STATUS can be used by the client to query the progress of an OFFLOAD_STATUS can be used by the client to query the progress of an
asynchronous operation, which is identified both by CURRENT_FH and asynchronous operation, which is identified both by CURRENT_FH and
the osa_stateid. If this operation is successful, the number of the osa_stateid. If this operation is successful, the number of
bytes processed are returned to the client in the osr_count field. bytes processed are returned to the client in the osr_count field.
If the optional osr_complete field is present, the asynchronous If the optional osr_complete field is present, the asynchronous
operation has completed. In this case the status value indicates the operation has completed. In this case the status value indicates the
result of the asynchronous operation. In all cases, the server will result of the asynchronous operation. In all cases, the server will
also deliver the final results of the asynchronous operation in a also deliver the final results of the asynchronous operation in a
CB_OFFLOAD operation. CB_OFFLOAD operation.
The failure of this operation does not indicate the result of the The failure of this operation does not indicate the result of the
asynchronous operation in any way. asynchronous operation in any way.
16.10. Operation 68: READ_PLUS - READ Data or Holes from a File 15.10. Operation 68: READ_PLUS - READ Data or Holes from a File
16.10.1. ARGUMENT 15.10.1. ARGUMENT
struct READ_PLUS4args { struct READ_PLUS4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 rpa_stateid; stateid4 rpa_stateid;
offset4 rpa_offset; offset4 rpa_offset;
count4 rpa_count; count4 rpa_count;
}; };
16.10.2. RESULT 15.10.2. RESULT
enum data_content4 { enum data_content4 {
NFS4_CONTENT_DATA = 0, NFS4_CONTENT_DATA = 0,
NFS4_CONTENT_HOLE = 1 NFS4_CONTENT_HOLE = 1
}; };
struct data_info4 { struct data_info4 {
offset4 di_offset; offset4 di_offset;
length4 di_length; length4 di_length;
}; };
skipping to change at page 84, line 28 skipping to change at page 78, line 28
read_plus_content rpr_contents<>; read_plus_content rpr_contents<>;
}; };
union READ_PLUS4res switch (nfsstat4 rp_status) { union READ_PLUS4res switch (nfsstat4 rp_status) {
case NFS4_OK: case NFS4_OK:
read_plus_res4 rp_resok4; read_plus_res4 rp_resok4;
default: default:
void; void;
}; };
16.10.3. DESCRIPTION 15.10.3. DESCRIPTION
The READ_PLUS operation is based upon the NFSv4.1 READ operation (see The READ_PLUS operation is based upon the NFSv4.1 READ operation (see
Section 18.22 of [RFC5661]) and similarly reads data from the regular Section 18.22 of [RFC5661]) and similarly reads data from the regular
file identified by the current filehandle. file identified by the current filehandle.
The client provides a rpa_offset of where the READ_PLUS is to start The client provides a rpa_offset of where the READ_PLUS is to start
and a rpa_count of how many bytes are to be read. A rpa_offset of and a rpa_count of how many bytes are to be read. A rpa_offset of
zero means to read data starting at the beginning of the file. If zero means to read data starting at the beginning of the file. If
rpa_offset is greater than or equal to the size of the file, the rpa_offset is greater than or equal to the size of the file, the
status NFS4_OK is returned with di_length (the data length) set to status NFS4_OK is returned with di_length (the data length) set to
skipping to change at page 86, line 22 skipping to change at page 80, line 22
For a READ_PLUS with a stateid value of all bits equal to zero, the For a READ_PLUS with a stateid value of all bits equal to zero, the
server MAY allow the READ_PLUS to be serviced subject to mandatory server MAY allow the READ_PLUS to be serviced subject to mandatory
byte-range locks or the current share deny modes for the file. For a byte-range locks or the current share deny modes for the file. For a
READ_PLUS with a stateid value of all bits equal to one, the server READ_PLUS with a stateid value of all bits equal to one, the server
MAY allow READ_PLUS operations to bypass locking checks at the MAY allow READ_PLUS operations to bypass locking checks at the
server. server.
On success, the current filehandle retains its value. On success, the current filehandle retains its value.
16.10.3.1. Note on Client Support of Arms of the Union 15.10.3.1. Note on Client Support of Arms of the Union
It was decided not to add a means for the client to inform the server It was decided not to add a means for the client to inform the server
as to which arms of READ_PLUS it would support. In a later minor as to which arms of READ_PLUS it would support. In a later minor
version, it may become necessary for the introduction of a new version, it may become necessary for the introduction of a new
operation which would allow the client to inform the server as to operation which would allow the client to inform the server as to
whether it supported the new arms of the union of data types whether it supported the new arms of the union of data types
available in READ_PLUS. available in READ_PLUS.
16.10.4. IMPLEMENTATION 15.10.4. IMPLEMENTATION
In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of
[RFC5661] also apply to READ_PLUS. [RFC5661] also apply to READ_PLUS.
16.10.4.1. Additional pNFS Implementation Information 15.10.4.1. Additional pNFS Implementation Information
With pNFS, the semantics of using READ_PLUS remains the same. Any With pNFS, the semantics of using READ_PLUS remains the same. Any
data server MAY return a hole result for a READ_PLUS request that it data server MAY return a hole result for a READ_PLUS request that it
receives. When a data server chooses to return such a result, it has receives. When a data server chooses to return such a result, it has
the option of returning information for the data stored on that data the option of returning information for the data stored on that data
server (as defined by the data layout), but it MUST NOT return server (as defined by the data layout), but it MUST NOT return
results for a byte range that includes data managed by another data results for a byte range that includes data managed by another data
server. server.
If mandatory locking is enforced, then the data server must also If mandatory locking is enforced, then the data server must also
ensure that to return only information that is within the owner's ensure that to return only information that is within the owner's
locked byte range. locked byte range.
16.10.5. READ_PLUS with Sparse Files Example 15.10.5. READ_PLUS with Sparse Files Example
The following table describes a sparse file. For each byte range, The following table describes a sparse file. For each byte range,
the file contains either non-zero data or a hole. In addition, the the file contains either non-zero data or a hole. In addition, the
server in this example will only create a hole if it is greater than server in this example will only create a hole if it is greater than
32K. 32K.
+-------------+----------+ +-------------+----------+
| Byte-Range | Contents | | Byte-Range | Contents |
+-------------+----------+ +-------------+----------+
| 0-15999 | Hole | | 0-15999 | Hole |
skipping to change at page 88, line 5 skipping to change at page 82, line 5
the client was requesting. the client was requesting.
3. READ_PLUS(s, 256K, 64K) --> NFS_OK, eof = false, <data[256K, 3. READ_PLUS(s, 256K, 64K) --> NFS_OK, eof = false, <data[256K,
288K], hole[288K, 354K]>. Returns an array of the 32K data and 288K], hole[288K, 354K]>. Returns an array of the 32K data and
the hole which extends to 354K. the hole which extends to 354K.
4. READ_PLUS(s, 354K, 64K) --> NFS_OK, eof = true, <data[354K, 4. READ_PLUS(s, 354K, 64K) --> NFS_OK, eof = true, <data[354K,
418K]>. Returns the final 64K of data and informs the client 418K]>. Returns the final 64K of data and informs the client
there is no more data in the file. there is no more data in the file.
16.11. Operation 69: SEEK - Find the Next Data or Hole 15.11. Operation 69: SEEK - Find the Next Data or Hole
16.11.1. ARGUMENT 15.11.1. ARGUMENT
enum data_content4 { enum data_content4 {
NFS4_CONTENT_DATA = 0, NFS4_CONTENT_DATA = 0,
NFS4_CONTENT_HOLE = 1 NFS4_CONTENT_HOLE = 1
}; };
struct SEEK4args { struct SEEK4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 sa_stateid; stateid4 sa_stateid;
offset4 sa_offset; offset4 sa_offset;
data_content4 sa_what; data_content4 sa_what;
}; };
16.11.2. RESULT 15.11.2. RESULT
struct seek_res4 { struct seek_res4 {
bool sr_eof; bool sr_eof;
offset4 sr_offset; offset4 sr_offset;
}; };
union SEEK4res switch (nfsstat4 sa_status) { union SEEK4res switch (nfsstat4 sa_status) {
case NFS4_OK: case NFS4_OK:
seek_res4 resok4; seek_res4 resok4;
default: default:
void; void;
}; };
16.11.3. DESCRIPTION 15.11.3. DESCRIPTION
SEEK is an operation that allows a client to determine the location SEEK is an operation that allows a client to determine the location
of the next data_content4 in a file. It allows an implementation of of the next data_content4 in a file. It allows an implementation of
the emerging extension to lseek(2) to allow clients to determine the the emerging extension to lseek(2) to allow clients to determine the
next hole whilst in data or the next data whilst in a hole. next hole whilst in data or the next data whilst in a hole.
From the given sa_offset, find the next data_content4 of type sa_what From the given sa_offset, find the next data_content4 of type sa_what
in the file. If the server can not find a corresponding sa_what, in the file. If the server can not find a corresponding sa_what,
then the status will still be NFS4_OK, but sr_eof would be TRUE. If then the status will still be NFS4_OK, but sr_eof would be TRUE. If
the server can find the sa_what, then the sr_offset is the start of the server can find the sa_what, then the sr_offset is the start of
that content. If the sa_offset is beyond the end of the file, then that content. If the sa_offset is beyond the end of the file, then
SEEK MUST return NFS4ERR_NXIO. SEEK MUST return NFS4ERR_NXIO.
All files MUST have a virtual hole at the end of the file. I.e., if All files MUST have a virtual hole at the end of the file. I.e., if
a filesystem does not support sparse files, then a compound with a filesystem does not support sparse files, then a compound with
{SEEK 0 NFS4_CONTENT_HOLE;} would return a result of {SEEK 1 X;} {SEEK 0 NFS4_CONTENT_HOLE;} would return a result of {SEEK 1 X;}
where 'X' was the size of the file. where 'X' was the size of the file.
SEEK must follow the same rules for stateids as READ_PLUS SEEK must follow the same rules for stateids as READ_PLUS
(Section 16.10.3). (Section 15.10.3).
16.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times to a File 15.12. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times to a File
16.12.1. ARGUMENT 15.12.1. ARGUMENT
enum stable_how4 { enum stable_how4 {
UNSTABLE4 = 0, UNSTABLE4 = 0,
DATA_SYNC4 = 1, DATA_SYNC4 = 1,
FILE_SYNC4 = 2 FILE_SYNC4 = 2
}; };
struct app_data_block4 { struct app_data_block4 {
offset4 adb_offset; offset4 adb_offset;
length4 adb_block_size; length4 adb_block_size;
skipping to change at page 89, line 35 skipping to change at page 83, line 35
opaque adb_pattern<>; opaque adb_pattern<>;
}; };
struct WRITE_SAME4args { struct WRITE_SAME4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 wsa_stateid; stateid4 wsa_stateid;
stable_how4 wsa_stable; stable_how4 wsa_stable;
app_data_block4 wsa_adb; app_data_block4 wsa_adb;
}; };
16.12.2. RESULT 15.12.2. RESULT
struct write_response4 { struct write_response4 {
stateid4 wr_callback_id<1>; stateid4 wr_callback_id<1>;
length4 wr_count; length4 wr_count;
stable_how4 wr_committed; stable_how4 wr_committed;
verifier4 wr_writeverf; verifier4 wr_writeverf;
}; };
union WRITE_SAME4res switch (nfsstat4 wsr_status) { union WRITE_SAME4res switch (nfsstat4 wsr_status) {
case NFS4_OK: case NFS4_OK:
write_response4 resok4; write_response4 resok4;
default: default:
void; void;
}; };
16.12.3. DESCRIPTION 15.12.3. DESCRIPTION
The WRITE_SAME operation writes an application data block to the The WRITE_SAME operation writes an application data block to the
regular file identified by the current filehandle (see WRITE SAME regular file identified by the current filehandle (see WRITE SAME
(10) in [T10-SBC2]). The target file is specified by the current (10) in [T10-SBC2]). The target file is specified by the current
filehandle. The data to be written is specified by an filehandle. The data to be written is specified by an
app_data_block4 structure (Section 8.1.1). The client specifies with app_data_block4 structure (Section 8.1.1). The client specifies with
the wsa_stable parameter the method of how the data is to be the wsa_stable parameter the method of how the data is to be
processed by the server. It is treated like the stable parameter in processed by the server. It is treated like the stable parameter in
the NFSv4.1 WRITE operation (see Section 18.2 of [RFC5661]). the NFSv4.1 WRITE operation (see Section 18.2 of [RFC5661]).
A successful WRITE_SAME will construct a reply for wr_count, A successful WRITE_SAME will construct a reply for wr_count,
wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation
results. If wr_callback_id is set, it indicates an asynchronous results. If wr_callback_id is set, it indicates an asynchronous
reply (see Section 16.12.3.1). reply (see Section 15.12.3.1).
WRITE_SAME has to support all of the errors which are returned by WRITE_SAME has to support all of the errors which are returned by
WRITE plus NFS4ERR_NOTSUPP, i.e., it is an OPTIONAL operation. If WRITE plus NFS4ERR_NOTSUPP, i.e., it is an OPTIONAL operation. If
the client supports WRITE_SAME, it MUST support CB_OFFLOAD. the client supports WRITE_SAME, it MUST support CB_OFFLOAD.
If the server supports ADBs, then it MUST support the WRITE_SAME If the server supports ADBs, then it MUST support the WRITE_SAME
operation. The server has no concept of the structure imposed by the operation. The server has no concept of the structure imposed by the
application. It is only when the application writes to a section of application. It is only when the application writes to a section of
the file does order get imposed. In order to detect corruption even the file does order get imposed. In order to detect corruption even
before the application utilizes the file, the application will want before the application utilizes the file, the application will want
skipping to change at page 90, line 50 skipping to change at page 84, line 50
When the server receives the WRITE_SAME operation, it MUST populate When the server receives the WRITE_SAME operation, it MUST populate
adb_block_count ADBs in the file starting at adb_offset. The block adb_block_count ADBs in the file starting at adb_offset. The block
size will be given by adb_block_size. The ADBN (if provided) will size will be given by adb_block_size. The ADBN (if provided) will
start at adb_reloff_blocknum and each block will be monotonically start at adb_reloff_blocknum and each block will be monotonically
numbered starting from adb_block_num in the first block. The pattern numbered starting from adb_block_num in the first block. The pattern
(if provided) will be at adb_reloff_pattern of each block and will be (if provided) will be at adb_reloff_pattern of each block and will be
provided in adb_pattern. provided in adb_pattern.
The server SHOULD return an asynchronous result if it can determine The server SHOULD return an asynchronous result if it can determine
the operation will be long running (see Section 16.12.3.1). Once the operation will be long running (see Section 15.12.3.1). Once
either the WRITE_SAME finishes synchronously or the server uses either the WRITE_SAME finishes synchronously or the server uses
CB_OFFLOAD to inform the client of the asynchronous completion of the CB_OFFLOAD to inform the client of the asynchronous completion of the
WRITE_SAME, the server MUST return the ADBs to clients as data. WRITE_SAME, the server MUST return the ADBs to clients as data.
16.12.3.1. Asynchronous Transactions 15.12.3.1. Asynchronous Transactions
ADB initialization may lead to server determining to service the ADB initialization may lead to server determining to service the
operation asynchronously. If it decides to do so, it sets the operation asynchronously. If it decides to do so, it sets the
stateid in wr_callback_id to be that of the wsa_stateid. If it does stateid in wr_callback_id to be that of the wsa_stateid. If it does
not set the wr_callback_id, then the result is synchronous. not set the wr_callback_id, then the result is synchronous.
When the client determines that the reply will be given When the client determines that the reply will be given
asynchronously, it should not assume anything about the contents of asynchronously, it should not assume anything about the contents of
what it wrote until it is informed by the server that the operation what it wrote until it is informed by the server that the operation
is complete. It can use OFFLOAD_STATUS (Section 16.9) to monitor the is complete. It can use OFFLOAD_STATUS (Section 15.9) to monitor the
operation and OFFLOAD_CANCEL (Section 16.8) to cancel the operation. operation and OFFLOAD_CANCEL (Section 15.8) to cancel the operation.
An example of a asynchronous WRITE_SAME is shown in Figure 6. Note An example of a asynchronous WRITE_SAME is shown in Figure 6. Note
that as with the COPY operation, WRITE_SAME must provide a stateid that as with the COPY operation, WRITE_SAME must provide a stateid
for tracking the asynchronous operation. for tracking the asynchronous operation.
Client Server Client Server
+ + + +
| | | |
|--- OPEN ---------------------------->| Client opens |--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the file |<------------------------------------/| the file
| | | |
skipping to change at page 92, line 17 skipping to change at page 86, line 17
information that a synchronous WRITE_SAME would have provided. information that a synchronous WRITE_SAME would have provided.
Regardless of whether the operation is asynchronous or synchronous, Regardless of whether the operation is asynchronous or synchronous,
it MUST still support the COMMIT operation semantics as outlined in it MUST still support the COMMIT operation semantics as outlined in
Section 18.3 of [RFC5661]. I.e., COMMIT works on one or more WRITE Section 18.3 of [RFC5661]. I.e., COMMIT works on one or more WRITE
operations and the WRITE_SAME operation can appear as several WRITE operations and the WRITE_SAME operation can appear as several WRITE
operations to the server. The client can use locking operations to operations to the server. The client can use locking operations to
control the behavior on the server with respect to long running control the behavior on the server with respect to long running
asynchronous write operations. asynchronous write operations.
16.12.3.2. Error Handling of a Partially Complete WRITE_SAME 15.12.3.2. Error Handling of a Partially Complete WRITE_SAME
WRITE_SAME will clone adb_block_count copies of the given ADB in WRITE_SAME will clone adb_block_count copies of the given ADB in
consecutive order in the file starting at adb_offset. An error can consecutive order in the file starting at adb_offset. An error can
occur after writing the Nth ADB to the file. WRITE_SAME MUST appear occur after writing the Nth ADB to the file. WRITE_SAME MUST appear
to populate the range of the file as if the client used WRITE to to populate the range of the file as if the client used WRITE to
transfer the instantiated ADBs. I.e., the contents of the range will transfer the instantiated ADBs. I.e., the contents of the range will
be easy for the client to determine in case of a partially complete be easy for the client to determine in case of a partially complete
WRITE_SAME. WRITE_SAME.
17. NFSv4.2 Callback Operations 16. NFSv4.2 Callback Operations
17.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous 16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
operation operation
17.1.1. ARGUMENT 16.1.1. ARGUMENT
struct write_response4 { struct write_response4 {
stateid4 wr_callback_id<1>; stateid4 wr_callback_id<1>;
length4 wr_count; length4 wr_count;
stable_how4 wr_committed; stable_how4 wr_committed;
verifier4 wr_writeverf; verifier4 wr_writeverf;
}; };
union offload_info4 switch (nfsstat4 coa_status) { union offload_info4 switch (nfsstat4 coa_status) {
case NFS4_OK: case NFS4_OK:
write_response4 coa_resok4; write_response4 coa_resok4;
default: default:
length4 coa_bytes_copied; length4 coa_bytes_copied;
}; };
struct CB_OFFLOAD4args { struct CB_OFFLOAD4args {
nfs_fh4 coa_fh; nfs_fh4 coa_fh;
stateid4 coa_stateid; stateid4 coa_stateid;
offload_info4 coa_offload_info; offload_info4 coa_offload_info;
}; };
17.1.2. RESULT 16.1.2. RESULT
struct CB_OFFLOAD4res { struct CB_OFFLOAD4res {
nfsstat4 cor_status; nfsstat4 cor_status;
}; };
17.1.3. DESCRIPTION 16.1.3. DESCRIPTION
CB_OFFLOAD is used to report to the client the results of an CB_OFFLOAD is used to report to the client the results of an
asynchronous operation, e.g., Server Side Copy or WRITE_SAME. The asynchronous operation, e.g., Server Side Copy or WRITE_SAME. The
coa_fh and coa_stateid identify the transaction and the coa_status coa_fh and coa_stateid identify the transaction and the coa_status
indicates success or failure. The coa_resok4.wr_callback_id MUST NOT indicates success or failure. The coa_resok4.wr_callback_id MUST NOT
be set. If the transaction failed, then the coa_bytes_copied be set. If the transaction failed, then the coa_bytes_copied
contains the number of bytes copied before the failure occurred. The contains the number of bytes copied before the failure occurred. The
coa_bytes_copied value indicates the number of bytes copied but not coa_bytes_copied value indicates the number of bytes copied but not
which specific bytes have been copied. which specific bytes have been copied.
skipping to change at page 94, line 4 skipping to change at page 87, line 43
then the client is REQUIRED to support the CB_OFFLOAD operation. then the client is REQUIRED to support the CB_OFFLOAD operation.
There is a potential race between the reply to the original There is a potential race between the reply to the original
transaction on the forechannel and the CB_OFFLOAD callback on the transaction on the forechannel and the CB_OFFLOAD callback on the
backchannel. Sections 2.10.6.3 and 20.9.3 of [RFC5661] describe how backchannel. Sections 2.10.6.3 and 20.9.3 of [RFC5661] describe how
to handle this type of issue. to handle this type of issue.
Upon success, the coa_resok4.wr_count presents for each operation: Upon success, the coa_resok4.wr_count presents for each operation:
COPY: the total number of bytes copied COPY: the total number of bytes copied
WRITE_SAME: the same information that a synchronous WRITE_SAME would WRITE_SAME: the same information that a synchronous WRITE_SAME would
provide provide
17. Security Considerations
NFSv4.2 has all of the security concerns present in NFSv4.1 (see
Section 21 of [RFC5661]) and those present in the Server Side Copy
(see Section 4.10) and in Labeled NFS (see Section 9.7).
18. IANA Considerations 18. IANA Considerations
The IANA Considerations for Labeled NFS are addressed in [Quigley14]. The IANA Considerations for Labeled NFS are addressed in [Quigley14].
19. References 19. References
19.1. Normative References 19.1. Normative References
[NFSv42xdr] [NFSv42xdr]
Haynes, T., "Network File System (NFS) Version 4 Minor Haynes, T., "Network File System (NFS) Version 4 Minor
Version 2 External Data Representation Standard (XDR) Version 2 External Data Representation Standard (XDR)
Description", September 2014. Description", November 2014.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC Resource Identifier (URI): Generic Syntax", STD 66, RFC
3986, January 2005. 3986, January 2005.
[RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File [RFC5661] Shepler, S., Eisler, M., and D. Noveck, "Network File
System (NFS) Version 4 Minor Version 1 Protocol", RFC System (NFS) Version 4 Minor Version 1 Protocol", RFC
5661, January 2010. 5661, January 2010.
[RFC5662] Shepler, S., Eisler, M., and D. Noveck, "Network File
System (NFS) Version 4 Minor Version 1 External Data
Representation Standard (XDR) Description", RFC 5662,
January 2010.
[RFC5664] Halevy, B., Welch, B., and J. Zelenka, "Object-Based [RFC5664] Halevy, B., Welch, B., and J. Zelenka, "Object-Based
Parallel NFS (pNFS) Operations", RFC 5664, January 2010. Parallel NFS (pNFS) Operations", RFC 5664, January 2010.
[posix_fadvise] [posix_fadvise]
The Open Group, "Section 'posix_fadvise()' of System The Open Group, "Section 'posix_fadvise()' of System
Interfaces of The Open Group Base Specifications Issue 6, Interfaces of The Open Group Base Specifications Issue 6,
IEEE Std 1003.1, 2004 Edition", 2004. IEEE Std 1003.1, 2004 Edition", 2004.
[posix_fallocate] [posix_fallocate]
The Open Group, "Section 'posix_fallocate()' of System The Open Group, "Section 'posix_fallocate()' of System
Interfaces of The Open Group Base Specifications Issue 6, Interfaces of The Open Group Base Specifications Issue 6,
IEEE Std 1003.1, 2004 Edition", 2004. IEEE Std 1003.1, 2004 Edition", 2004.
[rpcsec_gssv3] [rpcsec_gssv3]
Adamson, W. and N. Williams, "Remote Procedure Call (RPC) Adamson, W. and N. Williams, "Remote Procedure Call (RPC)
Security Version 3", July 2014. Security Version 3", November 2014.
19.2. Informative References 19.2. Informative References
[Ashdown08] [Ashdown08]
Ashdown, L., "Chapter 15, Validating Database Files and Ashdown, L., "Chapter 15, Validating Database Files and
Backups, of Oracle Database Backup and Recovery User's Backups, of Oracle Database Backup and Recovery User's
Guide 11g Release 1 (11.1)", August 2008. Guide 11g Release 1 (11.1)", August 2008.
[BL73] Bell, D. and L. LaPadula, "Secure Computer Systems: [BL73] Bell, D. and L. LaPadula, "Secure Computer Systems:
Mathematical Foundations and Model", Technical Report Mathematical Foundations and Model", Technical Report
skipping to change at page 95, line 27 skipping to change at page 89, line 32
version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-33 (Work version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-33 (Work
In Progress), April 2014. In Progress), April 2014.
[IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream", [IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream",
2008. 2008.
[McDougall07] [McDougall07]
McDougall, R. and J. Mauro, "Section 11.4.3, Detecting McDougall, R. and J. Mauro, "Section 11.4.3, Detecting
Memory Corruption of Solaris Internals", 2007. Memory Corruption of Solaris Internals", 2007.
[NFSv4-Versioning]
Haynes, T. and D. Noveck, "NFSv4 Version Management",
November 2014.
[Quigley14] [Quigley14]
Quigley, D., Lu, J., and T. Haynes, "Registry Quigley, D., Lu, J., and T. Haynes, "Registry
Specification for Mandatory Access Control (MAC) Security Specification for Mandatory Access Control (MAC) Security
Label Formats", draft-ietf-nfsv4-lfs-registry-01 (work in Label Formats", draft-ietf-nfsv4-lfs-registry-01 (work in
progress), September 2014. progress), September 2014.
[RFC1108] Kent, S., "Security Options for the Internet Protocol", [RFC1108] Kent, S., "Security Options for the Internet Protocol",
RFC 1108, November 1991. RFC 1108, November 1991.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
 End of changes. 198 change blocks. 
672 lines changed or deleted 481 lines changed or added

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