draft-ietf-nfsv4-minorversion2-23.txt   draft-ietf-nfsv4-minorversion2-24.txt 
NFSv4 T. Haynes NFSv4 T. Haynes
Internet-Draft Primary Data Internet-Draft Primary Data
Intended status: Standards Track April 29, 2014 Intended status: Standards Track May 17, 2014
Expires: October 31, 2014 Expires: November 18, 2014
NFS Version 4 Minor Version 2 NFS Version 4 Minor Version 2
draft-ietf-nfsv4-minorversion2-23.txt draft-ietf-nfsv4-minorversion2-24.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 focusing mainly on the protocol extensions made from NFS version 4
minor version 0 and NFS version 4 minor version 1. Major extensions minor version 0 and NFS version 4 minor version 1. Major extensions
introduced in NFS version 4 minor version two include: Server Side introduced in NFS version 4 minor version two include: Server Side
Copy, Application I/O Advise, Space Reservations, Sparse Files, Copy, Application I/O Advise, Space Reservations, Sparse Files,
Application Data Blocks, and Labeled NFS. Application Data Blocks, and Labeled NFS.
skipping to change at page 1, line 41 skipping to change at page 1, line 41
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 October 31, 2014. This Internet-Draft will expire on November 18, 2014.
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
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4
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 . . . . . . . . . . . . . . . . . 4 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 . . . . . . . . . . . . . . . 5 1.4.2. Application I/O Advise . . . . . . . . . . . . . . . 5
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 . . . . . . . . . . . . . . . . 6 1.5. Differences from NFSv4.1 . . . . . . . . . . . . . . . . 6
2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7 2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7
3. pNFS considerations for New Operations . . . . . . . . . . . 10 3. pNFS considerations for New Operations . . . . . . . . . . . 10
3.1. Atomicty for ALLOCATE and DEALLOCATE . . . . . . . . . . 10 3.1. Atomicity for ALLOCATE and DEALLOCATE . . . . . . . . . . 10
3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 10 3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 10
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 . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Type . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 11 3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 11
4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 11 4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 11
4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 11 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 11
4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 11 4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 11
4.2.1. Overview of Copy Operations . . . . . . . . . . . . . 12 4.2.1. Copy Operations . . . . . . . . . . . . . . . . . . . 12
4.2.2. Locking the Files . . . . . . . . . . . . . . . . . . 12 4.2.2. Requirements for Operations . . . . . . . . . . . . . 12
4.2.3. Intra-Server Copy . . . . . . . . . . . . . . . . . . 13 4.3. Requirements for Inter-Server Copy . . . . . . . . . . . 13
4.2.4. Inter-Server Copy . . . . . . . . . . . . . . . . . . 14 4.4. Locking the Files . . . . . . . . . . . . . . . . . . . . 13
4.2.5. Server-to-Server Copy Protocol . . . . . . . . . . . 18 4.5. Intra-Server Copy . . . . . . . . . . . . . . . . . . . . 14
4.3. Requirements for Operations . . . . . . . . . . . . . . . 19 4.6. Inter-Server Copy . . . . . . . . . . . . . . . . . . . . 15
4.3.1. netloc4 - Network Locations . . . . . . . . . . . . . 20 4.7. Server-to-Server Copy Protocol . . . . . . . . . . . . . 19
4.3.2. Copy Offload Stateids . . . . . . . . . . . . . . . . 20 4.7.1. Considerations on Selecting a Copy Protocol . . . . . 19
4.4. Security Considerations . . . . . . . . . . . . . . . . . 21 4.7.2. Using NFSv4.x as the Copy Protocol . . . . . . . . . 19
4.4.1. Inter-Server Copy Security . . . . . . . . . . . . . 21 4.7.3. Using an Alternative Copy Protocol . . . . . . . . . 19
4.8. netloc4 - Network Locations . . . . . . . . . . . . . . . 20
4.9. Copy Offload Stateids . . . . . . . . . . . . . . . . . . 21
4.10. Security Considerations . . . . . . . . . . . . . . . . . 21
4.10.1. Inter-Server Copy Security . . . . . . . . . . . . . 21
5. Support for Application IO Hints . . . . . . . . . . . . . . 31 5. Support for Application IO Hints . . . . . . . . . . . . . . 31
6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 32 6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 31
6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 32 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 31
6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 33 6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 32
6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 33 6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 32
6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 33 6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 32
6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 33 6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 33
7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 34 7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 33
7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 34 7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 33
7.2. Space Reservation Information . . . . . . . . . . . . . . 36 8. Application Data Block Support . . . . . . . . . . . . . . . 35
8. Application Data Block Support . . . . . . . . . . . . . . . 36 8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 36
8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 37 8.1.1. Data Block Representation . . . . . . . . . . . . . . 36
8.1.1. Data Block Representation . . . . . . . . . . . . . . 37 8.2. An Example of Detecting Corruption . . . . . . . . . . . 37
8.2. An Example of Detecting Corruption . . . . . . . . . . . 38 8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 38
8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 39 8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 39
8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 40 9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 39
9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 40 9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 39
9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 40 9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 40
9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 41 9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 41
9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 42 9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 41
9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 43 9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 42
9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 43 9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 42
9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 43 9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 42
9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 43 9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 42
9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 44 9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 43
9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 44 9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 43
9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 44 9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 43
9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 45 9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 43
9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 45 9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 45
9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 46 9.7. Security Considerations . . . . . . . . . . . . . . . . . 45
9.7. Security Considerations . . . . . . . . . . . . . . . . . 47
10. Sharing change attribute implementation details with NFSv4 10. Sharing change attribute implementation details with NFSv4
clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 47 10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 46
11. Security Considerations . . . . . . . . . . . . . . . . . . . 48 11. Security Considerations . . . . . . . . . . . . . . . . . . . 46
12. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 48 12. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 46
12.1. Error Definitions . . . . . . . . . . . . . . . . . . . 48 12.1. Error Definitions . . . . . . . . . . . . . . . . . . . 47
12.1.1. General Errors . . . . . . . . . . . . . . . . . . . 48 12.1.1. General Errors . . . . . . . . . . . . . . . . . . . 47
12.1.2. Server to Server Copy Errors . . . . . . . . . . . . 49 12.1.2. Server to Server Copy Errors . . . . . . . . . . . . 47
12.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 49 12.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 48
12.2. New Operations and Their Valid Errors . . . . . . . . . 49 12.2. New Operations and Their Valid Errors . . . . . . . . . 48
12.3. New Callback Operations and Their Valid Errors . . . . . 53 12.3. New Callback Operations and Their Valid Errors . . . . . 52
13. New File Attributes . . . . . . . . . . . . . . . . . . . . . 53 13. New File Attributes . . . . . . . . . . . . . . . . . . . . . 52
13.1. New RECOMMENDED Attributes - List and Definition 13.1. New RECOMMENDED Attributes - List and Definition
References . . . . . . . . . . . . . . . . . . . . . . . 53 References . . . . . . . . . . . . . . . . . . . . . . . 52
13.2. Attribute Definitions . . . . . . . . . . . . . . . . . 54 13.2. Attribute Definitions . . . . . . . . . . . . . . . . . 53
14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 57 14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 56
15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 60 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 59
15.1. Operation 59: ALLOCATE . . . . . . . . . . . . . . . . . 60 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a
15.2. Operation 60: COPY - Initiate a server-side copy . . . . 61 File . . . . . . . . . . . . . . . . . . . . . . . . . . 59
15.2. Operation 60: COPY - Initiate a server-side copy . . . . 60
15.3. Operation 61: COPY_NOTIFY - Notify a source server of a 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a
future copy . . . . . . . . . . . . . . . . . . . . . . 65 future copy . . . . . . . . . . . . . . . . . . . . . . 65
15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate 15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate
Client ID . . . . . . . . . . . . . . . . . . . . . . . 66 Client ID . . . . . . . . . . . . . . . . . . . . . . . 66
15.5. Operation 62: DEALLOCATE - Unreserve Space in a Region
15.5. Operation 62: DEALLOCATE . . . . . . . . . . . . . . . . 67 of a File . . . . . . . . . . . . . . . . . . . . . . . 68
15.6. Operation 63: IO_ADVISE - Application I/O access pattern 15.6. Operation 63: IO_ADVISE - Application I/O access pattern
hints . . . . . . . . . . . . . . . . . . . . . . . . . 68 hints . . . . . . . . . . . . . . . . . . . . . . . . . 69
15.7. Changes to Operation 51: LAYOUTRETURN . . . . . . . . . 74 15.7. Operation 64: LAYOUTERROR - Provide Errors for the
15.8. Operation 64: OFFLOAD_ABORT - Cancel a server-side copy 77 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 74
15.9. Operation 65: OFFLOAD_REVOKE - Revoke a destination 15.8. Operation 65: LAYOUTSTATS - Provide Statistics for the
server's copy privileges . . . . . . . . . . . . . . . . 77 Layout . . . . . . . . . . . . . . . . . . . . . . . . . 77
15.10. Operation 66: OFFLOAD_STATUS - Poll for status of a 15.9. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded
server-side copy . . . . . . . . . . . . . . . . . . . . 78 Operation . . . . . . . . . . . . . . . . . . . . . . . 78
15.11. Operation 67: READ_PLUS . . . . . . . . . . . . . . . . 79 15.10. Operation 67: OFFLOAD_STATUS - Poll for Status of
15.12. Operation 68: SEEK . . . . . . . . . . . . . . . . . . . 85 Asynchronous Operation . . . . . . . . . . . . . . . . . 79
15.13. Operation 69: WRITE_SAME . . . . . . . . . . . . . . . . 86 15.11. Operation 68: READ_PLUS - READ Data or Holes from a File 80
15.12. Operation 69: SEEK - Find the Next Data or Hole . . . . 84
15.13. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times
to a File . . . . . . . . . . . . . . . . . . . . . . . 85
16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89 16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89
16.1. Operation 15: CB_OFFLOAD - Report results of an 16.1. Operation 15: CB_OFFLOAD - Report results of an
asynchronous operation . . . . . . . . . . . . . . . . . 90 asynchronous operation . . . . . . . . . . . . . . . . . 89
17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 91 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 90
18. References . . . . . . . . . . . . . . . . . . . . . . . . . 91 18. References . . . . . . . . . . . . . . . . . . . . . . . . . 90
18.1. Normative References . . . . . . . . . . . . . . . . . . 91 18.1. Normative References . . . . . . . . . . . . . . . . . . 90
18.2. Informative References . . . . . . . . . . . . . . . . . 92 18.2. Informative References . . . . . . . . . . . . . . . . . 91
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 93 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 92
Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 94 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 93
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 95 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 93
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]. It follows second minor version, NFSv4.1, is described in [RFC5661].
the guidelines for minor versioning that are listed in Section 11 of
[I-D.ietf-nfsv4-rfc3530bis].
As a minor version, NFSv4.2 is consistent with the overall goals for As a minor version, NFSv4.2 is consistent with the overall goals for
NFSv4, but extends the protocol so as to better meet those goals, NFSv4, but extends the protocol so as to better meet those goals,
based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted
some additional goals, which motivate some of the major extensions in some additional goals, which motivate some of the major extensions in
NFSv4.2. NFSv4.2.
1.2. Scope of This Document 1.2. Scope of This Document
This document describes the NFSv4.2 protocol. With respect to This document describes the NFSv4.2 protocol. With respect to
skipping to change at page 7, line 4 skipping to change at page 7, line 9
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, is introduced which allows the server to NFS4ERR_UNION_NOTSUPP, allows the server to communicate to the client
communicate to the client that the operation is supported, but the that the operation is supported, but the specific arm of 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 To address the requirement of an NFS protocol that can evolve as the
need arises, the NFSv4 protocol contains the rules and framework to need arises, the NFSv4 protocol contains the rules and framework to
allow for future minor changes or versioning. allow for future minor changes or versioning.
The base assumption with respect to minor versioning is that any The base assumption with respect to minor versioning is that any
future accepted minor version will be documented in one or more future accepted minor version will be documented in one or more
Standards Track RFCs. Minor version 0 of the NFSv4 protocol is Standards Track RFCs. Minor version 0 of the NFSv4 protocol is
skipping to change at page 10, line 28 skipping to change at page 10, line 31
complicates implementation of the minor version. complicates implementation of the minor version.
16. Unless explicitly documented in a minor version standard's 16. Unless explicitly documented in a minor version standard's
document, a client MUST NOT attempt to use a stateid, document, a client MUST NOT attempt to use a stateid,
filehandle, or similar returned object from the COMPOUND filehandle, or similar returned object from the COMPOUND
procedure with minor version X for another COMPOUND procedure procedure with minor version X for another COMPOUND procedure
with minor version Y, where X != Y. with minor version Y, where X != Y.
3. pNFS considerations for New Operations 3. pNFS considerations for New Operations
3.1. Atomicty for ALLOCATE and DEALLOCATE 3.1. Atomicity for ALLOCATE and DEALLOCATE
Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.5) Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.5)
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.
3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout Type 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout Type
A file layout provided by a NFSv4.2 server may refer either to a DS A file layout provided by a NFSv4.2 server may refer either to a
that only implements NFSv4.1 as specified in [RFC5661], or to a DS storage device that only implements NFSv4.1 as specified in
that implements additions from NFSv4.2, in which case the rules in [RFC5661], or to a storage device that implements additions from
Section 3.3.1 apply. As the File Layout Type does not provide a NFSv4.2, in which case the rules in Section 3.3.1 apply. As the File
means for informing the client as to which minor version a particular Layout Type does not provide a means for informing the client as to
DS is providing, it will have to negotiate this via the normal RPC which minor version a particular storage device is providing, it will
semantics of major and minor version discovery. have to negotiate this via the normal RPC semantics of major and
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:
READ_PLUS (see Section 15.11), WRITE_SAME (see Section 15.13), and IO_ADVISE (see Section 15.6), READ_PLUS (see Section 15.11),
SEEK (see Section 15.12), which will be treated like the subset WRITE_SAME (see Section 15.13), and SEEK (see Section 15.12), which
specified as "Operations Sent to NFSv4.1 Data Servers" in will be treated like the subset specified as "Operations Sent to
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
The server-side copy feature provides a mechanism for the NFS client The server-side copy feature provides a mechanism for the NFS client
to perform a file copy on a server or between two servers without the to perform a file copy on a server or between two servers without the
data being transmitted back and forth over the network through the data being transmitted back and forth over the network through the
NFS client. Without this feature, an NFS client copies data from one NFS client. Without this feature, an NFS client copies data from one
location to another by reading the data from the source server over location to another by reading the data from the source server over
the network, and then writing the data back over the network to the the network, and then writing the data back over the network to the
destiniation server. destination server.
If the source object and destination object are on different file If the source object and destination object are on different file
servers, the file servers will communicate with one another to servers, the file servers will communicate with one another to
perform the copy operation. The server-to-server protocol by which perform the copy operation. The server-to-server protocol by which
this is accomplished is not defined in this document. this is accomplished is not defined in this document.
4.2. Protocol Overview 4.2. Protocol Overview
The server-side copy offload operations support both intra-server and The server-side copy offload operations support both intra-server and
inter-server file copies. An intra-server copy is a copy in which inter-server file copies. An intra-server copy is a copy in which
skipping to change at page 11, line 51 skipping to change at page 12, line 5
synchronously or asynchronously. synchronously or asynchronously.
Throughout the rest of this document, we refer to the NFS server Throughout the rest of this document, we refer to the NFS server
containing the source file as the "source server" and the NFS server containing the source file as the "source server" and the NFS server
to which the file is transferred as the "destination server". In the to which the file is transferred as the "destination server". In the
case of an intra-server copy, the source server and destination case of an intra-server copy, the source server and destination
server are the same server. Therefore in the context of an intra- server are the same server. Therefore in the context of an intra-
server copy, the terms source server and destination server refer to server copy, the terms source server and destination server refer to
the single server performing the copy. the single server performing the copy.
The operations described below are designed to copy files. Other The new operations are designed to copy files. Other file system
file system objects can be copied by building on these operations or objects can be copied by building on these operations or using other
using other techniques. For example if the user wishes to copy a techniques. For example if the user wishes to copy a directory, the
directory, the client can synthesize a directory copy by first client can synthesize a directory copy by first creating the
creating the destination directory and then copying the source destination directory and then copying the source directory's files
directory's files to the new destination directory. If the user to the new destination directory.
wishes to copy a namespace junction [FEDFS-NSDB] [FEDFS-ADMIN], the
client can use the ONC RPC Federated Filesystem protocol
[FEDFS-ADMIN] to perform the copy. Specifically the client can
determine the source junction's attributes using the FEDFS_LOOKUP_FSN
procedure and create a duplicate junction using the
FEDFS_CREATE_JUNCTION procedure.
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. Overview of Copy Operations 4.2.1. Copy Operations
COPY_NOTIFY: For inter-server copies, the client sends this
operation to the source server to notify it of a future file copy
from a given destination server for the given user.
(Section 15.3)
OFFLOAD_REVOKE: Also for inter-server copies, the client sends this COPY_NOTIFY: Used by the client to notify the source server of a
operation to the source server to revoke permission to copy a file future file copy from a given destination server for the given
for the given user. (Section 15.9) user. (Section 15.3)
COPY: Used by the client to request a file copy. (Section 15.2) COPY: Used by the client to request a file copy. (Section 15.2)
OFFLOAD_ABORT: Used by the client to abort an asynchronous file OFFLOAD_CANCEL: Used by the client to terminate an asynchronous file
copy. (Section 15.8) copy. (Section 15.9)
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 15.10) asynchronous file copy. (Section 15.10)
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 16.1) an asynchronous file copy to the client. (Section 16.1)
4.2.2. Locking the Files 4.2.2. Requirements for Operations
The implementation of server-side copy is OPTIONAL by the client and
the server. However, in order to successfully copy a file, some
operations MUST be supported by the client and/or server.
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 client MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations.
If a client desires an inter-server file copy, then it MUST support
the COPY, COPY_NOTICE, and CB_OFFLOAD operations, and MAY use the
OFFLOAD_CANCEL operation. If COPY returns a stateid, then the client
MAY use the OFFLOAD_CANCEL and OFFLOAD_STATUS operations.
If a server supports intra-server copy, then the server MUST support
the COPY operation. If a server's COPY operation returns a stateid,
then the server MUST also support these operations: CB_OFFLOAD,
OFFLOAD_CANCEL, and OFFLOAD_STATUS.
If a source server supports inter-server copy, then the source server
MUST support all these operations: COPY_NOTIFY and OFFLOAD_CANCEL.
If a destination server supports inter-server copy, then the
destination server MUST support the COPY operation. If a destination
server's COPY operation returns a stateid, then the destination
server MUST also support these operations: CB_OFFLOAD,
OFFLOAD_CANCEL, COPY_NOTIFY, and OFFLOAD_STATUS.
Each operation is performed in the context of the user identified by
the ONC RPC credential of its containing COMPOUND or CB_COMPOUND
request. For example, an OFFLOAD_CANCEL operation issued by a given
user indicates that a specified COPY operation initiated by the same
user be canceled. Therefore an OFFLOAD_CANCEL MUST NOT interfere
with a copy of the same file initiated by another user.
An NFS server MAY allow an administrative user to monitor or cancel
copy operations using an implementation specific interface.
4.3. Requirements for Inter-Server Copy
Inter-server copy is driven by several requirements:
o The specification MUST NOT mandate the server-to-server protocol.
o The specification MUST provide guidance for using NFSv4.x as a
copy protocol. For those source and destination servers willing
to use NFSv4.x, there are specific security considerations that
this specification MUST address.
o The specification MUST NOT mandate preconfiguration between the
source and destination server. Requiring that the source and
destination first have a "copying relationship" increases the
administrative burden. However the specification MUST NOT
preclude implementations that require preconfiguration.
o The specification MUST NOT mandate a trust relationship between
the source and destination server. The NFSv4 security model
requires mutual authentication between a principal on an NFS
client and a principal on an NFS server. This model MUST continue
with the introduction of COPY.
4.4. Locking the Files
Both the source and destination file may need to be locked to protect Both the source and destination file may need to be locked to protect
the content during the copy operations. A client can achieve this by the content during the copy operations. A client can achieve this by
a combination of OPEN and LOCK operations. I.e., either share or a combination of OPEN and LOCK operations. I.e., either share or
byte range locks might be desired. byte range locks might be desired.
4.2.3. 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_ABORT. using OFFLOAD_STATUS or cancel the copy using OFFLOAD_CANCEL.
A synchronous intra-server copy is shown in Figure 1. In this A synchronous intra-server copy is shown in Figure 1. In this
example, the NFS server chooses to perform the copy synchronously. example, the NFS server chooses to perform the copy synchronously.
The copy operation is completed, either successfully or The copy operation is completed, either successfully or
unsuccessfully, before the server replies to the client's request. unsuccessfully, before the server replies to the client's request.
The server's reply contains the final result of the operation. The server's reply contains the final result of the operation.
Client Server Client Server
+ + + +
| | | |
skipping to change at page 13, line 48 skipping to change at page 14, line 48
| | | |
Figure 1: A synchronous intra-server copy. Figure 1: A synchronous intra-server copy.
An asynchronous intra-server copy is shown in Figure 2. In this An asynchronous intra-server copy is shown in Figure 2. In this
example, the NFS server performs the copy asynchronously. The example, the NFS server performs the copy asynchronously. The
server's reply to the copy request indicates that the copy operation server's reply to the copy request indicates that the copy operation
was initiated and the final result will be delivered at a later time. was initiated and the final result will be delivered at a later time.
The server's reply also contains a copy stateid. The client may use The server's reply also contains a copy stateid. The client may use
this copy stateid to poll for status information (as shown) or to this copy stateid to poll for status information (as shown) or to
cancel the copy using a OFFLOAD_ABORT. When the server completes the cancel the copy using an OFFLOAD_CANCEL. When the server completes
copy, the server performs a callback to the client and reports the the copy, the server performs a callback to the client and reports
results. the results.
Client Server Client Server
+ + + +
| | | |
|--- OPEN ---------------------------->| Client opens |--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the source file |<------------------------------------/| the source file
| | | |
|--- OPEN ---------------------------->| Client opens |--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the destination file |<------------------------------------/| the destination file
| | | |
skipping to change at page 14, line 38 skipping to change at page 15, line 38
|--- CLOSE --------------------------->| Client closes |--- CLOSE --------------------------->| Client closes
|<------------------------------------/| the destination file |<------------------------------------/| the destination file
| | | |
|--- CLOSE --------------------------->| Client closes |--- CLOSE --------------------------->| Client closes
|<------------------------------------/| the source file |<------------------------------------/| the source file
| | | |
| | | |
Figure 2: An asynchronous intra-server copy. Figure 2: An asynchronous intra-server copy.
4.2.4. Inter-Server Copy 4.6. Inter-Server Copy
A copy may also be performed between two servers. The copy protocol A copy may also be performed between two servers. The copy protocol
is designed to accommodate a variety of network topologies. As shown is designed to accommodate a variety of network topologies. As shown
in Figure 3, the client and servers may be connected by multiple in Figure 3, the client and servers may be connected by multiple
networks. In particular, the servers may be connected by a networks. In particular, the servers may be connected by a
specialized, high speed network (network 192.0.2.0/24 in the diagram) specialized, high speed network (network 192.0.2.0/24 in the diagram)
that does not include the client. The protocol allows the client to that does not include the client. The protocol allows the client to
setup the copy between the servers (over network 203.0.113.0/24 in setup the copy between the servers (over network 203.0.113.0/24 in
the diagram) and for the servers to communicate on the high speed the diagram) and for the servers to communicate on the high speed
network if they choose to do so. network if they choose to do so.
skipping to change at page 18, line 5 skipping to change at page 19, line 5
| | | | | |
|--- LOCKU --->| | Only if LOCK was done |--- LOCKU --->| | Only if LOCK was done
|<------------------/| | |<------------------/| |
| | | | | |
|--- CLOSE --->| | Release open state |--- CLOSE --->| | Release open state
|<------------------/| | |<------------------/| |
| | | | | |
Figure 5: An asynchronous inter-server copy. Figure 5: An asynchronous inter-server copy.
4.2.5. Server-to-Server Copy Protocol 4.7. Server-to-Server Copy Protocol
The source server and destination server are not required to use a The choice of what protocol to use in an inter-server copy is
specific protocol to transfer the file data. The choice of what ultimately the destination server's decision. However, the
protocol to use is ultimately the destination server's decision. destination server has to be cognizant that it is working on behalf
of the client.
4.2.5.1. Using NFSv4.x as a Server-to-Server Copy Protocol 4.7.1. Considerations on Selecting a Copy Protocol
The client can have requirements over both the size of transactions
and error recovery semantics. It may want to split the copy up such
that each chunk is synchronously transferred. It may want the copy
protocol to copy the bytes in consecutive order such that upon an
error, the client can restart the copy at the last known good offset.
If the destination server cannot meet these requirements, the client
may prefer the traditional copy mechanism such that it can meet those
requirements.
4.7.2. Using NFSv4.x as the Copy Protocol
The destination server MAY use standard NFSv4.x (where x >= 1) The destination server MAY use standard NFSv4.x (where x >= 1)
operations to read the data from the source server. If NFSv4.x is operations to read the data from the source server. If NFSv4.x is
used for the server-to-server copy protocol, the destination server used for the server-to-server copy protocol, the destination server
can use the source filehandle and ca_src_stateid provided in the COPY can use the source filehandle and ca_src_stateid provided in the COPY
request with standard NFSv4.x operations to read data from the source request with standard NFSv4.x operations to read data from the source
server. server.
4.2.5.2. Using an alternative Server-to-Server Copy Protocol 4.7.3. Using an Alternative Copy Protocol
In a homogeneous environment, the source and destination servers In a homogeneous environment, the source and destination servers
might be able to perform the file copy extremely efficiently using might be able to perform the file copy extremely efficiently using
specialized protocols. For example the source and destination specialized protocols. For example the source and destination
servers might be two nodes sharing a common file system format for servers might be two nodes sharing a common file system format for
the source and destination file systems. Thus the source and the source and destination file systems. Thus the source and
destination are in an ideal position to efficiently render the image destination are in an ideal position to efficiently render the image
of the source file to the destination file by replicating the file of the source file to the destination file by replicating the file
system formats at the block level. Another possibility is that the system formats at the block level. Another possibility is that the
source and destination might be two nodes sharing a common storage source and destination might be two nodes sharing a common storage
skipping to change at page 19, line 12 skipping to change at page 20, line 24
destination server receives the source server's URL, it would use destination server receives the source server's URL, it would use
"_FH/0x12345" as the file name to pass to the FTP server listening on "_FH/0x12345" as the file name to pass to the FTP server listening on
port 9999 of s1.example.com. On port 9999 there would be a special port 9999 of s1.example.com. On port 9999 there would be a special
instance of the FTP service that understands how to convert NFS instance of the FTP service that understands how to convert NFS
filehandles to an open file descriptor (in many operating systems, filehandles to an open file descriptor (in many operating systems,
this would require a new system call, one which is the inverse of the this would require a new system call, one which is the inverse of the
makefh() function that the pre-NFSv4 MOUNT service needs). makefh() function that the pre-NFSv4 MOUNT service needs).
Authenticating and identifying the destination server to the source Authenticating and identifying the destination server to the source
server is also a challenge. Recommendations for how to accomplish server is also a challenge. Recommendations for how to accomplish
this are given in Section 4.4.1.4. this are given in Section 4.10.1.3.
4.3. Requirements for Operations
The implementation of server-side copy is OPTIONAL by the client and
the server. However, in order to successfully copy a file, some
operations MUST be supported by the client and/or server.
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 client MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations.
If a client desires an inter-server file copy, then it MUST support
the COPY, COPY_NOTICE, and CB_OFFLOAD operations, and MAY use the
OFFLOAD_REVOKE operation. If COPY returns a stateid, then the client
MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations.
If a server supports intra-server copy, then the server MUST support
the COPY operation. If a server's COPY operation returns a stateid,
then the server MUST also support these operations: CB_OFFLOAD,
OFFLOAD_ABORT, and OFFLOAD_STATUS.
If a source server supports inter-server copy, then the source server
MUST support all these operations: COPY_NOTIFY and OFFLOAD_REVOKE.
If a destination server supports inter-server copy, then the
destination server MUST support the COPY operation. If a destination
server's COPY operation returns a stateid, then the destination
server MUST also support these operations: CB_OFFLOAD, OFFLOAD_ABORT,
COPY_NOTIFY, OFFLOAD_REVOKE, and OFFLOAD_STATUS.
Each operation is performed in the context of the user identified by
the ONC RPC credential of its containing COMPOUND or CB_COMPOUND
request. For example, a OFFLOAD_ABORT operation issued by a given
user indicates that a specified COPY operation initiated by the same
user be canceled. Therefore a OFFLOAD_ABORT MUST NOT interfere with
a copy of the same file initiated by another user.
An NFS server MAY allow an administrative user to monitor or cancel
copy operations using an implementation specific interface.
4.3.1. netloc4 - Network Locations 4.8. netloc4 - Network Locations
The server-side copy operations specify network locations using the The server-side copy operations specify network locations using the
netloc4 data type shown below: netloc4 data type shown below:
enum netloc_type4 { enum netloc_type4 {
NL4_NAME = 0, NL4_NAME = 0,
NL4_URL = 1, NL4_URL = 1,
NL4_NETADDR = 2 NL4_NETADDR = 2
}; };
union netloc4 switch (netloc_type4 nl_type) { union netloc4 switch (netloc_type4 nl_type) {
skipping to change at page 20, line 36 skipping to change at page 21, line 8
UTF-8 string. If the netloc4 is of type NL4_NETADDR, the nl_addr UTF-8 string. If the netloc4 is of type NL4_NETADDR, the nl_addr
field MUST contain a valid netaddr4 as defined in Section 3.3.9 of field MUST contain a valid netaddr4 as defined in Section 3.3.9 of
[RFC5661]. [RFC5661].
When netloc4 values are used for an inter-server copy as shown in When netloc4 values are used for an inter-server copy as shown in
Figure 3, their values may be evaluated on the source server, Figure 3, their values may be evaluated on the source server,
destination server, and client. The network environment in which destination server, and client. The network environment in which
these systems operate should be configured so that the netloc4 values these systems operate should be configured so that the netloc4 values
are interpreted as intended on each system. are interpreted as intended on each system.
4.3.2. Copy Offload Stateids 4.9. Copy Offload Stateids
A server may perform a copy offload operation asynchronously. An A server may perform a copy offload operation asynchronously. An
asynchronous copy is tracked using a copy offload stateid. Copy asynchronous copy is tracked using a copy offload stateid. Copy
offload stateids are included in the COPY, OFFLOAD_ABORT, offload stateids are included in the COPY, OFFLOAD_CANCEL,
OFFLOAD_STATUS, and CB_OFFLOAD operations. OFFLOAD_STATUS, and CB_OFFLOAD operations.
Section 8.2.4 of [RFC5661] specifies that stateids are valid until
either (A) the client or server restart or (B) the client returns the
resource.
A copy offload stateid will be valid until either (A) the client or A copy offload stateid will be valid until either (A) the client or
server restarts or (B) the client returns the resource by issuing a server restarts or (B) the client returns the resource by issuing a
OFFLOAD_ABORT operation or the client replies to a CB_OFFLOAD OFFLOAD_CANCEL operation or the client replies to a CB_OFFLOAD
operation. operation.
A copy offload stateid's seqid MUST NOT be 0. In the context of a A copy offload stateid's seqid MUST NOT be 0. In the context of a
copy offload operation, it is ambiguous to indicate the most recent copy offload operation, it is ambiguous to indicate the most recent
copy offload operation using a stateid with seqid of 0. Therefore a copy offload operation using a stateid with seqid of 0. Therefore a
copy offload stateid with seqid of 0 MUST be considered invalid. copy offload stateid with seqid of 0 MUST be considered invalid.
4.4. Security Considerations 4.10. Security Considerations
The security considerations pertaining to NFSv4
[I-D.ietf-nfsv4-rfc3530bis] apply to this chapter.
The standard security mechanisms provide by NFSv4 The security considerations pertaining to NFSv4.1 [RFC5661] apply to
[I-D.ietf-nfsv4-rfc3530bis] may be used to secure the protocol this section. And as such, the standard security mechanisms used by
described in this chapter. the protocol can be used to secure the server-to-server operations.
NFSv4 clients and servers supporting the inter-server copy operations NFSv4 clients and servers supporting the inter-server copy operations
described in this chapter are REQUIRED to implement the mechanism described in this chapter are REQUIRED to implement the mechanism
described in Section 4.4.1.2, and to support rejecting COPY_NOTIFY described in Section 4.10.1.1, and to support rejecting COPY_NOTIFY
requests that do not use RPCSEC_GSS with privacy. If the server-to- requests that do not use RPCSEC_GSS with privacy. If the server-to-
server copy protocol is ONC RPC based, the servers are also REQUIRED server copy protocol is ONC RPC based, the servers are also REQUIRED
to implement [rpcsec_gssv3] including the RPCSEC_GSSv3 copy_to_auth, to implement [rpcsec_gssv3] including the RPCSEC_GSSv3 copy_to_auth,
copy_from_auth, and copy_confirm_auth structured privileges. This copy_from_auth, and copy_confirm_auth structured privileges. This
requirement to implement is not a requirement to use; for example, a requirement to implement is not a requirement to use; for example, a
server may depending on configuration also allow COPY_NOTIFY requests server may depending on configuration also allow COPY_NOTIFY requests
that use only AUTH_SYS. that use only AUTH_SYS.
4.4.1. Inter-Server Copy Security 4.10.1. Inter-Server Copy Security
4.4.1.1. Requirements for Secure Inter-Server Copy
Inter-server copy is driven by several requirements:
o The specification must not mandate an inter-server copy protocol.
There are many ways to copy data. Some will be more optimal than
others depending on the identities of the source server and
destination server. For example the source and destination
servers might be two nodes sharing a common file system format for
the source and destination file systems. Thus the source and
destination are in an ideal position to efficiently render the
image of the source file to the destination file by replicating
the file system formats at the block level. In other cases, the
source and destination might be two nodes sharing a common storage
area network, and thus there is no need to copy any data at all,
and instead ownership of the file and its contents simply gets re-
assigned to the destination.
o The specification must provide guidance for using NFSv4.x as a
copy protocol. For those source and destination servers willing
to use NFSv4.x there are specific security considerations that
this specification can and does address.
o The specification must not mandate pre-configuration between the
source and destination server. Requiring that the source and
destination first have a "copying relationship" increases the
administrative burden. However the specification MUST NOT
preclude implementations that require pre-configuration.
o The specification must not mandate a trust relationship between
the source and destination server. The NFSv4 security model
requires mutual authentication between a principal on an NFS
client and a principal on an NFS server. This model MUST continue
with the introduction of COPY.
4.4.1.2. Inter-Server Copy via ONC RPC with RPCSEC_GSSv3 4.10.1.1. Inter-Server Copy via ONC RPC with RPCSEC_GSSv3
When the client sends a COPY_NOTIFY to the source server to expect When the client sends a COPY_NOTIFY to the source server to expect
the destination to attempt to copy data from the source server, it is the destination to attempt to copy data from the source server, it is
expected that this copy is being done on behalf of the principal expected that this copy is being done on behalf of the principal
(called the "user principal") that sent the RPC request that encloses (called the "user principal") that sent the RPC request that encloses
the COMPOUND procedure that contains the COPY_NOTIFY operation. The the COMPOUND procedure that contains the COPY_NOTIFY operation. The
user principal is identified by the RPC credentials. A mechanism user principal is identified by the RPC credentials. A mechanism
that allows the user principal to authorize the destination server to that allows the user principal to authorize the destination server to
perform the copy, that lets the source server properly authenticate perform the copy, that lets the source server properly authenticate
the destination's copy, and does not allow the destination server to the destination's copy, and does not allow the destination server to
skipping to change at page 22, line 44 skipping to change at page 22, 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, we employ a combination of two features of the RPCSEC_GSSv3 Instead, a combination of two features of the RPCSEC_GSSv3
[rpcsec_gssv3] protocol: compound authentication and RPC application [rpcsec_gssv3] protocol can be used: compound authentication and RPC
defined structured privilege assertions. The combination of these application defined structured privilege assertions. These features
features allows 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 prinicpal, 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
source and destination servers authorization to copy. authorization of both the source and destination servers to copy.
RPCSEC_GSSv3 introduces the notion of RPC application defined RPCSEC_GSSv3 introduces the notion of RPC application defined
structured privileges. We define three structured privileges that structured privileges. We define three structured privileges that
work in tandum 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 24 skipping to change at page 23, line 35
*/ */
opaque ctap_handle<>; opaque ctap_handle<>;
int ctap_handle_vers; int ctap_handle_vers;
/* A nounce and a mic of the nounce using ctap_handle */ /* A nounce and a mic of the nounce using ctap_handle */
opaque ctap_nounce<>; opaque ctap_nounce<>;
opaque ctap_nounce_mic<>; 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. ctap_handle, ctap_handle_vers, ctap_nounce, and
ctap_nounce_mic are used to construct the compound authentication ctap_nounce_mic are used to construct the compound authentication
portion of the copy_confirm_auth RPCGSS_GSSv3 context between the portion of the copy_confirm_auth RPCSEC_GSSv3 context between the
destination server and the source server. See Section 4.4.1.2.1 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. Note that besides the
rpc_gss3_privs payload (struct copy_confirm_auth_priv), the rpc_gss3_privs payload (struct copy_confirm_auth_priv), the
copy_confirm_auth RPCSEC_GSS3_CREATE message also contains an copy_confirm_auth RPCSEC_GSS3_CREATE message also contains an
rpc_gss3_gss_binding payload so that the copy is done on behalf of rpc_gss3_gss_binding payload so that the copy is done on behalf of
the user principal. This privilege is established on the the user principal. This privilege is established on the
destination server before the file is copied from the source to destination server before the file is copied from the source to
the destination. The resultant RPCSEC_GSSv3 context is used to the destination. The resultant RPCSEC_GSSv3 context is used to
secure the READ operations from the source to the destination secure the READ operations from the source to the destination
server. 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.4.1.2.1. Establishing a Security Context 4.10.1.1.1. Establishing a Security Context
The RPCSEC_GSSv3 compound authentication feature allows a server to The RPCSEC_GSSv3 compound authentication feature allows a server to
act on behalf of a user if the server identifies the user and trusts 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 client. In the inter-server server side copy case, the server is
the source server, and the client is the destination server acting as the source server, and the client is the destination server acting as
a client when performing the copy. a client when performing the copy.
The user principal is not required (nor expected) to have an The user principal is not required (nor expected) to have an
RPCSEC_GSS secured connection and context between the destination RPCSEC_GSS secured connection and context between the destination
server (acting as a client) and the source server. The user server (acting as a client) and the source server. The user
principal does have an RPCSEC_GSS secured connection and context principal does have an RPCSEC_GSS secured connection and context
between the client and the source server established for the OPEN of between the client and the source server established for the OPEN of
the file to be copied. the file to be copied.
We use the RPCSEC_GSS context established between the user principal 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 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 necessary user principal identification to the source server from
the destination server (acting as a client). This is accomplished by the destination server (acting as a client). This is accomplished by
sending the user principal indentification information: e.g the sending the user principal identification information: e.g., the
rpc_gss3_gss_binding fields, in the copy_to_auth privilege rpc_gss3_gss_binding fields, in the copy_to_auth privilege
established between the client and the destination server. This same established between the client and the destination server. This same
information is then placed in the rpc_gss3_gss_binding fields of the information is then placed in the rpc_gss3_gss_binding fields of the
copy_confirm_auth RPCSEC_GSS3_CREATE message sent from the copy_confirm_auth RPCSEC_GSS3_CREATE message sent from the
destination server (acting as a client) to the source server. 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:
skipping to change at page 26, line 28 skipping to change at page 25, line 41
involving the destination server. involving the destination server.
granted_assertions[0].assertion.privs.name will be equal to granted_assertions[0].assertion.privs.name will be equal to
"copy_from_auth". "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 next four fields are
passed in the copy_to_auth privilege to be used by the passed in the copy_to_auth privilege to be used by the
copy_confirm_auth rpc_gss3_gss_binding fields as explained above. copy_confirm_auth rpc_gss3_gss_binding fields as explained above.
A nounce is created, and GSS_MIC() is invoked on the nounce using A nounce is created, and GSS_MIC() is invoked on the nounce using
the RPCSEC_GSSv1 (or v2) context shared between user prinicpal and the RPCSEC_GSSv1 (or v2) context shared between user principal and
the source server. The nounce, nounce MIC, context handle used to the source server. The nounce, nounce MIC, context handle used to
create the nounce MIC, and the context handle version are added to create the nounce MIC, and the context handle version are added to
the copy_to_auth_priv instance which is placed in the copy_to_auth_priv instance which 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_to_auth" is placed in string "copy_to_auth" is placed in
assertions[0].assertion.privs.name. The field assertions[0].assertion.privs.name. The field
assertions[0].critical is set to TRUE. The destination server assertions[0].critical is set to TRUE. The destination server
unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and unwraps the rpc_gss_svc_privacy RPCSEC_GSS3_CREATE payload and
verifies that the NFSv4 user id being asserted matches the verifies that the NFSv4 user id being asserted matches the
destination server's mapping of the user principal. If it does, destination server's mapping of the user principal. If it does,
the privilege is established on the destination server as: the privilege is established on the destination server as:
<"copy_to_auth", user id, source list, nounce, nounce MIC, context <"copy_to_auth", user id, source list, nounce, nounce MIC, context
handle, handle version>. The field "handle" in a successful reply handle, handle version>. The field "handle" in a successful reply
is the RPCSEC_GSSv3 "child" handle that the client will use on is the RPCSEC_GSSv3 "child" handle that the client will use on
COPY requests to the destination server involving the source COPY requests to the destination server involving the source
server. granted_assertions[0].assertion.privs.name will be equal server. granted_assertions[0].assertion.privs.name will be equal
to "copy_to_auth". 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_GSSv1 (or v2) handle used to
create the RPCSEC_GSSv3 child handle. create the RPCSEC_GSSv3 child handle.
4.4.1.2.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
skipping to change at page 27, line 36 skipping to change at page 27, line 5
destination filehandles. If the COPY returns a wr_callback_id, then destination filehandles. If the COPY returns a wr_callback_id, then
this is an asynchronous copy and the wr_callback_id must also must be this is an asynchronous copy and the wr_callback_id must also must be
annotated to the copy_to_auth privilege. If the client has failed to annotated to the copy_to_auth privilege. If the client has failed to
establish the "copy_to_auth" privilege it will reject the request establish the "copy_to_auth" 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.4.1.2.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 destiniation 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_GSS.
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. The field
assertions[0].critical is set to TRUE. assertions[0].critical is set to TRUE.
o The copy_confirm_auth RPCSEC_GSS3_CREATE call also includes a o The copy_confirm_auth RPCSEC_GSS3_CREATE call also includes a
compound authentication component. The rpc_gss3_gss_binding compound authentication component. The rpc_gss3_gss_binding
fields are filled in with information from the estalished fields are filled in with information from the established
"copy_to_auth" privilege (see Section 4.4.1.2.1). The "copy_to_auth" privilege (see Section 4.10.1.1.1). The
ctap_handle_vers, ctap_handle, ctap_nounce, and ctap_nounce_mic ctap_handle_vers, ctap_handle, ctap_nounce, and ctap_nounce_mic
are assigned to the vers, handle, nounce, and mic fields of an are assigned to the vers, handle, nounce, and mic fields of an
rpc_gss3_gss_binding instance respectively. 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
skipping to change at page 28, line 46 skipping to change at page 28, line 15
"copy_confirm_auth", shared_secret_mic, user id, nounce, nounce "copy_confirm_auth", shared_secret_mic, user id, nounce, nounce
MIC, context handle, context handle version>, and the resultant MIC, context handle, context handle version>, and the resultant
child handle is noted to be acting on behalf of the user child handle is noted to be acting on behalf of the user
principal. If the source server fails to verify either the principal. If the source server fails to verify either the
privilege or the compound_binding, the COPY operation will be privilege or the compound_binding, the COPY operation will be
rejected with NFS4ERR_PARTNER_NO_AUTH. rejected with NFS4ERR_PARTNER_NO_AUTH.
o All subsequent ONC RPC requests sent from the destination to copy o All subsequent ONC RPC requests sent from the destination to copy
data from the source to the destination will use the RPCSEC_GSSv3 data from the source to the destination will use the RPCSEC_GSSv3
handle returned by the source's RPCSEC_GSS3_CREATE response. Note handle returned by the source's RPCSEC_GSS3_CREATE response. Note
that as per the Compound Authenticaion section of [rpcsec_gssv3] that as per the Compound Authentication section of [rpcsec_gssv3]
the resultant RPCSEC_GSSv3 context handle is bound to the user the resultant RPCSEC_GSSv3 context handle is bound to the user
principal RPCSEC_GSS context and so it MUST be treated by servers principal RPCSEC_GSS context and so it MUST be treated by servers
as authenticating the user principal. as authenticating the user principal.
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.4.1.2.4. Finishing or Stoping a Secure Inter-Server Copy 4.10.1.1.4. 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 and compound authentication
RPCSEC_GSSv3 handle is constructed from information held by the RPCSEC_GSSv3 handle is constructed from information held by 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.
If the client sends a OFFLOAD_REVOKE to the source server to rescind If the client sends an OFFLOAD_CANCEL to the source server to rescind
the destination server's synchronous copy privilege, it uses the the destination server's synchronous copy privilege, it uses the
privileged "copy_from_auth" RPCSEC_GSSv3 handle and the privileged "copy_from_auth" RPCSEC_GSSv3 handle and the
cra_destination_server in OFFLOAD_REVOKE MUST be the same as the name cra_destination_server in OFFLOAD_CANCEL MUST be the same as the name
of the destination server specified in copy_from_auth_priv. The of the destination server specified in copy_from_auth_priv. The
source server will then delete the <"copy_from_auth", user id, source server will then delete the <"copy_from_auth", user id,
destination> privilege and fail any subsequent copy requests sent destination> privilege and fail any subsequent copy requests sent
under the auspices of this privilege from the destination server. under the auspices of this privilege from the destination server.
The client MUST destroy both the "copy_from_auth" and the The client MUST destroy both the "copy_from_auth" and the
"copy_to_auth" RPCSEC_GSSv3 handles. "copy_to_auth" RPCSEC_GSSv3 handles.
If the client sends a OFFLOAD_STATUS to the destination server to If the client sends an OFFLOAD_STATUS to the destination server to
check on the status of an asynchronous copy, it uses the privileged check on the status of an asynchronous copy, it uses the privileged
"copy_to_auth" RPCSEC_GSSv3 handle and the osa_stateid in "copy_to_auth" RPCSEC_GSSv3 handle and the osa_stateid in
OFFLOAD_STATUS MUST be the same as the wr_callback_id specified in OFFLOAD_STATUS MUST be the same as the wr_callback_id specified in
the "copy_to_auth" privilege stored on the destiniation server. the "copy_to_auth" privilege stored on the destination server.
If the client sends a OFFLOAD_ABORT to the destination server to If the client sends an OFFLOAD_CANCEL to the destination server to
cancel an asynchronous copy, it uses the privileged "copy_to_auth" cancel an asynchronous copy, it uses the privileged "copy_to_auth"
RPCSEC_GSSv3 handle and the oaa_stateid in OFFLOAD_ABORT MUST be the RPCSEC_GSSv3 handle and the oaa_stateid in OFFLOAD_CANCEL MUST be the
same as the wr_callback_id specified in the "copy_to_auth" privilege same as the wr_callback_id specified in the "copy_to_auth" privilege
stored on the destiniation server. The destiniation server will then stored on the destination server. The destination server will then
delete the <"copy_to_auth", user id, source list, nounce, nounce MIC, delete the <"copy_to_auth", user id, source list, nounce, nounce MIC,
context handle, handle version> privilege and the associated context handle, handle version> privilege and the associated
"copy_confirm_auth" RPCSEC_GSSv3 handle. The client MUST destroy "copy_confirm_auth" RPCSEC_GSSv3 handle. The client MUST destroy
both the copy_to_auth and copy_from_auth RPCSEC_GSSv3 handles. both the copy_to_auth and copy_from_auth RPCSEC_GSSv3 handles.
4.4.1.3. Inter-Server Copy via ONC RPC without RPCSEC_GSS 4.10.1.2. Inter-Server Copy via ONC RPC without RPCSEC_GSS
ONC RPC security flavors other than RPCSEC_GSS MAY be used with the ONC RPC security flavors other than RPCSEC_GSS MAY be used with the
server-side copy offload operations described in this chapter. In server-side copy offload operations described in this chapter. In
particular, host-based ONC RPC security flavors such as AUTH_NONE and particular, host-based ONC RPC security flavors such as AUTH_NONE and
AUTH_SYS MAY be used. If a host-based security flavor is used, a AUTH_SYS MAY be used. If a host-based security flavor is used, a
minimal level of protection for the server-to-server copy protocol is minimal level of protection for the server-to-server copy protocol is
possible. possible.
In the absence of a strong security mechanism designed for the In the absence of a strong security mechanism designed for the
purpose, the challenge is how the source server and destination purpose, the challenge is how the source server and destination
skipping to change at page 31, line 27 skipping to change at page 30, line 44
cannot defend against man-in-the-middle attacks after authentication cannot defend against man-in-the-middle attacks after authentication
or an eavesdropper that observes the random number on the wire. or an eavesdropper that observes the random number on the wire.
Other secure communication techniques (e.g., IPsec) are necessary to Other secure communication techniques (e.g., IPsec) are necessary to
block these attacks. block these attacks.
Servers SHOULD reject COPY_NOTIFY requests that do not use RPCSEC_GSS Servers SHOULD reject COPY_NOTIFY requests that do not use RPCSEC_GSS
with privacy, thus ensuring the URL in the COPY_NOTIFY reply is with privacy, thus ensuring the URL in the COPY_NOTIFY reply is
encrypted. For the same reason, clients SHOULD send COPY requests to encrypted. For the same reason, clients SHOULD send COPY requests to
the destination using RPCSEC_GSS with privacy. the destination using RPCSEC_GSS with privacy.
4.4.1.4. Inter-Server Copy without ONC RPC 4.10.1.3. Inter-Server Copy without ONC RPC
The same techniques as Section 4.4.1.3, 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 15.6) to communicate the client file IO_ADVISE procedure (Section 15.6) to communicate the client file
skipping to change at page 32, line 19 skipping to change at page 31, line 34
A sparse file is a common way of representing a large file without A sparse file is a common way of representing a large file without
having to utilize all of the disk space for it. Consequently, a having to utilize all of the disk space for it. Consequently, a
sparse file uses less physical space than its size indicates. This sparse file uses less physical space than its size indicates. This
means the file contains 'holes', byte ranges within the file that means the file contains 'holes', byte ranges within the file that
contain no data. Most modern file systems support sparse files, contain no data. Most modern file systems support sparse files,
including most UNIX file systems and NTFS, but notably not Apple's including most UNIX file systems and NTFS, but notably not Apple's
HFS+. Common examples of sparse files include Virtual Machine (VM) HFS+. Common examples of sparse files include Virtual Machine (VM)
OS/disk images, database files, log files, and even checkpoint OS/disk images, database files, log files, and even checkpoint
recovery files most commonly used by the HPC community. recovery files most commonly used by the HPC community.
In addition many modern filesystems support the concept of In addition many modern file systems support the concept of
'unwritten' or 'uninitialized' blocks, which have uninitialized space 'unwritten' or 'uninitialized' blocks, which have uninitialized space
allocated to them on disk, but will return zeros until data is allocated to them on disk, but will return zeros until data is
written to them. Such functionality is already present in the data written to them. Such functionality is already present in the data
model of the pNFS Block/Volume Layout (see [RFC5663]). Uninitialized model of the pNFS Block/Volume Layout (see [RFC5663]). Uninitialized
blocks can thought as holes inside a space reservation window. blocks can thought as holes inside a space reservation window.
If an application reads a hole in a sparse file, the file system must If an application reads a hole in a sparse file, the file system must
return all zeros to the application. For local data access there is return all zeros to the application. For local data access there is
little penalty, but with NFS these zeroes must be transferred back to little penalty, but with NFS these zeroes must be transferred back to
the client. If an application uses the NFS client to read data into the client. If an application uses the NFS client to read data into
skipping to change at page 32, line 45 skipping to change at page 32, line 11
is recorded in the metadata for the file. So a 8G disk image might is recorded in the metadata for the file. So a 8G disk image might
be represented initially by a couple hundred bits in the inode and be represented initially by a couple hundred bits in the inode and
nothing on the disk. If the VM then writes 100M to a file in the nothing on the disk. If the VM then writes 100M to a file in the
middle of the image, there would now be two holes represented in the middle of the image, there would now be two holes represented in the
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 filesystem and is transparent to the application. What is underlying file system and is transparent to the application. What
needed are the abilities to read sparse files and to punch holes to is needed are the abilities to read sparse files and to punch holes
reinitialize the contents of a file. to reinitialize the contents of a file.
Two new operations DEALLOCATE (Section 15.5) and READ_PLUS Two new operations DEALLOCATE (Section 15.5) and READ_PLUS
(Section 15.11) are introduced. DEALLOCATE allows for the hole (Section 15.11) 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.
skipping to change at page 35, line 23 skipping to change at page 34, line 38
The following operations and attributes can be used to resolve these The following operations and attributes can be used to resolve these
issues: issues:
space_freed This attribute specifies the space freed when a file is space_freed This attribute specifies the space freed when a file is
deleted, taking block sharing into consideration. deleted, taking block sharing into consideration.
DEALLOCATE This operation delallocates the blocks backing a region DEALLOCATE This operation delallocates the blocks backing a region
of the file. of the file.
WRITE_SAME This operation zeros the blocks backing a region of the
file. It does not deallocate the blocks, so it does not reduce
the space reservation.
READ_PLUS or SEEK These operations can return the reservation status
of blocks backing a region of the file.
If space_used of a file is interpreted to mean the size in bytes of If space_used of a file is interpreted to mean the size in bytes of
all disk blocks pointed to by the inode of the file, then shared all disk blocks pointed to by the inode of the file, then shared
blocks get double counted, over-reporting the space utilization. blocks get double counted, over-reporting the space utilization.
This also has the adverse effect that the deletion of a file with This also has the adverse effect that the deletion of a file with
shared blocks frees up less than space_used bytes. shared blocks frees up less than space_used bytes.
On the other hand, if space_used is interpreted to mean the size in On the other hand, if space_used is interpreted to mean the size in
bytes of those disk blocks unique to the inode of the file, then bytes of those disk blocks unique to the inode of the file, then
shared blocks are not counted in any file, resulting in under- shared blocks are not counted in any file, resulting in under-
reporting of the space utilization. reporting of the space utilization.
skipping to change at page 36, line 13 skipping to change at page 35, line 20
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 this problem 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.
7.2. Space Reservation Information
enum space_info4 {
SPACE_RESERVED4 = 0,
SPACE_UNRESERVED4 = 1,
SPACE_UNKNOWN4 = 2
};
The space_info4 type is used to report the reservation space in the
READ_PLUS (see Section 15.11) and SEEK (see Section 15.12 operations
to report the reservation state of a data block or hole. A data
block or hole may either be reserved, that means a future write MUST
not return NFS4ERR_NOSPC, or it might be unreserved in which case a
future write may return NFS4ERR_NOSPC. Servers may not know the
allocation state, in which case it might return unknown in the
space_info fields in the READ_PLUS and SEEK return values.
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.
skipping to change at page 37, line 14 skipping to change at page 36, line 5
network, corruption due to translation between big and little network, corruption due to translation between big and little
endian architectures are detectable. For example, 0xF0DEDEF0 has endian architectures are detectable. For example, 0xF0DEDEF0 has
the same bit pattern in both architectures. the same bit pattern in both architectures.
Applications already impose structures on files [Strohm11] and detect Applications already impose structures on files [Strohm11] and detect
corruption in data blocks [Ashdown08]. What they are not able to do corruption in data blocks [Ashdown08]. What they are not able to do
is efficiently transfer and store ADBs. To initialize a file with is efficiently transfer and store ADBs. To initialize a file with
ADBs, the client must send each full ADB to the server and that must ADBs, the client must send each full ADB to the server and that must
be stored on the server. be stored on the server.
In this section, we are going to define a framework for transferring In this section, we define a framework for transferring the ADB from
the ADB from client to server and present one approach to detecting client to server and present one approach to detecting corruption in
corruption in a given ADB implementation. a given ADB implementation.
8.1. Generic Framework 8.1. Generic Framework
We want the representation of the ADB to be flexible enough to We want the representation of the ADB to be flexible enough to
support many different applications. The most basic approach is no support many different applications. The most basic approach is no
imposition of a block at all, which means we are working with the raw imposition of a block at all, which means we are working with the raw
bytes. Such an approach would be useful for storing holes, punching bytes. Such an approach would be useful for storing holes, punching
holes, etc. In more complex deployments, a server might be holes, etc. In more complex deployments, a server might be
supporting multiple applications, each with their own definition of supporting multiple applications, each with their own definition of
the ADB. One might store the ADBN at the start of the block and then the ADB. One might store the ADBN at the start of the block and then
skipping to change at page 41, line 23 skipping to change at page 40, line 12
the usual DAC checks (ACLs and permission bits) will be performed to the usual DAC checks (ACLs and permission bits) will be performed to
ensure that proper file ownership is enforced. In addition a MAC ensure that proper file ownership is enforced. In addition a MAC
system MAY be employed on the client, server, or both to enforce system MAY be employed on the client, server, or both to enforce
additional policy on what subjects may modify security label additional policy on what subjects may modify security label
information. information.
The second change is to provide methods for the client to determine The second change is to provide methods for the client to determine
if the security label has changed. A client which needs to know if a if the security label has changed. A client which needs to know if a
label is going to change SHOULD request a delegation on that file. label is going to change SHOULD request a delegation on that file.
In order to change the security label, the server will have to recall In order to change the security label, the server will have to recall
all delegations. This will inform the client of the change. If a all delegations. This will inform the client of the change.
client wants to detect if the label has changed, it MAY use VERIFY
and NVERIFY on FATTR4_CHANGE_SEC_LABEL to detect that the
FATTR4_SEC_LABEL has been modified.
An additional useful change would be modification to the RPC layer An additional useful change would be modification to the RPC layer
used in NFSv4 to allow RPC calls to carry security labels. Such used in NFSv4 to allow RPC calls to carry security labels. Such
modifications are outside the scope of this document (see modifications are outside the scope of this document (see
[rpcsec_gssv3]). [rpcsec_gssv3]).
9.2. Definitions 9.2. Definitions
Label Format Specifier (LFS): is an identifier used by the client to Label Format Specifier (LFS): is an identifier used by the client to
establish the syntactic format of the security label and the establish the syntactic format of the security label and the
skipping to change at page 44, line 21 skipping to change at page 43, line 5
Consider a system in which the clients enforce MAC checks and and the Consider a system in which the clients enforce MAC checks and and the
server has a very simple security system which just stores the server has a very simple security system which just stores the
labels. In this system, the MAC label check always allows access, labels. In this system, the MAC label check always allows access,
regardless of the subject label. regardless of the subject label.
The way in which MAC labels are enforced is by the client. The The way in which MAC labels are enforced is by the client. The
security policies on the client can be such that the client does not security policies on the client can be such that the client does not
have access to the file unless it has a delegation. The recall of have access to the file unless it has a delegation. The recall of
the delegation will force the client to flush any cached content of the delegation will force the client to flush any cached content of
the file. The clients could also be configured to periodically the file.
VERIFY/NVERIFY the FATTR4_CHANGE_SEC_LABEL attribute to determine
when the label has changed. When a change is detected, then the
client could take the costlier action of retrieving the
FATTR4_SEC_LABEL.
9.4. pNFS Considerations 9.4. pNFS Considerations
The new FATTR4_SEC_LABEL attribute is metadata information and as The new FATTR4_SEC_LABEL attribute is metadata information and as
such the DS is not aware of the value contained on the MDS. such the DS is not aware of the value contained on the MDS.
Fortunately, the NFSv4.1 protocol [RFC5661] already has provisions Fortunately, the NFSv4.1 protocol [RFC5661] already has provisions
for doing access level checks from the DS to the MDS. In order for for doing access level checks from the DS to the MDS. In order for
the DS to validate the subject label presented by the client, it the DS to validate the subject label presented by the client, it
SHOULD utilize this mechanism. SHOULD utilize this mechanism.
skipping to change at page 48, line 11 skipping to change at page 46, line 39
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 13.2.1), and is per file system.
11. Security Considerations 11. Security Considerations
NFSv4.2 has all of the security concerns present in NFSv4.1 (see 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 Section 21 of [RFC5661]) and those present in the Server Side Copy
(see Section 4.4) and in Labeled NFS (see Section 9.7). (see Section 4.10) and in Labeled NFS (see Section 9.7).
12. Error Values 12. 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 12.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 12.1.3.1 |
| NFS4ERR_OFFLOAD_DENIED | 10091 | Section 12.1.2.1 | | NFS4ERR_OFFLOAD_DENIED | 10091 | Section 12.1.2.1 |
| NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 12.1.2.2 | | NFS4ERR_OFFLOAD_NO_REQS | 10094 | Section 12.1.2.2 |
| NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 12.1.2.3 | | NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 12.1.2.3 |
| NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 12.1.2.4 |
| NFS4ERR_UNION_NOTSUPP | 10090 | Section 12.1.1.1 | | NFS4ERR_UNION_NOTSUPP | 10090 | Section 12.1.1.1 |
| NFS4ERR_WRONG_LFS | 10092 | Section 12.1.3.2 | | NFS4ERR_WRONG_LFS | 10092 | Section 12.1.3.2 |
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
Table 1 Table 1
12.1.1. General Errors 12.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.
skipping to change at page 49, line 17 skipping to change at page 47, line 46
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) 12.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_PARTNER_NO_AUTH (Error Code 10089) 12.1.2.2. NFS4ERR_OFFLOAD_NO_REQS (Error Code 10094)
The copy offload operation is supported by both the source and the
destination, but the destination can not meet the client requirements
for either consecutive byte copy or synchronous copy. If the client
sees this error, it should either relax the requirements (if any) or
fall back to the normal copy semantics.
12.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.3. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088) 12.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 12.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) 12.1.3.1. NFS4ERR_BADLABEL (Error Code 10093)
skipping to change at page 51, line 24 skipping to change at page 50, line 12
| | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, | | | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, |
| | 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_REP_TOO_BIG, | | | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, | | | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| OFFLOAD_ABORT | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | | LAYOUTERROR | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, |
| | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, |
| | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, |
| | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, |
| | NFS4ERR_WRONG_TYPE |
| LAYOUTSTATS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_DEADSESSION, |
| | NFS4ERR_DELAY, NFS4ERR_DELEG_REVOKED, |
| | NFS4ERR_EXPIRED, NFS4ERR_FHEXPIRED, |
| | NFS4ERR_GRACE, NFS4ERR_INVAL, NFS4ERR_ISDIR, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOTSUPP, NFS4ERR_NO_GRACE, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNKNOWN_LAYOUTTYPE, NFS4ERR_WRONG_CRED, |
| | NFS4ERR_WRONG_TYPE |
| OFFLOAD_CANCEL | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, |
| | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, |
| | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| OFFLOAD_REVOKE | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_COMPLETE_ALREADY, NFS4ERR_DELAY, |
| | NFS4ERR_GRACE, NFS4ERR_INVALID, NFS4ERR_MOVED, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| OFFLOAD_STATUS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | | OFFLOAD_STATUS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, | | | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, |
| | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, | | | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, |
| | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, | | | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS | | | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| READ_PLUS | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | READ_PLUS | 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_EXPIRED, | | | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
skipping to change at page 54, line 13 skipping to change at page 53, line 26
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 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| change_attr_type | 79 | change_attr_type4 | R | Section 13.2.1 | | space_freed | 77 | length4 | R | Section 13.2.4 |
| sec_label | 80 | sec_label4 | R W | Section 13.2.2 | | change_attr_type | 78 | change_attr_type4 | R | Section 13.2.1 |
| change_sec_label | 77 | change_sec_label4 | R | Section 13.2.3 | | sec_label | 79 | sec_label4 | R W | Section 13.2.2 |
| space_freed | 78 | length4 | R | Section 13.2.4 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
Table 4 Table 4
13.2. Attribute Definitions 13.2. Attribute Definitions
13.2.1. Attribute 79: change_attr_type 13.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 55, line 13 skipping to change at page 54, line 25
preserved when writing to pNFS data servers. preserved when writing to pNFS data servers.
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute
value MUST be incremented by one unit for every atomic change to value MUST be incremented by one unit for every atomic change to
the file attributes, data, or directory contents. In the case the file attributes, data, or directory contents. In the case
where the client is writing to pNFS data servers, the number of where the client is writing to pNFS data servers, the number of
increments is not guaranteed to exactly match the number of increments is not guaranteed to exactly match the number of
writes. writes.
NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is
implemented as suggested in the NFSv4 spec implemented as suggested in [I-D.ietf-nfsv4-rfc3530bis] in terms
[I-D.ietf-nfsv4-rfc3530bis] in terms of the time_metadata of the time_metadata attribute.
attribute.
If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR, If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or
NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at
the very least that the change attribute is monotonically increasing, the very least that the change attribute is monotonically increasing,
which is sufficient to resolve the question of which value is the which is sufficient to resolve the question of which value is the
most recent. most recent.
If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then
by inspecting the value of the 'time_delta' attribute it additionally by inspecting the value of the 'time_delta' attribute it additionally
skipping to change at page 55, line 41 skipping to change at page 55, line 5
be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This
again allows it to detect changes made in parallel by another client. again allows it to detect changes made in parallel by another client.
The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the
same, but only if the client is not doing pNFS WRITEs. same, but only if the client is not doing pNFS WRITEs.
Finally, if the server does not support change_attr_type or if Finally, if the server does not support change_attr_type or if
NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an
effort to implement the change attribute in terms of the effort to implement the change attribute in terms of the
time_metadata attribute. time_metadata attribute.
13.2.2. Attribute 80: sec_label 13.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;
opaque slai_data<>; opaque slai_data<>;
}; };
skipping to change at page 56, line 38 skipping to change at page 55, line 43
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.
If a server supports sec_label, then it MUST also support If a server supports sec_label, then it MUST also support
change_sec_label. Any modification to sec_label MUST modify the change_sec_label. Any modification to sec_label MUST modify the
value for change_sec_label. value for change_sec_label.
13.2.3. Attribute 81: change_sec_label 13.2.3. Attribute 79: change_sec_label
The change_sec_label attribute is a read-only attribute per file. If The change_sec_label attribute is a read-only attribute per file. If
the value of sec_label for a file is not the same at two disparate the value of sec_label for a file is not the same at two disparate
times then the values of change_sec_label at those times MUST be times then the values of change_sec_label at those times MUST be
different as well. The value of change_sec_label MAY change at other different as well. The value of change_sec_label MAY change at other
times as well, but this should be rare, as that will require the times as well, but this should be rare, as that will require the
client to abort any operation in progress, re-read the label, and client to abort any operation in progress, re-read the label, and
retry the operation. As the sec_label is not bounded by size, this retry the operation. As the sec_label is not bounded by size, this
attribute allows for VERIFY and NVERIFY to quickly determine if the attribute allows for VERIFY and NVERIFY to quickly determine if the
sec_label has been modified. sec_label has been modified.
13.2.4. Attribute 78: space_freed 13.2.4. 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 14. 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 either OBSOLESCENT or MUST NOT implement.
skipping to change at page 58, line 43 skipping to change at page 57, line 45
| 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 | COPY (REQ) |
| OFFLOAD_ABORT | OPT | COPY (REQ) |
| COPY_NOTIFY | OPT | COPY (REQ) | | COPY_NOTIFY | OPT | COPY (REQ) |
| DEALLOCATE | OPT | | | DEALLOCATE | OPT | |
| OFFLOAD_REVOKE | OPT | COPY (REQ) |
| OFFLOAD_STATUS | OPT | COPY (REQ) |
| 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 | |
| GETATTR | REQ | | | GETATTR | REQ | |
| GETDEVICEINFO | OPT | pNFS (REQ) | | GETDEVICEINFO | OPT | pNFS (REQ) |
| GETDEVICELIST | OPT | pNFS (OPT) | | GETDEVICELIST | OPT | pNFS (OPT) |
| GETFH | REQ | | | GETFH | REQ | |
| GET_DIR_DELEGATION | OPT | DDELG (REQ) | | GET_DIR_DELEGATION | OPT | DDELG (REQ) |
| LAYOUTCOMMIT | OPT | pNFS (REQ) | | LAYOUTCOMMIT | OPT | pNFS (REQ) |
| LAYOUTGET | OPT | pNFS (REQ) | | LAYOUTGET | OPT | pNFS (REQ) |
| LAYOUTRETURN | OPT | pNFS (REQ) | | LAYOUTRETURN | OPT | pNFS (REQ) |
| LAYOUTERROR | 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_STATUS | OPT | COPY (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 60, line 36 skipping to change at page 59, line 39
| CB_RECALL_SLOT | REQ | | | CB_RECALL_SLOT | REQ | |
| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) | | CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS (REQ) |
| CB_SEQUENCE | OPT | FDELG, DDELG, pNFS | | CB_SEQUENCE | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
| CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS | | CB_WANTS_CANCELLED | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
+-------------------------+-------------------+---------------------+ +-------------------------+-------------------+---------------------+
15. NFSv4.2 Operations 15. NFSv4.2 Operations
15.1. Operation 59: ALLOCATE 15.1. Operation 59: ALLOCATE - Reserve Space in A Region of a File
15.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;
}; };
15.1.2. RESULT 15.1.2. RESULT
struct ALLOCATE4res { struct ALLOCATE4res {
nfsstat4 ar_status; nfsstat4 ar_status;
}; };
15.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
skipping to change at page 61, line 37 skipping to change at page 61, line 4
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.
15.2. Operation 60: COPY - Initiate a server-side copy 15.2. Operation 60: COPY - Initiate a server-side copy
15.2.1. ARGUMENT 15.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_synchronous;
netloc4 ca_source_server<>; netloc4 ca_source_server<>;
}; };
15.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;
}; };
union COPY4res switch (nfsstat4 cr_status) { struct COPY4res {
case NFS4_OK: nfsstat4 cr_status;
write_response4 resok4; write_response4 cr_response;
default: bool cr_consecutive;
length4 cr_bytes_copied; bool cr_synchronous;
}; };
15.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.
skipping to change at page 63, line 46 skipping to change at page 63, line 12
(zero) bytes, the amount of data copied is implementation dependent (zero) bytes, the amount of data copied is implementation dependent
(clients may guard against this case by specifying a non-zero count (clients may guard against this case by specifying a non-zero count
value or preventing modification of the source file as mentioned value or preventing modification of the source file as mentioned
above). above).
If the source offset or the source offset plus count is greater than If the source offset or the source offset plus count is greater than
or equal to the size of the source file, the operation will fail with or equal to the size of the source file, the operation will fail with
NFS4ERR_INVAL. The destination offset or destination offset plus NFS4ERR_INVAL. The destination offset or destination offset plus
count may be greater than the size of the destination file. This count may be greater than the size of the destination file. This
allows for the client to issue parallel copies to implement allows for the client to issue parallel copies to implement
operations such as "cat file1 file2 file3 file4 > dest". operations such as
% cat file1 file2 file3 file4 > dest
If the ca_source_server list is specified, then this is an inter- If the ca_source_server list is specified, then this is an inter-
server copy operation and the source file is on a remote server. The server copy operation and the source file is on a remote server. The
client is expected to have previously issued a successful COPY_NOTIFY client is expected to have previously issued a successful COPY_NOTIFY
request to the remote source server. The ca_source_server list MUST request to the remote source server. The ca_source_server list MUST
be the same as the COPY_NOTIFY response's cnr_source_server list. If be the same as the COPY_NOTIFY response's cnr_source_server list. If
the client includes the entries from the COPY_NOTIFY response's the client includes the entries from the COPY_NOTIFY response's
cnr_source_server list in the ca_source_server list, the source cnr_source_server list in the ca_source_server list, the source
server can indicate a specific copy protocol for the destination server can indicate a specific copy protocol for the destination
server to use by returning a URL, which specifies both a protocol server to use by returning a URL, which specifies both a protocol
service and server name. Server-to-server copy protocol service and server name. Server-to-server copy protocol
considerations are described in Section 4.2.5 and Section 4.4.1. considerations are described in Section 4.7 and Section 4.10.1.
If ca_consecutive is set, then the client has specified that the copy
protocol selected MUST copy bytes in consecutive order from
ca_src_offset to ca_count. If the destination server cannot meet
this requirement, then it MUST return an error of
NFS4ERR_OFFLOAD_NO_REQS and set cr_consecutive to be false.
Likewise, if ca_synchronous is set, then the client has required that
the copy protocol selected MUST perform a synchronous copy. If the
destination server cannot meet this requirement, then it MUST return
an error of NFS4ERR_OFFLOAD_NO_REQS and set cr_synchronous to be
false.
If both are set by the client, then the destination SHOULD try to
determine if it can respond to both requirements at the same time.
If it cannot make that determination, it must set to false the one it
can and set to true the other. The client, upon getting an
NFS4ERR_OFFLOAD_NO_REQS error, has to examine both cr_consecutive and
cr_synchronous against the respective values of ca_consecutive and
ca_synchronous to determine the possible requirement not met. It
MUST be prepared for the destination server not being able to
determine both requirements at the same time.
Upon receiving the NFS4ERR_OFFLOAD_NO_REQS error, the client has to
determine if it wants to either re-request the copy with a relaxed
set of requirements or if it wants to revert to manually copying the
data. If it decides to manually copy the data and this is a remote
copy, then the client is responsible for informing the source that
the earlier COPY_NOTIFY is no longer valid by sending it an
OFFLOAD_CANCEL.
The copying of any and all attributes on the source file is the The copying of any and all attributes on the source file is the
responsibility of both the client and the copy protocol. Any responsibility of both the client and the copy protocol. Any
attribute which is both exposed via the NFS protocol on the source attribute which is both exposed via the NFS protocol on the source
file and set SHOULD be copied to the destination file. Any attribute file and set SHOULD be copied to the destination file. Any attribute
supported by the destination server that is not set on the source supported by the destination server that is not set on the source
file SHOULD be left unset. If the client cannot copy an attribute file SHOULD be left unset. If the client cannot copy an attribute
from the source to destination, it MAY fail the copy transaction. from the source to destination, it MAY fail the copy transaction.
Metadata attributes not exposed via the NFS protocol SHOULD be copied Metadata attributes not exposed via the NFS protocol SHOULD be copied
skipping to change at page 64, line 36 skipping to change at page 64, line 33
source file. After the copy process completes, the client MAY source file. After the copy process completes, the client MAY
attempt to duplicate named attributes using standard NFSv4 attempt to duplicate named attributes using standard NFSv4
operations. However, the destination file's named attribute operations. However, the destination file's named attribute
capabilities MAY be different from the source file's named attribute capabilities MAY be different from the source file's named attribute
capabilities. capabilities.
If the operation does not result in an immediate failure, the server If the operation does not result in an immediate failure, the server
will return NFS4_OK, and the CURRENT_FH will remain the destination's will return NFS4_OK, and the CURRENT_FH will remain the destination's
filehandle. filehandle.
If an immediate failure does occur, cr_bytes_copied will be set to
the number of bytes copied to the destination file before the error
occurred. The cr_bytes_copied value indicates the number of bytes
copied but not which specific bytes have been copied.
A return of NFS4_OK indicates that either the operation is complete
or the operation was initiated and a callback will be used to deliver
the final status of the operation.
If the wr_callback_id is returned, this indicates that the operation If the wr_callback_id is returned, this indicates that the operation
was initiated and a CB_OFFLOAD callback will deliver the final was initiated and a CB_OFFLOAD callback will deliver the final
results of the operation. The wr_callback_id stateid is termed a results of the operation. The wr_callback_id stateid is termed a
copy stateid in this context. The server is given the option of copy stateid in this context. The server is given the option of
returning the results in a callback because the data may require a returning the results in a callback because the data may require a
relatively long period of time to copy. relatively long period of time to copy.
If no wr_callback_id is returned, the operation completed If no wr_callback_id is returned, the operation completed
synchronously and no callback will be issued by the server. The synchronously and no callback will be issued by the server. The
completion status of the operation is indicated by cr_status. completion status of the operation is indicated by cr_status.
If the copy completes successfully, either synchronously or If the copy completes successfully, either synchronously or
asynchronously, the data copied from the source file to the asynchronously, the data copied from the source file to the
destination file MUST appear identical to the NFS client. However, destination file MUST appear identical to the NFS client. However,
the NFS server's on disk representation of the data in the source the NFS server's on disk representation of the data in the source
file and destination file MAY differ. For example, the NFS server file and destination file MAY differ. For example, the NFS server
might encrypt, compress, deduplicate, or otherwise represent the on might encrypt, compress, deduplicate, or otherwise represent the on
disk data in the source and destination file differently. disk data in the source and destination file differently.
If a failure does occur for a synchronous copy, wr_count will be set
to the number of bytes copied to the destination file before the
error occurred. If cr_consecutive is true, then the bytes were
copied in order. If the failure occured for an asynchronous copy,
then the client will have gotten the notification of the consecutive
copy order when it got the copy stateid. It will be able to
determine the bytes copied from the coa_bytes_copied in the
CB_OFFLOAD argument.
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
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
on the destination, then the last byte written to will determine the
new file size. The contents of any block not written to and past the
original size of the file will be as if a normal WRITE extended the
file.
15.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
15.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;
}; };
skipping to change at page 66, line 37 skipping to change at page 66, line 44
synchronized clocks, copy lease times are granted by the server as a synchronized clocks, copy lease times are granted by the server as a
time delta. To renew the copy lease time the client should resend time delta. To renew the copy lease time the client should resend
the same copy notification request to the source server. the same copy notification request to the source server.
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.
If the client wishes to perform an inter-server copy, the client MUST
send a COPY_NOTIFY to the source server. Therefore, the source
server MUST support COPY_NOTIFY.
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.
15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID 15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID
15.4.1. ARGUMENT 15.4.1. ARGUMENT
/* new */ /* new */
const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004;
15.4.2. RESULT 15.4.2. RESULT
Unchanged Unchanged
15.4.3. MOTIVATION 15.4.3. MOTIVATION
skipping to change at page 67, line 45 skipping to change at page 68, line 5
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 The NFS server SHOULD support client ID trunking, and if it does
and the EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a and the EXCHGID4_FLAG_SUPP_FENCE_OPS capability is enabled, then a
session ID created on one node of the storage cluster MUST be session ID created on one node of the storage cluster MUST be
destroyable via DESTROY_SESSION. In addition, DESTROY_CLIENTID destroyable via DESTROY_SESSION. In addition, DESTROY_CLIENTID
and an EXCHANGE_ID with a new verifier affects all sessions and an EXCHANGE_ID with a new verifier affects all sessions
regardless what node the sessions were created on. regardless what node the sessions were created on.
15.5. Operation 62: DEALLOCATE 15.5. Operation 62: DEALLOCATE - Unreserve Space in a Region of a File
15.5.1. ARGUMENT 15.5.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;
}; };
15.5.2. RESULT 15.5.2. RESULT
struct DEALLOCATE4res { struct DEALLOCATE4res {
skipping to change at page 68, line 14 skipping to change at page 68, line 19
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;
}; };
15.5.2. RESULT 15.5.2. RESULT
struct DEALLOCATE4res { struct DEALLOCATE4res {
nfsstat4 dr_status; nfsstat4 dr_status;
}; };
15.5.3. DESCRIPTION 15.5.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 aa_offset and aa_length respectively. in bytes of the region set in aa_offset and aa_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.
Situations may arise where da_offset and/or da_offset + da_length Situations may arise where da_offset and/or da_offset + da_length
will not be aligned to a boundary for which the server does will not be aligned to a boundary for which the server does
allocations or deallocations. For most file systems, this is the allocations or deallocations. For most file systems, this is the
block size of the filesystem. 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.
15.6. Operation 63: IO_ADVISE - Application I/O access pattern hints 15.6. Operation 63: IO_ADVISE - Application I/O access pattern hints
skipping to change at page 69, line 20 skipping to change at page 69, line 25
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,
IO_ADVISE4_READ = 8, IO_ADVISE4_READ = 8,
IO_ADVISE4_WRITE = 9, IO_ADVISE4_WRITE = 9,
IO_ADVISE4_INIT_PROXIMITY = 10 IO_ADVISE4_INIT_PROXIMITY = 10
}; };
struct IO_ADVISE4args { struct IO_ADVISE4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 iar_stateid; stateid4 iaa_stateid;
offset4 iar_offset; offset4 iaa_offset;
length4 iar_count; length4 iaa_count;
bitmap4 iar_hints; bitmap4 iaa_hints;
}; };
15.6.2. RESULT 15.6.2. RESULT
struct IO_ADVISE4resok { struct IO_ADVISE4resok {
bitmap4 ior_hints; bitmap4 ior_hints;
}; };
union IO_ADVISE4res switch (nfsstat4 _status) { union IO_ADVISE4res switch (nfsstat4 ior_status) {
case NFS4_OK: case NFS4_OK:
IO_ADVISE4resok resok4; IO_ADVISE4resok resok4;
default: default:
void; void;
}; };
15.6.3. DESCRIPTION 15.6.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 iar_offset by iar_offset and iar_count. The byte range specified by iaa_offset
and iar_count need not currently exist in the file, but the iar_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 iar_count is 0, will apply to the byte range when it does exist. If iaa_count is 0,
all data following iar_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:
IO_ADVISE4_NORMAL There is no advice to give, this is the default IO_ADVISE4_NORMAL There is no advice to give, this is the default
behavior. behavior.
IO_ADVISE4_SEQUENTIAL Expects to access the specified data IO_ADVISE4_SEQUENTIAL Expects to access the specified data
sequentially from lower offsets to higher offsets. sequentially from lower offsets to higher offsets.
skipping to change at page 71, line 37 skipping to change at page 71, line 44
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.
15.6.5. IO_ADVISE4_INIT_PROXIMITY 15.6.5. IO_ADVISE4_INIT_PROXIMITY
The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and conveys The IO_ADVISE4_INIT_PROXIMITY hint is non-posix in origin and can be
that the client has recently accessed the byte range in its own used to convey that the client has recently accessed the byte range
cache. I.e., it has not accessed it on the server, but it has in its own cache. I.e., it has not accessed it on the server, but it
locally. When the server reaches resource exhaustion, knowing which has locally. When the server reaches resource exhaustion, knowing
data is more important allows the server to make better choices about which data is more important allows the server to make better choices
which data to, for example purge from a cache, or move to secondary about which data to, for example purge from a cache, or move to
storage. It also informs the server which delegations are more secondary storage. It also informs the server which delegations are
important, since if delegations are working correctly, once delegated more important, since if delegations are working correctly, once
to a client and the client has read the content for that byte range, delegated to a client and the client has read the content for that
a server might never receive another read request for that byte byte range, a server might never receive another read request for
range. that byte range.
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
between the client and the storage devices. The metadata server is
then free to use this information about client I/O to optimize the
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.
15.6.6. pNFS File Layout Data Type Considerations 15.6.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.
So 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
NFSv4.2 or higher. Any file's layout obtained with NFSv4.1 MUST NOT metadata servers running NFSv4.2 or higher. Any file's layout
have NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained obtained from a NFSv4.1 metadata server MUST NOT have
with NFSv4.2 MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS set. If the NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained with a
client does not implement IO_ADVISE, then it MUST ignore NFSv4.2 metadata server MAY have NFL42_UFLG_IO_ADVISE_THRU_MDS set.
NFL42_UFLG_IO_ADVISE_THRU_MDS. However, if the layout utilizes NFSv4.1 storage devices, the
IO_ADVISE operation cannot be sent to them.
If NFL42_UFLG_IO_ADVISE_THRU_MDS is set, the client MUST send the If NFL42_UFLG_IO_ADVISE_THRU_MDS is set, the client MUST send the
IO_ADVISE operation to the MDS in order for it to be honored by the IO_ADVISE operation to the MDS in order for it to be honored by the
DS. Once the MDS receives the IO_ADVISE operation, it will DS. Once the MDS receives the IO_ADVISE operation, it will
communicate the advice to each DS. communicate the advice to each DS.
If NFL42_UFLG_IO_ADVISE_THRU_MDS is not set, then the client SHOULD If NFL42_UFLG_IO_ADVISE_THRU_MDS is not set, then the client SHOULD
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
skipping to change at page 72, line 42 skipping to change at page 73, line 11
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.
15.6.6.1. Dense and Sparse Packing Considerations 15.6.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 iar_offset 0 really means iar_offset 10000 in the logical file, for iaa_offset 0 really means iaa_offset 10000 in the logical file,
then an IO_ADVISE for iar_offset 0 means iar_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 iar_offset 0 really means iar_offset 0 in the logical file, then for iaa_offset 0 really means iaa_offset 0 in the logical file, then
an IO_ADVISE for iar_offset 0 means iar_offset 0 in the logical file. an IO_ADVISE for iaa_offset 0 means iaa_offset 0 in the logical file.
E.g., if NFL4_UFLG_DENSE is present, the stripe unit is 1000 bytes E.g., if NFL4_UFLG_DENSE is present, the stripe unit is 1000 bytes
and the stripe count is 10, and the dense DS file is serving and the stripe count is 10, and the dense DS file is serving
iar_offset 0. A READ or WRITE to the DS for iar_offsets 0, 1000, iar_offset 0. A READ or WRITE to the DS for iaa_offsets 0, 1000,
2000, and 3000, really mean iar_offsets 10000, 20000, 30000, and 2000, and 3000, really mean iaa_offsets 10000, 20000, 30000, and
40000 (implying a stripe count of 10 and a stripe unit of 1000), then 40000 (implying a stripe count of 10 and a stripe unit of 1000), then
an IO_ADVISE sent to the same DS with an iar_offset of 500, and a an IO_ADVISE sent to the same DS with an iaa_offset of 500, and an
iar_count of 3000 means that the IO_ADVISE applies to these byte iaa_count of 3000 means that the IO_ADVISE applies to these byte
ranges of the dense DS file: ranges of the dense DS file:
- 500 to 999 - 500 to 999
- 1000 to 1999 - 1000 to 1999
- 2000 to 2999 - 2000 to 2999
- 3000 to 3499 - 3000 to 3499
I.e., the contiguous range 500 to 3499 as specified in IO_ADVISE. I.e., the contiguous range 500 to 3499 as specified in IO_ADVISE.
It also applies to these byte ranges of the logical file: It also applies to these byte ranges of the logical file:
- 10500 to 10999 (500 bytes) - 10500 to 10999 (500 bytes)
- 20000 to 20999 (1000 bytes) - 20000 to 20999 (1000 bytes)
- 30000 to 30999 (1000 bytes) - 30000 to 30999 (1000 bytes)
- 40000 to 40499 (500 bytes) - 40000 to 40499 (500 bytes)
(total 3000 bytes) (total 3000 bytes)
E.g., if NFL4_UFLG_DENSE is absent, the stripe unit is 250 bytes, the E.g., if NFL4_UFLG_DENSE is absent, the stripe unit is 250 bytes, the
stripe count is 4, and the sparse DS file is serving iar_offset 0. stripe count is 4, and the sparse DS file is serving iaa_offset 0.
Then a READ or WRITE to the DS for iar_offsets 0, 1000, 2000, and Then a READ or WRITE to the DS for iaa_offsets 0, 1000, 2000, and
3000, really mean iar_offsets 0, 1000, 2000, and 3000 in the logical 3000, really means iaa_offsets 0, 1000, 2000, and 3000 in the logical
file, keeping in mind that on the DS file,. byte ranges 250 to 999, file, keeping in mind that on the DS file, byte ranges 250 to 999,
1250 to 1999, 2250 to 2999, and 3250 to 3999 are not accessible. 1250 to 1999, 2250 to 2999, and 3250 to 3999 are not accessible.
Then an IO_ADVISE sent to the same DS with an iar_offset of 500, and Then an IO_ADVISE sent to the same DS with an iaa_offset of 500, and
a iar_count of 3000 means that the IO_ADVISE applies to these byte a iaa_count of 3000 means that the IO_ADVISE applies to these byte
ranges of the logical file and the sparse DS file: ranges of the logical file and the sparse DS file:
- 500 to 999 (500 bytes) - no effect - 500 to 999 (500 bytes) - no effect
- 1000 to 1249 (250 bytes) - effective - 1000 to 1249 (250 bytes) - effective
- 1250 to 1999 (750 bytes) - no effect - 1250 to 1999 (750 bytes) - no effect
- 2000 to 2249 (250 bytes) - effective - 2000 to 2249 (250 bytes) - effective
- 2250 to 2999 (750 bytes) - no effect - 2250 to 2999 (750 bytes) - no effect
- 3000 to 3249 (250 bytes) - effective - 3000 to 3249 (250 bytes) - effective
- 3250 to 3499 (250 bytes) - no effect - 3250 to 3499 (250 bytes) - no effect
(subtotal 2250 bytes) - no effect (subtotal 2250 bytes) - no effect
skipping to change at page 74, line 7 skipping to change at page 74, line 25
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.
15.7. Changes to Operation 51: LAYOUTRETURN 15.7. Operation 64: LAYOUTERROR - Provide Errors for the Layout
15.7.1. Introduction
In the pNFS description provided in [RFC5661], the client is not
capable of relaying an error code from the DS to the MDS. In the
specification of the Object Layout Type [RFC5664], use is made of the
opaque lrf_body field of the LAYOUTRETURN argument to do such a
relaying of error codes. In this section, we define a new data
structure to enable the passing of error codes back to the MDS and
provide some guidelines on what both the client and MDS should expect
in such circumstances.
There are two broad classes of errors, transient and persistent. The
client SHOULD strive to only use this new mechanism to report
persistent errors. It MUST be able to deal with transient issues by
itself. Also, while the client might consider an issue to be
persistent, it MUST be prepared for the MDS to consider such issues
to be transient. A prime example of this is if the MDS fences off a
client from either a stateid or a filehandle. The client will get an
error from the DS and might relay either NFS4ERR_ACCESS or
NFS4ERR_BAD_STATEID back to the MDS, with the belief that this is a
hard error. If the MDS is informed by the client that there is an
error, it can safely ignore that. For it, the mission is
accomplished in that the client has returned a layout that the MDS
had most likely recalled.
The client might also need to inform the MDS that it cannot reach one
or more of the DSes. While the MDS can detect the connectivity of
both of these paths:
o MDS to DS
o MDS to client 15.7.1. ARGUMENT
it cannot determine if the client and DS path is working. As with struct layoutupdate4 {
the case of the DS passing errors to the client, it must be prepared layouttype4 lou_type;
for the MDS to consider such outages as being transitory. opaque lou_body<>;
};
The existing LAYOUTRETURN operation is extended by introducing a new struct device_error4 {
data structure to report errors, layoutreturn_device_error4. Also, deviceid4 de_deviceid;
layoutreturn_device_error4 is introduced to enable an array of errors nfsstat4 de_status;
to be reported. nfs_opnum4 de_opnum;
};
15.7.2. ARGUMENT struct LAYOUTERROR4args {
/* CURRENT_FH: file */
offset4 lea_offset;
length4 lea_length;
stateid4 lea_stateid;
device_error4 lea_errors;
};
The ARGUMENT specification of the LAYOUTRETURN operation in section 15.7.2. RESULT
18.44.1 of [RFC5661] is augmented by the following XDR code
[RFC4506]:
struct layoutreturn_device_error4 { struct LAYOUTERROR4res {
deviceid4 lrde_deviceid; nfsstat4 ler_status;
nfsstat4 lrde_status;
nfs_opnum4 lrde_opnum;
}; };
struct layoutreturn_error_report4 { 15.7.3. DESCRIPTION
layoutreturn_device_error4 lrer_errors<>;
};
15.7.3. RESULT The client can use LAYOUTERROR to inform the metadata server about
errors in its interaction with the layout represented by the current
filehandle, client ID (derived from the session ID in the preceding
SEQUENCE operation), byte-range (lea_offset + lea_length), and
lea_stateid.
The RESULT of the LAYOUTRETURN operation is unchanged; see section Each individual device_error4 describes a single error associated
18.44.2 of [RFC5661]. with a storage device, which is identified via de_deviceid. If the
Layout Type supports NFSv4 operations, then the operation which
returned the error is identified via de_opnum. If the Layout Type
does not support NFSv4 operations, then it MAY chose to either map
the operation onto one of the allowed operations which can be sent to
a storage device with the File Layout Type (see Section 3.3) or it
can signal no support for operations by marking de_opnum with the
ILEGAL operation. Finally the NFS error value (nfsstat4) encountered
is provided via de_status and may consist of the following error
codes:
15.7.4. DESCRIPTION NFS4ERR_NXIO: The client was unable to establish any communication
with the storage device.
The following text is added to the end of the LAYOUTRETURN operation NFS4ERR_*: The client was able to establish communication with the
DESCRIPTION in section 18.44.3 of [RFC5661]. storage device and is returning one of the allowed error codes for
the operation denoted by de_opnum.
When a client uses LAYOUTRETURN with a type of LAYOUTRETURN4_FILE, Note that while the metadata server may return an error associated
then if the lrf_body field is NULL, it indicates to the MDS that the with the layout stateid or the open file, it MUST NOT return an error
client experienced no errors. If lrf_body is non-NULL, then the in the processing of the errors. If LAYOUTERROR is in a compound
field references error information which is layout type specific. before LAYOUTRETURN, it MUST NOT introduce an error other than what
I.e., the Object Layout Type can continue to utilize lrf_body as LAYOUTRETURN would already encounter.
specified in [RFC5664]. For both File [RFC5661] and Block [RFC5663]
Layout Types, the field references a layoutreturn_device_error4,
which contains an array of layoutreturn_device_error4.
Each individual layoutreturn_device_error4 describes a single error 15.7.4. IMPLEMENTATION
associated with a DS, which is identified via lrde_deviceid. The
operation which returned the error is identified via lrde_opnum.
Finally the NFS error value (nfsstat4) encountered is provided via
lrde_status and may consist of the following error codes:
NFS4ERR_NXIO: The client was unable to establish any communication There are two broad classes of errors, transient and persistent. The
with the DS. client SHOULD strive to only use this new mechanism to report
persistent errors. It MUST be able to deal with transient issues by
itself. Also, while the client might consider an issue to be
persistent, it MUST be prepared for the metadata server to consider
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
filehandle. The client will get an error from the storage device and
might relay either NFS4ERR_ACCESS or NFS4ERR_BAD_STATEID back to the
metadata server, with the belief that this is a hard error. If the
metadata server is informed by the client that there is an error, it
can safely ignore that. For it, the mission is accomplished in that
the client has returned a layout that the metadata server had most
likely recalled.
NFS4ERR_*: The client was able to establish communication with the The client might also need to inform the metadata server that it
DS and is returning one of the allowed error codes for the cannot reach one or more of the storage devices. While the metadata
operation denoted by lrde_opnum. server can detect the connectivity of both of these paths:
15.7.5. IMPLEMENTATION o metadata server to storage device
The following text is added to the end of the LAYOUTRETURN operation o metadata server to client
IMPLEMENTATION in section 18.4.4 of [RFC5661].
it cannot determine if the client and storage device path is working.
As with the case of the storage device passing errors to the client,
it must be prepared for the metadata server to consider such outages
as being transitory.
Clients are expected to tolerate transient storage device errors, and Clients are expected to tolerate transient storage device errors, and
hence clients SHOULD NOT use the LAYOUTRETURN error handling for hence clients SHOULD NOT use the LAYOUTERROR error handling for
device access problems that may be transient. The methods by which a device access problems that may be transient. The methods by which a
client decides whether a device access problem is transient vs. client decides whether a device access problem is transient vs
persistent are implementation-specific, but may include retrying I/Os persistent are implementation-specific, but may include retrying I/Os
to a data server under appropriate conditions. to a data server under appropriate conditions.
When an I/O fails to a storage device, the client SHOULD retry the When an I/O fails to a storage device, the client SHOULD retry the
failed I/O via the MDS. In this situation, before retrying the I/O, failed I/O via the metadata server. In this situation, before
the client SHOULD return the layout, or the affected portion thereof, retrying the I/O, the client SHOULD return the layout, or the
and SHOULD indicate which storage device or devices was problematic. affected portion thereof, and SHOULD indicate which storage device or
The client needs to do this when the DS is being unresponsive in devices was problematic. The client needs to do this when the
order to fence off any failed write attempts, and ensure that they do storage device is being unresponsive in order to fence off any failed
not end up overwriting any later data being written through the MDS. write attempts, and ensure that they do not end up overwriting any
If the client does not do this, the MDS MAY issue a layout recall later data being written through the metadata server. If the client
does not do this, the metadata server MAY issue a layout recall
callback in order to perform the retried I/O. callback in order to perform the retried I/O.
The client needs to be cognizant that since this error handling is The client needs to be cognizant that since this error handling is
optional in the MDS, the MDS may silently ignore this functionality. optional in the metadata server, the metadata server may silently
Also, as the MDS may consider some issues the client reports to be ignore this functionality. Also, as the metadata server may consider
expected (see Section 15.7.1), the client might find it difficult to some issues the client reports to be expected, the client might find
detect a MDS which has not implemented error handling via it difficult to detect a metadata server which has not implemented
LAYOUTRETURN. error handling via LAYOUTERROR.
If an MDS is aware that a storage device is proving problematic to a If an metadata server is aware that a storage device is proving
client, the MDS SHOULD NOT include that storage device in any pNFS problematic to a client, the metadata server SHOULD NOT include that
layouts sent to that client. If the MDS is aware that a storage storage device in any pNFS layouts sent to that client. If the
device is affecting many clients, then the MDS SHOULD NOT include metadata server is aware that a storage device is affecting many
that storage device in any pNFS layouts sent out. If a client asks clients, then the metadata server SHOULD NOT include that storage
for a new layout for the file from the MDS, it MUST be prepared for device in any pNFS layouts sent out. If a client asks for a new
the MDS to return that storage device in the layout. The MDS might layout for the file from the metadata server, it MUST be prepared for
not have any choice in using the storage device, i.e., there might the metadata server to return that storage device in the layout. The
only be one possible layout for the system. Also, in the case of metadata server might not have any choice in using the storage
existing files, the MDS might have no choice in which storage devices device, i.e., there might only be one possible layout for the system.
to hand out to clients. Also, in the case of existing files, the metadata server might have
no choice in which storage devices to hand out to clients.
The MDS is not required to indefinitely retain per-client storage The metadata server is not required to indefinitely retain per-client
device error information. An MDS is also not required to storage device error information. An metadata server is also not
automatically reinstate use of a previously problematic storage required to automatically reinstate use of a previously problematic
device; administrative intervention may be required instead. storage device; administrative intervention may be required instead.
15.8. Operation 64: OFFLOAD_ABORT - Cancel a server-side copy 15.8. Operation 65: LAYOUTSTATS - Provide Statistics for the Layout
15.8.1. ARGUMENT 15.8.1. ARGUMENT
struct OFFLOAD_ABORT4args { struct layoutupdate4 {
/* CURRENT_FH: destination file */ layouttype4 lou_type;
stateid4 oaa_stateid; opaque lou_body<>;
}; };
15.8.2. RESULT struct io_info4 {
uint32_t ii_count;
uint64_t ii_bytes;
};
struct OFFLOAD_ABORT4res { struct LAYOUTSTATS4args {
nfsstat4 oar_status; /* CURRENT_FH: file */
offset4 lsa_offset;
length4 lsa_length;
stateid4 lsa_stateid;
io_info4 lsa_read;
io_info4 lsa_write;
layoutupdate4 lsa_layoutupdate;
}; };
15.8.3. DESCRIPTION 15.8.2. RESULT
struct LAYOUTSTATS4res {
nfsstat4 lsr_status;
};
OFFLOAD_ABORT is used for both intra- and inter-server asynchronous 15.8.3. DESCRIPTION
copies. The OFFLOAD_ABORT operation allows the client to cancel a
server-side copy operation that it initiated. This operation is sent
in a COMPOUND request from the client to the destination server.
This operation may be used to cancel a copy when the application that
requested the copy exits before the operation is completed or for
some other reason.
The request contains the filehandle and copy stateid cookies that act The client can use LAYOUTSTATS to inform the metadata server about
as the context for the previously initiated copy operation. its interaction with the layout represented by the current
filehandle, client ID (derived from the session ID in the preceding
SEQUENCE operation), byte-range (lea_offset + lea_length), and
lea_stateid. lsa_read and lsa_write allow for non-Layout Type
specific statistices to be reported. The remaining information the
client is presenting is specific to the Layout Type and presented in
the lea_layoutupdate field. Each Layout Type MUST define the
contents of lea_layoutupdate in their respective specifications.
The result's oar_status field indicates whether the cancel was LAYOUTSTATS can be combined with IO_ADVISE (see Section 15.6) to
successful or not. A value of NFS4_OK indicates that the copy augment the decision making process of how the metadata server
operation was canceled and no callback will be issued by the server. handles a file. I.e., IO_ADVISE lets the server know that a byte
A copy operation that is successfully canceled may result in none, range has a certain characteristic, but not necessarily the intensity
some, or all of the data and/or metadata copied. of that characteristic.
If the server supports asynchronous copies, the server is REQUIRED to Note that while the metadata server may return an error associated
support the OFFLOAD_ABORT operation. with the layout stateid or the open file, it MUST NOT return an error
in the processing of the statistics.
15.9. Operation 65: OFFLOAD_REVOKE - Revoke a destination server's copy 15.9. Operation 66: OFFLOAD_CANCEL - Stop an Offloaded Operation
privileges
15.9.1. ARGUMENT 15.9.1. ARGUMENT
struct OFFLOAD_REVOKE4args { struct OFFLOAD_CANCEL4args {
/* CURRENT_FH: source file */ /* CURRENT_FH: source file */
netloc4 ora_destination_server; stateid4 oca_stateid;
}; };
15.9.2. RESULT 15.9.2. RESULT
struct OFFLOAD_REVOKE4res { struct OFFLOAD_CANCEL4res {
nfsstat4 orr_status; nfsstat4 ocr_status;
}; };
15.9.3. DESCRIPTION 15.9.3. DESCRIPTION
This operation is used for an inter-server copy. A client sends this OFFLOAD_CANCEL is used by the client to terminate an asynchronous
operation in a COMPOUND request to the source server to revoke the operation, which is identifed both by CURRENT_FH and the oca_stateid.
authorization of a destination server identified by I.e., there can be multiple offloaded operations acting on the file,
ora_destination_server from reading the file specified by CURRENT_FH the stateid will identify to the server exactly which one is to be
on behalf of given user. If the ora_destination_server has already stopped.
begun copying the file, a successful return from this operation
indicates that further access will be prevented.
The ora_destination_server MUST be specified using the netloc4
network location format. The server is not required to resolve the
ora_destination_server address before completing this operation.
The client uses OFFLOAD_ABORT to inform the destination to stop the
active transfer and OFFLOAD_REVOKE to inform the source to not allow
any more copy requests from the destination. The OFFLOAD_REVOKE
operation is also useful in situations in which the source server
granted a very long or infinite lease on the destination server's
ability to read the source file and all copy operations on the source
file have been completed.
For a copy only involving one server (the source and destination are In the context of server-to-server copy, the client can send
on the same server), this operation is unnecessary. OFFLOAD_CANCEL to either the source or destination server, albeit
with a different stateid. The client uses OFFLOAD_CANCEL to inform
the destination to stop the active transfer and uses the stateid it
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
allow any more copying from the destination.
If the server supports COPY_NOTIFY, the server is REQUIRED to support OFFLOAD_CANCEL is also useful in situations in which the source
the OFFLOAD_REVOKE operation. server granted a very long or infinite lease on the destination
server's ability to read the source file and all copy operations on
the source file have been completed.
15.10. Operation 66: OFFLOAD_STATUS - Poll for status of a server-side 15.10. Operation 67: OFFLOAD_STATUS - Poll for Status of Asynchronous
copy Operation
15.10.1. ARGUMENT 15.10.1. ARGUMENT
struct OFFLOAD_STATUS4args { struct OFFLOAD_STATUS4args {
/* CURRENT_FH: destination file */ /* CURRENT_FH: destination file */
stateid4 osa_stateid; stateid4 osa_stateid;
}; };
15.10.2. RESULT 15.10.2. RESULT
struct OFFLOAD_STATUS4resok { struct OFFLOAD_STATUS4resok {
length4 osr_bytes_copied; 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;
}; };
15.10.3. DESCRIPTION 15.10.3. DESCRIPTION
OFFLOAD_STATUS is used for both intra- and inter-server asynchronous OFFLOAD_STATUS can be used by the client to query the progress of an
copies. The OFFLOAD_STATUS operation allows the client to poll the asynchronous operation, which is identifed both by CURRENT_FH and the
destination server to determine the status of an asynchronous copy osa_stateid. If this operation is successful, the number of bytes
operation. processed are returned to the client in the osr_count field.
If this operation is successful, the number of bytes copied are
returned to the client in the osr_bytes_copied field. The
osr_bytes_copied value indicates the number of bytes copied but not
which specific bytes have been copied.
If the optional osr_complete field is present, the copy has If the optional osr_complete field is present, the asynchronous
completed. In this case the status value indicates the result of the operation has completed. In this case the status value indicates the
asynchronous copy operation. In all cases, the server will also result of the asynchronous operation. In all cases, the server will
deliver the final results of the asynchronous copy in a CB_OFFLOAD also deliver the final results of the asynchronous operation in a
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 copy in any way. asynchronous operation in any way.
If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_STATUS operation.
15.11. Operation 67: READ_PLUS 15.11. Operation 68: READ_PLUS - READ Data or Holes from a File
15.11.1. ARGUMENT 15.11.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;
}; };
15.11.2. RESULT 15.11.2. RESULT
enum space_info4 {
SPACE_RESERVED4 = 0,
SPACE_UNRESERVED4 = 1,
SPACE_UNKNOWN4 = 2
};
struct data_info4 { struct data_info4 {
offset4 di_offset; offset4 di_offset;
length4 di_length; length4 di_length;
space_info4 di_reserved;
}; };
struct data4 { struct data4 {
offset4 d_offset; offset4 d_offset;
bool d_allocated;
opaque d_data<>; opaque d_data<>;
}; };
union read_plus_content switch (data_content4 rpc_content) { union read_plus_content switch (data_content4 rpc_content) {
case NFS4_CONTENT_DATA: case NFS4_CONTENT_DATA:
data4 rpc_data; data4 rpc_data;
case NFS4_CONTENT_HOLE: case NFS4_CONTENT_HOLE:
data_info4 rpc_hole; data_info4 rpc_hole;
default: default:
void; void;
}; };
/* /*
* Allow a return of an array of contents. * Allow a return of an array of contents.
*/ */
struct read_plus_res4 { struct read_plus_res4 {
bool rpr_eof; bool rpr_eof;
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:
skipping to change at page 82, line 26 skipping to change at page 82, line 18
the client. the client.
If the client specifies a rpa_count value of zero, the READ_PLUS If the client specifies a rpa_count value of zero, the READ_PLUS
succeeds and returns zero bytes of data. In all situations, the succeeds and returns zero bytes of data. In all situations, the
server may choose to return fewer bytes than specified by the client. server may choose to return fewer bytes than specified by the client.
The client needs to check for this condition and handle the condition The client needs to check for this condition and handle the condition
appropriately. appropriately.
If the client specifies an rpa_offset and rpa_count value that is If the client specifies an rpa_offset and rpa_count value that is
entirely contained within a hole of the file, then the di_offset and entirely contained within a hole of the file, then the di_offset and
di_length returned must be for the entire hole. This result is di_length returned MAY be for the entire hole. If the the owner has
considered valid until the file is changed (detected via the change a locked byte range covering rpa_offset and rpa_count entirely the
attribute). The server MUST provide the same semantics for the hole di_offset and di_length MUST NOT be extended outside the locked byte
as if the client read the region and received zeroes; the implied range. This result is considered valid until the file is changed
holes contents lifetime MUST be exactly the same as any other read (detected via the change attribute). The server MUST provide the
data. same semantics for the hole as if the client read the region and
received zeroes; the implied holes contents lifetime MUST be exactly
the same as any other read data.
If the client specifies an rpa_offset and rpa_count value that begins If the client specifies an rpa_offset and rpa_count value that begins
in a non-hole of the file but extends into hole the server should in a non-hole of the file but extends into hole the server should
return an array comprised of both data and a hole. The client MUST return an array comprised of both data and a hole. The client MUST
be prepared for the server to return a short read describing just the be prepared for the server to return a short read describing just the
data. The client will then issue another READ_PLUS for the remaining data. The client will then issue another READ_PLUS for the remaining
bytes, which the server will respond with information about the hole bytes, which the server will respond with information about the hole
in the file. in the file.
Except when special stateids are used, the stateid value for a Except when special stateids are used, the stateid value for a
skipping to change at page 83, line 25 skipping to change at page 83, line 19
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.
15.11.3.1. Note on Client Support of Arms of the Union 15.11.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 as to which arms of READ_PLUS it would support. In a later minor
minorversion, 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.
15.11.4. IMPLEMENTATION 15.11.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. One delta is that when the owner [RFC5661] also apply to READ_PLUS.
has a locked byte range, the server MUST return an array of
rpr_contents with values inside that range.
15.11.4.1. Additional pNFS Implementation Information 15.11.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.
skipping to change at page 85, line 5 skipping to change at page 84, line 45
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.
15.12. Operation 68: SEEK 15.12. Operation 69: SEEK - Find the Next Data or Hole
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
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.
15.12.1. ARGUMENT 15.12.1. ARGUMENT
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;
}; };
15.12.2. RESULT 15.12.2. RESULT
enum space_info4 {
SPACE_RESERVED4 = 0,
SPACE_UNRESERVED4 = 1,
SPACE_UNKNOWN4 = 2
};
struct data_info4 {
offset4 di_offset;
length4 di_length;
space_info4 di_reserved;
};
union seek_content switch (data_content4 content) {
case NFS4_CONTENT_DATA:
data_info4 sc_data;
case NFS4_CONTENT_HOLE:
data_info4 sc_hole;
default:
void;
};
struct seek_res4 { struct seek_res4 {
bool sr_eof; bool sr_eof;
seek_content sr_contents; offset4 sr_offset;
}; };
union SEEK4res switch (nfsstat4 status) { union SEEK4res switch (nfsstat4 sa_status) {
case NFS4_OK: case NFS4_OK:
seek_res4 resok4; seek_res4 resok4;
default: default:
void; void;
}; };
15.12.3. DESCRIPTION 15.12.3. DESCRIPTION
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
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.
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. For a hole, this must return the data_content4 in its in the file. If the server can not find a corresponding sa_what,
entirety. For data, it must not return the actual data. 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
that content.
SEEK must follow the same rules for stateids as READ_PLUS SEEK must follow the same rules for stateids as READ_PLUS
(Section 15.11.3). (Section 15.11.3).
If the server could not find a corresponding sa_what, then the status 15.13. Operation 70: WRITE_SAME - WRITE an ADB Multiple Times to a File
would still be NFS4_OK, but sr_eof would be TRUE. The sr_contents
would contain a zero-ed out content of the appropriate type.
15.13. Operation 69: WRITE_SAME
15.13.1. ARGUMENT 15.13.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;
length4 adb_block_count; length4 adb_block_count;
length4 adb_reloff_blocknum; length4 adb_reloff_blocknum;
count4 adb_block_num; count4 adb_block_num;
length4 adb_reloff_pattern; length4 adb_reloff_pattern;
opaque adb_pattern<>; opaque adb_pattern<>;
}; };
struct WRITE_SAME4args { struct WRITE_SAME4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 ws_stateid; stateid4 wsa_stateid;
stable_how4 ws_stable; stable_how4 wsa_stable;
app_data_block4 ws_adb; app_data_block4 wsa_adb;
}; };
15.13.2. RESULT 15.13.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 ws_status) { union WRITE_SAME4res switch (nfsstat4 wsr_status) {
case NFS4_OK: case NFS4_OK:
write_response4 ws_resok4; write_response4 resok4;
default: default:
void; void;
}; };
15.13.3. DESCRIPTION 15.13.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 ws_stable parameter the method of how the data is to be processed the wsa_stable parameter the method of how the data is to be
by the server. It is treated like the stable parameter in the processed by the server. It is treated like the stable parameter in
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 15.13.3.1). reply (see Section 15.13.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.
skipping to change at page 88, line 33 skipping to change at page 87, line 33
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 15.13.3.1). This the operation will be long running (see Section 15.13.3.1). Once
document does not mandate the manner in which the server stores ADBs either the WRITE_SAME finishes synchronously or the server uses
for a file. Once either the WRITE_SAME finishes synchronously or the CB_OFFLOAD to inform the client of the asynchronous completion of the
server uses CB_OFFLOAD to inform the client of the asynchronous WRITE_SAME, the server MUST return the ADBs to clients as data.
completion of the WRITE_SAME, the server MUST return the ADBs to
clients as data.
15.13.3.1. Asynchronous Transactions 15.13.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 ws_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 15.10) to monitor is complete. It can use OFFLOAD_STATUS (Section 15.10) to monitor
the operation and OFFLOAD_ABORT (Section 15.8) to cancel the the operation and OFFLOAD_CANCEL (Section 15.9) to cancel the
operation. An example of a asynchronous WRITE_SAME is shown in operation. An example of a asynchronous WRITE_SAME is shown in
Figure 6. Note that as with the COPY operation, WRITE_SAME must Figure 6. Note that as with the COPY operation, WRITE_SAME must
provide a stateid for tracking the asynchronous operation. provide a stateid for tracking the asynchronous operation.
Client Server Client Server
+ + + +
| | | |
|--- OPEN ---------------------------->| Client opens |--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the file |<------------------------------------/| the file
| | | |
skipping to change at page 89, line 46 skipping to change at page 88, line 44
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.
15.13.3.2. Error Handling of a Partially Complete WRITE_SAME
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
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
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
WRITE_SAME.
16. NFSv4.2 Callback Operations 16. NFSv4.2 Callback Operations
16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous 16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
operation operation
16.1.1. ARGUMENT 16.1.1. ARGUMENT
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;
skipping to change at page 90, line 38 skipping to change at page 89, line 41
16.1.2. RESULT 16.1.2. RESULT
struct CB_OFFLOAD4res { struct CB_OFFLOAD4res {
nfsstat4 cor_status; nfsstat4 cor_status;
}; };
16.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 a hole punch 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.
If the client supports any of the following operations: If the client supports any of the following operations:
COPY: for both intra- and inter-server asynchronous copies COPY: for both intra-server and inter-server asynchronous copies
WRITE_SAME: for ADB initialization WRITE_SAME: for ADB initialization
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
skipping to change at page 91, line 20 skipping to change at page 90, line 22
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. IANA Considerations 17. IANA Considerations
This section uses terms that are defined in [RFC5226]. The IANA Considerations for Labeled NFS are addressed in [Quigley14].
18. References 18. References
18.1. Normative References 18.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", April 2014. Description", April 2014.
skipping to change at page 92, line 22 skipping to change at page 91, line 27
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.
[Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci- [Baira08] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci-
Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data Dusseau, A., and R. Arpaci-Dusseau, "An Analysis of Data
Corruption in the Storage Stack", Proceedings of the 6th Corruption in the Storage Stack", Proceedings of the 6th
USENIX Symposium on File and Storage Technologies (FAST USENIX Symposium on File and Storage Technologies (FAST
'08) , 2008. '08) , 2008.
[FEDFS-ADMIN]
Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M.
Naik, "Administration Protocol for Federated Filesystems",
draft-ietf-nfsv4-federated-fs-admin (Work In Progress),
2010.
[FEDFS-NSDB]
Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M.
Naik, "NSDB Protocol for Federated Filesystems", draft-
ietf-nfsv4-federated-fs-protocol (Work In Progress), 2010.
[I-D.ietf-nfsv4-rfc3530bis] [I-D.ietf-nfsv4-rfc3530bis]
Haynes, T. and D. Noveck, "Network File System (NFS) Haynes, T. and D. Noveck, "Network File System (NFS)
version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-25 (Work version 4 Protocol", draft-ietf-nfsv4-rfc3530bis-25 (Work
In Progress), February 2013. In Progress), February 2013.
[IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream", [IESG08] ISEG, "IESG Processing of RFC Errata for the IETF Stream",
2008. 2008.
[MLS] "Section 46.6. Multi-Level Security (MLS) of Deployment [MLS] "Section 46.6. Multi-Level Security (MLS) of Deployment
Guide: Deployment, configuration and administration of Red Guide: Deployment, configuration and administration of Red
Hat Enterprise Linux 5, Edition 6", 2011. Hat Enterprise Linux 5, Edition 6", 2011.
[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.
[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-quigley-nfsv4-lfs-registry-00 (work Label Formats", draft-ietf-nfsv4-lfs-registry-00 (work in
in progress), 2014. progress), 2014.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", March 1997. Requirement Levels", March 1997.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC4506] Eisler, M., "XDR: External Data Representation Standard", [RFC4506] Eisler, M., "XDR: External Data Representation Standard",
RFC 4506, May 2006. RFC 4506, May 2006.
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008.
[RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS [RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS
(pNFS) Block/Volume Layout", RFC 5663, January 2010. (pNFS) Block/Volume Layout", RFC 5663, January 2010.
[RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204, [RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204,
April 2014. April 2014.
[RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD [RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD
9, RFC 959, October 1985. 9, RFC 959, October 1985.
[Strohm11] [Strohm11]
 End of changes. 198 change blocks. 
671 lines changed or deleted 666 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/