draft-ietf-nfsv4-minorversion2-22.txt   draft-ietf-nfsv4-minorversion2-23.txt 
NFSv4 T. Haynes, Ed. NFSv4 T. Haynes
Internet-Draft Primary Data Internet-Draft Primary Data
Intended status: Standards Track April 13, 2014 Intended status: Standards Track April 29, 2014
Expires: October 15, 2014 Expires: October 31, 2014
NFS Version 4 Minor Version 2 NFS Version 4 Minor Version 2
draft-ietf-nfsv4-minorversion2-22.txt draft-ietf-nfsv4-minorversion2-23.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.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
Status of This Memo Status of This Memo
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 15, 2014. This Internet-Draft will expire on October 31, 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
skipping to change at page 2, line 19 skipping to change at page 2, line 19
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 . . . . . . . . . . . . . . . . . 4
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 . . . . . . . . . . . . . . . . . . . . 5 1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . 6
1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6 1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6
1.4.5. Application Data Hole (ADH) 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 . . . . . . . . . . . . . . . . . . . . . . 6 2. Minor Versioning . . . . . . . . . . . . . . . . . . . . . . 7
3. Server-side Copy . . . . . . . . . . . . . . . . . . . . . . 10 3. pNFS considerations for New Operations . . . . . . . . . . . 10
3.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 10 3.1. Atomicty for ALLOCATE and DEALLOCATE . . . . . . . . . . 10
3.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 10 3.2. Sharing of stateids with NFSv4.1 . . . . . . . . . . . . 10
3.2.1. Overview of Copy Operations . . . . . . . . . . . . . 11 3.3. NFSv4.2 as a Storage Protocol in pNFS: the File Layout
3.2.2. Locking the Files . . . . . . . . . . . . . . . . . . 11 Type . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.3. Intra-Server Copy . . . . . . . . . . . . . . . . . . 11 3.3.1. Operations Sent to NFSv4.2 Data Servers . . . . . . . 11
3.2.4. Inter-Server Copy . . . . . . . . . . . . . . . . . . 13 4. Server Side Copy . . . . . . . . . . . . . . . . . . . . . . 11
3.2.5. Server-to-Server Copy Protocol . . . . . . . . . . . 17 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 11
3.3. Requirements for Operations . . . . . . . . . . . . . . . 18 4.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 11
3.3.1. netloc4 - Network Locations . . . . . . . . . . . . . 19 4.2.1. Overview of Copy Operations . . . . . . . . . . . . . 12
3.3.2. Copy Offload Stateids . . . . . . . . . . . . . . . . 19 4.2.2. Locking the Files . . . . . . . . . . . . . . . . . . 12
3.4. Security Considerations . . . . . . . . . . . . . . . . . 20 4.2.3. Intra-Server Copy . . . . . . . . . . . . . . . . . . 13
3.4.1. Inter-Server Copy Security . . . . . . . . . . . . . 20 4.2.4. Inter-Server Copy . . . . . . . . . . . . . . . . . . 14
4. Support for Application IO Hints . . . . . . . . . . . . . . 30 4.2.5. Server-to-Server Copy Protocol . . . . . . . . . . . 18
5. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 31 4.3. Requirements for Operations . . . . . . . . . . . . . . . 19
5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 31 4.3.1. netloc4 - Network Locations . . . . . . . . . . . . . 20
5.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 31 4.3.2. Copy Offload Stateids . . . . . . . . . . . . . . . . 20
5.3. New Operations . . . . . . . . . . . . . . . . . . . . . 32 4.4. Security Considerations . . . . . . . . . . . . . . . . . 21
5.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 32 4.4.1. Inter-Server Copy Security . . . . . . . . . . . . . 21
5.3.2. WRITE_HOLE and WRITE_SAME . . . . . . . . . . . . . . 32 5. Support for Application IO Hints . . . . . . . . . . . . . . 31
6. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 33 6. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . 32
6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 33 6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 32
7. Application Data Hole Support . . . . . . . . . . . . . . . . 35 6.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 33
7.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 36 6.3. New Operations . . . . . . . . . . . . . . . . . . . . . 33
7.1.1. Data Hole Representation . . . . . . . . . . . . . . 36 6.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 33
7.1.2. Data Content . . . . . . . . . . . . . . . . . . . . 37 6.3.2. DEALLOCATE . . . . . . . . . . . . . . . . . . . . . 33
7.2. An Example of Detecting Corruption . . . . . . . . . . . 37 7. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 34
7.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 38 7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 34
8. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.2. Space Reservation Information . . . . . . . . . . . . . . 36
8.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 39 8. Application Data Block Support . . . . . . . . . . . . . . . 36
8.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 40 8.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 37
8.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 40 8.1.1. Data Block Representation . . . . . . . . . . . . . . 37
8.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 41 8.2. An Example of Detecting Corruption . . . . . . . . . . . 38
8.3.2. Permission Checking . . . . . . . . . . . . . . . . . 41 8.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 39
8.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 42 8.4. An Example of Zeroing Space . . . . . . . . . . . . . . . 40
8.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 42 9. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 40
8.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 42 9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 40
8.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 43 9.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 41
8.5. Discovery of Server Labeled NFS Support . . . . . . . . . 43 9.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 42
8.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 43 9.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 43
8.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 43 9.3.2. Permission Checking . . . . . . . . . . . . . . . . . 43
8.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 45 9.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 43
8.7. Security Considerations . . . . . . . . . . . . . . . . . 45 9.3.4. Existing Objects . . . . . . . . . . . . . . . . . . 43
9. Sharing change attribute implementation details with NFSv4 9.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 44
clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 9.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 44
9.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 46 9.5. Discovery of Server Labeled NFS Support . . . . . . . . . 44
10. Security Considerations . . . . . . . . . . . . . . . . . . . 46 9.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 45
11. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 46 9.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 45
11.1. Error Definitions . . . . . . . . . . . . . . . . . . . 47 9.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . 46
11.1.1. General Errors . . . . . . . . . . . . . . . . . . . 47 9.7. Security Considerations . . . . . . . . . . . . . . . . . 47
11.1.2. Server to Server Copy Errors . . . . . . . . . . . . 47 10. Sharing change attribute implementation details with NFSv4
11.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 48 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
11.2. New Operations and Their Valid Errors . . . . . . . . . 48 10.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 47
11.3. New Callback Operations and Their Valid Errors . . . . . 51 11. Security Considerations . . . . . . . . . . . . . . . . . . . 48
12. New File Attributes . . . . . . . . . . . . . . . . . . . . . 51 12. Error Values . . . . . . . . . . . . . . . . . . . . . . . . 48
12.1. New RECOMMENDED Attributes - List and Definition 12.1. Error Definitions . . . . . . . . . . . . . . . . . . . 48
References . . . . . . . . . . . . . . . . . . . . . . . 51 12.1.1. General Errors . . . . . . . . . . . . . . . . . . . 48
12.2. Attribute Definitions . . . . . . . . . . . . . . . . . 52 12.1.2. Server to Server Copy Errors . . . . . . . . . . . . 49
13. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 55 12.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . 49
14. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 59 12.2. New Operations and Their Valid Errors . . . . . . . . . 49
14.1. Operation 59: COPY - Initiate a server-side copy . . . . 59 12.3. New Callback Operations and Their Valid Errors . . . . . 53
14.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side copy 63 13. New File Attributes . . . . . . . . . . . . . . . . . . . . . 53
14.3. Operation 61: COPY_NOTIFY - Notify a source server of a 13.1. New RECOMMENDED Attributes - List and Definition
future copy . . . . . . . . . . . . . . . . . . . . . . 63 References . . . . . . . . . . . . . . . . . . . . . . . 53
14.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination 13.2. Attribute Definitions . . . . . . . . . . . . . . . . . 54
server's copy privileges . . . . . . . . . . . . . . . . 65 14. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . 57
14.5. Operation 63: OFFLOAD_STATUS - Poll for status of a 15. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . 60
server-side copy . . . . . . . . . . . . . . . . . . . . 66 15.1. Operation 59: ALLOCATE . . . . . . . . . . . . . . . . . 60
14.6. Modification to Operation 42: EXCHANGE_ID - Instantiate 15.2. Operation 60: COPY - Initiate a server-side copy . . . . 61
Client ID . . . . . . . . . . . . . . . . . . . . . . . 67 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a
14.7. Operation 67: IO_ADVISE - Application I/O access pattern future copy . . . . . . . . . . . . . . . . . . . . . . 65
15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate
Client ID . . . . . . . . . . . . . . . . . . . . . . . 66
15.5. Operation 62: DEALLOCATE . . . . . . . . . . . . . . . . 67
15.6. Operation 63: IO_ADVISE - Application I/O access pattern
hints . . . . . . . . . . . . . . . . . . . . . . . . . 68 hints . . . . . . . . . . . . . . . . . . . . . . . . . 68
14.8. Changes to Operation 51: LAYOUTRETURN . . . . . . . . . 74 15.7. Changes to Operation 51: LAYOUTRETURN . . . . . . . . . 74
14.9. Operation 65: READ_PLUS . . . . . . . . . . . . . . . . 77 15.8. Operation 64: OFFLOAD_ABORT - Cancel a server-side copy 77
14.10. Operation 66: SEEK . . . . . . . . . . . . . . . . . . . 82 15.9. Operation 65: OFFLOAD_REVOKE - Revoke a destination
14.11. Operation 64: WRITE_HOLE . . . . . . . . . . . . . . . . 83 server's copy privileges . . . . . . . . . . . . . . . . 77
14.12. Operation 68: WRITE_SAME . . . . . . . . . . . . . . . . 86 15.10. Operation 66: OFFLOAD_STATUS - Poll for status of a
15. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89 server-side copy . . . . . . . . . . . . . . . . . . . . 78
15.1. Operation 15: CB_OFFLOAD - Report results of an 15.11. Operation 67: READ_PLUS . . . . . . . . . . . . . . . . 79
asynchronous operation . . . . . . . . . . . . . . . . . 89 15.12. Operation 68: SEEK . . . . . . . . . . . . . . . . . . . 85
16. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 91 15.13. Operation 69: WRITE_SAME . . . . . . . . . . . . . . . . 86
17. References . . . . . . . . . . . . . . . . . . . . . . . . . 91 16. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 89
17.1. Normative References . . . . . . . . . . . . . . . . . . 91 16.1. Operation 15: CB_OFFLOAD - Report results of an
17.2. Informative References . . . . . . . . . . . . . . . . . 92 asynchronous operation . . . . . . . . . . . . . . . . . 90
17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 91
18. References . . . . . . . . . . . . . . . . . . . . . . . . . 91
18.1. Normative References . . . . . . . . . . . . . . . . . . 91
18.2. Informative References . . . . . . . . . . . . . . . . . 92
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 93 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . 93
Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 94 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 94
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 94 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 95
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]. It follows
the guidelines for minor versioning that are listed in Section 11 of the guidelines for minor versioning that are listed in Section 11 of
skipping to change at page 5, line 12 skipping to change at page 5, line 20
The full XDR for NFSv4.2 is presented in [NFSv42xdr]. The full XDR for NFSv4.2 is presented in [NFSv42xdr].
1.3. NFSv4.2 Goals 1.3. NFSv4.2 Goals
The goal of the design of NFSv4.2 is to take common local file system The goal of the design of NFSv4.2 is to take common local file system
features and offer them remotely. These features might features and offer them remotely. These features might
o already be available on the servers, e.g., sparse files o already be available on the servers, e.g., sparse files
o be under development as a new standard, e.g., SEEK_HOLE and o be under development as a new standard, e.g., SEEK pulls in both
SEEK_DATA SEEK_HOLE and SEEK_DATA
o be used by clients with the servers via some proprietary means, o be used by clients with the servers via some proprietary means,
e.g., Labeled NFS e.g., Labeled NFS
but the clients are not able to leverage them on the server within but the clients are not able to leverage them on the server within
the confines of the NFS protocol. the confines of the NFS protocol.
1.4. Overview of NFSv4.2 Features 1.4. Overview of NFSv4.2 Features
1.4.1. Server-side Copy 1.4.1. Server Side Copy
A traditional file copy from one server to another results in the A traditional file copy from one server to another results in the
data being put on the network twice - source to client and then data being put on the network twice - source to client and then
client to destination. New operations are introduced to allow the client to destination. New operations are introduced to allow the
client to authorize the two servers to interact directly. As this client to authorize the two servers to interact directly. As this
copy can be lengthy, asynchronous support is also provided. copy can be lengthy, asynchronous support is also provided.
1.4.2. Application I/O Advise 1.4.2. Application I/O Advise
Applications and clients want to advise the server as to expected I/O Applications and clients want to advise the server as to expected I/O
behavior. Using IO_ADVISE (see Section 14.7) to communicate future I behavior. Using IO_ADVISE (see Section 15.6) to communicate future I
/O behavior such as whether a file will be accessed sequentially or /O behavior such as whether a file will be accessed sequentially or
randomly, and whether a file will or will not be accessed in the near randomly, and whether a file will or will not be accessed in the near
future, allows servers to optimize future I/O requests for a file by, future, allows servers to optimize future I/O requests for a file by,
for example, prefetching or evicting data. This operation can be for example, prefetching or evicting data. This operation can be
used to support the posix_fadvise function as well as other used to support the posix_fadvise function as well as other
applications such as databases and video editors. applications such as databases and video editors.
1.4.3. Sparse Files 1.4.3. Sparse Files
Sparse files are ones which have unallocated data blocks as holes in Sparse files are ones which have unallocated or uninitialized data
the file. Such holes are typically transferred as 0s during I/O. blocks as holes in the file. Such holes are typically transferred as
READ_PLUS (see Section 14.9) allows a server to send back to the 0s during I/O. READ_PLUS (see Section 15.11) allows a server to send
client metadata describing the hole and WRITE_HOLE (see back to the client metadata describing the hole and DEALLOCATE (see
Section 14.11) allows the client to punch holes into a file. In Section 15.5) allows the client to punch holes into a file. In
addition, SEEK (see Section 14.10) is provided to scan for the next addition, SEEK (see Section 15.12) is provided to scan for the next
hole or data from a given location. hole or data from a given location.
1.4.4. Space Reservation 1.4.4. Space Reservation
When a file is sparse, one concern applications have is ensuring that When a file is sparse, one concern applications have is ensuring that
there will always be enough data blocks available for the file during there will always be enough data blocks available for the file during
future writes. A new attribute, space_reserved (see Section 12.2.4) future writes. ALLOCATE (see Section 15.1) allows a client to
provides the client a guarantee that space will be available. request a guarantee that space will be available. And DEALLOCATE
(see Section 15.5) allows the client to punch a hole into a file,
thus releasing a space reservation.
1.4.5. Application Data Hole (ADH) Support 1.4.5. Application Data Block (ADB) Support
Some applications treat a file as if it were a disk and as such want Some applications treat a file as if it were a disk and as such want
to initialize (or format) the file image. We extend both READ_PLUS to initialize (or format) the file image. We introduce WRITE_SAME
and introduce WRITE_SAME (see Section 14.12) to understand this (see Section 15.13) to send this metadata to the server to allow it
metadata as a new form of a hole. to write the block contents.
1.4.6. Labeled NFS 1.4.6. Labeled NFS
While both clients and servers can employ Mandatory Access Control While both clients and servers can employ Mandatory Access Control
(MAC) security models to enforce data access, there has been no (MAC) security models to enforce data access, there has been no
protocol support to allow full interoperability. A new file object protocol support to allow full interoperability. A new file object
attribute, sec_label (see Section 12.2.2) allows for the server to attribute, sec_label (see Section 13.2.2) allows for the server to
store and enforce MAC labels. The format of the sec_label store and enforce MAC labels. The format of the sec_label
accommodates any MAC security system. accommodates any MAC security system.
1.5. Differences from NFSv4.1 1.5. Differences from NFSv4.1
In NFSv4.1, the only way to introduce new variants of an operation In NFSv4.1, the only way to introduce new variants of an operation
was to introduce a new operation. I.e., READ becomes either READ2 or was to introduce a new operation. I.e., READ becomes either READ2 or
READ_PLUS. With the use of discriminated unions as parameters to READ_PLUS. With the use of discriminated unions as parameters to
such functions in NFSv4.2, it is possible to add a new arm in a such functions in NFSv4.2, it is possible to add a new arm in a
subsequent minor version. And it is also possible to move such an subsequent minor version. And it is also possible to move such an
skipping to change at page 10, line 5 skipping to change at page 10, line 20
15. Except for infrastructural changes, a minor version must not 15. Except for infrastructural changes, a minor version must not
introduce REQUIRED new features. introduce REQUIRED new features.
This rule allows for the introduction of new functionality and This rule allows for the introduction of new functionality and
forces the use of implementation experience before designating a forces the use of implementation experience before designating a
feature as REQUIRED. On the other hand, some classes of feature as REQUIRED. On the other hand, some classes of
features are infrastructural and have broad effects. Allowing features are infrastructural and have broad effects. Allowing
infrastructural features to be RECOMMENDED or OPTIONAL infrastructural features to be RECOMMENDED or OPTIONAL
complicates implementation of the minor version. complicates implementation of the minor version.
16. A client MUST NOT attempt to use a stateid, filehandle, or 16. Unless explicitly documented in a minor version standard's
similar returned object from the COMPOUND procedure with minor document, a client MUST NOT attempt to use a stateid,
version X for another COMPOUND procedure with minor version Y, filehandle, or similar returned object from the COMPOUND
where X != Y. procedure with minor version X for another COMPOUND procedure
with minor version Y, where X != Y.
3. Server-side Copy 3. pNFS considerations for New Operations
3.1. Introduction 3.1. Atomicty for ALLOCATE and DEALLOCATE
Both ALLOCATE (see Section 15.1) and DEALLOCATE (see Section 15.5)
are sent to the metadata server, which is responsible for
coordinating the changes onto the storage devices. In particular,
both operations must either fully succeed or fail, it cannot be the
case that one storage device succeeds whilst another fails.
3.2. Sharing of stateids with NFSv4.1
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
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
A file layout provided by a NFSv4.2 server may refer either to a DS
that only implements NFSv4.1 as specified in [RFC5661], or to a DS
that implements additions from NFSv4.2, in which case the rules in
Section 3.3.1 apply. As the File Layout Type does not provide a
means for informing the client as to which minor version a particular
DS is providing, it will 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
In addition to the commands listed in [RFC5661], NFSv4.2 data servers
MAY accept a COMPOUND containing the following additional operations:
READ_PLUS (see Section 15.11), WRITE_SAME (see Section 15.13), and
SEEK (see Section 15.12), which will be treated like the subset
specified as "Operations Sent to NFSv4.1 Data Servers" in
Section 13.6 of [RFC5661].
Additional details on the implementation of these operations in a
pNFS context are documented in the operation specific sections.
4. Server Side Copy
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. destiniation 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.
3.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
the source file and destination file reside on the same server. In the source file and destination file reside on the same server. In
an inter-server copy, the source file and destination file are on an inter-server copy, the source file and destination file are on
different servers. In both cases, the copy may be performed different servers. In both cases, the copy may be performed
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
skipping to change at page 11, line 13 skipping to change at page 12, line 20
[FEDFS-ADMIN] to perform the copy. Specifically the client can [FEDFS-ADMIN] to perform the copy. Specifically the client can
determine the source junction's attributes using the FEDFS_LOOKUP_FSN determine the source junction's attributes using the FEDFS_LOOKUP_FSN
procedure and create a duplicate junction using the procedure and create a duplicate junction using the
FEDFS_CREATE_JUNCTION procedure. 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.
3.2.1. Overview of Copy Operations 4.2.1. Overview of Copy Operations
COPY_NOTIFY: For inter-server copies, the client sends this COPY_NOTIFY: For inter-server copies, the client sends this
operation to the source server to notify it of a future file copy operation to the source server to notify it of a future file copy
from a given destination server for the given user. from a given destination server for the given user.
(Section 14.3) (Section 15.3)
OFFLOAD_REVOKE: Also for inter-server copies, the client sends this OFFLOAD_REVOKE: Also for inter-server copies, the client sends this
operation to the source server to revoke permission to copy a file operation to the source server to revoke permission to copy a file
for the given user. (Section 14.4) for the given user. (Section 15.9)
COPY: Used by the client to request a file copy. (Section 14.1) 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_ABORT: Used by the client to abort an asynchronous file
copy. (Section 14.2) copy. (Section 15.8)
OFFLOAD_STATUS: Used by the client to poll the status of an OFFLOAD_STATUS: Used by the client to poll the status of an
asynchronous file copy. (Section 14.5) 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 15.1) an asynchronous file copy to the client. (Section 16.1)
3.2.2. Locking the Files 4.2.2. 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.
3.2.3. Intra-Server Copy 4.2.3. 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_ABORT.
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.
skipping to change at page 13, line 38 skipping to change at page 14, 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.
3.2.4. Inter-Server Copy 4.2.4. 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 17, line 5 skipping to change at page 18, 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.
3.2.5. Server-to-Server Copy Protocol 4.2.5. Server-to-Server Copy Protocol
The source server and destination server are not required to use a The source server and destination server are not required to use a
specific protocol to transfer the file data. The choice of what specific protocol to transfer the file data. The choice of what
protocol to use is ultimately the destination server's decision. protocol to use is ultimately the destination server's decision.
3.2.5.1. Using NFSv4.x as a Server-to-Server Copy Protocol 4.2.5.1. Using NFSv4.x as a Server-to-Server 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.
3.2.5.2. Using an alternative Server-to-Server Copy Protocol 4.2.5.2. Using an alternative Server-to-Server 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
area network, and thus there is no need to copy any data at all, and area network, and thus there is no need to copy any data at all, and
instead ownership of the file and its contents might simply be re- instead ownership of the file and its contents might simply be re-
assigned to the destination. To allow for these possibilities, the assigned to the destination. To allow for these possibilities, the
destination server is allowed to use a server-to-server copy protocol destination server is allowed to use a server-to-server copy protocol
of its choice. of its choice.
In a heterogeneous environment, using a protocol other than NFSv4.x In a heterogeneous environment, using a protocol other than NFSv4.x
(e.g., HTTP [RFC2616] or FTP [RFC0959]) presents some challenges. In (e.g., HTTP [RFC2616] or FTP [RFC959]) presents some challenges. In
particular, the destination server is presented with the challenge of particular, the destination server is presented with the challenge of
accessing the source file given only an NFSv4.x filehandle. accessing the source file given only an NFSv4.x filehandle.
One option for protocols that identify source files with path names One option for protocols that identify source files with path names
is to use an ASCII hexadecimal representation of the source is to use an ASCII hexadecimal representation of the source
filehandle as the file name. filehandle as the file name.
Another option for the source server is to use URLs to direct the Another option for the source server is to use URLs to direct the
destination server to a specialized service. For example, the destination server to a specialized service. For example, the
response to COPY_NOTIFY could include the URL ftp:// response to COPY_NOTIFY could include the URL ftp://
skipping to change at page 18, line 12 skipping to change at page 19, line 12
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 3.4.1.4. this are given in Section 4.4.1.4.
3.3. Requirements for Operations 4.3. Requirements for Operations
The implementation of server-side copy is OPTIONAL by the client and The implementation of server-side copy is OPTIONAL by the client and
the server. However, in order to successfully copy a file, some the server. However, in order to successfully copy a file, some
operations MUST be supported by the client and/or server. operations MUST be supported by the client and/or server.
If a client desires an intra-server file copy, then it MUST support If a client desires an intra-server file copy, then it MUST support
the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then
the client MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations. the client MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations.
If a client desires an inter-server file copy, then it MUST support If a client desires an inter-server file copy, then it MUST support
skipping to change at page 19, line 5 skipping to change at page 20, line 5
Each operation is performed in the context of the user identified by Each operation is performed in the context of the user identified by
the ONC RPC credential of its containing COMPOUND or CB_COMPOUND the ONC RPC credential of its containing COMPOUND or CB_COMPOUND
request. For example, a OFFLOAD_ABORT operation issued by a given request. For example, a OFFLOAD_ABORT operation issued by a given
user indicates that a specified COPY operation initiated by the same user indicates that a specified COPY operation initiated by the same
user be canceled. Therefore a OFFLOAD_ABORT MUST NOT interfere with user be canceled. Therefore a OFFLOAD_ABORT MUST NOT interfere with
a copy of the same file initiated by another user. a copy of the same file initiated by another user.
An NFS server MAY allow an administrative user to monitor or cancel An NFS server MAY allow an administrative user to monitor or cancel
copy operations using an implementation specific interface. copy operations using an implementation specific interface.
3.3.1. netloc4 - Network Locations 4.3.1. 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 19, line 36 skipping to change at page 20, line 36
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.
3.3.2. Copy Offload Stateids 4.3.2. 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_ABORT,
OFFLOAD_STATUS, and CB_OFFLOAD operations. OFFLOAD_STATUS, and CB_OFFLOAD operations.
Section 8.2.4 of [RFC5661] specifies that stateids are valid until 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 either (A) the client or server restart or (B) the client returns the
resource. 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_ABORT 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.
3.4. Security Considerations 4.4. Security Considerations
The security considerations pertaining to NFSv4 The security considerations pertaining to NFSv4
[I-D.ietf-nfsv4-rfc3530bis] apply to this chapter. [I-D.ietf-nfsv4-rfc3530bis] apply to this chapter.
The standard security mechanisms provide by NFSv4 The standard security mechanisms provide by NFSv4
[I-D.ietf-nfsv4-rfc3530bis] may be used to secure the protocol [I-D.ietf-nfsv4-rfc3530bis] may be used to secure the protocol
described in this chapter. described in this chapter.
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 3.4.1.2, and to support rejecting COPY_NOTIFY described in Section 4.4.1.2, 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.
3.4.1. Inter-Server Copy Security 4.4.1. Inter-Server Copy Security
3.4.1.1. Requirements for Secure Inter-Server Copy 4.4.1.1. Requirements for Secure Inter-Server Copy
Inter-server copy is driven by several requirements: Inter-server copy is driven by several requirements:
o The specification must not mandate an inter-server copy protocol. o The specification must not mandate an inter-server copy protocol.
There are many ways to copy data. Some will be more optimal than There are many ways to copy data. Some will be more optimal than
others depending on the identities of the source server and others depending on the identities of the source server and
destination server. For example the source and destination destination server. 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 destination are in an ideal position to efficiently render the
skipping to change at page 21, line 19 skipping to change at page 22, line 19
destination first have a "copying relationship" increases the destination first have a "copying relationship" increases the
administrative burden. However the specification MUST NOT administrative burden. However the specification MUST NOT
preclude implementations that require pre-configuration. preclude implementations that require pre-configuration.
o The specification must not mandate a trust relationship between o The specification must not mandate a trust relationship between
the source and destination server. The NFSv4 security model the source and destination server. The NFSv4 security model
requires mutual authentication between a principal on an NFS requires mutual authentication between a principal on an NFS
client and a principal on an NFS server. This model MUST continue client and a principal on an NFS server. This model MUST continue
with the introduction of COPY. with the introduction of COPY.
3.4.1.2. Inter-Server Copy via ONC RPC with RPCSEC_GSSv3 4.4.1.2. 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 23, line 15 skipping to change at page 24, line 15
struct copy_to_auth_priv { struct copy_to_auth_priv {
/* equal to cfap_shared_secret */ /* equal to cfap_shared_secret */
secret4 ctap_shared_secret; secret4 ctap_shared_secret;
netloc4 ctap_source; netloc4 ctap_source;
/* the NFSv4 user name that the user principal maps to */ /* the NFSv4 user name that the user principal maps to */
utf8str_mixed ctap_username; utf8str_mixed ctap_username;
/* /*
* user principal RPCSEC_GSSv1 (or v2) handle shared * user principal RPCSEC_GSSv1 (or v2) handle shared
* with the source server * with the source server
*/ */
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 RPCGSS_GSSv3 context between the
destination server and the source server. See Section 3.4.1.2.1 destination server and the source server. See Section 4.4.1.2.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;
}; };
3.4.1.2.1. Establishing a Security Context 4.4.1.2.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
skipping to change at page 26, line 5 skipping to change at page 27, line 5
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.
3.4.1.2.2. Starting a Secure Inter-Server Copy 4.4.1.2.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 26, line 36 skipping to change at page 27, line 36
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.
3.4.1.2.3. Securing ONC RPC Server-to-Server Copy Protocols 4.4.1.2.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
skipping to change at page 27, line 17 skipping to change at page 28, line 17
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 estalished
"copy_to_auth" privilege (see Section 3.4.1.2.1). The "copy_to_auth" privilege (see Section 4.4.1.2.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 15 skipping to change at page 29, line 15
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.
3.4.1.2.4. Finishing or Stoping a Secure Inter-Server Copy 4.4.1.2.4. Finishing or Stoping 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
skipping to change at page 29, line 7 skipping to change at page 30, line 7
If the client sends a OFFLOAD_ABORT to the destination server to If the client sends a OFFLOAD_ABORT 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_ABORT 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 destiniation server. The destiniation 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.
3.4.1.3. Inter-Server Copy via ONC RPC without RPCSEC_GSS 4.4.1.3. 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 30, line 27 skipping to change at page 31, line 27
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.
3.4.1.4. Inter-Server Copy without ONC RPC 4.4.1.4. Inter-Server Copy without ONC RPC
The same techniques as Section 3.4.1.3, using unique URLs for each The same techniques as Section 4.4.1.3, 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 [RFC0959]) as well. [RFC2616] and FTP [RFC959]) as well.
4. 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 14.7) to communicate the client file IO_ADVISE procedure (Section 15.6) to communicate the client file
access patterns to the NFS server. The NFS server upon receiving a access patterns to the NFS server. The NFS server upon receiving a
IO_ADVISE operation MAY choose to alter its I/O and caching behavior, IO_ADVISE operation MAY choose to alter its I/O and caching behavior,
but is under no obligation to do so. but is under no obligation to do so.
Application specific NFS clients such as those used by hypervisors Application specific NFS clients such as those used by hypervisors
and databases can also leverage application hints to communicate and databases can also leverage application hints to communicate
their specialized requirements. their specialized requirements.
5. Sparse Files 6. Sparse Files
5.1. Introduction 6.1. Introduction
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
'unwritten' or 'uninitialized' blocks, which have uninitialized space
allocated to them on disk, but will return zeros until data is
written to them. Such functionality is already present in the data
model of the pNFS Block/Volume Layout (see [RFC5663]). Uninitialized
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
memory, this wastes time and bandwidth as the application waits for memory, this wastes time and bandwidth as the application waits for
the zeroes to be transferred. the zeroes to be transferred.
A sparse file is typically created by initializing the file to be all A sparse file is typically created by initializing the file to be all
zeros - nothing is written to the data in the file, instead the hole zeros - nothing is written to the data in the file, instead the hole
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.
Three new operations WRITE_HOLE (Section 14.11), WRITE_SAME No new operation is needed to allow the creation of a sparsely
(Section 14.12), and READ_PLUS (Section 14.9) are introduced. populated file, when a file is created and a write occurs past the
WRITE_HOLE allows for the creation of a sparse file and/or hole current size of the file, the non-allocated region will either be a
punching. I.e, An application might want to zero out a range of the hole or filled with zeros. The choice of behavior is dictated by the
file. WRITE_SAME allows for the creation of application specific underlying filesystem and is transparent to the application. What is
block structures in a file which is treated by the application as if needed are the abilities to read sparse files and to punch holes to
it were a disk. READ_PLUS supports all the features of READ but reinitialize the contents of a file.
includes an extension to support sparse pattern files
(Section 7.1.2). READ_PLUS is guaranteed to perform no worse than
READ, and can dramatically improve performance with sparse files.
READ_PLUS does not depend on pNFS protocol features, but can be used
by pNFS to support sparse files.
5.2. Terminology Two new operations DEALLOCATE (Section 15.5) and READ_PLUS
(Section 15.11) are introduced. DEALLOCATE allows for the hole
punching. I.e., an application might want to reset the allocation
and reservation status of a range of the file. READ_PLUS supports
all the features of READ but includes an extension to support sparse
files. READ_PLUS is guaranteed to perform no worse than READ, and
can dramatically improve performance with sparse files. READ_PLUS
does not depend on pNFS protocol features, but can be used by pNFS to
support sparse files.
6.2. Terminology
Regular file: An object of file type NF4REG or NF4NAMEDATTR. Regular file: An object of file type NF4REG or NF4NAMEDATTR.
Sparse file: A Regular file that contains one or more Holes. Sparse file: A Regular file that contains one or more holes.
Hole: A byte range within a Sparse file that contains regions of all Hole: A byte range within a Sparse file that contains regions of all
zeroes. For block-based file systems, this could also be an zeroes. A hole might or might not have space allocated or
unallocated region of the file. reserved to it.
Hole Threshold: The minimum length of a Hole as determined by the
server. If a server chooses to define a Hole Threshold, then it
would not return hole information about holes with a length
shorter than the Hole Threshold.
5.3. New Operations 6.3. New Operations
READ_PLUS, WRITE_HOLE, and WRITE_SAME are new variants of the NFSv4.1 6.3.1. READ_PLUS
READ and WRITE operations [RFC5661]. Besides being able to support
all of the data semantics of those operations, they can also be used
by the client and server to efficiently transfer both holes and ADHs
(see Section 7.1.1). As READ is inefficient for transfer of sparse
sections of the file, it is marked as OBSOLESCENT in NFSv4.2.
Instead, a client should utilize READ_PLUS. Note that as the client
has no a priori knowledge of whether either an ADH or a hole is
present or not, if it supports these operations and so does the
server, then it should always use these operations.
5.3.1. READ_PLUS READ_PLUS is a new variant of the NFSv4.1 READ operation [RFC5661].
Besides being able to support all of the data semantics of the READ
operation, it can also be used by the client and server to
efficiently transfer holes. Note that as the client has no a priori
knowledge of whether a hole is present or not, if the client supports
READ_PLUS and so does the server, then it should always use the
READ_PLUS operation in preference to the READ operation.
For holes, READ_PLUS extends the response to avoid returning data for READ_PLUS extends the response with a new arm representing holes to
portions of the file which are initialized and contain no backing avoid returning data for portions of the file which are initialized
store. Additionally it will do so if the result would appear to be a to zero and may or may not contain a backing store. Returning data
hole. I.e., if the result was a data block composed entirely of blocks of uninitialized data wastes computational and network
zeros, then it is easier to return a hole. Returning data blocks of resources, thus reducing performance.
uninitialized data wastes computational and network resources, thus
reducing performance. For ADHs, READ_PLUS is used to return the
metadata describing the portions of the file which are initialized
and contain no backing store.
If the client sends a READ operation, it is explicitly stating that If the client sends a READ operation, it is explicitly stating that
it is neither supporting sparse files nor ADHs. So if a READ occurs it is not supporting sparse files. So if a READ occurs on a sparse
on a sparse ADH or file, then the server must expand such data to be file, then the server must expand such data to be raw bytes. If a
raw bytes. If a READ occurs in the middle of a hole or ADH, the READ occurs in the middle of a hole, the server can only send back
server can only send back bytes starting from that offset. In bytes starting from that offset. In contrast, if a READ_PLUS occurs
contrast, if a READ_PLUS occurs in the middle of a hole or ADH, the in the middle of a hole, the server can send back a range which
server can send back a range which starts before the offset and starts before the offset and extends past the range.
extends past the range.
5.3.2. WRITE_HOLE and WRITE_SAME 6.3.2. DEALLOCATE
WRITE_HOLE can be used to hole punch and WRITE_SAME can be used to DEALLOCATE can be used to hole punch, which allows the client to
initialize ADHs. For either purpose, the client can avoid the avoid the transfer of a repetitive pattern of zeros across the
transfer of a repetitive pattern across the network. If the network.
filesystem on the server does not support sparse files, the
WRITE_HOLE and WRITE_SAME operations may return the result
asynchronously via the CB_OFFLOAD operation. As a hole punch may
entail deallocating data blocks, even if the filesystem supports
sparse files, it may still have to return the result via CB_OFFLOAD.
6. Space Reservation 7. Space Reservation
6.1. Introduction 7.1. Introduction
Applications such as hypervisors want to be able to reserve space for Applications want to be able to reserve space for a file, report the
a file, report the amount of actual disk space a file occupies, and amount of actual disk space a file occupies, and free-up the backing
free-up the backing space of a file when it is not required. In space of a file when it is not required.
virtualized environments, virtual disk files are often stored on NFS
mounted volumes. Since virtual disk files represent the hard disks
of virtual machines, hypervisors often have to guarantee certain
properties for the file.
One such example is space reservation. When a hypervisor creates a One example is the posix_fallocate ([posix_fallocate]) which allows
applications to ask for space reservations from the operating system,
usually to provide a better file layout and reduce overhead for
random or slow growing file appending workloads.
Another example is space reservation for virtual disks in a
hypervisor. In virtualized environments, virtual disk files are
often stored on NFS mounted volumes. When a hypervisor creates a
virtual disk file, it often tries to preallocate the space for the virtual disk file, it often tries to preallocate the space for the
file so that there are no future allocation related errors during the file so that there are no future allocation related errors during the
operation of the virtual machine. Such errors prevent a virtual operation of the virtual machine. Such errors prevent a virtual
machine from continuing execution and result in downtime. machine from continuing execution and result in downtime.
Currently, in order to achieve such a guarantee, applications zero Currently, in order to achieve such a guarantee, applications zero
the entire file. The initial zeroing allocates the backing blocks the entire file. The initial zeroing allocates the backing blocks
and all subsequent writes are overwrites of already allocated blocks. and all subsequent writes are overwrites of already allocated blocks.
This approach is not only inefficient in terms of the amount of I/O This approach is not only inefficient in terms of the amount of I/O
done, it is also not guaranteed to work on file systems that are log done, it is also not guaranteed to work on file systems that are log
structured or deduplicated. An efficient way of guaranteeing space structured or deduplicated. An efficient way of guaranteeing space
reservation would be beneficial to such applications. reservation would be beneficial to such applications.
We define a "reservation" as being the combination of the The new ALLOCATE operation (see Section 15.1) allows a client to
space_reserved attribute (see Section 12.2.4) and the size attribute request a guarantee that space will be available. The ALLOCATE
(see Section 5.8.1.5 of [RFC5661]). If space_reserved attribute is operation guarantees that any future writes to the region it was
set on a file, it is guaranteed that writes that do not grow the file successfully called for will not fail with NFS4ERR_NOSPC.
past the size will not fail with NFS4ERR_NOSPC. Once the size is
changed, then the reservation is changed to that new size.
Another useful feature is the ability to report the number of blocks Another useful feature is the ability to report the number of blocks
that would be freed when a file is deleted. Currently, NFS reports that would be freed when a file is deleted. Currently, NFS reports
two size attributes: two size attributes:
size The logical file size of the file. size The logical file size of the file.
space_used The size in bytes that the file occupies on disk space_used The size in bytes that the file occupies on disk
While these attributes are sufficient for space accounting in While these attributes are sufficient for space accounting in
traditional file systems, they prove to be inadequate in modern file traditional file systems, they prove to be inadequate in modern file
systems that support block sharing. In such file systems, multiple systems that support block sharing. In such file systems, multiple
inodes can point to a single block with a block reference count to inodes can point to a single block with a block reference count to
guard against premature freeing. Having a way to tell the number of guard against premature freeing. Having a way to tell the number of
blocks that would be freed if the file was deleted would be useful to blocks that would be freed if the file was deleted would be useful to
applications that wish to migrate files when a volume is low on applications that wish to migrate files when a volume is low on
space. space.
Since virtual disks represent a hard drive in a virtual machine, a Since virtual disks represent a hard drive in a virtual machine, a
skipping to change at page 34, line 20 skipping to change at page 35, line 14
applications that wish to migrate files when a volume is low on applications that wish to migrate files when a volume is low on
space. space.
Since virtual disks represent a hard drive in a virtual machine, a Since virtual disks represent a hard drive in a virtual machine, a
virtual disk can be viewed as a file system within a file. Since not virtual disk can be viewed as a file system within a file. Since not
all blocks within a file system are in use, there is an opportunity all blocks within a file system are in use, there is an opportunity
to reclaim blocks that are no longer in use. A call to deallocate to reclaim blocks that are no longer in use. A call to deallocate
blocks could result in better space efficiency. Lesser space MAY be blocks could result in better space efficiency. Lesser space MAY be
consumed for backups after block deallocation. consumed for backups after block deallocation.
The following operations and attributes can be used to resolve this The following operations and attributes can be used to resolve these
issues: issues:
space_reserved This attribute specifies that writes to the reserved
area of the file will not fail with NFS4ERR_NOSPACE.
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.
WRITE_HOLE and WRITE_SAME These operations zero and/or deallocate DEALLOCATE This operation delallocates the blocks backing a region
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.
For example, two files A and B have 10 blocks each. Let 6 of these For example, two files A and B have 10 blocks each. Let 6 of these
blocks be shared between them. Thus, the combined space utilized by blocks be shared between them. Thus, the combined space utilized by
the two files is 14 * BLOCK_SIZE bytes. In the former case, the the two files is 14 * BLOCK_SIZE bytes. In the former case, the
combined space utilization of the two files would be reported as 20 * combined space utilization of the two files would be reported as 20 *
BLOCK_SIZE. However, deleting either would only result in 4 * BLOCK_SIZE. However, deleting either would only result in 4 *
BLOCK_SIZE being freed. Conversely, the latter interpretation would BLOCK_SIZE being freed. Conversely, the latter interpretation would
report that the space utilization is only 8 * BLOCK_SIZE. report that the space utilization is only 8 * BLOCK_SIZE.
Adding another size attribute, space_freed (see Section 12.2.5), is Adding another size attribute, space_freed (see Section 13.2.4), is
helpful in solving this problem. space_freed is the number of blocks helpful in solving this problem. space_freed is the number of blocks
that are allocated to the given file that would be freed on its that are allocated to the given file that would be freed on its
deletion. In the example, both A and B would report space_freed as 4 deletion. In the example, both A and B would report space_freed as 4
* BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B * BLOCK_SIZE and space_used as 10 * BLOCK_SIZE. If A is deleted, B
will report space_freed as 10 * BLOCK_SIZE as the deletion of B would will report space_freed as 10 * BLOCK_SIZE as the deletion of B would
result in the deallocation of all 10 blocks. result in the deallocation of all 10 blocks.
The addition of this problem does not solve the problem of space The addition of 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. Application Data Hole Support 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
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: a header and data. The header describes the sections: header and data. The header describes the characteristics
characteristics of the block and can provide a means to detect of the block and can provide a means to detect corruption in the data
corruption in the data payload. The data section is typically payload. The data section is typically initialized to all zeros.
initialized to all zeros.
The format of the header is application specific, but there are two The format of the header is application specific, but there are two
main components typically encountered: main components typically encountered:
1. A logical block number which allows the application to determine 1. An Application Data Block Number (ADBN) which allows the
which data block is being referenced. This is useful when the application to determine which data block is being referenced.
client is not storing the blocks in contiguous memory. This is useful when the client is not storing the blocks in
contiguous memory, i.e., a logical block number.
2. Fields to describe the state of the ADB and a means to detect 2. Fields to describe the state of the ADB and a means to detect
block corruption. For both pieces of data, a useful property is block corruption. For both pieces of data, a useful property is
that allowed values be unique in that if passed across the that allowed values be unique in that if passed across the
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 the 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 an Application Data Hole In this section, we are going to define a framework for transferring
(ADH), which is a generic framework for transferring the ADB, present the ADB from client to server and present one approach to detecting
one approach to detecting corruption in a given ADH implementation, corruption in a given ADB implementation.
and describe the model for how the client and server can support
efficient initialization of ADHs, reading of ADH holes, punching ADH
holes in a file, and space reservation. We define the ADHN to be the
Application Data Hole Number, which is the logical block number
discussed earlier.
7.1. Generic Framework 8.1. Generic Framework
We want the representation of the ADH 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 ADH. One might store the ADHN at the start of the block and then the ADB. One might store the ADBN at the start of the block and then
have a guard pattern to detect corruption [McDougall07]. The next have a guard pattern to detect corruption [McDougall07]. The next
might store the ADHN at an offset of 100 bytes within the block and might store the ADBN at an offset of 100 bytes within the block and
have no guard pattern at all, i.e., existing applications might have no guard pattern at all, i.e., existing applications might
already have well defined formats for their data blocks. already have well defined formats for their data blocks.
The guard pattern can be used to represent the state of the block, to The guard pattern can be used to represent the state of the block, to
protect against corruption, or both. Again, it needs to be able to protect against corruption, or both. Again, it needs to be able to
be placed anywhere within the ADH. be placed anywhere within the ADB.
We need to be able to represent the starting offset of the block and We need to be able to represent the starting offset of the block and
the size of the block. Note that nothing prevents the application the size of the block. Note that nothing prevents the application
from defining different sized blocks in a file. from defining different sized blocks in a file.
7.1.1. Data Hole Representation 8.1.1. Data Block Representation
struct app_data_hole4 {
offset4 adh_offset;
length4 adh_block_size;
length4 adh_block_count;
length4 adh_reloff_blocknum;
count4 adh_block_num;
length4 adh_reloff_pattern;
opaque adh_pattern<>;
};
The app_data_hole4 structure captures the abstraction presented for
the ADH. The additional fields present are to allow the transmission
of adh_block_count ADHs at one time. We also use adh_block_num to
convey the ADHN of the first block in the sequence. Each ADH will
contain the same adh_pattern string.
As both adh_block_num and adh_pattern are optional, if either
adh_reloff_pattern or adh_reloff_blocknum is set to NFS4_UINT64_MAX,
then the corresponding field is not set in any of the ADH.
7.1.2. Data Content
/* struct app_data_block4 {
* Use an enum such that we can extend new types. offset4 adb_offset;
*/ length4 adb_block_size;
enum data_content4 { length4 adb_block_count;
NFS4_CONTENT_DATA = 0, length4 adb_reloff_blocknum;
NFS4_CONTENT_APP_DATA_HOLE = 1, count4 adb_block_num;
NFS4_CONTENT_HOLE = 2 length4 adb_reloff_pattern;
opaque adb_pattern<>;
}; };
The app_data_block4 structure captures the abstraction presented for
the ADB. The additional fields present are to allow the transmission
of adb_block_count ADBs at one time. We also use adb_block_num to
convey the ADBN of the first block in the sequence. Each ADB will
contain the same adb_pattern string.
New operations might need to differentiate between wanting to access As both adb_block_num and adb_pattern are optional, if either
data versus an ADH. Also, future minor versions might want to adb_reloff_pattern or adb_reloff_blocknum is set to NFS4_UINT64_MAX,
introduce new data formats. This enumeration allows that to occur. then the corresponding field is not set in any of the ADB.
7.2. An Example of Detecting Corruption 8.2. An Example of Detecting Corruption
In this section, we define an ADH format in which corruption can be In this section, we define an ADB format in which corruption can be
detected. Note that this is just one possible format and means to detected. Note that this is just one possible format and means to
detect corruption. detect corruption.
Consider a very basic implementation of an operating system's disk Consider a very basic implementation of an operating system's disk
blocks. A block is either data or it is an indirect block which blocks. A block is either data or it is an indirect block which
allows for files to be larger than one block. It is desired to be allows for files to be larger than one block. It is desired to be
able to initialize a block. Lastly, to quickly unlink a file, a able to initialize a block. Lastly, to quickly unlink a file, a
block can be marked invalid. The contents remain intact - which block can be marked invalid. The contents remain intact - which
would enable this OS application to undelete a file. would enable this OS application to undelete a file.
The application defines 4k sized data blocks, with an 8 byte block The application defines 4k sized data blocks, with an 8 byte block
counter occurring at offset 0 in the block, and with the guard counter occurring at offset 0 in the block, and with the guard
pattern occurring at offset 8 inside the block. Furthermore, the pattern occurring at offset 8 inside the block. Furthermore, the
guard pattern can take one of four states: guard pattern can take one of four states:
0xfeedface - This is the FREE state and indicates that the ADH 0xfeedface - This is the FREE state and indicates that the ADB
format has been applied. format has been applied.
0xcafedead - This is the DATA state and indicates that real data 0xcafedead - This is the DATA state and indicates that real data
has been written to this block. has been written to this block.
0xe4e5c001 - This is the INDIRECT state and indicates that the 0xe4e5c001 - This is the INDIRECT state and indicates that the
block contains block counter numbers that are chained off of this block contains block counter numbers that are chained off of this
block. block.
0xba1ed4a3 - This is the INVALID state and indicates that the block 0xba1ed4a3 - This is the INVALID state and indicates that the block
contains data whose contents are garbage. contains data whose contents are garbage.
Finally, it also defines an 8 byte checksum [Baira08] starting at Finally, it also defines an 8 byte checksum [Baira08] starting at
byte 16 which applies to the remaining contents of the block. If the byte 16 which applies to the remaining contents of the block. If the
state is FREE, then that checksum is trivially zero. As such, the state is FREE, then that checksum is trivially zero. As such, the
application has no need to transfer the checksum implicitly inside application has no need to transfer the checksum implicitly inside
the ADH - it need not make the transfer layer aware of the fact that the ADB - it need not make the transfer layer aware of the fact that
there is a checksum (see [Ashdown08] for an example of checksums used there is a checksum (see [Ashdown08] for an example of checksums used
to detect corruption in application data blocks). to detect corruption in application data blocks).
Corruption in each ADH can thus be detected: Corruption in each ADB can thus be detected:
o If the guard pattern is anything other than one of the allowed o If the guard pattern is anything other than one of the allowed
values, including all zeros. values, including all zeros.
o If the guard pattern is FREE and any other byte in the remainder o If the guard pattern is FREE and any other byte in the remainder
of the ADH is anything other than zero. of the ADB is anything other than zero.
o If the guard pattern is anything other than FREE, then if the o If the guard pattern is anything other than FREE, then if the
stored checksum does not match the computed checksum. stored checksum does not match the computed checksum.
o If the guard pattern is INDIRECT and one of the stored indirect o If the guard pattern is INDIRECT and one of the stored indirect
block numbers has a value greater than the number of ADHs in the block numbers has a value greater than the number of ADBs in the
file. file.
o If the guard pattern is INDIRECT and one of the stored indirect o If the guard pattern is INDIRECT and one of the stored indirect
block numbers is a duplicate of another stored indirect block block numbers is a duplicate of another stored indirect block
number. number.
As can be seen, the application can detect errors based on the As can be seen, the application can detect errors based on the
combination of the guard pattern state and the checksum. But also, combination of the guard pattern state and the checksum. But also,
the application can detect corruption based on the state and the the application can detect corruption based on the state and the
contents of the ADH. This last point is important in validating the contents of the ADB. This last point is important in validating the
minimum amount of data we incorporated into our generic framework. minimum amount of data we incorporated into our generic framework.
I.e., the guard pattern is sufficient in allowing applications to I.e., the guard pattern is sufficient in allowing applications to
design their own corruption detection. design their own corruption detection.
Finally, it is important to note that none of these corruption checks Finally, it is important to note that none of these corruption checks
occur in the transport layer. The server and client components are occur in the transport layer. The server and client components are
totally unaware of the file format and might report everything as totally unaware of the file format and might report everything as
being transferred correctly even in the case the application detects being transferred correctly even in the case the application detects
corruption. corruption.
7.3. Example of READ_PLUS 8.3. Example of READ_PLUS
The hypothetical application presented in Section 7.2 can be used to The hypothetical application presented in Section 8.2 can be used to
illustrate how READ_PLUS would return an array of results. A file is illustrate how READ_PLUS would return an array of results. A file is
created and initialized with 100 4k ADHs in the FREE state: created and initialized with 100 4k ADBs in the FREE state with the
WRITE_SAME operation (see Section 15.13):
WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface} WRITE_SAME {0, 4k, 100, 0, 0, 8, 0xfeedface}
Further, assume the application writes a single ADH at 16k, changing Further, assume the application writes a single ADB at 16k, changing
the guard pattern to 0xcafedead, we would then have in memory: the guard pattern to 0xcafedead, we would then have in memory:
0 -> (16k - 1) : 4k, 4, 0, 0, 8, 0xfeedface 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00
16k -> (20k - 1) : 00 00 00 05 ca fe de ad XX XX ... XX XX 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00
20k -> 400k : 4k, 95, 0, 6, 0xfeedface 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00
12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00
16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00
20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00
24k -> (28k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00
...
396k -> (400k - 1) : 00 00 00 63 fe ed fa ce 00 00 ... 00 00
And when the client did a READ_PLUS of 64k at the start of the file, And when the client did a READ_PLUS of 64k at the start of the file,
it would get back a result of an ADH, some data, and a final ADH: it could get back a result of data:
ADH {0, 4, 0, 0, 8, 0xfeedface} 0k -> (4k - 1) : 00 00 00 00 fe ed fa ce 00 00 ... 00 00
data 4k 4k -> (8k - 1) : 00 00 00 01 fe ed fa ce 00 00 ... 00 00
ADH {20k, 4k, 59, 0, 6, 0xfeedface} 8k -> (12k - 1) : 00 00 00 02 fe ed fa ce 00 00 ... 00 00
12k -> (16k - 1) : 00 00 00 03 fe ed fa ce 00 00 ... 00 00
16k -> (20k - 1) : 00 00 00 04 ca fe de ad 00 00 ... 00 00
20k -> (24k - 1) : 00 00 00 05 fe ed fa ce 00 00 ... 00 00
24k -> (24k - 1) : 00 00 00 06 fe ed fa ce 00 00 ... 00 00
...
62k -> (64k - 1) : 00 00 00 15 fe ed fa ce 00 00 ... 00 00
8. Labeled NFS 8.4. An Example of Zeroing Space
8.1. Introduction A simpler use case for WRITE_SAME are applications that want to
efficiently zero out a file, but do not want to modify space
reservations. This can easily be archived by a call to WRITE_SAME
without a ADB block numbers and pattern, e.g.:
WRITE_SAME {0, 1k, 10000, 0, 0, 0, 0}
9. Labeled NFS
9.1. Introduction
Access control models such as Unix permissions or Access Control Access control models such as Unix permissions or Access Control
Lists are commonly referred to as Discretionary Access Control (DAC) Lists are commonly referred to as Discretionary Access Control (DAC)
models. These systems base their access decisions on user identity models. These systems base their access decisions on user identity
and resource ownership. In contrast Mandatory Access Control (MAC) and resource ownership. In contrast Mandatory Access Control (MAC)
models base their access control decisions on the label on the models base their access control decisions on the label on the
subject (usually a process) and the object it wishes to access subject (usually a process) and the object it wishes to access
[Haynes13]. These labels may contain user identity information but [RFC7204]. These labels may contain user identity information but
usually contain additional information. In DAC systems users are usually contain additional information. In DAC systems users are
free to specify the access rules for resources that they own. MAC free to specify the access rules for resources that they own. MAC
models base their security decisions on a system wide policy models base their security decisions on a system wide policy
established by an administrator or organization which the users do established by an administrator or organization which the users do
not have the ability to override. In this section, we add a MAC not have the ability to override. In this section, we add a MAC
model to NFSv4.2. model to NFSv4.2.
The first change necessary is to devise a method for transporting and The first change necessary is to devise a method for transporting and
storing security label data on NFSv4 file objects. Security labels storing security label data on NFSv4 file objects. Security labels
have several semantics that are met by NFSv4 recommended attributes have several semantics that are met by NFSv4 recommended attributes
skipping to change at page 40, line 11 skipping to change at page 41, line 30
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. If a
client wants to detect if the label has changed, it MAY use VERIFY client wants to detect if the label has changed, it MAY use VERIFY
and NVERIFY on FATTR4_CHANGE_SEC_LABEL to detect that the and NVERIFY on FATTR4_CHANGE_SEC_LABEL to detect that the
FATTR4_SEC_LABEL has been modified. 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. modifications are outside the scope of this document (see
[rpcsec_gssv3]).
8.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
semantic meaning of its components. These specifiers exist in a semantic meaning of its components. These specifiers exist in a
registry associated with documents describing the format and registry associated with documents describing the format and
semantics of the label. semantics of the label.
Label Format Registry: is the IANA registry containing all Label Format Registry: is the IANA registry containing all
registered LFS along with references to the documents that registered LFS along with references to the documents that
describe the syntactic format and semantics of the security label. describe the syntactic format and semantics of the security label.
skipping to change at page 40, line 47 skipping to change at page 42, line 20
MAC-Aware: is a server which can transmit and store object labels. MAC-Aware: is a server which can transmit and store object labels.
MAC-Functional: is a client or server which is Labeled NFS enabled. MAC-Functional: is a client or server which is Labeled NFS enabled.
Such a system can interpret labels and apply policies based on the Such a system can interpret labels and apply policies based on the
security system. security system.
Multi-Level Security (MLS): is a traditional model where objects are Multi-Level Security (MLS): is a traditional model where objects are
given a sensitivity level (Unclassified, Secret, Top Secret, etc) given a sensitivity level (Unclassified, Secret, Top Secret, etc)
and a category set [MLS]. and a category set [MLS].
8.3. MAC Security Attribute 9.3. MAC Security Attribute
MAC models base access decisions on security attributes bound to MAC models base access decisions on security attributes bound to
subjects and objects. This information can range from a user subjects and objects. This information can range from a user
identity for an identity based MAC model, sensitivity levels for identity for an identity based MAC model, sensitivity levels for
Multi-level security, or a type for Type Enforcement. These models Multi-level security, or a type for Type Enforcement. These models
base their decisions on different criteria but the semantics of the base their decisions on different criteria but the semantics of the
security attribute remain the same. The semantics required by the security attribute remain the same. The semantics required by the
security attributes are listed below: security attributes are listed below:
o MUST provide flexibility with respect to the MAC model. o MUST provide flexibility with respect to the MAC model.
skipping to change at page 41, line 24 skipping to change at page 42, line 45
o MUST provide the ability to enforce access control decisions both o MUST provide the ability to enforce access control decisions both
on the client and the server. on the client and the server.
o MUST NOT expose an object to either the client or server name o MUST NOT expose an object to either the client or server name
space before its security information has been bound to it. space before its security information has been bound to it.
NFSv4 implements the security attribute as a recommended attribute. NFSv4 implements the security attribute as a recommended attribute.
These attributes have a fixed format and semantics, which conflicts These attributes have a fixed format and semantics, which conflicts
with the flexible nature of the security attribute. To resolve this with the flexible nature of the security attribute. To resolve this
the security attribute consists of two components. The first the security attribute consists of two components. The first
component is a LFS as defined in [Quigley11] to allow for component is a LFS as defined in [Quigley14] to allow for
interoperability between MAC mechanisms. The second component is an interoperability between MAC mechanisms. The second component is an
opaque field which is the actual security attribute data. To allow opaque field which is the actual security attribute data. To allow
for various MAC models, NFSv4 should be used solely as a transport for various MAC models, NFSv4 should be used solely as a transport
mechanism for the security attribute. It is the responsibility of mechanism for the security attribute. It is the responsibility of
the endpoints to consume the security attribute and make access the endpoints to consume the security attribute and make access
decisions based on their respective models. In addition, creation of decisions based on their respective models. In addition, creation of
objects through OPEN and CREATE allows for the security attribute to objects through OPEN and CREATE allows for the security attribute to
be specified upon creation. By providing an atomic create and set be specified upon creation. By providing an atomic create and set
operation for the security attribute it is possible to enforce the operation for the security attribute it is possible to enforce the
second and fourth requirements. The recommended attribute second and fourth requirements. The recommended attribute
FATTR4_SEC_LABEL (see Section 12.2.2) will be used to satisfy this FATTR4_SEC_LABEL (see Section 13.2.2) will be used to satisfy this
requirement. requirement.
8.3.1. Delegations 9.3.1. Delegations
In the event that a security attribute is changed on the server while In the event that a security attribute is changed on the server while
a client holds a delegation on the file, both the server and the a client holds a delegation on the file, both the server and the
client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661]) client MUST follow the NFSv4.1 protocol (see Chapter 10 of [RFC5661])
with respect to attribute changes. It SHOULD flush all changes back with respect to attribute changes. It SHOULD flush all changes back
to the server and relinquish the delegation. to the server and relinquish the delegation.
8.3.2. Permission Checking 9.3.2. Permission Checking
It is not feasible to enumerate all possible MAC models and even It is not feasible to enumerate all possible MAC models and even
levels of protection within a subset of these models. This means levels of protection within a subset of these models. This means
that the NFSv4 client and servers cannot be expected to directly make that the NFSv4 client and servers cannot be expected to directly make
access control decisions based on the security attribute. Instead access control decisions based on the security attribute. Instead
NFSv4 should defer permission checking on this attribute to the host NFSv4 should defer permission checking on this attribute to the host
system. These checks are performed in addition to existing DAC and system. These checks are performed in addition to existing DAC and
ACL checks outlined in the NFSv4 protocol. Section 8.6 gives a ACL checks outlined in the NFSv4 protocol. Section 9.6 gives a
specific example of how the security attribute is handled under a specific example of how the security attribute is handled under a
particular MAC model. particular MAC model.
8.3.3. Object Creation 9.3.3. Object Creation
When creating files in NFSv4 the OPEN and CREATE operations are used. When creating files in NFSv4 the OPEN and CREATE operations are used.
One of the parameters to these operations is an fattr4 structure One of the parameters to these operations is an fattr4 structure
containing the attributes the file is to be created with. This containing the attributes the file is to be created with. This
allows NFSv4 to atomically set the security attribute of files upon allows NFSv4 to atomically set the security attribute of files upon
creation. When a client is MAC-Functional it must always provide the creation. When a client is MAC-Functional it must always provide the
initial security attribute upon file creation. In the event that the initial security attribute upon file creation. In the event that the
server is MAC-Functional as well, it should determine by policy server is MAC-Functional as well, it should determine by policy
whether it will accept the attribute from the client or instead make whether it will accept the attribute from the client or instead make
the determination itself. If the client is not MAC-Functional, then the determination itself. If the client is not MAC-Functional, then
the MAC-Functional server must decide on a default label. A more in the MAC-Functional server must decide on a default label. A more in
depth explanation can be found in Section 8.6. depth explanation can be found in Section 9.6.
8.3.4. Existing Objects 9.3.4. Existing Objects
Note that under the MAC model, all objects must have labels. Note that under the MAC model, all objects must have labels.
Therefore, if an existing server is upgraded to include Labeled NFS Therefore, if an existing server is upgraded to include Labeled NFS
support, then it is the responsibility of the security system to support, then it is the responsibility of the security system to
define the behavior for existing objects. define the behavior for existing objects.
8.3.5. Label Changes 9.3.5. Label Changes
If there are open delegations on the file belonging to client other If there are open delegations on the file belonging to client other
than the one making the label change, then the process described in than the one making the label change, then the process described in
Section 8.3.1 must be followed. In short, the delegation will be Section 9.3.1 must be followed. In short, the delegation will be
recalled, which effectively notifies the client of the change. recalled, which effectively notifies the client of the change.
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. The clients could also be configured to periodically
VERIFY/NVERIFY the FATTR4_CHANGE_SEC_LABEL attribute to determine VERIFY/NVERIFY the FATTR4_CHANGE_SEC_LABEL attribute to determine
when the label has changed. When a change is detected, then the when the label has changed. When a change is detected, then the
client could take the costlier action of retrieving the client could take the costlier action of retrieving the
FATTR4_SEC_LABEL. FATTR4_SEC_LABEL.
8.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.
8.5. Discovery of Server Labeled NFS Support 9.5. Discovery of Server Labeled NFS Support
The server can easily determine that a client supports Labeled NFS The server can easily determine that a client supports Labeled NFS
when it queries for the FATTR4_SEC_LABEL label for an object. The when it queries for the FATTR4_SEC_LABEL label for an object. The
client might need to discover which LFS the server supports. client might need to discover which LFS the server supports.
The following compound MUST NOT be denied by any MAC label check: The following compound MUST NOT be denied by any MAC label check:
PUTROOTFH, GETATTR {FATTR4_SEC_LABEL} PUTROOTFH, GETATTR {FATTR4_SEC_LABEL}
Note that the server might have imposed a security flavor on the root Note that the server might have imposed a security flavor on the root
that precludes such access. I.e., if the server requires kerberized that precludes such access. I.e., if the server requires kerberized
access and the client presents a compound with AUTH_SYS, then the access and the client presents a compound with AUTH_SYS, then the
server is allowed to return NFS4ERR_WRONGSEC in this case. But if server is allowed to return NFS4ERR_WRONGSEC in this case. But if
the client presents a correct security flavor, then the server MUST the client presents a correct security flavor, then the server MUST
return the FATTR4_SEC_LABEL attribute with the supported LFS filled return the FATTR4_SEC_LABEL attribute with the supported LFS filled
in. in.
8.6. MAC Security NFS Modes of Operation 9.6. MAC Security NFS Modes of Operation
A system using Labeled NFS may operate in two modes. The first mode A system using Labeled NFS may operate in two modes. The first mode
provides the most protection and is called "full mode". In this mode provides the most protection and is called "full mode". In this mode
both the client and server implement a MAC model allowing each end to both the client and server implement a MAC model allowing each end to
make an access control decision. The remaining mode is called the make an access control decision. The remaining mode is called the
"guest mode" and in this mode one end of the connection is not "guest mode" and in this mode one end of the connection is not
implementing a MAC model and thus offers less protection than full implementing a MAC model and thus offers less protection than full
mode. mode.
8.6.1. Full Mode 9.6.1. Full Mode
Full mode environments consist of MAC-Functional NFSv4 servers and Full mode environments consist of MAC-Functional NFSv4 servers and
clients and may be composed of mixed MAC models and policies. The clients and may be composed of mixed MAC models and policies. The
system requires that both the client and server have an opportunity system requires that both the client and server have an opportunity
to perform an access control check based on all relevant information to perform an access control check based on all relevant information
within the network. The file object security attribute is provided within the network. The file object security attribute is provided
using the mechanism described in Section 8.3. using the mechanism described in Section 9.3.
Fully MAC-Functional NFSv4 servers are not possible in the absence of Fully MAC-Functional NFSv4 servers are not possible in the absence of
RPC layer modifications to support subject label transport. However, RPC layer modifications to support subject label transport. However,
servers may make decisions based on the RPC credential information servers may make decisions based on the RPC credential information
available and future specifications may provide subject label available and future specifications may provide subject label
transport. transport.
8.6.1.1. Initial Labeling and Translation 9.6.1.1. Initial Labeling and Translation
The ability to create a file is an action that a MAC model may wish The ability to create a file is an action that a MAC model may wish
to mediate. The client is given the responsibility to determine the to mediate. The client is given the responsibility to determine the
initial security attribute to be placed on a file. This allows the initial security attribute to be placed on a file. This allows the
client to make a decision as to the acceptable security attributes to client to make a decision as to the acceptable security attributes to
create a file with before sending the request to the server. Once create a file with before sending the request to the server. Once
the server receives the creation request from the client it may the server receives the creation request from the client it may
choose to evaluate if the security attribute is acceptable. choose to evaluate if the security attribute is acceptable.
Security attributes on the client and server may vary based on MAC Security attributes on the client and server may vary based on MAC
skipping to change at page 44, line 31 skipping to change at page 46, line 5
identify the format and meaning of the opaque portion of the security identify the format and meaning of the opaque portion of the security
attribute. A full mode environment may contain hosts operating in attribute. A full mode environment may contain hosts operating in
several different LFSs. In this case a mechanism for translating the several different LFSs. In this case a mechanism for translating the
opaque portion of the security attribute is needed. The actual opaque portion of the security attribute is needed. The actual
translation function will vary based on MAC model and policy and is translation function will vary based on MAC model and policy and is
out of the scope of this document. If a translation is unavailable out of the scope of this document. If a translation is unavailable
for a given LFS then the request MUST be denied. Another recourse is for a given LFS then the request MUST be denied. Another recourse is
to allow the host to provide a fallback mapping for unknown security to allow the host to provide a fallback mapping for unknown security
attributes. attributes.
8.6.1.2. Policy Enforcement 9.6.1.2. Policy Enforcement
In full mode access control decisions are made by both the clients In full mode access control decisions are made by both the clients
and servers. When a client makes a request it takes the security and servers. When a client makes a request it takes the security
attribute from the requesting process and makes an access control attribute from the requesting process and makes an access control
decision based on that attribute and the security attribute of the decision based on that attribute and the security attribute of the
object it is trying to access. If the client denies that access an object it is trying to access. If the client denies that access an
RPC call to the server is never made. If however the access is RPC call to the server is never made. If however the access is
allowed the client will make a call to the NFS server. allowed the client will make a call to the NFS server.
When the server receives the request from the client it uses any When the server receives the request from the client it uses any
skipping to change at page 45, line 11 skipping to change at page 46, line 31
Future protocol extensions may also allow the server to factor into Future protocol extensions may also allow the server to factor into
the decision a security label extracted from the RPC request. the decision a security label extracted from the RPC request.
Implementations MAY validate security attributes supplied over the Implementations MAY validate security attributes supplied over the
network to ensure that they are within a set of attributes permitted network to ensure that they are within a set of attributes permitted
from a specific peer, and if not, reject them. Note that a system from a specific peer, and if not, reject them. Note that a system
may permit a different set of attributes to be accepted from each may permit a different set of attributes to be accepted from each
peer. peer.
8.6.1.3. Limited Server 9.6.1.3. Limited Server
A Limited Server mode (see Section 3.5.2 of [Haynes13]) consists of a A Limited Server mode (see Section 4.2 of [RFC7204]) consists of a
server which is label aware, but does not enforce policies. Such a server which is label aware, but does not enforce policies. Such a
server will store and retrieve all object labels presented by server will store and retrieve all object labels presented by
clients, utilize the methods described in Section 8.3.5 to allow the clients, utilize the methods described in Section 9.3.5 to allow the
clients to detect changing labels, but may not factor the label into clients to detect changing labels, but may not factor the label into
access decisions. Instead, it will expect the clients to enforce all access decisions. Instead, it will expect the clients to enforce all
such access locally. such access locally.
8.6.2. Guest Mode 9.6.2. Guest Mode
Guest mode implies that either the client or the server does not Guest mode implies that either the client or the server does not
handle labels. If the client is not Labeled NFS aware, then it will handle labels. If the client is not Labeled NFS aware, then it will
not offer subject labels to the server. The server is the only not offer subject labels to the server. The server is the only
entity enforcing policy, and may selectively provide standard NFS entity enforcing policy, and may selectively provide standard NFS
services to clients based on their authentication credentials and/or services to clients based on their authentication credentials and/or
associated network attributes (e.g., IP address, network interface). associated network attributes (e.g., IP address, network interface).
The level of trust and access extended to a client in this mode is The level of trust and access extended to a client in this mode is
configuration-specific. If the server is not Labeled NFS aware, then configuration-specific. If the server is not Labeled NFS aware, then
it will not return object labels to the client. Clients in this it will not return object labels to the client. Clients in this
environment are may consist of groups implementing different MAC environment are may consist of groups implementing different MAC
model policies. The system requires that all clients in the model policies. The system requires that all clients in the
environment be responsible for access control checks. environment be responsible for access control checks.
8.7. Security Considerations 9.7. Security Considerations
This entire chapter deals with security issues. This entire chapter deals with security issues.
Depending on the level of protection the MAC system offers there may Depending on the level of protection the MAC system offers there may
be a requirement to tightly bind the security attribute to the data. be a requirement to tightly bind the security attribute to the data.
When only one of the client or server enforces labels, it is When only one of the client or server enforces labels, it is
important to realize that the other side is not enforcing MAC important to realize that the other side is not enforcing MAC
protections. Alternate methods might be in use to handle the lack of protections. Alternate methods might be in use to handle the lack of
MAC support and care should be taken to identify and mitigate threats MAC support and care should be taken to identify and mitigate threats
from possible tampering outside of these methods. from possible tampering outside of these methods.
An example of this is that a server that modifies READDIR or LOOKUP An example of this is that a server that modifies READDIR or LOOKUP
results based on the client's subject label might want to always results based on the client's subject label might want to always
construct the same subject label for a client which does not present construct the same subject label for a client which does not present
one. This will prevent a non-Labeled NFS client from mixing entries one. This will prevent a non-Labeled NFS client from mixing entries
in the directory cache. in the directory cache.
9. Sharing change attribute implementation details with NFSv4 clients 10. Sharing change attribute implementation details with NFSv4 clients
9.1. Introduction 10.1. Introduction
Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1 Although both the NFSv4 [I-D.ietf-nfsv4-rfc3530bis] and NFSv4.1
protocol [RFC5661], define the change attribute as being mandatory to protocol [RFC5661], define the change attribute as being mandatory to
implement, there is little in the way of guidance. The only mandated implement, there is little in the way of guidance. The only mandated
feature is that the value must change whenever the file data or feature is that the value must change whenever the file data or
metadata change. metadata change.
While this allows for a wide range of implementations, it also leaves While this allows for a wide range of implementations, it also leaves
the client with a conundrum: how does it determine which is the most the client with a conundrum: how does it determine which is the most
recent value for the change attribute in a case where several RPC recent value for the change attribute in a case where several RPC
skipping to change at page 46, line 33 skipping to change at page 48, line 5
two change attribute values returned in the replies to the GETATTR two change attribute values returned in the replies to the GETATTR
requests correspond to the most recent state of the file? In some requests correspond to the most recent state of the file? In some
cases, the only recourse may be to send another COMPOUND containing a cases, the only recourse may be to send another COMPOUND containing a
third GETATTR that is fully serialized with the first two. third GETATTR that is fully serialized with the first two.
NFSv4.2 avoids this kind of inefficiency by allowing the server to NFSv4.2 avoids this kind of inefficiency by allowing the server to
share details about how the change attribute is expected to evolve, share details about how the change attribute is expected to evolve,
so that the client may immediately determine which, out of the so that the client may immediately determine which, out of the
several change attribute values returned by the server, is the most several change attribute values returned by the server, is the most
recent. change_attr_type is defined as a new recommended attribute recent. change_attr_type is defined as a new recommended attribute
(see Section 12.2.1), and is per file system. (see Section 13.2.1), and is per file system.
10. 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 3.4) and in Labeled NFS (see Section 8.7). (see Section 4.4) and in Labeled NFS (see Section 9.7).
11. 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.
11.1. Error Definitions 12.1. Error Definitions
Protocol Error Definitions Protocol Error Definitions
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
| Error | Number | Description | | Error | Number | Description |
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
| NFS4ERR_BADLABEL | 10093 | Section 11.1.3.1 | | NFS4ERR_BADLABEL | 10093 | Section 12.1.3.1 |
| NFS4ERR_OFFLOAD_DENIED | 10091 | Section 11.1.2.1 | | NFS4ERR_OFFLOAD_DENIED | 10091 | Section 12.1.2.1 |
| NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 11.1.2.2 | | NFS4ERR_PARTNER_NO_AUTH | 10089 | Section 12.1.2.2 |
| NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 11.1.2.3 | | NFS4ERR_PARTNER_NOTSUPP | 10088 | Section 12.1.2.3 |
| NFS4ERR_UNION_NOTSUPP | 10090 | Section 11.1.1.1 | | NFS4ERR_UNION_NOTSUPP | 10090 | Section 12.1.1.1 |
| NFS4ERR_WRONG_LFS | 10092 | Section 11.1.3.2 | | NFS4ERR_WRONG_LFS | 10092 | Section 12.1.3.2 |
+-------------------------+--------+------------------+ +-------------------------+--------+------------------+
Table 1 Table 1
11.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.
11.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090) 12.1.1.1. NFS4ERR_UNION_NOTSUPP (Error Code 10090)
One of the arguments to the operation is a discriminated union and One of the arguments to the operation is a discriminated union and
while the server supports the given operation, it does not support while the server supports the given operation, it does not support
the selected arm of the discriminated union. the selected arm of the discriminated union.
11.1.2. Server to Server Copy Errors 12.1.2. Server to Server Copy Errors
These errors deal with the interaction between server to server These errors deal with the interaction between server to server
copies. copies.
11.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.
11.1.2.2. NFS4ERR_PARTNER_NO_AUTH (Error Code 10089) 12.1.2.2. 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.
11.1.2.3. NFS4ERR_PARTNER_NOTSUPP (Error Code 10088) 12.1.2.3. 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.
11.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.
11.1.3.1. NFS4ERR_BADLABEL (Error Code 10093) 12.1.3.1. NFS4ERR_BADLABEL (Error Code 10093)
The label specified is invalid in some manner. The label specified is invalid in some manner.
11.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092) 12.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092)
The LFS specified in the subject label is not compatible with the LFS The LFS specified in the subject label is not compatible with the LFS
in the object label. in the object label.
11.2. New Operations and Their Valid Errors 12.2. New Operations and Their Valid Errors
This section contains a table that gives the valid error returns for This section contains a table that gives the valid error returns for
each new NFSv4.2 protocol operation. The error code NFS4_OK each new NFSv4.2 protocol operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be (indicating no error) is not listed but should be understood to be
returnable by all new operations. The error values for all other returnable by all new operations. The error values for all other
operations are defined in Section 15.2 of [RFC5661]. operations are defined in Section 15.2 of [RFC5661].
Valid Error Returns for Each New Protocol Operation Valid Error Returns for Each New Protocol Operation
+----------------+--------------------------------------------------+ +----------------+--------------------------------------------------+
| Operation | Errors | | Operation | Errors |
+----------------+--------------------------------------------------+ +----------------+--------------------------------------------------+
| ALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_MOVED, |
| | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | COPY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, |
| | NFS4ERR_METADATA_NOTSUPP, NFS4ERR_MOVED, | | | NFS4ERR_METADATA_NOTSUPP, NFS4ERR_MOVED, |
| | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, | | | NFS4ERR_NOFILEHANDLE, NFS4ERR_NOSPC, |
| | NFS4ERR_OFFLOAD_DENIED, NFS4ERR_OLD_STATEID, | | | NFS4ERR_OFFLOAD_DENIED, NFS4ERR_OLD_STATEID, |
skipping to change at page 49, line 21 skipping to change at page 51, line 9
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, |
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_WRONG_TYPE | | | NFS4ERR_WRONG_TYPE |
| DEALLOCATE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
| | NFS4ERR_FBIG, NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, |
| | NFS4ERR_INVAL, NFS4ERR_IO, NFS4ERR_ISDIR, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| OFFLOAD_ABORT | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, | | OFFLOAD_ABORT | 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, | | OFFLOAD_REVOKE | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_COMPLETE_ALREADY, NFS4ERR_DELAY, | | | NFS4ERR_COMPLETE_ALREADY, NFS4ERR_DELAY, |
| | NFS4ERR_GRACE, NFS4ERR_INVALID, NFS4ERR_MOVED, | | | NFS4ERR_GRACE, NFS4ERR_INVALID, NFS4ERR_MOVED, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OP_NOT_IN_SESSION, | | | NFS4ERR_NOTSUPP, NFS4ERR_OP_NOT_IN_SESSION, |
skipping to change at page 49, line 45 skipping to change at page 51, line 48
| | 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, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_WRONG_TYPE | | | NFS4ERR_WRONG_TYPE |
| SEEK | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | SEEK | 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, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, | | | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_NOTSUPP, NFS4ERR_OLD_STATEID, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | | | NFS4ERR_OPENMODE, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_PNFS_IO_HOLE, NFS4ERR_PNFS_NO_LAYOUT, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, | | | NFS4ERR_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, | | | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE | | | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE |
| SEQUENCE | NFS4ERR_BADSESSION, NFS4ERR_BADSLOT, | | SEQUENCE | NFS4ERR_BADSESSION, NFS4ERR_BADSLOT, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_HIGH_SLOT, | | | NFS4ERR_BADXDR, NFS4ERR_BAD_HIGH_SLOT, |
| | NFS4ERR_CONN_NOT_BOUND_TO_SESSION, | | | NFS4ERR_CONN_NOT_BOUND_TO_SESSION, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | 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_SEQUENCE_POS, NFS4ERR_SEQ_FALSE_RETRY, | | | NFS4ERR_SEQUENCE_POS, NFS4ERR_SEQ_FALSE_RETRY, |
| | NFS4ERR_SEQ_MISORDERED, NFS4ERR_TOO_MANY_OPS | | | NFS4ERR_SEQ_MISORDERED, NFS4ERR_TOO_MANY_OPS |
| WRITE_HOLE | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, |
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
| WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, | | WRITE_SAME | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, | | | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, | | | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, | | | NFS4ERR_DELEG_REVOKED, NFS4ERR_DQUOT, |
| | NFS4ERR_EXPIRED, NFS4ERR_FBIG, | | | NFS4ERR_EXPIRED, NFS4ERR_FBIG, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, | | | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, | | | NFS4ERR_IO, NFS4ERR_ISDIR, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, | | | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, | | | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
skipping to change at page 51, line 16 skipping to change at page 53, line 4
| | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, | | | NFS4ERR_NOSPC, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, | | | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, | | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_PNFS_IO_HOLE, |
| | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_PNFS_NO_LAYOUT, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, | | | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, | | | NFS4ERR_ROFS, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_STALE, NFS4ERR_SYMLINK, | | | NFS4ERR_STALE, NFS4ERR_SYMLINK, |
| | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE | | | NFS4ERR_TOO_MANY_OPS, NFS4ERR_WRONG_TYPE |
+----------------+--------------------------------------------------+ +----------------+--------------------------------------------------+
Table 2 Table 2
11.3. New Callback Operations and Their Valid Errors 12.3. New Callback Operations and Their Valid Errors
This section contains a table that gives the valid error returns for This section contains a table that gives the valid error returns for
each new NFSv4.2 callback operation. The error code NFS4_OK each new NFSv4.2 callback operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be (indicating no error) is not listed but should be understood to be
returnable by all new callback operations. The error values for all returnable by all new callback operations. The error values for all
other callback operations are defined in Section 15.3 of [RFC5661]. other callback operations are defined in Section 15.3 of [RFC5661].
Valid Error Returns for Each New Protocol Callback Operation Valid Error Returns for Each New Protocol Callback Operation
+------------+------------------------------------------------------+ +------------+------------------------------------------------------+
skipping to change at page 51, line 43 skipping to change at page 53, line 30
| CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, | | CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, | | | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, | | | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, | | | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, |
| | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, | | | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_TOO_MANY_OPS | | | NFS4ERR_TOO_MANY_OPS |
+------------+------------------------------------------------------+ +------------+------------------------------------------------------+
Table 3 Table 3
12. New File Attributes 13. New File Attributes
12.1. New RECOMMENDED Attributes - List and Definition References 13.1. New RECOMMENDED Attributes - List and Definition References
The list of new RECOMMENDED attributes appears in Table 4. The The list of new RECOMMENDED attributes appears in Table 4. The
meaning of the columns of the table are: meaning of the columns of the table are:
Name: The name of the attribute. Name: The name of the attribute.
Id: The number assigned to the attribute. In the event of conflicts Id: The number assigned to the attribute. In the event of conflicts
between the assigned number and [NFSv42xdr], the latter is likely between the assigned number and [NFSv42xdr], the latter is likely
authoritative, but should be resolved with Errata to this document authoritative, but should be resolved with Errata to this document
and/or [NFSv42xdr]. See [IESG08] for the Errata process. and/or [NFSv42xdr]. See [IESG08] for the Errata process.
skipping to change at page 52, line 26 skipping to change at page 54, line 13
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 12.2.1 | | change_attr_type | 79 | change_attr_type4 | R | Section 13.2.1 |
| sec_label | 80 | sec_label4 | R W | Section 12.2.2 | | sec_label | 80 | sec_label4 | R W | Section 13.2.2 |
| change_sec_label | 81 | change_sec_label4 | R | Section 12.2.3 | | change_sec_label | 77 | change_sec_label4 | R | Section 13.2.3 |
| space_reserved | 77 | boolean | R W | Section 12.2.4 | | space_freed | 78 | length4 | R | Section 13.2.4 |
| space_freed | 78 | length4 | R | Section 12.2.5 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
Table 4 Table 4
12.2. Attribute Definitions 13.2. Attribute Definitions
12.2.1. Attribute 79: change_attr_type 13.2.1. Attribute 79: 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 54, line 7 skipping to change at page 55, line 41
be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This be after a COMPOUND containing a SETATTR, WRITE, or CREATE. This
again allows it to detect changes made in parallel by another client. again allows it to detect changes made in parallel by another client.
The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the The value NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS permits the
same, but only if the client is not doing pNFS WRITEs. same, but only if the client is not doing pNFS WRITEs.
Finally, if the server does not support change_attr_type or if Finally, if the server does not support change_attr_type or if
NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an NFS4_CHANGE_TYPE_IS_UNDEFINED is set, then the server SHOULD make an
effort to implement the change attribute in terms of the effort to implement the change attribute in terms of the
time_metadata attribute. time_metadata attribute.
12.2.2. Attribute 80: sec_label 13.2.2. Attribute 80: 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 54, line 27 skipping to change at page 56, line 20
labelformat_spec4 slai_lfs; labelformat_spec4 slai_lfs;
opaque slai_data<>; opaque slai_data<>;
}; };
The FATTR4_SEC_LABEL contains an array of two components with the The FATTR4_SEC_LABEL contains an array of two components with the
first component being an LFS. It serves to provide the receiving end first component being an LFS. It serves to provide the receiving end
with the information necessary to translate the security attribute with the information necessary to translate the security attribute
into a form that is usable by the endpoint. Label Formats assigned into a form that is usable by the endpoint. Label Formats assigned
an LFS may optionally choose to include a Policy Identifier field to an LFS may optionally choose to include a Policy Identifier field to
allow for complex policy deployments. The LFS and Label Format allow for complex policy deployments. The LFS and Label Format
Registry are described in detail in [Quigley11]. The translation Registry are described in detail in [Quigley14]. The translation
used to interpret the security attribute is not specified as part of used to interpret the security attribute is not specified as part of
the protocol as it may depend on various factors. The second the protocol as it may depend on various factors. The second
component is an opaque section which contains the data of the component is an opaque section which contains the data of the
attribute. This component is dependent on the MAC model to interpret attribute. This component is dependent on the MAC model to interpret
and enforce. and enforce.
In particular, it is the responsibility of the LFS specification to In particular, it is the responsibility of the LFS specification to
define a maximum size for the opaque section, slai_data<>. When define a maximum size for the opaque section, slai_data<>. When
creating or modifying a label for an object, the client needs to be creating or modifying a label for an object, the client needs to be
guaranteed that the server will accept a label that is sized guaranteed that the server will accept a label that is sized
correctly. By both client and server being part of a specific MAC correctly. By both client and server being part of a specific MAC
model, the client will be aware of the size. model, the client will be aware of the size.
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.
12.2.3. Attribute 81: change_sec_label 13.2.3. Attribute 81: 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.
12.2.4. Attribute 77: space_reserved 13.2.4. Attribute 78: space_freed
The space_reserve attribute is a read/write attribute of type
boolean. It is a per file attribute and applies during the lifetime
of the file or until it is turned off. When the space_reserved
attribute is set via SETATTR, the server must ensure that there is
disk space to accommodate every byte in the file before it can return
success. If the server cannot guarantee this, it must return
NFS4ERR_NOSPC.
If the client tries to grow a file which has the space_reserved
attribute set, the server must guarantee that there is disk space to
accommodate every byte in the file with the new size before it can
return success. If the server cannot guarantee this, it must return
NFS4ERR_NOSPC.
It is not required that the server allocate the space to the file
before returning success. The allocation can be deferred, however,
it must be guaranteed that it will not fail for lack of space.
The value of space_reserved can be obtained at any time through
GETATTR. If the size is retrieved at the same time, the client can
determine the size of the reservation.
In order to avoid ambiguity, the space_reserve bit cannot be set
along with the size bit in SETATTR. Increasing the size of a file
with space_reserve set will fail if space reservation cannot be
guaranteed for the new size. If the file size is decreased, space
reservation is only guaranteed for the new size. If a hole is
punched into the file, then the reservation is not changed.
12.2.5. Attribute 78: 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.
13. 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.
The designation of OBSOLESCENT is reserved for those operations which The designation of OBSOLESCENT is reserved for those operations which
are defined in either NFSv4.0 or NFSv4.1 and are intended to be are defined in either NFSv4.0 or NFSv4.1 and are intended to be
classified as MUST NOT be implemented in NFSv4.3. The designation of classified as MUST NOT be implemented in NFSv4.3. The designation of
MUST NOT implement is reserved for those operations that were defined MUST NOT implement is reserved for those operations that were defined
in either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2. in either NFSv4.0 or NFSV4.1 and MUST NOT be implemented in NFSv4.2.
skipping to change at page 57, line 16 skipping to change at page 58, line 28
follows: follows:
pNFS Parallel NFS pNFS Parallel NFS
FDELG File Delegations FDELG File Delegations
DDELG Directory Delegations DDELG Directory Delegations
COPY Server Side Copy COPY Server Side Copy
ADH Application Data Holes ADB Application Data Blocks
Operations Operations
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, | | Operation | EOL, REQ, REC, OPT, | Feature (REQ, REC, |
| | or MNI | or OPT) | | | or MNI | or OPT) |
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
| ALLOCATE | OPT | |
| 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) | | OFFLOAD_ABORT | OPT | COPY (REQ) |
| COPY_NOTIFY | OPT | COPY (REQ) | | COPY_NOTIFY | OPT | COPY (REQ) |
| DEALLOCATE | OPT | |
| OFFLOAD_REVOKE | OPT | COPY (REQ) | | OFFLOAD_REVOKE | OPT | COPY (REQ) |
| OFFLOAD_STATUS | 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 | |
skipping to change at page 58, line 16 skipping to change at page 59, line 31
| LOOKUP | REQ | | | LOOKUP | REQ | |
| LOOKUPP | REQ | | | LOOKUPP | REQ | |
| NVERIFY | REQ | | | NVERIFY | 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 (OBS) | | | READ | REQ | |
| READDIR | REQ | | | READDIR | REQ | |
| READLINK | OPT | | | READLINK | OPT | |
| READ_PLUS | OPT | ADH (REQ) | | READ_PLUS | OPT | |
| RECLAIM_COMPLETE | REQ | | | RECLAIM_COMPLETE | REQ | |
| RELEASE_LOCKOWNER | MNI | | | RELEASE_LOCKOWNER | MNI | |
| REMOVE | REQ | | | REMOVE | REQ | |
| RENAME | REQ | | | RENAME | REQ | |
| RENEW | MNI | | | RENEW | MNI | |
| RESTOREFH | REQ | | | RESTOREFH | REQ | |
| SAVEFH | REQ | | | SAVEFH | REQ | |
| SECINFO | REQ | | | SECINFO | REQ | |
| SECINFO_NO_NAME | REC | pNFS file layout | | SECINFO_NO_NAME | REC | pNFS file layout |
| | | (REQ) | | | | (REQ) |
| SEQUENCE | REQ | | | SEQUENCE | REQ | |
| SETATTR | REQ | | | SETATTR | REQ | |
| SETCLIENTID | MNI | | | SETCLIENTID | MNI | |
| SETCLIENTID_CONFIRM | MNI | | | SETCLIENTID_CONFIRM | MNI | |
| SET_SSV | REQ | | | SET_SSV | REQ | |
| TEST_STATEID | REQ | | | TEST_STATEID | REQ | |
| VERIFY | REQ | | | VERIFY | REQ | |
| WANT_DELEGATION | OPT | FDELG (OPT) | | WANT_DELEGATION | OPT | FDELG (OPT) |
| WRITE | REQ | | | WRITE | REQ | |
| WRITE_HOLE | OPT | | | WRITE_SAME | OPT | ADB (REQ) |
| WRITE_SAME | OPT | ADH (REQ) |
+----------------------+---------------------+----------------------+ +----------------------+---------------------+----------------------+
Callback Operations Callback Operations
+-------------------------+-------------------+---------------------+ +-------------------------+-------------------+---------------------+
| Operation | REQ, REC, OPT, or | Feature (REQ, REC, | | Operation | REQ, REC, OPT, or | Feature (REQ, REC, |
| | MNI | or OPT) | | | MNI | or OPT) |
+-------------------------+-------------------+---------------------+ +-------------------------+-------------------+---------------------+
| CB_OFFLOAD | OPT | COPY (REQ) | | CB_OFFLOAD | OPT | COPY (REQ) |
| CB_GETATTR | OPT | FDELG (REQ) | | CB_GETATTR | OPT | FDELG (REQ) |
| CB_LAYOUTRECALL | OPT | pNFS (REQ) | | CB_LAYOUTRECALL | OPT | pNFS (REQ) |
| CB_NOTIFY | OPT | DDELG (REQ) | | CB_NOTIFY | OPT | DDELG (REQ) |
skipping to change at page 59, line 29 skipping to change at page 60, line 34
| CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS | | CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
| 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) |
+-------------------------+-------------------+---------------------+ +-------------------------+-------------------+---------------------+
14. NFSv4.2 Operations 15. NFSv4.2 Operations
14.1. Operation 59: COPY - Initiate a server-side copy 15.1. Operation 59: ALLOCATE
14.1.1. ARGUMENT 15.1.1. ARGUMENT
struct ALLOCATE4args {
/* CURRENT_FH: file */
stateid4 aa_stateid;
offset4 aa_offset;
length4 aa_length;
};
15.1.2. RESULT
struct ALLOCATE4res {
nfsstat4 ar_status;
};
15.1.3. DESCRIPTION
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
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.
The server will ensure that backing blocks are reserved to the region
specified by aa_offset and aa_length, and that no future writes into
this region will return NFS4ERR_NOSPC. If the region lies partially
or fully outside the current file size the file size will be set to
aa_offset + aa_length implicitly. If the server cannot guarantee
this, it must return NFS4ERR_NOSPC.
The ALLOCATE operation can also be used to extend the size of a file
if the region specified by aa_offset and aa_length extends beyond the
current file size. In that case any data outside of the previous
file size will return zeroes when read before data is written to it.
It is not required that the server allocate the space to the file
before returning success. The allocation can be deferred, however,
it must be guaranteed that it will not fail for lack of space. The
deferral does not result in an asynchronous reply.
The ALLOCATE operation will result in the space_used attribute and
space_freed attributes being increased by the number of bytes
reserved unless they were previously reserved or written and not
shared.
15.2. Operation 60: COPY - Initiate a server-side copy
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;
netloc4 ca_source_server<>; netloc4 ca_source_server<>;
}; };
14.1.2. RESULT 15.2.2. RESULT
struct write_response4 {
stateid4 wr_callback_id<1>;
length4 wr_count;
stable_how4 wr_committed;
verifier4 wr_writeverf;
};
union COPY4res switch (nfsstat4 cr_status) { union COPY4res switch (nfsstat4 cr_status) {
case NFS4_OK: case NFS4_OK:
write_response4 resok4; write_response4 resok4;
default: default:
length4 cr_bytes_copied; length4 cr_bytes_copied;
}; };
14.1.3. DESCRIPTION 15.2.3. DESCRIPTION
The COPY operation is used for both intra-server and inter-server The COPY operation is used for both intra-server and inter-server
copies. In both cases, the COPY is always sent from the client to copies. In both cases, the COPY is always sent from the client to
the destination server of the file copy. The COPY operation requests the destination server of the file copy. The COPY operation requests
that a file be copied from the location specified by the SAVED_FH that a file be copied from the location specified by the SAVED_FH
value to the location specified by the CURRENT_FH. value to the location specified by the CURRENT_FH.
The SAVED_FH must be a regular file. If SAVED_FH is not a regular The SAVED_FH must be a regular file. If SAVED_FH is not a regular
file, the operation MUST fail and return NFS4ERR_WRONG_TYPE. file, the operation MUST fail and return NFS4ERR_WRONG_TYPE.
skipping to change at page 61, line 49 skipping to change at page 64, line 10
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 3.2.5 and Section 3.4.1. considerations are described in Section 4.2.5 and Section 4.4.1.
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 63, line 7 skipping to change at page 65, line 17
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.
14.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side copy 15.3. Operation 61: COPY_NOTIFY - Notify a source server of a future
14.2.1. ARGUMENT
struct OFFLOAD_ABORT4args {
/* CURRENT_FH: destination file */
stateid4 oaa_stateid;
};
14.2.2. RESULT
struct OFFLOAD_ABORT4res {
nfsstat4 oar_status;
};
14.2.3. DESCRIPTION
OFFLOAD_ABORT is used for both intra- and inter-server asynchronous
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
as the context for the previously initiated copy operation.
The result's oar_status field indicates whether the cancel was
successful or not. A value of NFS4_OK indicates that the copy
operation was canceled and no callback will be issued by the server.
A copy operation that is successfully canceled may result in none,
some, or all of the data and/or metadata copied.
If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_ABORT operation.
14.3. Operation 61: COPY_NOTIFY - Notify a source server of a future
copy copy
14.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;
}; };
14.3.2. RESULT 15.3.2. RESULT
struct COPY_NOTIFY4resok { struct COPY_NOTIFY4resok {
nfstime4 cnr_lease_time; nfstime4 cnr_lease_time;
netloc4 cnr_source_server<>; netloc4 cnr_source_server<>;
}; };
union COPY_NOTIFY4res switch (nfsstat4 cnr_status) { union COPY_NOTIFY4res switch (nfsstat4 cnr_status) {
case NFS4_OK: case NFS4_OK:
COPY_NOTIFY4resok resok4; COPY_NOTIFY4resok resok4;
default: default:
void; void;
}; };
14.3.3. DESCRIPTION 15.3.3. DESCRIPTION
This operation is used for an inter-server copy. A client sends this This operation is used for an inter-server copy. A client sends this
operation in a COMPOUND request to the source server to authorize a operation in a COMPOUND request to the source server to authorize a
destination server identified by cna_destination_server to read the destination server identified by cna_destination_server to read the
file specified by CURRENT_FH on behalf of the given user. file specified by CURRENT_FH on behalf of the given user.
The cna_src_stateid MUST refer to either open or locking states The cna_src_stateid MUST refer to either open or locking states
provided earlier by the server. If it is invalid, then the operation provided earlier by the server. If it is invalid, then the operation
MUST fail. MUST fail.
skipping to change at page 65, line 27 skipping to change at page 66, line 44
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 If the client wishes to perform an inter-server copy, the client MUST
send a COPY_NOTIFY to the source server. Therefore, the source send a COPY_NOTIFY to the source server. Therefore, the source
server MUST support COPY_NOTIFY. 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.
14.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination server's copy 15.4. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID
privileges
14.4.1. ARGUMENT
struct OFFLOAD_REVOKE4args {
/* CURRENT_FH: source file */
netloc4 ora_destination_server;
};
14.4.2. RESULT
struct OFFLOAD_REVOKE4res {
nfsstat4 orr_status;
};
14.4.3. DESCRIPTION
This operation is used for an inter-server copy. A client sends this
operation in a COMPOUND request to the source server to revoke the
authorization of a destination server identified by
ora_destination_server from reading the file specified by CURRENT_FH
on behalf of given user. If the ora_destination_server has already
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
on the same server), this operation is unnecessary.
If the server supports COPY_NOTIFY, the server is REQUIRED to support
the OFFLOAD_REVOKE operation.
14.5. Operation 63: OFFLOAD_STATUS - Poll for status of a server-side
copy
14.5.1. ARGUMENT
struct OFFLOAD_STATUS4args {
/* CURRENT_FH: destination file */
stateid4 osa_stateid;
};
14.5.2. RESULT
struct OFFLOAD_STATUS4resok {
length4 osr_bytes_copied;
nfsstat4 osr_complete<1>;
};
union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) {
case NFS4_OK:
OFFLOAD_STATUS4resok osr_resok4;
default:
void;
};
14.5.3. DESCRIPTION
OFFLOAD_STATUS is used for both intra- and inter-server asynchronous
copies. The OFFLOAD_STATUS operation allows the client to poll the
destination server to determine the status of an asynchronous copy
operation.
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
completed. In this case the status value indicates the result of the
asynchronous copy operation. In all cases, the server will also
deliver the final results of the asynchronous copy in a CB_OFFLOAD
operation.
The failure of this operation does not indicate the result of the
asynchronous copy in any way.
If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_STATUS operation.
14.6. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID
14.6.1. ARGUMENT 15.4.1. ARGUMENT
/* new */ /* new */
const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004;
14.6.2. RESULT 15.4.2. RESULT
Unchanged Unchanged
14.6.3. MOTIVATION 15.4.3. MOTIVATION
Enterprise applications require guarantees that an operation has Enterprise applications require guarantees that an operation has
either aborted or completed. NFSv4.1 provides this guarantee as long either aborted or completed. NFSv4.1 provides this guarantee as long
as the session is alive: simply send a SEQUENCE operation on the same as the session is alive: simply send a SEQUENCE operation on the same
slot with a new sequence number, and the successful return of slot with a new sequence number, and the successful return of
SEQUENCE indicates the previous operation has completed. However, if SEQUENCE indicates the previous operation has completed. However, if
the session is lost, there is no way to know when any in progress the session is lost, there is no way to know when any in progress
operations have aborted or completed. In hindsight, the NFSv4.1 operations have aborted or completed. In hindsight, the NFSv4.1
specification should have mandated that DESTROY_SESSION either abort specification should have mandated that DESTROY_SESSION either abort
or complete all outstanding operations. or complete all outstanding operations.
14.6.4. DESCRIPTION 15.4.4. DESCRIPTION
A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability A client SHOULD request the EXCHGID4_FLAG_SUPP_FENCE_OPS capability
when it sends an EXCHANGE_ID operation. The server SHOULD set this when it sends an EXCHANGE_ID operation. The server SHOULD set this
capability in the EXCHANGE_ID reply whether the client requests it or capability in the EXCHANGE_ID reply whether the client requests it or
not. It is the server's return that determines whether this not. It is the server's return that determines whether this
capability is in effect. When it is in effect, the following will capability is in effect. When it is in effect, the following will
occur: occur:
o The server will not reply to any DESTROY_SESSION invoked with the o The server will not reply to any DESTROY_SESSION invoked with the
client ID until all operations in progress are completed or client ID until all operations in progress are completed or
skipping to change at page 68, line 29 skipping to change at page 67, line 45
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.
14.7. Operation 67: IO_ADVISE - Application I/O access pattern hints 15.5. Operation 62: DEALLOCATE
14.7.1. ARGUMENT 15.5.1. ARGUMENT
struct DEALLOCATE4args {
/* CURRENT_FH: file */
stateid4 da_stateid;
offset4 da_offset;
length4 da_length;
};
15.5.2. RESULT
struct DEALLOCATE4res {
nfsstat4 dr_status;
};
15.5.3. DESCRIPTION
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
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.
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
already is in unreserved state. All further reads from the region
passed to DEALLOCATE MUST return zeros until overwritten. The
filehandle specified must be that of a regular file.
Situations may arise where da_offset and/or da_offset + da_length
will not be aligned to a boundary for which the server does
allocations or deallocations. For most file systems, this is the
block size of the filesystem. In such a case, the server can
deallocate as many bytes as it can in the region. The blocks that
cannot be deallocated MUST be zeroed.
DEALLOCATE will result in the space_used attribute being decreased by
the number of bytes that were deallocated. The space_freed attribute
may or may not decrease, depending on the support and whether the
blocks backing the specified range were shared or not. The size
attribute will remain unchanged.
15.6. Operation 63: IO_ADVISE - Application I/O access pattern hints
15.6.1. ARGUMENT
enum IO_ADVISE_type4 { enum IO_ADVISE_type4 {
IO_ADVISE4_NORMAL = 0, IO_ADVISE4_NORMAL = 0,
IO_ADVISE4_SEQUENTIAL = 1, IO_ADVISE4_SEQUENTIAL = 1,
IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2, IO_ADVISE4_SEQUENTIAL_BACKWARDS = 2,
IO_ADVISE4_RANDOM = 3, IO_ADVISE4_RANDOM = 3,
IO_ADVISE4_WILLNEED = 4, IO_ADVISE4_WILLNEED = 4,
IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5, IO_ADVISE4_WILLNEED_OPPORTUNISTIC = 5,
IO_ADVISE4_DONTNEED = 6, IO_ADVISE4_DONTNEED = 6,
IO_ADVISE4_NOREUSE = 7, IO_ADVISE4_NOREUSE = 7,
IO_ADVISE4_READ = 8, IO_ADVISE4_READ = 8,
skipping to change at page 69, line 26 skipping to change at page 69, line 26
}; };
struct IO_ADVISE4args { struct IO_ADVISE4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 iar_stateid; stateid4 iar_stateid;
offset4 iar_offset; offset4 iar_offset;
length4 iar_count; length4 iar_count;
bitmap4 iar_hints; bitmap4 iar_hints;
}; };
14.7.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 _status) {
case NFS4_OK: case NFS4_OK:
IO_ADVISE4resok resok4; IO_ADVISE4resok resok4;
default: default:
void; void;
}; };
14.7.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 iar_offset
and iar_count need not currently exist in the file, but the iar_hints and iar_count need not currently exist in the file, but the iar_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 iar_count is 0,
all data following iar_offset is specified. The server MAY ignore all data following iar_offset is specified. The server MAY ignore
the advice. the advice.
The following are the allowed hints for a stateid holder: The following are the allowed hints for a stateid holder:
skipping to change at page 71, line 25 skipping to change at page 71, line 25
perhaps due to a temporary resource limitation. perhaps due to a temporary resource limitation.
Each issuance of the IO_ADVISE operation overrides all previous Each issuance of the IO_ADVISE operation overrides all previous
issuances of IO_ADVISE for a given byte range. This effectively issuances of IO_ADVISE for a given byte range. This effectively
follows a strategy of last hint wins for a given stateid and byte follows a strategy of last hint wins for a given stateid and byte
range. range.
Clients should assume that hints included in an IO_ADVISE operation Clients should assume that hints included in an IO_ADVISE operation
will be forgotten once the file is closed. will be forgotten once the file is closed.
14.7.4. IMPLEMENTATION 15.6.4. IMPLEMENTATION
The NFS client may choose to issue an IO_ADVISE operation to the The NFS client may choose to issue an IO_ADVISE operation to the
server in several different instances. server in several different instances.
The most obvious is in direct response to an application's execution The most obvious is in direct response to an application's execution
of posix_fadvise(). In this case, IO_ADVISE4_WRITE and of posix_fadvise(). In this case, IO_ADVISE4_WRITE and
IO_ADVISE4_READ may be set based upon the type of file access IO_ADVISE4_READ may be set based upon the type of file access
specified when the file was opened. specified when the file was opened.
14.7.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 conveys
that the client has recently accessed the byte range in its own that the client has recently accessed the byte range in its own
cache. I.e., it has not accessed it on the server, but it has cache. I.e., it has not accessed it on the server, but it has
locally. When the server reaches resource exhaustion, knowing which locally. When the server reaches resource exhaustion, knowing which
data is more important allows the server to make better choices about data is more important allows the server to make better choices about
which data to, for example purge from a cache, or move to secondary which data to, for example purge from a cache, or move to secondary
storage. It also informs the server which delegations are more storage. It also informs the server which delegations are more
important, since if delegations are working correctly, once delegated important, since if delegations are working correctly, once delegated
to a client and the client has read the content for that byte range, to a client and the client has read the content for that byte range,
a server might never receive another read request for that byte a server might never receive another read request for that byte
range. range.
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.
14.7.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 So 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 NFSv4.2 or higher. Any file's layout obtained with NFSv4.1 MUST NOT
have NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained have NFL42_UFLG_IO_ADVISE_THRU_MDS set. Any file's layout obtained
skipping to change at page 72, line 36 skipping to change at page 72, line 36
send an IO_ADVISE operation to the appropriate DS for the specified send an IO_ADVISE operation to the appropriate DS for the specified
byte range. While the client MAY always send IO_ADVISE to the MDS, byte range. While the client MAY always send IO_ADVISE to the MDS,
if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client if the server has not set NFL42_UFLG_IO_ADVISE_THRU_MDS, the client
should expect that such an IO_ADVISE is futile. Note that a client should expect that such an IO_ADVISE is futile. Note that a client
SHOULD use the same set of arguments on each IO_ADVISE sent to a DS SHOULD use the same set of arguments on each IO_ADVISE sent to a DS
for the same open file reference. for the same open file reference.
The server is not required to support different advice for different The server is not required to support different advice for different
DS's with the same open file reference. DS's with the same open file reference.
14.7.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 iar_offset 0 really means iar_offset 10000 in the logical file,
then an IO_ADVISE for iar_offset 0 means iar_offset 10000. then an IO_ADVISE for iar_offset 0 means iar_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 iar_offset 0 really means iar_offset 0 in the logical file, then
skipping to change at page 74, line 7 skipping to change at page 74, line 7
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.
14.8. Changes to Operation 51: LAYOUTRETURN 15.7. Changes to Operation 51: LAYOUTRETURN
14.8.1. Introduction 15.7.1. Introduction
In the pNFS description provided in [RFC5661], the client is not In the pNFS description provided in [RFC5661], the client is not
capable to relay an error code from the DS to the MDS. In the capable of relaying an error code from the DS to the MDS. In the
specification of the Objects-Based Layout protocol [RFC5664], use is specification of the Object Layout Type [RFC5664], use is made of the
made of the opaque lrf_body field of the LAYOUTRETURN argument to do opaque lrf_body field of the LAYOUTRETURN argument to do such a
such a relaying of error codes. In this section, we define a new relaying of error codes. In this section, we define a new data
data structure to enable the passing of error codes back to the MDS structure to enable the passing of error codes back to the MDS and
and provide some guidelines on what both the client and MDS should provide some guidelines on what both the client and MDS should expect
expect in such circumstances. in such circumstances.
There are two broad classes of errors, transient and persistent. The There are two broad classes of errors, transient and persistent. The
client SHOULD strive to only use this new mechanism to report client SHOULD strive to only use this new mechanism to report
persistent errors. It MUST be able to deal with transient issues by persistent errors. It MUST be able to deal with transient issues by
itself. Also, while the client might consider an issue to be itself. Also, while the client might consider an issue to be
persistent, it MUST be prepared for the MDS to consider such issues 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 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 client from either a stateid or a filehandle. The client will get an
error from the DS and might relay either NFS4ERR_ACCESS or 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 NFS4ERR_BAD_STATEID back to the MDS, with the belief that this is a
skipping to change at page 75, line 5 skipping to change at page 75, line 5
it cannot determine if the client and DS path is working. As with it cannot determine if the client and DS path is working. As with
the case of the DS passing errors to the client, it must be prepared the case of the DS passing errors to the client, it must be prepared
for the MDS to consider such outages as being transitory. for the MDS to consider such outages as being transitory.
The existing LAYOUTRETURN operation is extended by introducing a new The existing LAYOUTRETURN operation is extended by introducing a new
data structure to report errors, layoutreturn_device_error4. Also, data structure to report errors, layoutreturn_device_error4. Also,
layoutreturn_device_error4 is introduced to enable an array of errors layoutreturn_device_error4 is introduced to enable an array of errors
to be reported. to be reported.
14.8.2. ARGUMENT 15.7.2. ARGUMENT
The ARGUMENT specification of the LAYOUTRETURN operation in section The ARGUMENT specification of the LAYOUTRETURN operation in section
18.44.1 of [RFC5661] is augmented by the following XDR code 18.44.1 of [RFC5661] is augmented by the following XDR code
[RFC4506]: [RFC4506]:
struct layoutreturn_device_error4 { struct layoutreturn_device_error4 {
deviceid4 lrde_deviceid; deviceid4 lrde_deviceid;
nfsstat4 lrde_status; nfsstat4 lrde_status;
nfs_opnum4 lrde_opnum; nfs_opnum4 lrde_opnum;
}; };
struct layoutreturn_error_report4 { struct layoutreturn_error_report4 {
layoutreturn_device_error4 lrer_errors<>; layoutreturn_device_error4 lrer_errors<>;
}; };
14.8.3. RESULT 15.7.3. RESULT
The RESULT of the LAYOUTRETURN operation is unchanged; see section The RESULT of the LAYOUTRETURN operation is unchanged; see section
18.44.2 of [RFC5661]. 18.44.2 of [RFC5661].
14.8.4. DESCRIPTION 15.7.4. DESCRIPTION
The following text is added to the end of the LAYOUTRETURN operation The following text is added to the end of the LAYOUTRETURN operation
DESCRIPTION in section 18.44.3 of [RFC5661]. DESCRIPTION in section 18.44.3 of [RFC5661].
When a client uses LAYOUTRETURN with a type of LAYOUTRETURN4_FILE, When a client uses LAYOUTRETURN with a type of LAYOUTRETURN4_FILE,
then if the lrf_body field is NULL, it indicates to the MDS that the then if the lrf_body field is NULL, it indicates to the MDS that the
client experienced no errors. If lrf_body is non-NULL, then the client experienced no errors. If lrf_body is non-NULL, then the
field references error information which is layout type specific. field references error information which is layout type specific.
I.e., the Objects-Based Layout protocol can continue to utilize I.e., the Object Layout Type can continue to utilize lrf_body as
lrf_body as specified in [RFC5664]. For both Files-Based and Block- specified in [RFC5664]. For both File [RFC5661] and Block [RFC5663]
Based Layouts, the field references a layoutreturn_device_error4, Layout Types, the field references a layoutreturn_device_error4,
which contains an array of layoutreturn_device_error4. which contains an array of layoutreturn_device_error4.
Each individual layoutreturn_device_error4 describes a single error Each individual layoutreturn_device_error4 describes a single error
associated with a DS, which is identified via lrde_deviceid. The associated with a DS, which is identified via lrde_deviceid. The
operation which returned the error is identified via lrde_opnum. operation which returned the error is identified via lrde_opnum.
Finally the NFS error value (nfsstat4) encountered is provided via Finally the NFS error value (nfsstat4) encountered is provided via
lrde_status and may consist of the following error codes: lrde_status and may consist of the following error codes:
NFS4ERR_NXIO: The client was unable to establish any communication NFS4ERR_NXIO: The client was unable to establish any communication
with the DS. with the DS.
NFS4ERR_*: The client was able to establish communication with the NFS4ERR_*: The client was able to establish communication with the
DS and is returning one of the allowed error codes for the DS and is returning one of the allowed error codes for the
operation denoted by lrde_opnum. operation denoted by lrde_opnum.
14.8.5. IMPLEMENTATION 15.7.5. IMPLEMENTATION
The following text is added to the end of the LAYOUTRETURN operation The following text is added to the end of the LAYOUTRETURN operation
IMPLEMENTATION in section 18.4.4 of [RFC5661]. IMPLEMENTATION in section 18.4.4 of [RFC5661].
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 LAYOUTRETURN 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.
skipping to change at page 76, line 30 skipping to change at page 76, line 30
and SHOULD indicate which storage device or devices was problematic. and SHOULD indicate which storage device or devices was problematic.
The client needs to do this when the DS is being unresponsive in The client needs to do this when the DS is being unresponsive in
order to fence off any failed write attempts, and ensure that they do order to fence off any failed write attempts, and ensure that they do
not end up overwriting any later data being written through the MDS. not end up overwriting any later data being written through the MDS.
If the client does not do this, the MDS MAY issue a layout recall If the client does not do this, the MDS 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 MDS, the MDS may silently ignore this functionality.
Also, as the MDS may consider some issues the client reports to be Also, as the MDS may consider some issues the client reports to be
expected (see Section 14.8.1), the client might find it difficult to expected (see Section 15.7.1), the client might find it difficult to
detect a MDS which has not implemented error handling via detect a MDS which has not implemented error handling via
LAYOUTRETURN. LAYOUTRETURN.
If an MDS is aware that a storage device is proving problematic to a If an MDS is aware that a storage device is proving problematic to a
client, the MDS SHOULD NOT include that storage device in any pNFS client, the MDS SHOULD NOT include that storage device in any pNFS
layouts sent to that client. If the MDS is aware that a storage layouts sent to that client. If the MDS is aware that a storage
device is affecting many clients, then the MDS SHOULD NOT include device is affecting many clients, then the MDS SHOULD NOT include
that storage device in any pNFS layouts sent out. If a client asks that storage device in any pNFS layouts sent out. If a client asks
for a new layout for the file from the MDS, it MUST be prepared for for a new layout for the file from the MDS, it MUST be prepared for
the MDS to return that storage device in the layout. The MDS might the MDS to return that storage device in the layout. The MDS might
not have any choice in using the storage device, i.e., there might not have any choice in using the storage device, i.e., there might
only be one possible layout for the system. Also, in the case of only be one possible layout for the system. Also, in the case of
existing files, the MDS might have no choice in which storage devices existing files, the MDS might have no choice in which storage devices
to hand out to clients. to hand out to clients.
The MDS is not required to indefinitely retain per-client storage The MDS is not required to indefinitely retain per-client storage
device error information. An MDS is also not required to device error information. An MDS is also not required to
automatically reinstate use of a previously problematic storage automatically reinstate use of a previously problematic storage
device; administrative intervention may be required instead. device; administrative intervention may be required instead.
14.9. Operation 65: READ_PLUS 15.8. Operation 64: OFFLOAD_ABORT - Cancel a server-side copy
14.9.1. ARGUMENT 15.8.1. ARGUMENT
struct OFFLOAD_ABORT4args {
/* CURRENT_FH: destination file */
stateid4 oaa_stateid;
};
15.8.2. RESULT
struct OFFLOAD_ABORT4res {
nfsstat4 oar_status;
};
15.8.3. DESCRIPTION
OFFLOAD_ABORT is used for both intra- and inter-server asynchronous
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
as the context for the previously initiated copy operation.
The result's oar_status field indicates whether the cancel was
successful or not. A value of NFS4_OK indicates that the copy
operation was canceled and no callback will be issued by the server.
A copy operation that is successfully canceled may result in none,
some, or all of the data and/or metadata copied.
If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_ABORT operation.
15.9. Operation 65: OFFLOAD_REVOKE - Revoke a destination server's copy
privileges
15.9.1. ARGUMENT
struct OFFLOAD_REVOKE4args {
/* CURRENT_FH: source file */
netloc4 ora_destination_server;
};
15.9.2. RESULT
struct OFFLOAD_REVOKE4res {
nfsstat4 orr_status;
};
15.9.3. DESCRIPTION
This operation is used for an inter-server copy. A client sends this
operation in a COMPOUND request to the source server to revoke the
authorization of a destination server identified by
ora_destination_server from reading the file specified by CURRENT_FH
on behalf of given user. If the ora_destination_server has already
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
on the same server), this operation is unnecessary.
If the server supports COPY_NOTIFY, the server is REQUIRED to support
the OFFLOAD_REVOKE operation.
15.10. Operation 66: OFFLOAD_STATUS - Poll for status of a server-side
copy
15.10.1. ARGUMENT
struct OFFLOAD_STATUS4args {
/* CURRENT_FH: destination file */
stateid4 osa_stateid;
};
15.10.2. RESULT
struct OFFLOAD_STATUS4resok {
length4 osr_bytes_copied;
nfsstat4 osr_complete<1>;
};
union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) {
case NFS4_OK:
OFFLOAD_STATUS4resok osr_resok4;
default:
void;
};
15.10.3. DESCRIPTION
OFFLOAD_STATUS is used for both intra- and inter-server asynchronous
copies. The OFFLOAD_STATUS operation allows the client to poll the
destination server to determine the status of an asynchronous copy
operation.
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
completed. In this case the status value indicates the result of the
asynchronous copy operation. In all cases, the server will also
deliver the final results of the asynchronous copy in a CB_OFFLOAD
operation.
The failure of this operation does not indicate the result of the
asynchronous copy 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.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;
}; };
14.9.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;
bool di_allocated; space_info4 di_reserved;
}; };
struct data4 { struct data4 {
offset4 d_offset; offset4 d_offset;
bool d_allocated; 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_APP_DATA_HOLE:
app_data_hole4 rpc_adh;
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 {
skipping to change at page 78, line 30 skipping to change at page 81, line 28
read_plus_content rpr_contents<>; read_plus_content rpr_contents<>;
}; };
union READ_PLUS4res switch (nfsstat4 rp_status) { union READ_PLUS4res switch (nfsstat4 rp_status) {
case NFS4_OK: case NFS4_OK:
read_plus_res4 rp_resok4; read_plus_res4 rp_resok4;
default: default:
void; void;
}; };
14.9.3. DESCRIPTION 15.11.3. DESCRIPTION
The READ_PLUS operation is based upon the NFSv4.1 READ operation (see The READ_PLUS operation is based upon the NFSv4.1 READ operation (see
Section 18.22 of [RFC5661]) and similarly reads data from the regular Section 18.22 of [RFC5661]) and similarly reads data from the regular
file identified by the current filehandle. file identified by the current filehandle.
The client provides a rpa_offset of where the READ_PLUS is to start The client provides a rpa_offset of where the READ_PLUS is to start
and a rpa_count of how many bytes are to be read. A rpa_offset of and a rpa_count of how many bytes are to be read. A rpa_offset of
zero means to read data starting at the beginning of the file. If zero means to read data starting at the beginning of the file. If
rpa_offset is greater than or equal to the size of the file, the rpa_offset is greater than or equal to the size of the file, the
status NFS4_OK is returned with di_length (the data length) set to status NFS4_OK is returned with di_length (the data length) set to
zero and eof set to TRUE. zero and eof set to TRUE.
The READ_PLUS result is comprised of an array of rpr_contents, each The READ_PLUS result is comprised of an array of rpr_contents, each
of which describe a data_content4 type of data (Section 7.1.2). For of which describe a data_content4 type of data. For NFSv4.2, the
NFSv4.2, the allowed values are data, ADH, and hole. A server is allowed values are data and hole. A server MUST support both the
required to support the data type, but neither ADH nor hole. Both an data type and the hole if it uses READ_PLUS. If it does not want to
ADH and a hole must be returned in its entirety - clients must be support a hole, it MUST use READ. The hole SHOULD be returned in its
prepared to get more information than they requested. Both the start entirety - clients must be prepared to get more information than they
and the end of the hole may exceed what was requested. The array requested. Both the start and the end of the hole may exceed what
contents MUST be contiguous in the file. was requested. The array contents MUST be contiguous in the file.
If the data to be returned is comprised entirely of zeros, then the If the data to be returned is comprised entirely of zeros, then the
server may elect to return that data as a hole. The server server SHOULD return that data as a hole. The di_reserved field is
differentiates this to the client by setting di_allocated to TRUE in used to tell the client if a hole is unreserved, that is writes to it
this case. Note that in such a scenario, the server is not required MAY return NFS4ERR_NOSPC, or it is reserved in which cases writes
to determine the full extent of the "hole" - it does not need to into the hole MUST NOT return ENOSPC. If the server does not know
determine where the zeros start and end. If the server elects to the reservations status it may set the di_reserved field to
return the hole as data, then it can set the d_allocted to FALSE in SPACE_UNKNOWN4.
the rpc_data to indicate it is a hole.
The server may elect to return adjacent elements of the same type. The server may elect to return adjacent elements of the same type.
For example, the guard pattern or block size of an ADH might change, For example, if the server has a range of data comprised entirely of
which would require adjacent elements of type ADH. Likewise if the zeros and then a hole, it might want to return two adjacent holes to
server has a range of data comprised entirely of zeros and then a the client.
hole, it might want to return two adjacent holes to 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 must be for the entire hole. This result is
skipping to change at page 80, line 23 skipping to change at page 83, line 22
For a READ_PLUS with a stateid value of all bits equal to zero, the For a READ_PLUS with a stateid value of all bits equal to zero, the
server MAY allow the READ_PLUS to be serviced subject to mandatory server MAY allow the READ_PLUS to be serviced subject to mandatory
byte-range locks or the current share deny modes for the file. For a byte-range locks or the current share deny modes for the file. For a
READ_PLUS with a stateid value of all bits equal to one, the server READ_PLUS with a stateid value of all bits equal to one, the server
MAY allow READ_PLUS operations to bypass locking checks at the MAY allow READ_PLUS operations to bypass locking checks at the
server. server.
On success, the current filehandle retains its value. On success, the current filehandle retains its value.
14.9.4. IMPLEMENTATION 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
as to which arms of READ_PLUS it would support. In a later
minorversion, it may become necessary for the introduction of a new
operation which would allow the client to inform the server as to
whether it supported the new arms of the union of data types
available in READ_PLUS.
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. One delta is that when the owner
has a locked byte range, the server MUST return an array of has a locked byte range, the server MUST return an array of
rpr_contents with values inside that range. rpr_contents with values inside that range.
14.9.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 or ADH result for a READ_PLUS request data server MAY return a hole result for a READ_PLUS request that it
that it receives. When a data server chooses to return such a receives. When a data server chooses to return such a result, it has
result, it has the option of returning information for the data the option of returning information for the data stored on that data
stored on that data server (as defined by the data layout), but it server (as defined by the data layout), but it MUST NOT return
MUST NOT return results for a byte range that includes data managed results for a byte range that includes data managed by another data
by another data server. server.
A data server should do its best to return as much information about
a ADH as is feasible without having to contact the metadata server.
If communication with the metadata server is required, then every
attempt should be taken to minimize the number of requests.
If mandatory locking is enforced, then the data server must also If mandatory locking is enforced, then the data server must also
ensure that to return only information that is within the owner's ensure that to return only information that is within the owner's
locked byte range. locked byte range.
14.9.5. READ_PLUS with Sparse Files Example 15.11.5. READ_PLUS with Sparse Files Example
The following table describes a sparse file. For each byte range, The following table describes a sparse file. For each byte range,
the file contains either non-zero data or a hole. In addition, the the file contains either non-zero data or a hole. In addition, the
server in this example uses a Hole Threshold of 32K. server in this example will only create a hole if it is greater than
32K.
+-------------+----------+ +-------------+----------+
| Byte-Range | Contents | | Byte-Range | Contents |
+-------------+----------+ +-------------+----------+
| 0-15999 | Hole | | 0-15999 | Hole |
| 16K-31999 | Non-Zero | | 16K-31999 | Non-Zero |
| 32K-255999 | Hole | | 32K-255999 | Hole |
| 256K-287999 | Non-Zero | | 256K-287999 | Non-Zero |
| 288K-353999 | Hole | | 288K-353999 | Hole |
| 354K-417999 | Non-Zero | | 354K-417999 | Non-Zero |
skipping to change at page 81, line 32 skipping to change at page 84, line 33
Table 5 Table 5
Under the given circumstances, if a client was to read from the file Under the given circumstances, if a client was to read from the file
with a max read size of 64K, the following will be the results for with a max read size of 64K, the following will be the results for
the given READ_PLUS calls. This assumes the client has already the given READ_PLUS calls. This assumes the client has already
opened the file, acquired a valid stateid ('s' in the example), and opened the file, acquired a valid stateid ('s' in the example), and
just needs to issue READ_PLUS requests. just needs to issue READ_PLUS requests.
1. READ_PLUS(s, 0, 64K) --> NFS_OK, eof = false, <data[0,32K], 1. READ_PLUS(s, 0, 64K) --> NFS_OK, eof = false, <data[0,32K],
hole[32K,224K]>. Since the first hole is less than the server's hole[32K,224K]>. Since the first hole is less than the server's
Hole Threshhold, the first 32K of the file is returned as data minimum hole size, the first 32K of the file is returned as data
and the remaining 32K is returned as a hole which actually and the remaining 32K is returned as a hole which actually
extends to 256K. extends to 256K.
2. READ_PLUS(s, 32K, 64K) --> NFS_OK, eof = false, <hole[32K,224K]> 2. READ_PLUS(s, 32K, 64K) --> NFS_OK, eof = false, <hole[32K,224K]>
The requested range was all zeros, and the current hole begins at The requested range was all zeros, and the current hole begins at
offset 32K and is 224K in length. Note that the client should offset 32K and is 224K in length. Note that the client should
not have followed up the previous READ_PLUS request with this one not have followed up the previous READ_PLUS request with this one
as the hole information from the previous call extended past what as the hole information from the previous call extended past what
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.
14.10. Operation 66: SEEK 15.12. Operation 68: SEEK
SEEK is an operation that allows a client to determine the location SEEK is an operation that allows a client to determine the location
of the next data_content4 in a file. It allows an implementation of of the next data_content4 in a file. It allows an implementation of
the emerging extension to lseek(2) to allow clients to determine the emerging extension to lseek(2) to allow clients to determine the
SEEK_HOLE and SEEK_DATA. next hole whilst in data or the next data whilst in a hole.
14.10.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;
}; };
14.10.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) { union seek_content switch (data_content4 content) {
case NFS4_CONTENT_DATA: case NFS4_CONTENT_DATA:
data_info4 sc_data; data_info4 sc_data;
case NFS4_CONTENT_APP_DATA_HOLE:
app_data_hole4 sc_adh;
case NFS4_CONTENT_HOLE: case NFS4_CONTENT_HOLE:
data_info4 sc_hole; data_info4 sc_hole;
default: default:
void; void;
}; };
struct seek_res4 { struct seek_res4 {
bool sr_eof; bool sr_eof;
seek_content sr_contents; seek_content sr_contents;
}; };
union SEEK4res switch (nfsstat4 status) { union SEEK4res switch (nfsstat4 status) {
case NFS4_OK: case NFS4_OK:
seek_res4 resok4; seek_res4 resok4;
default: default:
void; void;
}; };
14.10.3. DESCRIPTION 15.12.3. DESCRIPTION
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 either a hole or ADH, this must return the in the file. For a hole, this must return the data_content4 in its
data_content4 in its entirety. For data, it must not return the entirety. For data, it must not return the actual data.
actual data.
SEEK must follow the same rules for stateids as READ_PLUS SEEK must follow the same rules for stateids as READ_PLUS
(Section 14.9.3). (Section 15.11.3).
If the server could not find a corresponding sa_what, then the status If the server could not find a corresponding sa_what, then the status
would still be NFS4_OK, but sr_eof would be TRUE. The sr_contents 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. would contain a zero-ed out content of the appropriate type.
14.11. Operation 64: WRITE_HOLE 15.13. Operation 69: WRITE_SAME
14.11.1. ARGUMENT
struct data_info4 {
offset4 di_offset;
length4 di_length;
bool di_allocated;
};
struct WRITE_HOLE4args {
/* CURRENT_FH: file */
stateid4 wh_stateid;
stable_how4 wh_stable;
data_info4 wh_hole;
};
14.11.2. RESULT
struct write_response4 { 15.13.1. ARGUMENT
stateid4 wr_callback_id<1>;
length4 wr_count;
stable_how4 wr_committed;
verifier4 wr_writeverf;
};
union WRITE_HOLE4res switch (nfsstat4 wh_status) { enum stable_how4 {
case NFS4_OK: UNSTABLE4 = 0,
write_response4 wh_resok4; DATA_SYNC4 = 1,
default: FILE_SYNC4 = 2
void;
}; };
struct app_data_block4 {
14.11.3. DESCRIPTION offset4 adb_offset;
length4 adb_block_size;
The WRITE_HOLE operation is an extension of the NFSv4.1 WRITE length4 adb_block_count;
operation (see Section 18.2 of [RFC5661]) and writes holes to the length4 adb_reloff_blocknum;
regular file identified by the current filehandle. The server MAY count4 adb_block_num;
write fewer bytes than requested by the client. length4 adb_reloff_pattern;
opaque adb_pattern<>;
A successful WRITE_HOLE will construct a reply for wr_count,
wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation
results. If wr_callback_id is set, it indicates an asynchronous
reply (see Section 14.11.3.2).
WRITE_HOLE has to support all of the errors which are returned by
WRITE plus NFS4ERR_NOTSUPP, i.e., it is an OPTIONAL operation. If
the client supports WRITE_HOLE, it MUST support CB_OFFLOAD.
14.11.3.1. Hole punching
Whenever a client wishes to zero the blocks backing a particular
region in the file, it calls the WRITE_HOLE operation with the
current filehandle set to the filehandle of the file in question, and
the equivalent of start offset and length in bytes of the region set
in wh_hole.di_offset and wh_hole.di_length respectively. If the
wh_hole.di_allocated is set to TRUE, then the blocks will be zeroed
and if it is set to FALSE, then they will be deallocated. All
further reads to this region MUST return zeros until overwritten.
The filehandle specified must be that of a regular file.
Situations may arise where di_offset and/or di_offset + di_length
will not be aligned to a boundary for which the server does
allocations/deallocations. For most file systems, this is the 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 cannot be
deallocated MUST be zeroed. Except for the block deallocation and
maximum hole punching capability, a WRITE_HOLE operation is to be
treated similar to a write of zeroes.
The server is not required to complete deallocating the blocks
specified in the operation before returning. The server SHOULD
return an asynchronous result if it can determine the operation will
be long running (see Section 14.11.3.2).
If used to hole punch, WRITE_HOLE will result in the space_used
attribute being decreased by the number of bytes that were
deallocated. The space_freed attribute may or may not decrease,
depending on the support and whether the blocks backing the specified
range were shared or not. The size attribute will remain unchanged.
The WRITE_HOLE operation MUST NOT change the space reservation
guarantee of the file. While the server can deallocate the blocks
specified by di_offset and di_length, future writes to this region
MUST NOT fail with NFSERR_NOSPC.
14.11.3.2. Asynchronous Transactions
Hole punching may lead to server determining to service the operation
asynchronously. If it decides to do so, it sets the stateid in
wr_callback_id to be that of the wh_stateid. If it does not set the
wr_callback_id, then the result is synchronous.
When the client determines that the reply will be given
asynchronously, it should not assume anything about the contents of
what it wrote until it is informed by the server that the operation
is complete. It can use OFFLOAD_STATUS (Section 14.5) to monitor the
operation and OFFLOAD_ABORT (Section 14.2) to cancel the operation.
An example of a asynchronous WRITE_HOLE is shown in Figure 6. Note
that as with the COPY operation, WRITE_HOLE must provide a stateid
for tracking the asynchronous operation.
Client Server
+ +
| |
|--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the file
| |
|--- WRITE_HOLE ---------------------->| Client punches
|<------------------------------------/| a hole
| |
| |
|--- OFFLOAD_STATUS ------------------>| Client may poll
|<------------------------------------/| for status
| |
| . | Multiple OFFLOAD_STATUS
| . | operations may be sent.
| . |
| |
|<-- CB_OFFLOAD -----------------------| Server reports results
|\------------------------------------>|
| |
|--- CLOSE --------------------------->| Client closes
|<------------------------------------/| the file
| |
| |
Figure 6: An asynchronous WRITE_HOLE.
When CB_OFFLOAD informs the client of the successful WRITE_HOLE, the
write_response4 embedded in the operation will provide the necessary
information that a synchronous WRITE_HOLE would have provided.
Regardless of whether the operation is asynchronous or synchronous,
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
operations and the WRITE_HOLE operation can appear as several WRITE
operations to the server. The client can use locking operations to
control the behavior on the server with respect to long running
asynchronous write operations.
14.12. Operation 68: WRITE_SAME
14.12.1. ARGUMENT
struct data_info4 {
offset4 di_offset;
length4 di_length;
bool di_allocated;
}; };
struct WRITE_SAME4args { struct WRITE_SAME4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 ws_stateid; stateid4 ws_stateid;
stable_how4 ws_stable; stable_how4 ws_stable;
app_data_hole4 ws_adh; app_data_block4 ws_adb;
}; };
14.12.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 ws_status) {
case NFS4_OK: case NFS4_OK:
write_response4 ws_resok4; write_response4 ws_resok4;
default: default:
void; void;
}; };
14.12.3. DESCRIPTION 15.13.3. DESCRIPTION
The WRITE_SAME operation is an extension of the NFSv4.1 WRITE The WRITE_SAME operation writes an application data block to the
operation (see Section 18.2 of [RFC5661]) and writes data to the regular file identified by the current filehandle (see WRITE SAME
regular file identified by the current filehandle. The server MAY (10) in [T10-SBC2]). The target file is specified by the current
write fewer bytes than requested by the client. filehandle. The data to be written is specified by an
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
by the server. It is treated like the stable parameter in the
NFSv4.1 WRITE operation (see Section 18.2 of [RFC5661]).
The WRITE_SAME argument is comprised of an array of rpr_contents, A successful WRITE_SAME will construct a reply for wr_count,
each of which describe a data_content4 type of data (Section 7.1.2). wr_committed, and wr_writeverf as per the NFSv4.1 WRITE operation
For NFSv4.2, the allowed values are data, ADH, and hole. The array results. If wr_callback_id is set, it indicates an asynchronous
contents MUST be contiguous in the file. A successful WRITE_SAME reply (see Section 15.13.3.1).
will construct a reply for wr_count, wr_committed, and wr_writeverf
as per the NFSv4.1 WRITE operation results. If wr_callback_id is
set, it indicates an asynchronous reply (see Section 14.12.3.2).
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.
14.12.3.1. ADHs If the server supports ADBs, then it MUST support the WRITE_SAME
If the server supports ADHs, then it MUST support the WRITE_SAME
operation. The server has no concept of the structure imposed by the operation. The server has no concept of the structure imposed by the
application. It is only when the application writes to a section of application. It is only when the application writes to a section of
the file does order get imposed. In order to detect corruption even the file does order get imposed. In order to detect corruption even
before the application utilizes the file, the application will want before the application utilizes the file, the application will want
to initialize a range of ADHs using WRITE_SAME. to initialize a range of ADBs using WRITE_SAME.
For ADHs, when the client invokes the WRITE_SAME operation, it has
two desired results:
1. The structure described by the app_data_block4 be imposed on the
file.
2. The contents described by the app_data_block4 be sparse.
If the server supports the WRITE_SAME operation, it still might not
support sparse files. So if it receives the WRITE_SAME operation,
then it MUST populate the contents of the file with the initialized
ADHs. The server SHOULD return an asynchronous result if it can
determine the operation will be long running (see Section 14.12.3.2).
If the data was already initialized, there are two interesting
scenarios:
1. The data blocks are allocated.
2. Initializing in the middle of an existing ADH.
If the data blocks were already allocated, then the WRITE_SAME is a When the client invokes the WRITE_SAME operation, it wants to record
hole punch operation. If WRITE_SAME supports sparse files, then the the block structure described by the app_data_block4 on to the file.
data blocks are to be deallocated. If not, then the data blocks are
to be rewritten in the indicated ADH format.
Since the server has no knowledge of ADHs, it should not report When the server receives the WRITE_SAME operation, it MUST populate
misaligned creation of ADHs. Even while it can detect them, it adb_block_count ADBs in the file starting at adb_offset. The block
cannot disallow them, as the application might be in the process of size will be given by adb_block_size. The ADBN (if provided) will
changing the size of the ADHs. Thus the server must be prepared to start at adb_reloff_blocknum and each block will be monotonically
handle an WRITE_SAME into an existing ADH. 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
provided in adb_pattern.
This document does not mandate the manner in which the server stores The server SHOULD return an asynchronous result if it can determine
ADHs sparsely for a file. However, if an WRITE_SAME arrives that the operation will be long running (see Section 15.13.3.1). This
will force a new ADH to start inside an existing ADH then the server document does not mandate the manner in which the server stores ADBs
will have three ADHs instead of two. It will have one up to the new for a file. Once either the WRITE_SAME finishes synchronously or the
one for the WRITE_SAME, one for the WRITE_SAME, and one for after the server uses CB_OFFLOAD to inform the client of the asynchronous
WRITE_SAME. Note that depending on server specific policies for completion of the WRITE_SAME, the server MUST return the ADBs to
block allocation, there may also be some physical blocks allocated to clients as data.
align the boundaries.
14.12.3.2. Asynchronous Transactions 15.13.3.1. Asynchronous Transactions
ADH 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 ws_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 14.5) to monitor the is complete. It can use OFFLOAD_STATUS (Section 15.10) to monitor
operation and OFFLOAD_ABORT (Section 14.2) to cancel the operation. the operation and OFFLOAD_ABORT (Section 15.8) to cancel the
An example of a asynchronous WRITE_SAME is shown in Figure 7. Note operation. An example of a asynchronous WRITE_SAME is shown in
that as with the COPY operation, WRITE_SAME must provide a stateid Figure 6. Note that as with the COPY operation, WRITE_SAME must
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
| | | |
|--- WRITE_SAME ---------------------->| Client initializes |--- WRITE_SAME ----------------------->| Client initializes
|<------------------------------------/| an ADH |<------------------------------------/| an ADB
| | | |
| | | |
|--- OFFLOAD_STATUS ------------------>| Client may poll |--- OFFLOAD_STATUS ------------------>| Client may poll
|<------------------------------------/| for status |<------------------------------------/| for status
| | | |
| . | Multiple OFFLOAD_STATUS | . | Multiple OFFLOAD_STATUS
| . | operations may be sent. | . | operations may be sent.
| . | | . |
| | | |
|<-- CB_OFFLOAD -----------------------| Server reports results |<-- CB_OFFLOAD -----------------------| Server reports results
|\------------------------------------>| |\------------------------------------>|
| | | |
|--- CLOSE --------------------------->| Client closes |--- CLOSE --------------------------->| Client closes
|<------------------------------------/| the file |<------------------------------------/| the file
| | | |
| | | |
Figure 7: An asynchronous WRITE_SAME. Figure 6: An asynchronous WRITE_SAME.
When CB_OFFLOAD informs the client of the successful WRITE_SAME, the When CB_OFFLOAD informs the client of the successful WRITE_SAME, the
write_response4 embedded in the operation will provide the necessary write_response4 embedded in the operation will provide the necessary
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. NFSv4.2 Callback Operations 16. NFSv4.2 Callback Operations
16.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
15.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
operation operation
15.1.1. ARGUMENT 16.1.1. ARGUMENT
struct write_response4 { struct write_response4 {
stateid4 wr_callback_id<1>; stateid4 wr_callback_id<1>;
length4 wr_count; length4 wr_count;
stable_how4 wr_committed; stable_how4 wr_committed;
verifier4 wr_writeverf; verifier4 wr_writeverf;
}; };
union offload_info4 switch (nfsstat4 coa_status) { union offload_info4 switch (nfsstat4 coa_status) {
case NFS4_OK: case NFS4_OK:
skipping to change at page 90, line 27 skipping to change at page 90, line 29
default: default:
length4 coa_bytes_copied; length4 coa_bytes_copied;
}; };
struct CB_OFFLOAD4args { struct CB_OFFLOAD4args {
nfs_fh4 coa_fh; nfs_fh4 coa_fh;
stateid4 coa_stateid; stateid4 coa_stateid;
offload_info4 coa_offload_info; offload_info4 coa_offload_info;
}; };
15.1.2. RESULT 16.1.2. RESULT
struct CB_OFFLOAD4res { struct CB_OFFLOAD4res {
nfsstat4 cor_status; nfsstat4 cor_status;
}; };
15.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 a hole punch 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 either If the client supports any of the following operations:
1. the COPY operation
2. either the WRITE_HOLE or WRITE_SAME operations COPY: for both intra- and inter-server asynchronous copies
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.
15.1.3.1. Server-side Copy Upon success, the coa_resok4.wr_count presents for each operation:
CB_OFFLOAD is used for both intra- and inter-server asynchronous
copies. This operation is sent by the destination server to the
client in a CB_COMPOUND request. Upon success, the
coa_resok4.wr_count presents the total number of bytes copied.
15.1.3.2. WRITE_HOLE and WRITE_SAME COPY: the total number of bytes copied
CB_OFFLOAD is used to report the completion of either a hole punch or WRITE_SAME: the same information that a synchronous WRITE_SAME would
an ADH initialization. Upon success, the coa_resok4 will contain the provide
same information that the corresponding synchronous WRITE_HOLE or
WRITE_SAME would have returned.
16. IANA Considerations 17. IANA Considerations
This section uses terms that are defined in [RFC5226]. This section uses terms that are defined in [RFC5226].
17. References 18. References
17.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.
[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC Resource Identifier (URI): Generic Syntax", STD 66, RFC
3986, January 2005. 3986, January 2005.
skipping to change at page 92, line 5 skipping to change at page 91, line 47
5661, January 2010. 5661, January 2010.
[RFC5664] Halevy, B., Welch, B., and J. Zelenka, "Object-Based [RFC5664] Halevy, B., Welch, B., and J. Zelenka, "Object-Based
Parallel NFS (pNFS) Operations", RFC 5664, January 2010. Parallel NFS (pNFS) Operations", RFC 5664, January 2010.
[posix_fadvise] [posix_fadvise]
The Open Group, "Section 'posix_fadvise()' of System The Open Group, "Section 'posix_fadvise()' of System
Interfaces of The Open Group Base Specifications Issue 6, Interfaces of The Open Group Base Specifications Issue 6,
IEEE Std 1003.1, 2004 Edition", 2004. IEEE Std 1003.1, 2004 Edition", 2004.
[posix_fallocate]
The Open Group, "Section 'posix_fallocate()' of System
Interfaces of The Open Group Base Specifications Issue 6,
IEEE Std 1003.1, 2004 Edition", 2004.
[rpcsec_gssv3] [rpcsec_gssv3]
Adamson, W. and N. Williams, "Remote Procedure Call (RPC) Adamson, W. and N. Williams, "Remote Procedure Call (RPC)
Security Version 3", October 2013. Security Version 3", October 2013.
17.2. Informative References 18.2. Informative References
[Ashdown08] [Ashdown08]
Ashdown, L., "Chapter 15, Validating Database Files and Ashdown, L., "Chapter 15, Validating Database Files and
Backups, of Oracle Database Backup and Recovery User's Backups, of Oracle Database Backup and Recovery User's
Guide 11g Release 1 (11.1)", August 2008. Guide 11g Release 1 (11.1)", August 2008.
[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
skipping to change at page 92, line 33 skipping to change at page 92, line 33
Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M.
Naik, "Administration Protocol for Federated Filesystems", Naik, "Administration Protocol for Federated Filesystems",
draft-ietf-nfsv4-federated-fs-admin (Work In Progress), draft-ietf-nfsv4-federated-fs-admin (Work In Progress),
2010. 2010.
[FEDFS-NSDB] [FEDFS-NSDB]
Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M.
Naik, "NSDB Protocol for Federated Filesystems", draft- Naik, "NSDB Protocol for Federated Filesystems", draft-
ietf-nfsv4-federated-fs-protocol (Work In Progress), 2010. ietf-nfsv4-federated-fs-protocol (Work In Progress), 2010.
[Haynes13]
Haynes, T., "Requirements for Labeled NFS", draft-ietf-
nfsv4-labreqs-04 (work in progress), 2013.
[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.
[Quigley11] [Quigley14]
Quigley, D. and J. Lu, "Registry Specification for MAC Quigley, D., Lu, J., and T. Haynes, "Registry
Security Label Formats", draft-quigley-label-format- Specification for Mandatory Access Control (MAC) Security
registry (work in progress), 2011. Label Formats", draft-quigley-nfsv4-lfs-registry-00 (work
in progress), 2014.
[RFC0959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD
9, RFC 959, October 1985.
[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 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226, IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008. May 2008.
[RFC5663] Black, D., Fridella, S., and J. Glasgow, "Parallel NFS
(pNFS) Block/Volume Layout", RFC 5663, January 2010.
[RFC7204] Haynes, T., "Requirements for Labeled NFS", RFC 7204,
April 2014.
[RFC959] Postel, J. and J. Reynolds, "File Transfer Protocol", STD
9, RFC 959, October 1985.
[Strohm11] [Strohm11]
Strohm, R., "Chapter 2, Data Blocks, Extents, and Strohm, R., "Chapter 2, Data Blocks, Extents, and
Segments, of Oracle Database Concepts 11g Release 1 Segments, of Oracle Database Concepts 11g Release 1
(11.1)", January 2011. (11.1)", January 2011.
[T10-SBC2]
Elliott, R., Ed., "ANSI INCITS 405-2005, Information
Technology - SCSI Block Commands - 2 (SBC-2)", November
2004.
Appendix A. Acknowledgments Appendix A. Acknowledgments
Tom Haynes would like to thank NetApp, Inc. for its funding of his Tom Haynes would like to thank NetApp, Inc. for its funding of his
time on this project. time on this project.
For the pNFS Access Permissions Check, the original draft was by For the pNFS Access Permissions Check, the original draft was by
Sorin Faibish, David Black, Mike Eisler, and Jason Glasgow. The work Sorin Faibish, David Black, Mike Eisler, and Jason Glasgow. The work
was influenced by discussions with Benny Halevy and Bruce Fields. A was influenced by discussions with Benny Halevy and Bruce Fields. A
review was done by Tom Haynes. review was done by Tom Haynes.
For the Sharing change attribute implementation details with NFSv4 For the Sharing change attribute implementation details with NFSv4
clients, the original draft was by Trond Myklebust. clients, the original draft was by Trond Myklebust.
For the NFS Server-side Copy, the original draft was by James For the NFS Server Side Copy, the original draft was by James
Lentini, Mike Eisler, Deepak Kenchammana, Anshul Madan, and Rahul Lentini, Mike Eisler, Deepak Kenchammana, Anshul Madan, and Rahul
Iyer. Tom Talpey co-authored an unpublished version of that Iyer. Tom Talpey co-authored an unpublished version of that
document. It was also was reviewed by a number of individuals: document. It was also was reviewed by a number of individuals:
Pranoop Erasani, Tom Haynes, Arthur Lent, Trond Myklebust, Dave Pranoop Erasani, Tom Haynes, Arthur Lent, Trond Myklebust, Dave
Noveck, Theresa Lingutla-Raj, Manjunath Shankararao, Satyam Vaghani, Noveck, Theresa Lingutla-Raj, Manjunath Shankararao, Satyam Vaghani,
and Nico Williams. Anna Schumaker's early prototyping experience and Nico Williams. Anna Schumaker's early prototyping experience
helped us avoid some traps. helped us avoid some traps.
For the NFS space reservation operations, the original draft was by For the NFS space reservation operations, the original draft was by
Mike Eisler, James Lentini, Manjunath Shankararao, and Rahul Iyer. Mike Eisler, James Lentini, Manjunath Shankararao, and Rahul Iyer.
skipping to change at page 94, line 22 skipping to change at page 94, line 34
For the Application IO Hints, the original draft was by Dean For the Application IO Hints, the original draft was by Dean
Hildebrand, Mike Eisler, Trond Myklebust, and Sam Falkner. Some Hildebrand, Mike Eisler, Trond Myklebust, and Sam Falkner. Some
early reviewers included Benny Halevy and Pranoop Erasani. early reviewers included Benny Halevy and Pranoop Erasani.
For Labeled NFS, the original draft was by David Quigley, James For Labeled NFS, the original draft was by David Quigley, James
Morris, Jarret Lu, and Tom Haynes. Peter Staubach, Trond Myklebust, Morris, Jarret Lu, and Tom Haynes. Peter Staubach, Trond Myklebust,
Stephen Smalley, Sorin Faibish, Nico Williams, and David Black also Stephen Smalley, Sorin Faibish, Nico Williams, and David Black also
contributed in the final push to get this accepted. contributed in the final push to get this accepted.
Christoph Hellwig was very helpful in getting the WRITE_SAME
semantics to model more of what T10 was doing for WRITE SAME (10)
[T10-SBC2]. And he led the push to get space reservations to more
closely model the posix_fallocate.
During the review process, Talia Reyes-Ortiz helped the sessions run During the review process, Talia Reyes-Ortiz helped the sessions run
smoothly. While many people contributed here and there, the core smoothly. While many people contributed here and there, the core
reviewers were Andy Adamson, Pranoop Erasani, Bruce Fields, Chuck reviewers were Andy Adamson, Pranoop Erasani, Bruce Fields, Chuck
Lever, Trond Myklebust, David Noveck, Peter Staubach, and Mike Lever, Trond Myklebust, David Noveck, Peter Staubach, and Mike
Kupfer. Kupfer.
Appendix B. RFC Editor Notes Appendix B. RFC Editor Notes
[RFC Editor: please remove this section prior to publishing this [RFC Editor: please remove this section prior to publishing this
document as an RFC] document as an RFC]
[RFC Editor: prior to publishing this document as an RFC, please [RFC Editor: prior to publishing this document as an RFC, please
replace all occurrences of NFSv42xdr with RFCxxxx where xxxx is the replace all occurrences of NFSv42xdr with RFCxxxx where xxxx is the
RFC number of the companion XDR document] RFC number of the companion XDR document]
Author's Address Author's Address
Thomas Haynes (editor) Thomas Haynes
PrimaryData, Inc. Primary Data, Inc.
4300 El Camino Real Ste 100 4300 El Camino Real Ste 100
Los Altos, CA 94022 Los Altos, CA 94022
USA USA
Phone: +1 408 215 1519 Phone: +1 408 215 1519
Email: thomas.haynes@primarydata.com Email: thomas.haynes@primarydata.com
 End of changes. 284 change blocks. 
915 lines changed or deleted 932 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/