draft-ietf-nfsv4-minorversion2-15.txt   draft-ietf-nfsv4-minorversion2-16.txt 
NFSv4 T. Haynes NFSv4 T. Haynes
Internet-Draft Editor Internet-Draft Editor
Intended status: Standards Track October 03, 2012 Intended status: Standards Track October 18, 2012
Expires: April 6, 2013 Expires: April 21, 2013
NFS Version 4 Minor Version 2 NFS Version 4 Minor Version 2
draft-ietf-nfsv4-minorversion2-15.txt draft-ietf-nfsv4-minorversion2-16.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 [1]. document are to be interpreted as described in RFC 2119 [8].
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
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 April 6, 2013. This Internet-Draft will expire on April 21, 2013.
Copyright Notice Copyright Notice
Copyright (c) 2012 IETF Trust and the persons identified as the Copyright (c) 2012 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
This document may contain material from IETF Documents or IETF
Contributions published or made publicly available before November
10, 2008. The person(s) controlling the copyright in some of this
material may not have granted the IETF Trust the right to allow
modifications of such material outside the IETF Standards Process.
Without obtaining an adequate license from the person(s) controlling
the copyright in such materials, this document may not be modified
outside the IETF Standards Process, and derivative works of it may
not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other
than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 5 1.1. The NFS Version 4 Minor Version 2 Protocol . . . . . . . 5
1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5 1.2. Scope of This Document . . . . . . . . . . . . . . . . . 5
1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5 1.3. NFSv4.2 Goals . . . . . . . . . . . . . . . . . . . . . . 5
1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 6 1.4. Overview of NFSv4.2 Features . . . . . . . . . . . . . . 6
1.4.1. Sparse Files . . . . . . . . . . . . . . . . . . . . . 6 1.4.1. Server-side Copy . . . . . . . . . . . . . . . . . . . 6
1.4.2. Application I/O Advise . . . . . . . . . . . . . . . . 6 1.4.2. Application I/O Advise . . . . . . . . . . . . . . . . 6
1.5. Differences from NFSv4.1 . . . . . . . . . . . . . . . . 6 1.4.3. Sparse Files . . . . . . . . . . . . . . . . . . . . . 6
2. NFS Server-side Copy . . . . . . . . . . . . . . . . . . . . . 6 1.4.4. Space Reservation . . . . . . . . . . . . . . . . . . 6
2.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 6 1.4.5. Application Data Hole (ADH) Support . . . . . . . . . 6
1.4.6. Labeled NFS . . . . . . . . . . . . . . . . . . . . . 6
1.5. Differences from NFSv4.1 . . . . . . . . . . . . . . . . 7
2. Server-side Copy . . . . . . . . . . . . . . . . . . . . . . . 7
2.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 7
2.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 7 2.2. Protocol Overview . . . . . . . . . . . . . . . . . . . . 7
2.2.1. Overview of Copy Operations . . . . . . . . . . . . . 7 2.2.1. Overview of Copy Operations . . . . . . . . . . . . . 8
2.2.2. Locking the Files . . . . . . . . . . . . . . . . . . 8 2.2.2. Locking the Files . . . . . . . . . . . . . . . . . . 9
2.2.3. Intra-Server Copy . . . . . . . . . . . . . . . . . . 8 2.2.3. Intra-Server Copy . . . . . . . . . . . . . . . . . . 9
2.2.4. Inter-Server Copy . . . . . . . . . . . . . . . . . . 10 2.2.4. Inter-Server Copy . . . . . . . . . . . . . . . . . . 10
2.2.5. Server-to-Server Copy Protocol . . . . . . . . . . . . 14 2.2.5. Server-to-Server Copy Protocol . . . . . . . . . . . . 14
2.3. Requirements for Operations . . . . . . . . . . . . . . . 15 2.3. Requirements for Operations . . . . . . . . . . . . . . . 15
2.3.1. netloc4 - Network Locations . . . . . . . . . . . . . 16 2.3.1. netloc4 - Network Locations . . . . . . . . . . . . . 16
2.3.2. Copy Offload Stateids . . . . . . . . . . . . . . . . 16 2.3.2. Copy Offload Stateids . . . . . . . . . . . . . . . . 16
2.4. Security Considerations . . . . . . . . . . . . . . . . . 17 2.4. Security Considerations . . . . . . . . . . . . . . . . . 17
2.4.1. Inter-Server Copy Security . . . . . . . . . . . . . . 17 2.4.1. Inter-Server Copy Security . . . . . . . . . . . . . . 17
3. Support for Application IO Hints . . . . . . . . . . . . . . . 25 3. Support for Application IO Hints . . . . . . . . . . . . . . . 25
4. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . . 25 4. Sparse Files . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 25 4.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 25
4.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 26 4.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 26
5. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 26 4.3. New Operations . . . . . . . . . . . . . . . . . . . . . 26
4.3.1. READ_PLUS . . . . . . . . . . . . . . . . . . . . . . 27
4.3.2. WRITE_PLUS . . . . . . . . . . . . . . . . . . . . . . 27
5. Space Reservation . . . . . . . . . . . . . . . . . . . . . . 27
5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 27 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 27
6. Application Data Hole Support . . . . . . . . . . . . . . . . 29 6. Application Data Hole Support . . . . . . . . . . . . . . . . 29
6.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 29 6.1. Generic Framework . . . . . . . . . . . . . . . . . . . . 30
6.1.1. Data Hole Representation . . . . . . . . . . . . . . . 30 6.1.1. Data Hole Representation . . . . . . . . . . . . . . . 31
6.1.2. Data Content . . . . . . . . . . . . . . . . . . . . . 30 6.1.2. Data Content . . . . . . . . . . . . . . . . . . . . . 31
6.2. An Example of Detecting Corruption . . . . . . . . . . . 31 6.2. An Example of Detecting Corruption . . . . . . . . . . . 32
6.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 32 6.3. Example of READ_PLUS . . . . . . . . . . . . . . . . . . 33
7. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 33 7. Labeled NFS . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 33 7.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 34
7.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 34 7.2. Definitions . . . . . . . . . . . . . . . . . . . . . . . 35
7.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 34 7.3. MAC Security Attribute . . . . . . . . . . . . . . . . . 35
7.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 35 7.3.1. Delegations . . . . . . . . . . . . . . . . . . . . . 36
7.3.2. Permission Checking . . . . . . . . . . . . . . . . . 35 7.3.2. Permission Checking . . . . . . . . . . . . . . . . . 36
7.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 36 7.3.3. Object Creation . . . . . . . . . . . . . . . . . . . 36
7.3.4. Existing Objects . . . . . . . . . . . . . . . . . . . 36 7.3.4. Existing Objects . . . . . . . . . . . . . . . . . . . 37
7.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 36 7.3.5. Label Changes . . . . . . . . . . . . . . . . . . . . 37
7.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 37 7.4. pNFS Considerations . . . . . . . . . . . . . . . . . . . 37
7.5. Discovery of Server Labeled NFS Support . . . . . . . . . 37 7.5. Discovery of Server Labeled NFS Support . . . . . . . . . 38
7.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 37 7.6. MAC Security NFS Modes of Operation . . . . . . . . . . . 38
7.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 38 7.6.1. Full Mode . . . . . . . . . . . . . . . . . . . . . . 38
7.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . . 39 7.6.2. Guest Mode . . . . . . . . . . . . . . . . . . . . . . 40
7.7. Security Considerations . . . . . . . . . . . . . . . . . 39 7.7. Security Considerations . . . . . . . . . . . . . . . . . 40
8. Sharing change attribute implementation details with NFSv4 8. Sharing change attribute implementation details with NFSv4
clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
8.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 40 8.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 41
9. Security Considerations . . . . . . . . . . . . . . . . . . . 40 9. Security Considerations . . . . . . . . . . . . . . . . . . . 41
10. Error Values . . . . . . . . . . . . . . . . . . . . . . . . . 40 10. Error Values . . . . . . . . . . . . . . . . . . . . . . . . . 41
10.1. Error Definitions . . . . . . . . . . . . . . . . . . . . 41 10.1. Error Definitions . . . . . . . . . . . . . . . . . . . . 42
10.1.1. General Errors . . . . . . . . . . . . . . . . . . . . 41 10.1.1. General Errors . . . . . . . . . . . . . . . . . . . . 42
10.1.2. Server to Server Copy Errors . . . . . . . . . . . . . 41 10.1.2. Server to Server Copy Errors . . . . . . . . . . . . . 42
10.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . . 42 10.1.3. Labeled NFS Errors . . . . . . . . . . . . . . . . . . 43
11. New File Attributes . . . . . . . . . . . . . . . . . . . . . 42 10.2. New Operations and Their Valid Errors . . . . . . . . . . 43
10.3. New Callback Operations and Their Valid Errors . . . . . 46
11. New File Attributes . . . . . . . . . . . . . . . . . . . . . 47
11.1. New RECOMMENDED Attributes - List and Definition 11.1. New RECOMMENDED Attributes - List and Definition
References . . . . . . . . . . . . . . . . . . . . . . . 42 References . . . . . . . . . . . . . . . . . . . . . . . 47
11.2. Attribute Definitions . . . . . . . . . . . . . . . . . . 43 11.2. Attribute Definitions . . . . . . . . . . . . . . . . . . 48
12. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . . 46 12. Operations: REQUIRED, RECOMMENDED, or OPTIONAL . . . . . . . . 51
13. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . . 50 13. NFSv4.2 Operations . . . . . . . . . . . . . . . . . . . . . . 55
13.1. Operation 59: COPY - Initiate a server-side copy . . . . 50 13.1. Operation 59: COPY - Initiate a server-side copy . . . . 55
13.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side 13.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side
copy . . . . . . . . . . . . . . . . . . . . . . . . . . 58 copy . . . . . . . . . . . . . . . . . . . . . . . . . . 62
13.3. Operation 61: COPY_NOTIFY - Notify a source server of 13.3. Operation 61: COPY_NOTIFY - Notify a source server of
a future copy . . . . . . . . . . . . . . . . . . . . . . 59 a future copy . . . . . . . . . . . . . . . . . . . . . . 63
13.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination 13.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination
server's copy privileges . . . . . . . . . . . . . . . . 60 server's copy privileges . . . . . . . . . . . . . . . . 64
13.5. Operation 63: OFFLOAD_STATUS - Poll for status of a 13.5. Operation 63: OFFLOAD_STATUS - Poll for status of a
server-side copy . . . . . . . . . . . . . . . . . . . . 61 server-side copy . . . . . . . . . . . . . . . . . . . . 65
13.6. Modification to Operation 42: EXCHANGE_ID - 13.6. Modification to Operation 42: EXCHANGE_ID -
Instantiate Client ID . . . . . . . . . . . . . . . . . . 63 Instantiate Client ID . . . . . . . . . . . . . . . . . . 66
13.7. Operation 64: INITIALIZE . . . . . . . . . . . . . . . . 64 13.7. Operation 64: WRITE_PLUS . . . . . . . . . . . . . . . . 67
13.8. Operation 67: IO_ADVISE - Application I/O access 13.8. Operation 67: IO_ADVISE - Application I/O access
pattern hints . . . . . . . . . . . . . . . . . . . . . . 67 pattern hints . . . . . . . . . . . . . . . . . . . . . . 72
13.9. Changes to Operation 51: LAYOUTRETURN . . . . . . . . . . 73 13.9. Changes to Operation 51: LAYOUTRETURN . . . . . . . . . . 78
13.10. Operation 65: READ_PLUS . . . . . . . . . . . . . . . . . 76 13.10. Operation 65: READ_PLUS . . . . . . . . . . . . . . . . . 81
13.11. Operation 66: SEEK . . . . . . . . . . . . . . . . . . . 81 13.11. Operation 66: SEEK . . . . . . . . . . . . . . . . . . . 86
14. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 82 14. NFSv4.2 Callback Operations . . . . . . . . . . . . . . . . . 87
14.1. Operation 15: CB_COPY - Report results of a 14.1. Operation 15: CB_OFFLOAD - Report results of an
server-side copy . . . . . . . . . . . . . . . . . . . . 82 asynchronous operation . . . . . . . . . . . . . . . . . 87
15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 83 15. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 88
16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 83 16. References . . . . . . . . . . . . . . . . . . . . . . . . . . 89
16.1. Normative References . . . . . . . . . . . . . . . . . . 83 16.1. Normative References . . . . . . . . . . . . . . . . . . 89
16.2. Informative References . . . . . . . . . . . . . . . . . 84 16.2. Informative References . . . . . . . . . . . . . . . . . 89
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 85 Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 90
Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 86 Appendix B. RFC Editor Notes . . . . . . . . . . . . . . . . . . 91
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 86 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 92
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 [10] and the second minor version, version, NFSv4.0, is described in [9] and the second minor version,
NFSv4.1, is described in [2]. It follows the guidelines for minor NFSv4.1, is described in [1]. It follows the guidelines for minor
versioning that are listed in Section 11 of [10]. versioning that are listed in Section 11 of [9].
As a minor version, NFSv4.2 is consistent with the overall goals for As a minor version, NFSv4.2 is consistent with the overall goals for
NFSv4, but extends the protocol so as to better meet those goals, NFSv4, but extends the protocol so as to better meet those goals,
based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted based on experiences with NFSv4.1. In addition, NFSv4.2 has adopted
some additional goals, which motivate some of the major extensions in some additional goals, which motivate some of the major extensions in
NFSv4.2. NFSv4.2.
1.2. Scope of This Document 1.2. Scope of This Document
This document describes the NFSv4.2 protocol. With respect to This document describes the NFSv4.2 protocol. With respect to
NFSv4.0 and NFSv4.1, this document does not: NFSv4.0 and NFSv4.1, this document does not:
o describe the NFSv4.0 or NFSv4.1 protocols, except where needed to o describe the NFSv4.0 or NFSv4.1 protocols, except where needed to
contrast with NFSv4.2. contrast with NFSv4.2
o modify the specification of the NFSv4.0 or NFSv4.1 protocols. o modify the specification of the NFSv4.0 or NFSv4.1 protocols
o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any o clarify the NFSv4.0 or NFSv4.1 protocols. I.e., any
clarifications made here apply to NFSv4.2 and neither of the prior clarifications made here apply to NFSv4.2 and neither of the prior
protocols. protocols
The full XDR for NFSv4.2 is presented in [3]. The full XDR for NFSv4.2 is presented in [2].
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_HOLE and
SEEK_DATA 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
[[Comment.1: This needs fleshing out! --TH]] 1.4.1. Server-side Copy
1.4.1. Sparse Files
Two new operations are defined to support the reading of sparse files A traditional file copy from one server to another results in the
(READ_PLUS) and the punching of holes to remove backing storage data being put on the network twice - source to client and then
(INITIALIZE). client to destination. New operations are introduced to allow the
client to authorize the two servers to interact directly. As this
copy can be lengthy, asynchronous support is also provided.
1.4.2. Application I/O Advise 1.4.2. Application I/O Advise
We propose a new IO_ADVISE operation for NFSv4.2 that clients can use Applications and clients want to advise the server as to expected I/O
to communicate expected I/O behavior to the server. By communicating behavior. Using IO_ADVISE (see Section 13.8) to communicate future
future I/O behavior such as whether a file will be accessed I/O behavior such as whether a file will be accessed sequentially or
sequentially or randomly, and whether a file will or will not be randomly, and whether a file will or will not be accessed in the near
accessed in the near future, servers can optimize future I/O requests future, allows servers to optimize future I/O requests for a file by,
for a file by, for example, prefetching or evicting data. This for example, prefetching or evicting data. This operation can be
operation can be used to support the posix_fadvise function as well used to support the posix_fadvise function as well as other
as other applications such as databases and video editors. applications such as databases and video editors.
1.4.3. Sparse Files
Sparse files are ones which have unallocated data blocks as holes in
the file. Such holes are typically transferred as 0s during I/O.
READ_PLUS (see Section 13.10) allows a server to send back to the
client metadata describing the hole and WRITE_PLUS (see Section 13.7)
allows the client to punch holes into a file. In addition, SEEK (see
Section 13.11) is provided to scan for the next hole or data from a
given location.
1.4.4. Space Reservation
When a file is sparse, one concern applications have is ensuring that
there will always be enough data blocks available for the file during
future writes. A new attribute, space_reserved (see Section 11.2.4)
provides the client a guarantee that space will be available.
1.4.5. Application Data Hole (ADH) Support
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
and WRITE_PLUS to understand this metadata as a new form of a hole.
1.4.6. Labeled NFS
While both clients and servers can employ Mandatory Access Control
(MAC) security models to enforce data access, there has been no
protocol support to allow full interoperability. A new file object
attribute, sec_label (see Section 11.2.2) allows for the server to
store and enforce MAC labels. The format of the sec_label
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
operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an operation from OPTIONAL/RECOMMENDED to REQUIRED. Forcing an
implementation to adopt each arm of a discriminated union at such a implementation to adopt each arm of a discriminated union at such a
time does not meet the spirit of the minor versioning rules. As time does not meet the spirit of the minor versioning rules. As
such, new arms of a discriminated union MUST follow the same such, new arms of a discriminated union MUST follow the same
guidelines for minor versioning as operations in NFSv4.1 - i.e., they guidelines for minor versioning as operations in NFSv4.1 - i.e., they
may not be made REQUIRED. To support this, a new error code, may not be made REQUIRED. To support this, a new error code,
NFS4ERR_UNION_NOTSUPP, is introduced which allows the server to NFS4ERR_UNION_NOTSUPP, is introduced which allows the server to
communicate to the client that the operation is supported, but the communicate to the client that the operation is supported, but the
specific arm of the discriminated union is not. specific arm of the discriminated union is not.
2. NFS Server-side Copy 2. Server-side Copy
2.1. Introduction 2.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 the server without the data being to perform a file copy on the server without the data being
transmitted back and forth over the network. Without this feature, transmitted back and forth over the network. Without this feature,
an NFS client copies data from one location to another by reading the an NFS client copies data from one location to another by reading the
data from the server over the network, and then writing the data back data from the server over the network, and then writing the data back
over the network to the server. Using this server-side copy over the network to the server. Using this server-side copy
operation, the client is able to instruct the server to copy the data operation, the client is able to instruct the server to copy the data
skipping to change at page 7, line 37 skipping to change at page 8, line 21
server are the same server. Therefore in the context of an intra- server are the same server. Therefore in the context of an intra-
server copy, the terms source server and destination server refer to server copy, the terms source server and destination server refer to
the single server performing the copy. the single server performing the copy.
The operations described below are designed to copy files. Other The operations described below are designed to copy files. Other
file system objects can be copied by building on these operations or file system objects can be copied by building on these operations or
using other techniques. For example if the user wishes to copy a using other techniques. For example if the user wishes to copy a
directory, the client can synthesize a directory copy by first directory, the client can synthesize a directory copy by first
creating the destination directory and then copying the source creating the destination directory and then copying the source
directory's files to the new destination directory. If the user directory's files to the new destination directory. If the user
wishes to copy a namespace junction [11] [12], the client can use the wishes to copy a namespace junction [10] [11], the client can use the
ONC RPC Federated Filesystem protocol [12] to perform the copy. ONC RPC Federated Filesystem protocol [11] to perform the copy.
Specifically the client can determine the source junction's Specifically the client can determine the source junction's
attributes using the FEDFS_LOOKUP_FSN procedure and create a attributes using the FEDFS_LOOKUP_FSN procedure and create a
duplicate junction using the FEDFS_CREATE_JUNCTION procedure. duplicate junction using the FEDFS_CREATE_JUNCTION procedure.
For the inter-server copy, the operations are defined to be For the inter-server copy, the operations are defined to be
compatible with the traditional copy authentication approach. The compatible with the traditional copy authentication approach. The
client and user are authorized at the source for reading. Then they client and user are authorized at the source for reading. Then they
are authorized at the destination for writing. are authorized at the destination for writing.
2.2.1. Overview of Copy Operations 2.2.1. Overview of Copy Operations
skipping to change at page 8, line 21 skipping to change at page 9, line 5
for the given user. (Section 13.4) for the given user. (Section 13.4)
COPY: Used by the client to request a file copy. (Section 13.1) COPY: Used by the client to request a file copy. (Section 13.1)
OFFLOAD_ABORT: Used by the client to abort an asynchronous file OFFLOAD_ABORT: Used by the client to abort an asynchronous file
copy. (Section 13.2) copy. (Section 13.2)
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 13.5) asynchronous file copy. (Section 13.5)
CB_COPY: Used by the destination server to report the results of an CB_OFFLOAD: Used by the destination server to report the results of
asynchronous file copy to the client. (Section 14.1) an asynchronous file copy to the client. (Section 14.1)
2.2.2. Locking the Files 2.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.
2.2.3. Intra-Server Copy 2.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_COPY operation callback. If the copy is performed results using a CB_OFFLOAD operation callback. If the copy is
asynchronously, the client may poll the status of the copy using performed asynchronously, the client may poll the status of the copy
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.
The copy operation is completed, either successfully or The copy operation is completed, either successfully or
unsuccessfully, before the server replies to the client's request. unsuccessfully, before the server replies to the client's request.
The server's reply contains the final result of the operation. The server's reply contains the final result of the operation.
Client Server Client Server
+ + + +
| | | |
skipping to change at page 10, line 25 skipping to change at page 10, line 33
|<------------------------------------/| a file copy |<------------------------------------/| a file copy
| | | |
| | | |
|--- 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_COPY --------------------------| Server reports results |<-- CB_OFFLOAD -----------------------| Server reports results
|\------------------------------------>| |\------------------------------------>|
| | | |
|--- 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.
2.2.4. Inter-Server Copy 2.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.168.33.0/24 in the specialized, high speed network (network 192.0.2.0/24 in the diagram)
diagram) that does not include the client. The protocol allows the that does not include the client. The protocol allows the client to
client to setup the copy between the servers (over network setup the copy between the servers (over network 203.0.113.0/24 in
10.11.78.0/24 in the diagram) and for the servers to communicate on the diagram) and for the servers to communicate on the high speed
the high speed network if they choose to do so. network if they choose to do so.
192.168.33.0/24 192.0.2.0/24
+-------------------------------------+ +-------------------------------------+
| | | |
| | | |
| 192.168.33.18 | 192.168.33.56 | 192.0.2.18 | 192.0.2.56
+-------+------+ +------+------+ +-------+------+ +------+------+
| Source | | Destination | | Source | | Destination |
+-------+------+ +------+------+ +-------+------+ +------+------+
| 10.11.78.18 | 10.11.78.56 | 203.0.113.18 | 203.0.113.56
| | | |
| | | |
| 10.11.78.0/24 | | 203.0.113.0/24 |
+------------------+------------------+ +------------------+------------------+
| |
| |
| 10.11.78.243 | 203.0.113.243
+-----+-----+ +-----+-----+
| Client | | Client |
+-----------+ +-----------+
Figure 3: An example inter-server network topology. Figure 3: An example inter-server network topology.
For an inter-server copy, the client notifies the source server that For an inter-server copy, the client notifies the source server that
a file will be copied by the destination server using a COPY_NOTIFY a file will be copied by the destination server using a COPY_NOTIFY
operation. The client then initiates the copy by sending the COPY operation. The client then initiates the copy by sending the COPY
operation to the destination server. The destination server may operation to the destination server. The destination server may
skipping to change at page 13, line 32 skipping to change at page 13, line 32
| | | | | |
|--- 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_COPY --------------------------| Destination reports |<-- CB_OFFLOAD -----------------------| Destination reports
|\------------------------------------>| results |\------------------------------------>| results
| | | | | |
|--- LOCKU --------------------------->| Only if LOCK was done |--- LOCKU --------------------------->| Only if LOCK was done
|<------------------------------------/| |<------------------------------------/|
| | | | | |
|--- CLOSE --------------------------->| Release open state |--- CLOSE --------------------------->| Release open state
|<------------------------------------/| |<------------------------------------/|
| | | | | |
|--- LOCKU --->| | Only if LOCK was done |--- LOCKU --->| | Only if LOCK was done
|<------------------/| | |<------------------/| |
skipping to change at page 14, line 41 skipping to change at page 14, line 41
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 [13] or FTP [14]) presents some challenges. In (e.g., HTTP [12] or FTP [13]) 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 response to COPY_NOTIFY could include the URL
skipping to change at page 15, line 24 skipping to change at page 15, line 24
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 2.4.1.2.4 and Section 2.4.1.4. this are given in Section 2.4.1.2.4 and Section 2.4.1.4.
2.3. Requirements for Operations 2.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_COPY operations. If COPY returns a stateid, then the the COPY and CB_OFFLOAD operations. If COPY returns a stateid, then
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
the COPY, COPY_NOTICE, and CB_COPY operations, and MAY use the the COPY, COPY_NOTICE, and CB_OFFLOAD operations, and MAY use the
OFFLOAD_REVOKE operation. If COPY returns a stateid, then the client OFFLOAD_REVOKE operation. If COPY returns a stateid, then the client
MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations. MAY use the OFFLOAD_ABORT and OFFLOAD_STATUS operations.
If a server supports intra-server copy, then the server MUST support If a server supports intra-server copy, then the server MUST support
the COPY operation. If a server's COPY operation returns a stateid, the COPY operation. If a server's COPY operation returns a stateid,
then the server MUST also support these operations: CB_COPY, then the server MUST also support these operations: CB_OFFLOAD,
OFFLOAD_ABORT, and OFFLOAD_STATUS. OFFLOAD_ABORT, and OFFLOAD_STATUS.
If a source server supports inter-server copy, then the source server If a source server supports inter-server copy, then the source server
MUST support all these operations: COPY_NOTIFY and OFFLOAD_REVOKE. MUST support all these operations: COPY_NOTIFY and OFFLOAD_REVOKE.
If a destination server supports inter-server copy, then the If a destination server supports inter-server copy, then the
destination server MUST support the COPY operation. If a destination destination server MUST support the COPY operation. If a destination
server's COPY operation returns a stateid, then the destination server's COPY operation returns a stateid, then the destination
server MUST also support these operations: CB_COPY, OFFLOAD_ABORT, server MUST also support these operations: CB_OFFLOAD, OFFLOAD_ABORT,
COPY_NOTIFY, OFFLOAD_REVOKE, and OFFLOAD_STATUS. COPY_NOTIFY, OFFLOAD_REVOKE, and OFFLOAD_STATUS.
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
skipping to change at page 16, line 27 skipping to change at page 16, line 27
}; };
union netloc4 switch (netloc_type4 nl_type) { union netloc4 switch (netloc_type4 nl_type) {
case NL4_NAME: utf8str_cis nl_name; case NL4_NAME: utf8str_cis nl_name;
case NL4_URL: utf8str_cis nl_url; case NL4_URL: utf8str_cis nl_url;
case NL4_NETADDR: netaddr4 nl_addr; case NL4_NETADDR: netaddr4 nl_addr;
}; };
If the netloc4 is of type NL4_NAME, the nl_name field MUST be If the netloc4 is of type NL4_NAME, the nl_name field MUST be
specified as a UTF-8 string. The nl_name is expected to be resolved specified as a UTF-8 string. The nl_name is expected to be resolved
to a network address via DNS, LDAP, NIS, /etc/hosts, or some other to a network address via DNS, LDAP, NIS, /etc/hosts, or some other
means. If the netloc4 is of type NL4_URL, a server URL [4] means. If the netloc4 is of type NL4_URL, a server URL [3]
appropriate for the server-to-server copy operation is specified as a appropriate for the server-to-server copy operation is specified as a
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
[2]. [1].
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.
2.3.2. Copy Offload Stateids 2.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_COPY operations. OFFLOAD_STATUS, and CB_OFFLOAD operations.
Section 8.2.4 of [2] specifies that stateids are valid until either Section 8.2.4 of [1] specifies that stateids are valid until either
(A) the client or server restart or (B) the client returns the (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_COPY operation. OFFLOAD_ABORT operation or the client replies to a CB_OFFLOAD
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.
2.4. Security Considerations 2.4. Security Considerations
The security considerations pertaining to NFSv4 [10] apply to this The security considerations pertaining to NFSv4 [9] apply to this
chapter. chapter.
The standard security mechanisms provide by NFSv4 [10] may be used to The standard security mechanisms provide by NFSv4 [9] may be used to
secure the protocol described in this chapter. secure the protocol 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 [5], including described in this chapter are REQUIRED to implement [4], including
the RPCSEC_GSSv3 privileges copy_from_auth and copy_to_auth. If the the RPCSEC_GSSv3 privileges copy_from_auth and copy_to_auth. If the
server-to-server copy protocol is ONC RPC based, the servers are also server-to-server copy protocol is ONC RPC based, the servers are also
REQUIRED to implement the RPCSEC_GSSv3 privilege copy_confirm_auth. REQUIRED to implement the RPCSEC_GSSv3 privilege copy_confirm_auth.
These requirements to implement are not requirements to use. NFSv4 These requirements to implement are not requirements to use. NFSv4
clients and servers are RECOMMENDED to use [5] to secure server-side clients and servers are RECOMMENDED to use [4] to secure server-side
copy operations. copy operations.
2.4.1. Inter-Server Copy Security 2.4.1. Inter-Server Copy Security
2.4.1.1. Requirements for Secure Inter-Server Copy 2.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
skipping to change at page 18, line 40 skipping to change at page 18, line 40
An approach that sends delegated credentials of the client's user An approach that sends delegated credentials of the client's user
principal to the destination server is not used for the following principal to the destination server is not used for the following
reasons. If the client's user delegated its credentials, the reasons. If the client's user delegated its credentials, the
destination would authenticate as the user principal. If the destination would authenticate as the user principal. If the
destination were using the NFSv4 protocol to perform the copy, then destination were using the NFSv4 protocol to perform the copy, then
the source server would authenticate the destination server as the the source server would authenticate the destination server as the
user principal, and the file copy would securely proceed. However, user principal, and the file copy would securely proceed. However,
this approach would allow the destination server to copy other files. this approach would allow the destination server to copy other files.
The user principal would have to trust the destination server to not The user principal would have to trust the destination server to not
do so. This is counter to the requirements, and therefore is not do so. This is counter to the requirements, and therefore is not
considered. Instead an approach using RPCSEC_GSSv3 [5] privileges is considered. Instead an approach using RPCSEC_GSSv3 [4] privileges is
proposed. proposed.
One of the stated applications of the proposed RPCSEC_GSSv3 protocol One of the stated applications of the proposed RPCSEC_GSSv3 protocol
is compound client host and user authentication [+ privilege is compound client host and user authentication [+ privilege
assertion]. For inter-server file copy, we require compound NFS assertion]. For inter-server file copy, we require compound NFS
server host and user authentication [+ privilege assertion]. The server host and user authentication [+ privilege assertion]. The
distinction between the two is one without meaning. distinction between the two is one without meaning.
RPCSEC_GSSv3 introduces the notion of privileges. We define three RPCSEC_GSSv3 introduces the notion of privileges. We define three
privileges: privileges:
skipping to change at page 23, line 46 skipping to change at page 23, line 46
2.4.1.2.4. Securing Non ONC RPC Server-to-Server Copy Protocols 2.4.1.2.4. Securing Non ONC RPC Server-to-Server Copy Protocols
If the destination won't be using ONC RPC to copy the data, then the If the destination won't be using ONC RPC to copy the data, then the
source and destination are using an unspecified copy protocol. The source and destination are using an unspecified copy protocol. The
destination could use the shared secret and the NFSv4 user id to destination could use the shared secret and the NFSv4 user id to
prove to the source server that the user principal has authorized the prove to the source server that the user principal has authorized the
copy. copy.
For protocols that authenticate user names with passwords (e.g., HTTP For protocols that authenticate user names with passwords (e.g., HTTP
[13] and FTP [14]), the nfsv4 user id could be used as the user name, [12] and FTP [13]), the NFSv4 user id could be used as the user name,
and an ASCII hexadecimal representation of the RPCSEC_GSSv3 shared and an ASCII hexadecimal representation of the RPCSEC_GSSv3 shared
secret could be used as the user password or as input into non- secret could be used as the user password or as input into non-
password authentication methods like CHAP [15]. password authentication methods like CHAP [14].
2.4.1.3. Inter-Server Copy via ONC RPC but without RPCSEC_GSSv3 2.4.1.3. Inter-Server Copy via ONC RPC but without RPCSEC_GSSv3
ONC RPC security flavors other than RPCSEC_GSSv3 MAY be used with the ONC RPC security flavors other than RPCSEC_GSSv3 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.
skipping to change at page 24, line 36 skipping to change at page 24, line 36
quadruple: <random number, source fh, user ID, destination address quadruple: <random number, source fh, user ID, destination address
Y>. If the destination uses one of these target netlocs to contact Y>. If the destination uses one of these target netlocs to contact
the source server, the source server will be able to uniquely the source server, the source server will be able to uniquely
identify the destination server, even if the destination server does identify the destination server, even if the destination server does
not connect from the address specified by the client in COPY_NOTIFY. not connect from the address specified by the client in COPY_NOTIFY.
The level of assurance in this identification depends on the The level of assurance in this identification depends on the
unpredictability, strength and secrecy of the random number. unpredictability, strength and secrecy of the random number.
For example, suppose the network topology is as shown in Figure 3. For example, suppose the network topology is as shown in Figure 3.
If the source filehandle is 0x12345, the source server may respond to If the source filehandle is 0x12345, the source server may respond to
a COPY_NOTIFY for destination 10.11.78.56 with the URLs: a COPY_NOTIFY for destination 203.0.113.56 with the URLs:
nfs://10.11.78.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/10.11.78.56/_FH/
0x12345
nfs://192.168.33.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/10.11.78.56/ nfs://203.0.113.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/203.0.113.56/
_FH/0x12345 _FH/0x12345
nfs://192.0.2.18//_COPY/FvhH1OKbu8VrxvV1erdjvR7N/203.0.113.56/_FH/
0x12345
The name component after _COPY is 24 characters of base 64, more than The name component after _COPY is 24 characters of base 64, more than
enough to encode a 128 bit random number. enough to encode a 128 bit random number.
The client will then send these URLs to the destination server in the The client will then send these URLs to the destination server in the
COPY operation. Suppose that the 192.168.33.0/24 network is a high COPY operation. Suppose that the 192.0.2.0/24 network is a high
speed network and the destination server decides to transfer the file speed network and the destination server decides to transfer the file
over this network. If the destination contacts the source server over this network. If the destination contacts the source server
from 192.168.33.56 over this network using NFSv4.1, it does the from 192.0.2.56 over this network using NFSv4.1, it does the
following: following:
COMPOUND { PUTROOTFH, LOOKUP "_COPY" ; LOOKUP COMPOUND { PUTROOTFH, LOOKUP "_COPY" ; LOOKUP
"FvhH1OKbu8VrxvV1erdjvR7N" ; LOOKUP "10.11.78.56"; LOOKUP "_FH" ; "FvhH1OKbu8VrxvV1erdjvR7N" ; LOOKUP "203.0.113.56"; LOOKUP "_FH" ;
OPEN "0x12345" ; GETFH } OPEN "0x12345" ; GETFH }
Provided that the random number is unpredictable and has been kept Provided that the random number is unpredictable and has been kept
secret by the parties involved, the source server will therefore know secret by the parties involved, the source server will therefore know
that these NFSv4.x operations are being issued by the destination that these NFSv4.x operations are being issued by the destination
server identified in the COPY_NOTIFY. This random number technique server identified in the COPY_NOTIFY. This random number technique
only provides initial authentication of the destination server, and only provides initial authentication of the destination server, and
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.
2.4.1.4. Inter-Server Copy without ONC RPC and RPCSEC_GSSv3 2.4.1.4. Inter-Server Copy without ONC RPC and RPCSEC_GSSv3
The same techniques as Section 2.4.1.3, using unique URLs for each The same techniques as Section 2.4.1.3, using unique URLs for each
destination server, can be used for other protocols (e.g., HTTP [13] destination server, can be used for other protocols (e.g., HTTP [12]
and FTP [14]) as well. and FTP [13]) as well.
3. Support for Application IO Hints 3. Support for Application IO Hints
Applications can issue client I/O hints via posix_fadvise() [6] to Applications can issue client I/O hints via posix_fadvise() [5] to
the NFS client. While this can help the NFS client optimize I/O and the NFS client. While this can help the NFS client optimize I/O and
caching for a file, it does not allow the NFS server and its exported caching for a file, it does not allow the NFS server and its exported
file system to do likewise. We add an IO_ADVISE procedure file system to do likewise. We add an IO_ADVISE procedure
(Section 13.8) to communicate the client file access patterns to the (Section 13.8) to communicate the client file access patterns to the
NFS server. The NFS server upon receiving a IO_ADVISE operation MAY NFS server. The NFS server upon receiving a IO_ADVISE operation MAY
choose to alter its I/O and caching behavior, but is under no choose to alter its I/O and caching behavior, but is under no
obligation to do so. 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
skipping to change at page 26, line 22 skipping to change at page 26, line 22
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.
Two new operations INITIALIZE (Section 13.7) and READ_PLUS Two new operations WRITE_PLUS (Section 13.7) and READ_PLUS
(Section 13.10) are introduced. INITIALIZE allows for the creation (Section 13.10) are introduced. WRITE_PLUS allows for the creation
of a sparse file and for hole punching. An application might want to of a sparse file and for hole punching. An application might want to
zero out a range of the file. READ_PLUS supports all the features of zero out a range of the file. READ_PLUS supports all the features of
READ but includes an extension to support sparse pattern files READ but includes an extension to support sparse pattern files
(Section 6.1.2). READ_PLUS is guaranteed to perform no worse than (Section 6.1.2). READ_PLUS is guaranteed to perform no worse than
READ, and can dramatically improve performance with sparse files. READ, and can dramatically improve performance with sparse files.
READ_PLUS does not depend on pNFS protocol features, but can be used READ_PLUS does not depend on pNFS protocol features, but can be used
by pNFS to support sparse files. by pNFS to support sparse files.
4.2. Terminology 4.2. Terminology
skipping to change at page 26, line 47 skipping to change at page 26, line 47
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. For block-based file systems, this could also be an
unallocated region of the file. unallocated region of the file.
Hole Threshold: The minimum length of a Hole as determined by the Hole Threshold: The minimum length of a Hole as determined by the
server. If a server chooses to define a Hole Threshold, then it server. If a server chooses to define a Hole Threshold, then it
would not return hole information about holes with a length would not return hole information about holes with a length
shorter than the Hole Threshold. shorter than the Hole Threshold.
4.3. New Operations
READ_PLUS and WRITE_PLUS are new variants of the NFSv4.1 READ and
WRITE operations [1]. 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 6.1.1). As both READ and WRITE are inefficient for transfer
of sparse sections of the file, they are marked as OBSOLETE in
NFSv4.2. Instead, a client should utilize READ_PLUS and WRITE_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.
4.3.1. READ_PLUS
For holes, READ_PLUS extends the response to avoid returning data for
portions of the file which are either initialized and contain no
backing store or if the result would appear to be so. I.e., if the
result was a data block composed entirely of zeros, then it is easier
to return a hole. Returning data blocks of 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 either initialized and contain no
backing store.
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
on a sparse ADH or file, then the server must expand such data to be
raw bytes. If a READ occurs in the middle of a hole or ADH, the
server can only send back bytes starting from that offset. In
contrast, if a READ_PLUS occurs in the middle of a hole or ADH, the
server can send back a range which starts before the offset and
extends past the range.
4.3.2. WRITE_PLUS
WRITE_PLUS can be used to either hole punch or initialize ADHs. For
either purpose, the client can avoid the transfer of a repetitive
pattern across the network. If the filesystem on the server does not
supports sparse files, the WRITE_PLUS operation 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.
5. Space Reservation 5. Space Reservation
5.1. Introduction 5.1. Introduction
This section describes a set of operations that allow applications Applications such as hypervisors want to be able to reserve space for
such as hypervisors to reserve space for a file, report the amount of a file, report the amount of actual disk space a file occupies, and
actual disk space a file occupies and freeup the backing space of a freeup the backing space of a file when it is not required. In
file when it is not required. In virtualized environments, virtual virtualized environments, virtual disk files are often stored on NFS
disk files are often stored on NFS mounted volumes. Since virtual mounted volumes. Since virtual disk files represent the hard disks
disk files represent the hard disks of virtual machines, hypervisors of virtual machines, hypervisors often have to guarantee certain
often have to guarantee certain properties for the file. properties for the file.
One such example is space reservation. When a hypervisor creates a One such example is space reservation. 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.
If the space_reserved attribute (see Section 11.2.4) is set on a We define a "reservation" as being the combination of the
file, it is guaranteed that writes that do not grow the file will not space_reserved attribute (see Section 11.2.4) and the size attribute
fail with NFSERR_NOSPC. (see Section 5.8.1.5 of [1]). If space_reserved attribute is set on
a file, it is guaranteed that writes that do not grow the file 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 would be the ability to report the number of Another useful feature is the ability to report the number of blocks
blocks that would be freed when a file is deleted. Currently, NFS that would be freed when a file is deleted. Currently, NFS reports
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
skipping to change at page 28, line 11 skipping to change at page 29, line 8
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 this
issues: issues:
space_reserved This attribute specifies whether the blocks backing space_reserved This attribute specifies that writes to the reserved
the file have been preallocated. 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.
INITIALIZE This operation zeroes and/or deallocates the blocks WRITE_PLUS This operation zeroes and/or deallocates the blocks
backing a region of the file. 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
skipping to change at page 28, line 47 skipping to change at page 29, line 44
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 11.2.5), is Adding another size attribute, space_freed (see Section 11.2.5), 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 doesn't solve the problem of space being The addition of this problem does not solve the problem of space
over-reported. However, over-reporting is better than under- being over-reported. However, over-reporting is better than under-
reporting. reporting.
6. Application Data Hole Support 6. Application Data Hole 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 [16]). An ADB is typically comprised of two not raw bytes (see [15]). An ADB is typically comprised of two
sections: a header and data. The header describes the sections: a header and data. The header describes the
characteristics of the block and can provide a means to detect characteristics of the block and can provide a means to detect
corruption in the data payload. The data section is typically corruption in the data 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. A logical block number which allows the application to determine
which data block is being referenced. This is useful when the which data block is being referenced. This is useful when the
client is not storing the blocks in contiguous memory. client is not storing the blocks in contiguous memory.
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 [16] and detect Applications already impose structures on files [15] and detect
corruption in data blocks [17]. What they are not able to do is corruption in data blocks [16]. What they are not able to do is
efficiently transfer and store ADBs. To initialize a file with ADBs, efficiently transfer and store ADBs. To initialize a file with ADBs,
the client must send the full ADB to the server and that must be the client must send the full ADB to the server and that must be
stored on the server. stored on the server.
In this section, we are going to define an Application Data Hole In this section, we are going to define an Application Data Hole
(ADH), which is a generic framework for transfering the ADB, present (ADH), which is a generic framework for transferring the ADB, present
one approach to detecting corruption in a given ADH implementation, one approach to detecting corruption in a given ADH implementation,
and describe the model for how the client and server can support and describe the model for how the client and server can support
efficient initialization of ADHs, reading of ADH holes, punching ADH efficient initialization of ADHs, reading of ADH holes, punching ADH
holes in a file, and space reservation. We define the ADHN to be the holes in a file, and space reservation. We define the ADHN to be the
Application Data Hole Number, which is the logical block number Application Data Hole Number, which is the logical block number
discussed earlier. discussed earlier.
6.1. Generic Framework 6.1. Generic Framework
We want the representation of the ADH to be flexible enough to We want the representation of the ADH 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 ADH. One might store the ADHN at the start of the block and then
have a guard pattern to detect corruption [18]. The next might store have a guard pattern to detect corruption [17]. The next might store
the ADHN at an offset of 100 bytes within the block and have no guard the ADHN at an offset of 100 bytes within the block and have no guard
pattern at all, i.e., existing applications might already have well pattern at all, i.e., existing applications might already have well
defined formats for their data blocks. 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 ADH.
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
skipping to change at page 31, line 39 skipping to change at page 32, line 36
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 [19] starting at byte 16 Finally, it also defines an 8 byte checksum [18] starting at byte 16
which applies to the remaining contents of the block. If the state which applies to the remaining contents of the block. If the state
is FREE, then that checksum is trivially zero. As such, the 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 ADH - it need not make the transfer layer aware of the fact that
there is a checksum (see [17] for an example of checksums used to there is a checksum (see [16] for an example of checksums used to
detect corruption in application data blocks). detect corruption in application data blocks).
Corruption in each ADH can be detected thusly: Corruption in each ADH 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 ADH 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.
skipping to change at page 32, line 39 skipping to change at page 33, line 36
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.
6.3. Example of READ_PLUS 6.3. Example of READ_PLUS
The hypothetical application presented in Section 6.2 can be used to The hypothetical application presented in Section 6.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 ADHs in the FREE state:
INITIALIZE {0, 4k, 100, 0, 0, 8, 0xfeedface} WRITE_PLUS {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 ADH 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 0 -> (16k - 1) : 4k, 4, 0, 0, 8, 0xfeedface
16k -> (20k - 1) : 00 00 00 05 ca fe de ad XX XX ... XX XX 16k -> (20k - 1) : 00 00 00 05 ca fe de ad XX XX ... XX XX
20k -> 400k : 4k, 95, 0, 6, 0xfeedface 20k -> 400k : 4k, 95, 0, 6, 0xfeedface
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 would get back a result of an ADH, some data, and a final ADH:
skipping to change at page 33, line 15 skipping to change at page 34, line 14
7. Labeled NFS 7. Labeled NFS
7.1. Introduction 7.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 [7]. subject (usually a process) and the object it wishes to access [19].
These labels may contain user identity information but usually These labels may contain user identity information but usually
contain additional information. In DAC systems users are free to contain additional information. In DAC systems users are free to
specify the access rules for resources that they own. MAC models specify the access rules for resources that they own. MAC models
base their security decisions on a system wide policy established by base their security decisions on a system wide policy established by
an administrator or organization which the users do not have the an administrator or organization which the users do not have the
ability to override. In this section, we add a MAC model to NFSv4.2. ability to override. In this section, we add a MAC 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 33, line 45 skipping to change at page 34, line 44
The second change is to provide methods for the client to determine The second change is to provide methods for the client to determine
if the security label has changed. A client which needs to know if a if the security label has changed. A client which needs to know if a
label is going to change SHOULD register a delegation on that file. label is going to change SHOULD register 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.
The final change necessary is a modification to the RPC layer used in The final change necessary is a modification to the RPC layer used in
NFSv4 in the form of a new version of the RPCSEC_GSS [8] framework. NFSv4 in the form of a new version of the RPCSEC_GSS [6] framework.
In order for an NFSv4 server to apply MAC checks it must obtain In order for an NFSv4 server to apply MAC checks it must obtain
additional information from the client. Several methods were additional information from the client. Several methods were
explored for performing this and it was decided that the best explored for performing this and it was decided that the best
approach was to incorporate the ability to make security attribute approach was to incorporate the ability to make security attribute
assertions through the RPC mechanism. RPCSECGSSv3 [5] outlines a assertions through the RPC mechanism. RPCSECGSSv3 [4] outlines a
method to assert additional security information such as security method to assert additional security information such as security
labels on gss context creation and have that data bound to all RPC labels on gss context creation and have that data bound to all RPC
requests that make use of that context. requests that make use of that context.
7.2. Definitions 7.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
skipping to change at page 35, line 13 skipping to change at page 36, line 8
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.
o MUST provide the ability to atomically set security information o MUST provide the ability to atomically set security information
upon object creation. upon object creation.
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 [21] to allow for interoperability component is a LFS as defined in [21] to allow for interoperability
between MAC mechanisms. The second component is an opaque field between MAC mechanisms. The second component is an opaque field
which is the actual security attribute data. To allow for various which is the actual security attribute data. To allow for various
MAC models, NFSv4 should be used solely as a transport mechanism for MAC models, NFSv4 should be used solely as a transport mechanism for
skipping to change at page 35, line 37 skipping to change at page 36, line 32
OPEN and CREATE allows for the security attribute to be specified OPEN and CREATE allows for the security attribute to be specified
upon creation. By providing an atomic create and set operation for upon creation. By providing an atomic create and set operation for
the security attribute it is possible to enforce the second and the security attribute it is possible to enforce the second and
fourth requirements. The recommended attribute FATTR4_SEC_LABEL (see fourth requirements. The recommended attribute FATTR4_SEC_LABEL (see
Section 11.2.2) will be used to satisfy this requirement. Section 11.2.2) will be used to satisfy this requirement.
7.3.1. Delegations 7.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 [2]) with client MUST follow the NFSv4.1 protocol (see Chapter 10 of [1]) with
respect to attribute changes. It SHOULD flush all changes back to respect to attribute changes. It SHOULD flush all changes back to
the server and relinquish the delegation. the server and relinquish the delegation.
7.3.2. Permission Checking 7.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
skipping to change at page 37, line 14 skipping to change at page 38, line 9
7.4. pNFS Considerations 7.4. pNFS Considerations
This section examines the issues in deploying Labeled NFS in a pNFS This section examines the issues in deploying Labeled NFS in a pNFS
community of servers. community of servers.
7.4.1. MAC Label Checks 7.4.1. MAC Label Checks
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 [2] already has provisions for Fortunately, the NFSv4.1 protocol [1] already has provisions for
doing access level checks from the DS to the MDS. In order for the 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 SHOULD DS to validate the subject label presented by the client, it SHOULD
utilize this mechanism. utilize this mechanism.
7.5. Discovery of Server Labeled NFS Support 7.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. Note when it queries for the FATTR4_SEC_LABEL label for an object. Note
that it cannot assume that the presence of RPCSEC_GSSv3 indicates that it cannot assume that the presence of RPCSEC_GSSv3 indicates
Labeled NFS support. The client might need to discover which LFS the Labeled NFS support. The client might need to discover which LFS the
skipping to change at page 38, line 14 skipping to change at page 39, line 7
7.6.1. Full Mode 7.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 7.3. The security attribute using the mechanism described in Section 7.3. The security attribute
of the subject making the request is transported at the RPC layer of the subject making the request is transported at the RPC layer
using the mechanism described in RPCSECGSSv3 [5]. using the mechanism described in RPCSECGSSv3 [4].
7.6.1.1. Initial Labeling and Translation 7.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.
skipping to change at page 39, line 15 skipping to change at page 40, line 9
otherwise it will return NFS4ERR_ACCESS. otherwise it will return NFS4ERR_ACCESS.
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.
7.6.1.3. Limited Server 7.6.1.3. Limited Server
A Limited Server mode (see Section 3.5.2 of [7]) consists of a server A Limited Server mode (see Section 3.5.2 of [19]) consists of a
which is label aware, but does not enforce policies. Such a server server which is label aware, but does not enforce policies. Such a
will store and retrieve all object labels presented by clients, server will store and retrieve all object labels presented by
utililze the methods described in Section 7.3.5 to allow the clients clients, utilize the methods described in Section 7.3.5 to allow the
to detect changing labels,, but will not restrict access via the clients to detect changing labels,, but will not restrict access via
subject label. Instead, it will expect the clients to enforce all the subject label. Instead, it will expect the clients to enforce
such access locally. all such access locally.
7.6.2. Guest Mode 7.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
skipping to change at page 40, line 13 skipping to change at page 41, line 9
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.
8. Sharing change attribute implementation details with NFSv4 clients 8. Sharing change attribute implementation details with NFSv4 clients
8.1. Introduction 8.1. Introduction
Although both the NFSv4 [10] and NFSv4.1 protocol [2], define the Although both the NFSv4 [9] and NFSv4.1 protocol [1], define the
change attribute as being mandatory to implement, there is little in change attribute as being mandatory to implement, there is little in
the way of guidance. The only mandated feature is that the value the way of guidance. The only mandated feature is that the value
must change whenever the file data or metadata change. must change whenever the file data or metadata change.
While this allows for a wide range of implementations, it also leaves While this allows for a wide range of implementations, it also leaves
the client with a conundrum: how does it determine which is the most the client with 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
calls have been issued in parallel? In other words if two COMPOUNDs, calls have been issued in parallel? In other words if two COMPOUNDs,
both containing WRITE and GETATTR requests for the same file, have both containing WRITE and GETATTR requests for the same file, have
been issued in parallel, how does the client determine which of the been issued in parallel, how does the client determine which of the
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 serialised 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 11.2.1), and is per file system. (see Section 11.2.1), and is per file system.
9. Security Considerations 9. Security Considerations
NFSv4.2 has all of the security concerns present in NFSv4.1 (see
Section 21 of [1]) and those present in the Server-side Copy (see
Section 2.4) and in Labeled NFS (see Section 7.7).
10. Error Values 10. 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.
skipping to change at page 42, line 31 skipping to change at page 43, line 31
10.1.3.1. NFS4ERR_BADLABEL (Error Code 10093) 10.1.3.1. NFS4ERR_BADLABEL (Error Code 10093)
The label specified is invalid in some manner. The label specified is invalid in some manner.
10.1.3.2. NFS4ERR_WRONG_LFS (Error Code 10092) 10.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.
10.2. New Operations and Their Valid Errors
This section contains a table that gives the valid error returns for
each new NFSv4.2 protocol operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be
returnable by all new operations. The error values for all other
operations are defined in Section 15.2 of [1].
Valid Error Returns for Each New Protocol Operation
+----------------+--------------------------------------------------+
| Operation | Errors |
+----------------+--------------------------------------------------+
| COPY | 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_OFFLOAD_DENIED, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OPENMODE, |
| | NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_PARTNER_NO_AUTH, |
| | NFS4ERR_PARTNER_NOTSUPP, 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 |
| COPY_NOTIFY | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | 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_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_WRONG_TYPE |
| OFFLOAD_ABORT | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, |
| | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, |
| | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| OFFLOAD_REVOKE | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_COMPLETE_ALREADY, NFS4ERR_DELAY, |
| | NFS4ERR_GRACE, NFS4ERR_INVALID, NFS4ERR_MOVED, |
| | NFS4ERR_NOTSUPP, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| OFFLOAD_STATUS | NFS4ERR_ADMIN_REVOKED, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_COMPLETE_ALREADY, |
| | NFS4ERR_DEADSESSION, NFS4ERR_EXPIRED, |
| | NFS4ERR_DELAY, NFS4ERR_GRACE, NFS4ERR_NOTSUPP, |
| | NFS4ERR_OLD_STATEID, NFS4ERR_OP_NOT_IN_SESSION, |
| | NFS4ERR_SERVERFAULT, NFS4ERR_TOO_MANY_OPS |
| READ_PLUS | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | 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_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE |
| SEEK | NFS4ERR_ACCESS, NFS4ERR_ADMIN_REVOKED, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_STATEID, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_DELEG_REVOKED, NFS4ERR_EXPIRED, |
| | NFS4ERR_FHEXPIRED, NFS4ERR_GRACE, NFS4ERR_INVAL, |
| | NFS4ERR_ISDIR, NFS4ERR_IO, NFS4ERR_LOCKED, |
| | NFS4ERR_MOVED, NFS4ERR_NOFILEHANDLE, |
| | 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_SERVERFAULT, NFS4ERR_STALE, |
| | NFS4ERR_SYMLINK, NFS4ERR_TOO_MANY_OPS, |
| | NFS4ERR_UNION_NOTSUPP, NFS4ERR_WRONG_TYPE |
| SEQUENCE | NFS4ERR_BADSESSION, NFS4ERR_BADSLOT, |
| | NFS4ERR_BADXDR, NFS4ERR_BAD_HIGH_SLOT, |
| | NFS4ERR_CONN_NOT_BOUND_TO_SESSION, |
| | NFS4ERR_DEADSESSION, NFS4ERR_DELAY, |
| | NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, |
| | NFS4ERR_REQ_TOO_BIG, NFS4ERR_RETRY_UNCACHED_REP, |
| | NFS4ERR_SEQUENCE_POS, NFS4ERR_SEQ_FALSE_RETRY, |
| | NFS4ERR_SEQ_MISORDERED, NFS4ERR_TOO_MANY_OPS |
| WRITE_PLUS | 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_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_UNION_NOTSUPP, |
| | NFS4ERR_WRONG_TYPE |
+----------------+--------------------------------------------------+
Table 2
10.3. New Callback Operations and Their Valid Errors
This section contains a table that gives the valid error returns for
each new NFSv4.2 callback operation. The error code NFS4_OK
(indicating no error) is not listed but should be understood to be
returnable by all new callback operations. The error values for all
other callback operations are defined in Section 15.3 of [1].
Valid Error Returns for Each New Protocol Callback Operation
+------------+------------------------------------------------------+
| Callback | Errors |
| Operation | |
+------------+------------------------------------------------------+
| CB_OFFLOAD | NFS4ERR_BADHANDLE, NFS4ERR_BADXDR, |
| | NFS4ERR_BAD_STATEID, NFS4ERR_DELAY, |
| | NFS4ERR_OP_NOT_IN_SESSION, NFS4ERR_REP_TOO_BIG, |
| | NFS4ERR_REP_TOO_BIG_TO_CACHE, NFS4ERR_REQ_TOO_BIG, |
| | NFS4ERR_RETRY_UNCACHED_REP, NFS4ERR_SERVERFAULT, |
| | NFS4ERR_TOO_MANY_OPS |
+------------+------------------------------------------------------+
Table 3
11. New File Attributes 11. New File Attributes
11.1. New RECOMMENDED Attributes - List and Definition References 11.1. New RECOMMENDED Attributes - List and Definition References
The list of new RECOMMENDED attributes appears in Table 2. 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 [3], the latter is likely between the assigned number and [2], 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 [3]. See [22] for the Errata process. and/or [2]. See [22] for the Errata process.
Data Type: The XDR data type of the attribute. Data Type: The XDR data type of the attribute.
Acc: Access allowed to the attribute. Acc: Access allowed to the attribute.
R means read-only (GETATTR may retrieve, SETATTR may not set). R means read-only (GETATTR may retrieve, SETATTR may not set).
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).
skipping to change at page 43, line 24 skipping to change at page 48, line 15
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| Name | Id | Data Type | Acc | Defined in | | Name | Id | Data Type | Acc | Defined in |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
| change_attr_type | 79 | change_attr_type4 | R | Section 11.2.1 | | change_attr_type | 79 | change_attr_type4 | R | Section 11.2.1 |
| sec_label | 80 | sec_label4 | R W | Section 11.2.2 | | sec_label | 80 | sec_label4 | R W | Section 11.2.2 |
| change_sec_label | 81 | change_sec_label4 | R | Section 11.2.3 | | change_sec_label | 81 | change_sec_label4 | R | Section 11.2.3 |
| space_reserved | 77 | boolean | R W | Section 11.2.4 | | space_reserved | 77 | boolean | R W | Section 11.2.4 |
| space_freed | 78 | length4 | R | Section 11.2.5 | | space_freed | 78 | length4 | R | Section 11.2.5 |
+------------------+----+-------------------+-----+----------------+ +------------------+----+-------------------+-----+----------------+
Table 2 Table 4
11.2. Attribute Definitions 11.2. Attribute Definitions
11.2.1. Attribute 79: change_attr_type 11.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
NFSv4.2 server to provide additional information about how it expects NFSv4.2 server to provide additional information about how it expects
the change attribute value to evolve after the file data, or metadata the change attribute value to evolve after the file data, or metadata
has changed. While Section 5.4 of [2] discusses per file system has changed. While Section 5.4 of [1] discusses per file system
attributes, it is expected that the value of change_attr_type not attributes, it is expected that the value of change_attr_type not
depend on the value of "homogeneous" and only changes in the event of depend on the value of "homogeneous" and only changes in the event of
a migration. a migration.
NFS4_CHANGE_TYPE_IS_UNDEFINED: The change attribute does not take NFS4_CHANGE_TYPE_IS_UNDEFINED: The change attribute does not take
values that fit into any of these categories. values that fit into any of these categories.
NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR: The change attribute value MUST NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR: The change attribute value MUST
monotonically increase for every atomic change to the file monotonically increase for every atomic change to the file
attributes, data, or directory contents. attributes, data, or directory contents.
skipping to change at page 44, line 18 skipping to change at page 49, line 8
preserved when writing to pNFS data servers. preserved when writing to pNFS data servers.
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute NFS4_CHANGE_TYPE_IS_VERSION_COUNTER_NOPNFS: The change attribute
value MUST be incremented by one unit for every atomic change to value MUST be incremented by one unit for every atomic change to
the file attributes, data, or directory contents. In the case the file attributes, data, or directory contents. In the case
where the client is writing to pNFS data servers, the number of where the client is writing to pNFS data servers, the number of
increments is not guaranteed to exactly match the number of increments is not guaranteed to exactly match the number of
writes. writes.
NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is NFS4_CHANGE_TYPE_IS_TIME_METADATA: The change attribute is
implemented as suggested in the NFSv4 spec [10] in terms of the implemented as suggested in the NFSv4 spec [9] in terms of the
time_metadata attribute. time_metadata attribute.
If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR, If either NFS4_CHANGE_TYPE_IS_MONOTONIC_INCR,
NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or NFS4_CHANGE_TYPE_IS_VERSION_COUNTER, or
NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at NFS4_CHANGE_TYPE_IS_TIME_METADATA are set, then the client knows at
the very least that the change attribute is monotonically increasing, the very least that the change attribute is monotonically increasing,
which is sufficient to resolve the question of which value is the which is sufficient to resolve the question of which value is the
most recent. most recent.
If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then If the client sees the value NFS4_CHANGE_TYPE_IS_TIME_METADATA, then
skipping to change at page 45, line 33 skipping to change at page 50, line 21
is an opaque section which contains the data of the attribute. This is an opaque section which contains the data of the attribute. This
component is dependent on the MAC model to interpret and enforce. component is dependent on the MAC model to interpret 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
change_sec_label. Any modification to sec_label MUST modify the
value for change_sec_label.
11.2.3. Attribute 81: change_sec_label 11.2.3. Attribute 81: change_sec_label
typedef uint32_t change_sec_label4; struct change_sec_label4 {
uint64_t csl_major;
uint64_t csl_minor;
};
The change_sec_label attribute is a read-only attribute per file. The change_sec_label attribute is a read-only attribute per file. If
When the file is created, the value of change_sec_label is set to 0. the value of sec_label for a file is not the same at two disparate
Each time the sec_label is changed, the server MUST increment the times then the values of change_sec_label at those times MUST be
value of change_sec_label by one. As the sec_label is not bounded by different as well. The value of change_sec_label MAY change at other
size, this attribute allows for VERIFY and NVERIFY to quickly times as well, but this should be rare, as that will require the
determine if the sec_label has been modified. 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
attribute allows for VERIFY and NVERIFY to quickly determine if the
sec_label has been modified.
11.2.4. Attribute 77: space_reserved 11.2.4. Attribute 77: space_reserved
The space_reserve attribute is a read/write attribute of type The space_reserve attribute is a read/write attribute of type
boolean. It is a per file attribute. When the space_reserved 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 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 disk space to accommodate every byte in the file before it can return
success. If the server cannot guarantee this, it must return success. If the server cannot guarantee this, it must return
NFS4ERR_NOSPC. NFS4ERR_NOSPC.
If the client tries to grow a file which has the space_reserved 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 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 accommodate every byte in the file with the new size before it can
return success. If the server cannot guarantee this, it must return return success. If the server cannot guarantee this, it must return
NFS4ERR_NOSPC. NFS4ERR_NOSPC.
It is not required that the server allocate the space to the file It is not required that the server allocate the space to the file
before returning success. The allocation can be deferred, however, before returning success. The allocation can be deferred, however,
it must be guaranteed that it will not fail for lack of space. 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 The value of space_reserved can be obtained at any time through
GETATTR. 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 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 along with the size bit in SETATTR. Increasing the size of a file
with space_reserve set will fail if space reservation cannot be with space_reserve set will fail if space reservation cannot be
guaranteed for the new size. If the file size is decreased, space guaranteed for the new size. If the file size is decreased, space
reservation is only guaranteed for the new size and the extra blocks reservation is only guaranteed for the new size. If a hole is
backing the file can be released. punched into the file, then the reservation is not changed.
11.2.5. Attribute 78: space_freed 11.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.
12. Operations: REQUIRED, RECOMMENDED, or OPTIONAL 12. 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
skipping to change at page 47, line 18 skipping to change at page 52, line 16
on the fore channel that will be a catalyst for the server sending on the fore channel that will be a catalyst for the server sending
callback operations. A partial exception is CB_RECALL_SLOT; the only callback operations. A partial exception is CB_RECALL_SLOT; the only
way the client can avoid supporting this operation is by not creating way the client can avoid supporting this operation is by not creating
a backchannel. a backchannel.
Since this is a summary of the operations and their designation, Since this is a summary of the operations and their designation,
there are subtleties that are not presented here. Therefore, if there are subtleties that are not presented here. Therefore, if
there is a question of the requirements of implementation, the there is a question of the requirements of implementation, the
operation descriptions themselves must be consulted along with other operation descriptions themselves must be consulted along with other
relevant explanatory text within this either specification or that of relevant explanatory text within this either specification or that of
NFSv4.1 [2]. NFSv4.1 [1].
The abbreviations used in the second and third columns of the table The abbreviations used in the second and third columns of the table
are defined as follows. are defined as follows.
REQ REQUIRED to implement REQ REQUIRED to implement
REC RECOMMEND to implement REC RECOMMENDED to implement
OPT OPTIONAL to implement OPT OPTIONAL to implement
OBS MUST NOT implement OBS OBSOLETE, might be required to implement
MNI MUST NOT implement MNI MUST NOT implement
For the NFSv4.2 features that are OPTIONAL, the operations that For the NFSv4.2 features that are OPTIONAL, the operations that
support those features are OPTIONAL, and the server would return support those features are OPTIONAL, and the server would return
NFS4ERR_NOTSUPP in response to the client's use of those operations. NFS4ERR_NOTSUPP in response to the client's use of those operations.
If an OPTIONAL feature is supported, it is possible that a set of If an OPTIONAL feature is supported, it is possible that a set of
operations related to the feature become REQUIRED to implement. The operations related to the feature become REQUIRED to implement. The
third column of the table designates the feature(s) and if the third column of the table designates the feature(s) and if the
operation is REQUIRED or OPTIONAL in the presence of support for the operation is REQUIRED or OPTIONAL in the presence of support for the
skipping to change at page 48, line 37 skipping to change at page 53, line 37
| DELEGRETURN | OPT | FDELG, DDELG, pNFS | | DELEGRETURN | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
| DESTROY_CLIENTID | REQ | | | DESTROY_CLIENTID | REQ | |
| DESTROY_SESSION | REQ | | | DESTROY_SESSION | REQ | |
| EXCHANGE_ID | REQ | | | EXCHANGE_ID | REQ | |
| FREE_STATEID | REQ | | | FREE_STATEID | REQ | |
| GETATTR | REQ | | | GETATTR | REQ | |
| GETDEVICEINFO | OPT | pNFS (REQ) | | GETDEVICEINFO | OPT | pNFS (REQ) |
| GETDEVICELIST | OPT | pNFS (OPT) | | GETDEVICELIST | OPT | pNFS (OPT) |
| GETFH | REQ | | | GETFH | REQ | |
| INITIALIZE | OPT | ADH (REQ) | | WRITE_PLUS | OPT | ADH (REQ) |
| GET_DIR_DELEGATION | OPT | DDELG (REQ) | | GET_DIR_DELEGATION | OPT | DDELG (REQ) |
| LAYOUTCOMMIT | OPT | pNFS (REQ) | | LAYOUTCOMMIT | OPT | pNFS (REQ) |
| LAYOUTGET | OPT | pNFS (REQ) | | LAYOUTGET | OPT | pNFS (REQ) |
| LAYOUTRETURN | OPT | pNFS (REQ) | | LAYOUTRETURN | OPT | pNFS (REQ) |
| LINK | OPT | | | LINK | OPT | |
| LOCK | REQ | | | LOCK | REQ | |
| LOCKT | REQ | | | LOCKT | REQ | |
| LOCKU | REQ | | | LOCKU | REQ | |
| LOOKUP | REQ | | | LOOKUP | REQ | |
| LOOKUPP | REQ | | | LOOKUPP | REQ | |
skipping to change at page 49, line 30 skipping to change at page 54, line 30
| 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 | OBS | |
+----------------------+--------------------+-----------------------+ +----------------------+--------------------+-----------------------+
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_COPY | 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) |
| CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) |
| CB_NOTIFY_LOCK | OPT | | | CB_NOTIFY_LOCK | OPT | |
| CB_PUSH_DELEG | OPT | FDELG (OPT) | | CB_PUSH_DELEG | OPT | FDELG (OPT) |
| CB_RECALL | OPT | FDELG, DDELG, pNFS | | CB_RECALL | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
| CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS | | CB_RECALL_ANY | OPT | FDELG, DDELG, pNFS |
| | | (REQ) | | | | (REQ) |
skipping to change at page 51, line 10 skipping to change at page 56, line 10
length4 ca_count; length4 ca_count;
uint32_t ca_flags; uint32_t ca_flags;
component4 ca_destination; component4 ca_destination;
netloc4 ca_source_server<>; netloc4 ca_source_server<>;
}; };
13.1.2. RESULT 13.1.2. RESULT
union COPY4res switch (nfsstat4 cr_status) { union COPY4res switch (nfsstat4 cr_status) {
case NFS4_OK: case NFS4_OK:
stateid4 cr_callback_id<1>; write_response4 resok4;
default: default:
length4 cr_bytes_copied; length4 cr_bytes_copied;
}; };
13.1.3. DESCRIPTION 13.1.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 combination of CURRENT_FH and value to the location specified by the combination of CURRENT_FH and
ca_destination. ca_destination.
skipping to change at page 53, line 42 skipping to change at page 58, line 42
server, the behavior is implementation dependent. server, the behavior is implementation dependent.
If the metadata flag is set and the client is requesting a whole file If the metadata flag is set and the client is requesting a whole file
copy (i.e., ca_count is 0 (zero)), a subset of the destination file's copy (i.e., ca_count is 0 (zero)), a subset of the destination file's
attributes MUST be the same as the source file's corresponding attributes MUST be the same as the source file's corresponding
attributes and a subset of the destination file's attributes SHOULD attributes and a subset of the destination file's attributes SHOULD
be the same as the source file's corresponding attributes. The be the same as the source file's corresponding attributes. The
attributes in the MUST and SHOULD copy subsets will be defined for attributes in the MUST and SHOULD copy subsets will be defined for
each NFS version. each NFS version.
For NFSv4.2, Table 3 and Table 4 list the REQUIRED and RECOMMENDED For NFSv4.2, Table 5 and Table 6 list the REQUIRED and RECOMMENDED
attributes respectively. In the "Copy to destination file?" column, attributes respectively. In the "Copy to destination file?" column,
a "MUST" indicates that the attribute is part of the MUST copy set. a "MUST" indicates that the attribute is part of the MUST copy set.
A "SHOULD" indicates that the attribute is part of the SHOULD copy A "SHOULD" indicates that the attribute is part of the SHOULD copy
set. A "no" indicates that the attribute MUST NOT be copied. set. A "no" indicates that the attribute MUST NOT be copied.
REQUIRED attributes REQUIRED attributes
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
| Name | Id | Copy to destination file? | | Name | Id | Copy to destination file? |
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
skipping to change at page 54, line 26 skipping to change at page 59, line 26
| symlink_support | 6 | no | | symlink_support | 6 | no |
| named_attr | 7 | no | | named_attr | 7 | no |
| fsid | 8 | no | | fsid | 8 | no |
| unique_handles | 9 | no | | unique_handles | 9 | no |
| lease_time | 10 | no | | lease_time | 10 | no |
| rdattr_error | 11 | no | | rdattr_error | 11 | no |
| filehandle | 19 | no | | filehandle | 19 | no |
| suppattr_exclcreat | 75 | no | | suppattr_exclcreat | 75 | no |
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
Table 3 Table 5
RECOMMENDED attributes RECOMMENDED attributes
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
| Name | Id | Copy to destination file? | | Name | Id | Copy to destination file? |
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
| acl | 12 | MUST | | acl | 12 | MUST |
| aclsupport | 13 | no | | aclsupport | 13 | no |
| archive | 14 | no | | archive | 14 | no |
| cansettime | 15 | no | | cansettime | 15 | no |
skipping to change at page 56, line 4 skipping to change at page 61, line 4
| system | 46 | MUST | | system | 46 | MUST |
| time_access | 47 | MUST | | time_access | 47 | MUST |
| time_access_set | 48 | no | | time_access_set | 48 | no |
| time_backup | 49 | no | | time_backup | 49 | no |
| time_create | 50 | MUST | | time_create | 50 | MUST |
| time_delta | 51 | no | | time_delta | 51 | no |
| time_metadata | 52 | SHOULD | | time_metadata | 52 | SHOULD |
| time_modify | 53 | MUST | | time_modify | 53 | MUST |
| time_modify_set | 54 | no | | time_modify_set | 54 | no |
+--------------------+----+---------------------------+ +--------------------+----+---------------------------+
Table 4 Table 6
[NOTE: The source file's attribute values will take precedence over [NOTE: The source file's attribute values will take precedence over
any attribute values inherited by the destination file.] any attribute values inherited by the destination file.]
In the case of an inter-server copy or an intra-server copy between In the case of an inter-server copy or an intra-server copy between
file systems, the attributes supported for the source file and file systems, the attributes supported for the source file and
destination file could be different. By definition,the REQUIRED destination file could be different. By definition,the REQUIRED
attributes will be supported in all cases. If the metadata flag is attributes will be supported in all cases. If the metadata flag is
set and the source file has a RECOMMENDED attribute that is not set and the source file has a RECOMMENDED attribute that is not
supported for the destination file, the copy MUST fail with supported for the destination file, the copy MUST fail with
skipping to change at page 57, line 4 skipping to change at page 62, line 4
If an immediate failure does occur, cr_bytes_copied will be set to If an immediate failure does occur, cr_bytes_copied will be set to
the number of bytes copied to the destination file before the error the number of bytes copied to the destination file before the error
occurred. The cr_bytes_copied value indicates the number of bytes occurred. The cr_bytes_copied value indicates the number of bytes
copied but not which specific bytes have been copied. copied but not which specific bytes have been copied.
A return of NFS4_OK indicates that either the operation is complete A return of NFS4_OK indicates that either the operation is complete
or the operation was initiated and a callback will be used to deliver or the operation was initiated and a callback will be used to deliver
the final status of the operation. the final status of the operation.
If the cr_callback_id is returned, this indicates that the operation If the cr_callback_id is returned, this indicates that the operation
was initiated and a CB_COPY callback will deliver the final results was initiated and a CB_OFFLOAD callback will deliver the final
of the operation. The cr_callback_id stateid is termed a copy results of the operation. The cr_callback_id stateid is termed a
stateid in this context. The server is given the option of returning copy stateid in this context. The server is given the option of
the results in a callback because the data may require a relatively returning the results in a callback because the data may require a
long period of time to copy. relatively long period of time to copy.
If no cr_callback_id is returned, the operation completed If no cr_callback_id is returned, the operation completed
synchronously and no callback will be issued by the server. The synchronously and no callback will be issued by the server. The
completion status of the operation is indicated by cr_status. completion status of the operation is indicated by cr_status.
If the copy completes successfully, either synchronously or If the copy completes successfully, either synchronously or
asynchronously, the data copied from the source file to the asynchronously, the data copied from the source file to the
destination file MUST appear identical to the NFS client. However, destination file MUST appear identical to the NFS client. However,
the NFS server's on disk representation of the data in the source the NFS server's on disk representation of the data in the source
file and destination file MAY differ. For example, the NFS server file and destination file MAY differ. For example, the NFS server
might encrypt, compress, deduplicate, or otherwise represent the on might encrypt, compress, deduplicate, or otherwise represent the on
disk data in the source and destination file differently. disk data in the source and destination file differently.
In the event of a failure the state of the destination file is
implementation dependent. The COPY operation may fail for the
following reasons (this is a partial list).
o NFS4ERR_MOVED
o NFS4ERR_NOTSUPP
o NFS4ERR_PARTNER_NOTSUPP
o NFS4ERR_OFFLOAD_DENIED
o NFS4ERR_PARTNER_NO_AUTH
o NFS4ERR_FBIG
o NFS4ERR_NOTDIR
o NFS4ERR_WRONG_TYPE
o NFS4ERR_ISDIR
o NFS4ERR_INVAL
o NFS4ERR_DELAY
o NFS4ERR_METADATA_NOTSUPP
o NFS4ERR_WRONGSEC
13.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side copy 13.2. Operation 60: OFFLOAD_ABORT - Cancel a server-side copy
13.2.1. ARGUMENT 13.2.1. ARGUMENT
struct OFFLOAD_ABORT4args { struct OFFLOAD_ABORT4args {
/* CURRENT_FH: destination file */ /* CURRENT_FH: destination file */
stateid4 oaa_stateid; stateid4 oaa_stateid;
}; };
13.2.2. RESULT 13.2.2. RESULT
skipping to change at page 58, line 42 skipping to change at page 63, line 12
The result's oar_status field indicates whether the cancel was The result's oar_status field indicates whether the cancel was
successful or not. A value of NFS4_OK indicates that the copy successful or not. A value of NFS4_OK indicates that the copy
operation was canceled and no callback will be issued by the server. operation was canceled and no callback will be issued by the server.
A copy operation that is successfully canceled may result in none, A copy operation that is successfully canceled may result in none,
some, or all of the data and/or metadata copied. some, or all of the data and/or metadata copied.
If the server supports asynchronous copies, the server is REQUIRED to If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_ABORT operation. support the OFFLOAD_ABORT operation.
The OFFLOAD_ABORT operation may fail for the following reasons (this
is a partial list):
o NFS4ERR_NOTSUPP
o NFS4ERR_RETRY
o NFS4ERR_COMPLETE_ALREADY
o NFS4ERR_SERVERFAULT
13.3. Operation 61: COPY_NOTIFY - Notify a source server of a future 13.3. Operation 61: COPY_NOTIFY - Notify a source server of a future
copy copy
13.3.1. ARGUMENT 13.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;
}; };
13.3.2. RESULT 13.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;
}; };
13.3.3. DESCRIPTION 13.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
skipping to change at page 60, line 32 skipping to change at page 64, line 38
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.
The COPY_NOTIFY operation may fail for the following reasons (this is
a partial list):
o NFS4ERR_MOVED
o NFS4ERR_NOTSUPP
o NFS4ERR_WRONGSEC
13.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination server's copy 13.4. Operation 62: OFFLOAD_REVOKE - Revoke a destination server's copy
privileges privileges
13.4.1. ARGUMENT 13.4.1. ARGUMENT
struct OFFLOAD_REVOKE4args { struct OFFLOAD_REVOKE4args {
/* CURRENT_FH: source file */ /* CURRENT_FH: source file */
netloc4 ora_destination_server; netloc4 ora_destination_server;
}; };
skipping to change at page 61, line 39 skipping to change at page 65, line 39
granted a very long or infinite lease on the destination server's 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 ability to read the source file and all copy operations on the source
file have been completed. file have been completed.
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.
If the server supports COPY_NOTIFY, the server is REQUIRED to support If the server supports COPY_NOTIFY, the server is REQUIRED to support
the OFFLOAD_REVOKE operation. the OFFLOAD_REVOKE operation.
The OFFLOAD_REVOKE operation may fail for the following reasons (this
is a partial list):
o NFS4ERR_MOVED
o NFS4ERR_NOTSUPP
13.5. Operation 63: OFFLOAD_STATUS - Poll for status of a server-side 13.5. Operation 63: OFFLOAD_STATUS - Poll for status of a server-side
copy copy
13.5.1. ARGUMENT 13.5.1. ARGUMENT
struct OFFLOAD_STATUS4args { struct OFFLOAD_STATUS4args {
/* CURRENT_FH: destination file */ /* CURRENT_FH: destination file */
stateid4 osa_stateid; stateid4 osa_stateid;
}; };
13.5.2. RESULT 13.5.2. RESULT
struct OFFLOAD_STATUS4resok { struct OFFLOAD_STATUS4resok {
length4 osr_bytes_copied; length4 osr_bytes_copied;
nfsstat4 osr_complete<1>; nfsstat4 osr_complete<1>;
}; };
union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) { union OFFLOAD_STATUS4res switch (nfsstat4 osr_status) {
case NFS4_OK: case NFS4_OK:
OFFLOAD_STATUS4resok resok4; OFFLOAD_STATUS4resok osr_resok4;
default: default:
void; void;
}; };
13.5.3. DESCRIPTION 13.5.3. DESCRIPTION
OFFLOAD_STATUS is used for both intra- and inter-server asynchronous OFFLOAD_STATUS is used for both intra- and inter-server asynchronous
copies. The OFFLOAD_STATUS operation allows the client to poll the copies. The OFFLOAD_STATUS operation allows the client to poll the
destination server to determine the status of an asynchronous copy destination server to determine the status of an asynchronous copy
operation. operation.
If this operation is successful, the number of bytes copied are If this operation is successful, the number of bytes copied are
returned to the client in the osr_bytes_copied field. The returned to the client in the osr_bytes_copied field. The
osr_bytes_copied value indicates the number of bytes copied but not osr_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 optional osr_complete field is present, the copy has If the optional osr_complete field is present, the copy has
completed. In this case the status value indicates the result of the completed. In this case the status value indicates the result of the
asynchronous copy operation. In all cases, the server will also asynchronous copy operation. In all cases, the server will also
deliver the final results of the asynchronous copy in a CB_COPY deliver the final results of the asynchronous copy in a CB_OFFLOAD
operation. operation.
The failure of this operation does not indicate the result of the The failure of this operation does not indicate the result of the
asynchronous copy in any way. asynchronous copy in any way.
If the server supports asynchronous copies, the server is REQUIRED to If the server supports asynchronous copies, the server is REQUIRED to
support the OFFLOAD_STATUS operation. support the OFFLOAD_STATUS operation.
The OFFLOAD_STATUS operation may fail for the following reasons (this
is a partial list):
o NFS4ERR_NOTSUPP
o NFS4ERR_BAD_STATEID
o NFS4ERR_EXPIRED
13.6. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID 13.6. Modification to Operation 42: EXCHANGE_ID - Instantiate Client ID
13.6.1. ARGUMENT 13.6.1. ARGUMENT
/* new */ /* new */
const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004; const EXCHGID4_FLAG_SUPP_FENCE_OPS = 0x00000004;
13.6.2. RESULT 13.6.2. RESULT
Unchanged Unchanged
skipping to change at page 64, line 12 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.
13.7. Operation 64: INITIALIZE 13.7. Operation 64: WRITE_PLUS
This operation can be used to initialize the structure imposed by an
application onto a file, i.e., ADHs, and to punch a hole into a file.
13.7.1. ARGUMENT 13.7.1. ARGUMENT
struct data_info4 { struct data_info4 {
offset4 di_offset; offset4 di_offset;
length4 di_length; length4 di_length;
bool di_allocated; bool di_allocated;
}; };
/* struct data4 {
* We use data_content4 in case we wish to offset4 d_offset;
* extend new types later. Note that we bool d_allocated;
* are explicitly disallowing data. opaque d_data<>;
*/ };
union initialize_arg4 switch (data_content4 content) {
union write_plus_arg4 switch (data_content4 wpa_content) {
case NFS4_CONTENT_DATA:
data4 wpa_data;
case NFS4_CONTENT_APP_DATA_HOLE: case NFS4_CONTENT_APP_DATA_HOLE:
app_data_hole4 ia_adh; app_data_hole4 wpa_adh;
case NFS4_CONTENT_HOLE: case NFS4_CONTENT_HOLE:
data_info4 ia_hole; data_info4 wpa_hole;
default: default:
void; void;
}; };
struct INITIALIZE4args { struct WRITE_PLUS4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 ia_stateid; stateid4 wp_stateid;
stable_how4 ia_stable; stable_how4 wp_stable;
initialize_arg4 ia_data<>; write_plus_arg4 wp_data<>;
}; };
13.7.2. RESULT 13.7.2. RESULT
struct INITIALIZE4resok { struct write_response4 {
count4 ir_count; stateid4 wr_callback_id<1>;
stable_how4 ir_committed; count4 wr_count;
verifier4 ir_writeverf; stable_how4 wr_committed;
data_content4 ir_sparse; verifier4 wr_writeverf;
}; };
union WRITE_PLUS4res switch (nfsstat4 wp_status) {
union INITIALIZE4res switch (nfsstat4 status) {
case NFS4_OK: case NFS4_OK:
INITIALIZE4resok resok4; write_response4 wp_resok4;
default: default:
void; void;
}; };
13.7.3. DESCRIPTION 13.7.3. DESCRIPTION
Using the data_content4 (Section 6.1.2), INITIALIZE can be used The WRITE_PLUS operation is an extension of the NFSv4.1 WRITE
either to punch holes or to impose ADH structure on a file. operation (see Section 18.2 of [1] and writes data to the regular
file identified by the current filehandle. The server MAY write
fewer bytes than requested by the client.
13.7.3.1. Hole punching The WRITE_PLUS argument is comprised of an array of rpr_contents,
each of which describe a data_content4 type of data (Section 6.1.2).
For NFSv4.2, the allowed values are data, ADH, and hole. The array
contents MUST be contiguous in the file. A successful WRITE_PLUS
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 13.7.3.4).
WRITE_PLUS has to support all of the errors which are returned by
WRITE plus NFS4ERR_UNION_NOTSUPP. If the client asks for a hole and
the server does not support that arm of the discriminated union, but
does support one or more additional arms, it can signal to the client
that it supports the operation, but not the arm with
NFS4ERR_UNION_NOTSUPP.
If the client supports WRITE_PLUS, it MUST support CB_OFFLOAD.
13.7.3.1. Data
The d_offset specifies the offset where the data should be written.
An d_offset of zero specifies that the write should start at the
beginning of the file. The d_count, as encoded as part of the opaque
data parameter, represents the number of bytes of data that are to be
written. If the d_count is zero, the WRITE_PLUS will succeed and
return a d_count of zero subject to permissions checking.
Note that d_allocated has no meaning for WRITE_PLUS.
13.7.3.2. Hole punching
Whenever a client wishes to zero the blocks backing a particular Whenever a client wishes to zero the blocks backing a particular
region in the file, it calls the INITIALIZE operation with the region in the file, it calls the WRITE_PLUS operation with the
current filehandle set to the filehandle of the file in question, and 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 the equivalent of start offset and length in bytes of the region set
in ia_hole.di_offset and ia_hole.di_length respectively. If the in wpa_hole.di_offset and wpa_hole.di_length respectively. If the
ia_hole.di_allocated is set to TRUE, then the blocks will be zeroed wpa_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 and if it is set to FALSE, then they will be deallocated. All
further reads to this region MUST return zeros until overwritten. further reads to this region MUST return zeros until overwritten.
The filehandle specified must be that of a regular file. The filehandle specified must be that of a regular file.
Situations may arise where di_offset and/or di_offset + di_length Situations may arise where di_offset and/or di_offset + di_length
will not be aligned to a boundary that the server does allocations/ will not be aligned to a boundary that the server does allocations/
deallocations in. For most file systems, this is the block size of deallocations in. For most file systems, this is the block size of
the file system. In such a case, the server can deallocate as many 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 bytes as it can in the region. The blocks that cannot be deallocated
MUST be zeroed. Except for the block deallocation and maximum hole MUST be zeroed. Except for the block deallocation and maximum hole
punching capability, a INITIALIZE operation is to be treated similar punching capability, a WRITE_PLUS operation is to be treated similar
to a write of zeroes. to a write of zeroes.
The server is not required to complete deallocating the blocks The server is not required to complete deallocating the blocks
specified in the operation before returning. It is acceptable to specified in the operation before returning. The server SHOULD
have the deallocation be deferred. In fact, INITIALIZE is merely a return an asynchronous result if it can determine the operation will
hint; it is valid for a server to return success without ever doing be long running (see Section 13.7.3.4).
anything towards deallocating the blocks backing the region
specified. However, any future reads to the region MUST return
zeroes.
If used to hole punch, INITIALIZE will result in the space_used If used to hole punch, WRITE_PLUS will result in the space_used
attribute being decreased by the number of bytes that were attribute being decreased by the number of bytes that were
deallocated. The space_freed attribute may or may not decrease, deallocated. The space_freed attribute may or may not decrease,
depending on the support and whether the blocks backing the specified depending on the support and whether the blocks backing the specified
range were shared or not. The size attribute will remain unchanged. range were shared or not. The size attribute will remain unchanged.
The INITIALIZE operation MUST NOT change the space reservation The WRITE_PLUS operation MUST NOT change the space reservation
guarantee of the file. While the server can deallocate the blocks guarantee of the file. While the server can deallocate the blocks
specified by di_offset and di_length, future writes to this region specified by di_offset and di_length, future writes to this region
MUST NOT fail with NFSERR_NOSPC. MUST NOT fail with NFSERR_NOSPC.
The INITIALIZE operation may fail for the following reasons (this is 13.7.3.3. ADHs
a partial list):
NFS4ERR_NOTSUPP The Hole punch operations are not supported by the
NFS server receiving this request.
NFS4ERR_DIR The current filehandle is of type NF4DIR.
NFS4ERR_SYMLINK The current filehandle is of type NF4LNK.
NFS4ERR_WRONG_TYPE The current filehandle does not designate an
ordinary file.
13.7.3.2. ADHs
If the server supports ADHs, then it MUST support the If the server supports ADHs, then it MUST support the
NFS4_CONTENT_APP_DATA_HOLE arm of the INITIALIZE operation. The NFS4_CONTENT_APP_DATA_HOLE arm of the WRITE_PLUS operation. The
server has no concept of the structure imposed by the application. server has no concept of the structure imposed by the application.
It is only when the application writes to a section of the file does It is only when the application writes to a section of the file does
order get imposed. In order to detect corruption even before the order get imposed. In order to detect corruption even before the
application utilizes the file, the application will want to application utilizes the file, the application will want to
initialize a range of ADHs using INITIALIZE. initialize a range of ADHs using WRITE_PLUS.
For ADHs, when the client invokes the INITIALIZE operation, it has For ADHs, when the client invokes the WRITE_PLUS operation, it has
two desired results: two desired results:
1. The structure described by the app_data_block4 be imposed on the 1. The structure described by the app_data_block4 be imposed on the
file. file.
2. The contents described by the app_data_block4 be sparse. 2. The contents described by the app_data_block4 be sparse.
If the server supports the INITIALIZE operation, it still might not If the server supports the WRITE_PLUS operation, it still might not
support sparse files. So if it receives the INITIALIZE operation, support sparse files. So if it receives the WRITE_PLUS operation,
then it MUST populate the contents of the file with the initialized then it MUST populate the contents of the file with the initialized
ADHs. ADHs. The server SHOULD return an asynchronous result if it can
determine the operation will be long running (see Section 13.7.3.4).
If the data was already initialized, there are two interesting If the data was already initialized, there are two interesting
scenarios: scenarios:
1. The data blocks are allocated. 1. The data blocks are allocated.
2. Initializing in the middle of an existing ADH. 2. Initializing in the middle of an existing ADH.
If the data blocks were already allocated, then the INITIALIZE is a If the data blocks were already allocated, then the WRITE_PLUS is a
hole punch operation. If INITIALIZE supports sparse files, then the hole punch operation. If WRITE_PLUS supports sparse files, then the
data blocks are to be deallocated. If not, then the data blocks are data blocks are to be deallocated. If not, then the data blocks are
to be rewritten in the indicated ADH format. to be rewritten in the indicated ADH format.
Since the server has no knowledge of ADHs, it should not report Since the server has no knowledge of ADHs, it should not report
misaligned creation of ADHs. Even while it can detect them, it misaligned creation of ADHs. Even while it can detect them, it
cannot disallow them, as the application might be in the process of cannot disallow them, as the application might be in the process of
changing the size of the ADHs. Thus the server must be prepared to changing the size of the ADHs. Thus the server must be prepared to
handle an INITIALIZE into an existing ADH. handle an WRITE_PLUS into an existing ADH.
This document does not mandate the manner in which the server stores This document does not mandate the manner in which the server stores
ADHs sparsely for a file. However, if an INITIALIZE arrives that ADHs sparsely for a file. However, if an WRITE_PLUS arrives that
will force a new ADH to start inside an existing ADH then the server will force a new ADH to start inside an existing ADH then the server
will have three ADHs instead of two. It will have one up to the new will have three ADHs instead of two. It will have one up to the new
one for the INITIALIZE, one for the INITIALIZE, and one for after the one for the WRITE_PLUS, one for the WRITE_PLUS, and one for after the
INITIALIZE. Note that depending on server specific policies for WRITE_PLUS. Note that depending on server specific policies for
block allocation, there may also be some physical blocks allocated to block allocation, there may also be some physical blocks allocated to
align the boundaries. align the boundaries.
13.7.3.4. Asynchronous Transactions
Both hole punching and ADH initialization 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
wp_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 13.5) to monitor the
operation and OFFLOAD_ABORT (Section 13.2) to cancel the operation.
An example of a asynchronous WRITE_PLUS is shown in Figure 6.
Client Server
+ +
| |
|--- OPEN ---------------------------->| Client opens
|<------------------------------------/| the file
| |
|--- WRITE_PLUS ---------------------->| 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_PLUS.
When CB_OFFLOAD informs the client of the successful WRITE_PLUS, the
write_response4 embedded in the operation will provide the necessary
information that a synchronous WRITE_PLUS would have provided.
13.8. Operation 67: IO_ADVISE - Application I/O access pattern hints 13.8. Operation 67: IO_ADVISE - Application I/O access pattern hints
13.8.1. ARGUMENT 13.8.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,
skipping to change at page 73, line 13 skipping to change at page 78, line 13
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.
13.9. Changes to Operation 51: LAYOUTRETURN 13.9. Changes to Operation 51: LAYOUTRETURN
13.9.1. Introduction 13.9.1. Introduction
In the pNFS description provided in [2], the client is not capable to In the pNFS description provided in [1], the client is not capable to
relay an error code from the DS to the MDS. In the specification of relay an error code from the DS to the MDS. In the specification of
the Objects-Based Layout protocol [9], use is made of the opaque the Objects-Based Layout protocol [7], use is made of the opaque
lrf_body field of the LAYOUTRETURN argument to do such a relaying of lrf_body field of the LAYOUTRETURN argument to do such a relaying of
error codes. In this section, we define a new data structure to error codes. In this section, we define a new data structure to
enable the passing of error codes back to the MDS and provide some enable the passing of error codes back to the MDS and provide some
guidelines on what both the client and MDS should expect in such guidelines on what both the client and MDS should expect in such
circumstances. 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
hard error. If the MDS is informed by the client that there is an hard error. If the MDS is informed by the client that there is an
error, it can safely ignore that. For it, the mission is error, it can safely ignore that. For it, the mission is
accomplished in that the client has returned a layout that the MDS accomplished in that the client has returned a layout that the MDS
had most likley recalled. had most likely recalled.
The client might also need to inform the MDS that it cannot reach one The client might also need to inform the MDS that it cannot reach one
or more of the DSes. While the MDS can detect the connectivity of or more of the DSes. While the MDS can detect the connectivity of
both of these paths: both of these paths:
o MDS to DS o MDS to DS
o MDS to client o MDS to client
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 transistory. 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.
13.9.2. ARGUMENT 13.9.2. ARGUMENT
The ARGUMENT specification of the LAYOUTRETURN operation in section The ARGUMENT specification of the LAYOUTRETURN operation in section
18.44.1 of [2] is augmented by the following XDR code [23]: 18.44.1 of [1] is augmented by the following XDR code [23]:
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<>;
}; };
13.9.3. RESULT 13.9.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 [2]. 18.44.2 of [1].
13.9.4. DESCRIPTION 13.9.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 [2]. DESCRIPTION in section 18.44.3 of [1].
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 Objects-Based Layout protocol can continue to utilize
lrf_body as specified in [9]. For both Files-Based and Block-Based lrf_body as specified in [7]. For both Files-Based and Block-Based
Layouts, the field references a layoutreturn_device_error4, which Layouts, the field references a layoutreturn_device_error4, which
contains an array of layoutreturn_device_error4. contains an array of layoutreturn_device_error4.
Each individual layoutreturn_device_error4 descibes a single error Each individual layoutreturn_device_error4 describes a single error
associated with a DS, which is identfied 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.
13.9.5. IMPLEMENTATION 13.9.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 [2]. IMPLEMENTATION in section 18.4.4 of [1].
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.
When an I/O fails to a storage device, the client SHOULD retry the When an I/O fails to a storage device, the client SHOULD retry the
failed I/O via the MDS. In this situation, before retrying the I/O, failed I/O via the MDS. In this situation, before retrying the I/O,
skipping to change at page 76, line 7 skipping to change at page 81, line 7
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.
13.10. Operation 65: READ_PLUS 13.10. Operation 65: READ_PLUS
READ_PLUS is a new variant of the NFSv4.1 READ operation [2].
Besides being able to support all of the data semantics of READ, it
can also be used by the server to return either holes or ADHs to the
client. For holes, READ_PLUS extends the response to avoid returning
data for portions of the file which are either initialized and
contain no backing store or if the result would appear to be so.
I.e., if the result was a data block composed entirely of zeros, then
it is easier to return a hole. Returning data blocks of
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 either
initialized and contain no backing store.
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
on a sparse ADH or file, then the server must expand such data to be
raw bytes. If a READ occurs in the middle of a hole or ADH, the
server can only send back bytes starting from that offset. In
contrast, if a READ_PLUS occurs in the middle of a hole or ADH, the
server can send back a range which starts before the offset and
extends past the range.
READ is inefficient for transfer of sparse sections of the file. As
such, READ is marked as OBSOLETE in NFSv4.2. Instead, a client
should issue READ_PLUS. Note that as the client has no a priori
knowledge of whether either an ADH or a hole is present or not, it
should always use READ_PLUS.
13.10.1. ARGUMENT 13.10.1. ARGUMENT
struct READ_PLUS4args { struct READ_PLUS4args {
/* CURRENT_FH: file */ /* CURRENT_FH: file */
stateid4 rpa_stateid; stateid4 rpa_stateid;
offset4 rpa_offset; offset4 rpa_offset;
count4 rpa_count; count4 rpa_count;
}; };
13.10.2. RESULT 13.10.2. RESULT
union read_plus_content switch (data_content4 content) { struct data_info4 {
offset4 di_offset;
length4 di_length;
bool di_allocated;
};
struct data4 {
offset4 d_offset;
bool d_allocated;
opaque d_data<>;
};
union read_plus_content switch (data_content4 rpc_content) {
case NFS4_CONTENT_DATA: case NFS4_CONTENT_DATA:
opaque rpc_data<>; data4 rpc_data;
case NFS4_CONTENT_APP_DATA_HOLE: case NFS4_CONTENT_APP_DATA_HOLE:
app_data_hole4 rpc_adh; 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 {
bool rpr_eof; bool rpr_eof;
read_plus_content rpr_contents<>; read_plus_content rpr_contents<>;
}; };
union READ_PLUS4res switch (nfsstat4 status) { union READ_PLUS4res switch (nfsstat4 rp_status) {
case NFS4_OK: case NFS4_OK:
read_plus_res4 resok4; read_plus_res4 rp_resok4;
default: default:
void; void;
}; };
13.10.3. DESCRIPTION 13.10.3. DESCRIPTION
The READ_PLUS operation is based upon the NFSv4.1 READ operation [2] The READ_PLUS operation is based upon the NFSv4.1 READ operation (see
and similarly reads data from the regular file identified by the Section 18.22 of [1]) and similarly reads data from the regular file
current filehandle. 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 6.1.2). For of which describe a data_content4 type of data (Section 6.1.2). For
NFSv4.2, the allowed values are data, ADH, and hole. A server is NFSv4.2, the allowed values are data, ADH, and hole. A server is
required to support the data type, but neither ADH nor hole. Both an required to support the data type, but neither ADH nor hole. Both an
ADH and a hole must be returned in its entirety - clients must be ADH and a hole must be returned in its entirety - clients must be
prepared to get more information than they requested. Both the start prepared to get more information than they requested. Both the start
and the end of the hole may execeed what was requested. and the end of the hole may exceed what was requested. The array
contents MUST be contiguous in the file.
READ_PLUS has to support all of the errors which are returned by READ READ_PLUS has to support all of the errors which are returned by READ
plus NFS4ERR_UNION_NOTSUPP. If the client asks for a hole and the plus NFS4ERR_UNION_NOTSUPP. If the client asks for a hole and the
server does not support that arm of the discriminated union, but does server does not support that arm of the discriminated union, but does
support one or more additional arms, it can signal to the client that support one or more additional arms, it can signal to the client that
it supports the operation, but not the arm with it supports the operation, but not the arm with
NFS4ERR_UNION_NOTSUPP. NFS4ERR_UNION_NOTSUPP.
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 may elect to return that data as a hole. The server
differentiates this to the client by setting di_allocated to TRUE in differentiates this to the client by setting di_allocated to TRUE in
this case. Note that in such a scenario, the server is not required this case. Note that in such a scenario, the server is not required
to determine the full extent of the "hole" - it does not need to to determine the full extent of the "hole" - it does not need to
determine where the zeros start and end. determine where the zeros start and end. If the server elects to
return the hole as data, then it can set the d_allocted to FALSE in
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, the guard pattern or block size of an ADH might change,
which would require adjacent elements of type ADH. Likewise if the which would require adjacent elements of type ADH. Likewise if the
server has a range of data comprised entirely of zeros and then a server has a range of data comprised entirely of zeros and then a
hole, it might want to return two adjacent holes to 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.
skipping to change at page 79, line 34 skipping to change at page 84, line 33
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.
13.10.4. IMPLEMENTATION 13.10.4. IMPLEMENTATION
In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of In general, the IMPLEMENTATION notes for READ in Section 18.22.4 of
[2] also apply to READ_PLUS. One delta is that when the owner has a [1] also apply to READ_PLUS. One delta is that when the owner has a
locked byte range, the server MUST return an array of rpr_contents locked byte range, the server MUST return an array of rpr_contents
with values inside that range. with values inside that range.
13.10.4.1. Additional pNFS Implementation Information 13.10.4.1. Additional pNFS Implementation Information
With pNFS, the semantics of using READ_PLUS remains the same. Any With pNFS, the semantics of using READ_PLUS remains the same. Any
data server MAY return a hole or ADH result for a READ_PLUS request data server MAY return a hole or ADH result for a READ_PLUS request
that it receives. When a data server chooses to return such a that it receives. When a data server chooses to return such a
result, it has the option of returning information for the data result, it has the option of returning information for the data
stored on that data server (as defined by the data layout), but it stored on that data server (as defined by the data layout), but it
MUST not return results for a byte range that includes data managed MUST NOT return results for a byte range that includes data managed
by another data server. by another data server.
A data server should do its best to return as much information about 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. a ADH as is feasible without having to contact the metadata server.
If communication with the metadata server is required, then every If communication with the metadata server is required, then every
attempt should be taken to minimize the number of requests. 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.
skipping to change at page 80, line 26 skipping to change at page 85, line 26
| 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 |
+-------------+----------+ +-------------+----------+
Table 5 Table 7
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 Hole Threshhold, the first 32K of the file is returned as data
skipping to change at page 82, line 21 skipping to change at page 87, line 21
SEEK must follow the same rules for stateids as READ_PLUS SEEK must follow the same rules for stateids as READ_PLUS
(Section 13.10.3). (Section 13.10.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. NFSv4.2 Callback Operations 14. NFSv4.2 Callback Operations
14.1. Operation 15: CB_COPY - Report results of a server-side copy 14.1. Operation 15: CB_OFFLOAD - Report results of an asynchronous
operation
14.1.1. ARGUMENT 14.1.1. ARGUMENT
union copy_info4 switch (nfsstat4 cca_status) { struct write_response4 {
case NFS4_OK: stateid4 wr_callback_id<1>;
void; count4 wr_count;
default: stable_how4 wr_committed;
length4 cca_bytes_copied; verifier4 wr_writeverf;
}; };
struct CB_COPY4args { union offload_info4 switch (nfsstat4 coa_status) {
nfs_fh4 cca_fh; case NFS4_OK:
stateid4 cca_stateid; write_response4 coa_resok4;
copy_info4 cca_copy_info; default:
length4 coa_bytes_copied;
};
struct CB_OFFLOAD4args {
nfs_fh4 coa_fh;
stateid4 coa_stateid;
offload_info4 coa_offload_info;
}; };
14.1.2. RESULT 14.1.2. RESULT
struct CB_COPY4res { struct CB_OFFLOAD4res {
nfsstat4 ccr_status; nfsstat4 cor_status;
}; };
14.1.3. DESCRIPTION 14.1.3. DESCRIPTION
CB_COPY is used for both intra- and inter-server asynchronous copies. CB_OFFLOAD is used to report to the client the results of an
The CB_COPY callback informs the client of the result of an asynchronous operation, e.g., Server-side Copy or a hole punch. The
asynchronous server-side copy. This operation is sent by the coa_fh and coa_stateid identify the transaction and the coa_status
destination server to the client in a CB_COMPOUND request. The copy indicates success or failure. The coa_resok4.wr_callback_id MUST NOT
is identified by the filehandle and stateid arguments. The result is be set. If the transaction failed, then the coa_bytes_copied
indicated by the status field. If the copy failed, cca_bytes_copied
contains the number of bytes copied before the failure occurred. The contains the number of bytes copied before the failure occurred. The
cca_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 the COPY operation, the client is REQUIRED to If the client supports either the COPY or WRITE_PLUS operation, the
support the CB_COPY operation. client is REQUIRED to support the CB_OFFLOAD operation.
There is a potential race between the reply to the original COPY on There is a potential race between the reply to the original
the forechannel and the CB_COPY callback on the backchannel. transaction on the forechannel and the CB_OFFLOAD callback on the
Sections 2.10.6.3 and 20.9.3 in [2] describes how to handle this type backchannel. Sections 2.10.6.3 and 20.9.3 in [1] describes how to
of issue. handle this type of issue.
The CB_COPY operation may fail for the following reasons (this is a 14.1.3.1. Server-side Copy
partial list):
NFS4ERR_NOTSUPP: The copy offload operation is not supported by the CB_OFFLOAD is used for both intra- and inter-server asynchronous
NFS client receiving this request. 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.
14.1.3.2. WRITE_PLUS
CB_OFFLOAD is used to report the completion of either a hole punch or
an ADH initialization. Upon success, the coa_resok4 will contain the
same information that a synchronous WRITE_PLUS would have returned.
15. IANA Considerations 15. IANA Considerations
This section uses terms that are defined in [24]. This section uses terms that are defined in [24].
16. References 16. References
16.1. Normative References 16.1. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate Requirement [1] Shepler, S., Eisler, M., and D. Noveck, "Network File System
Levels", March 1997.
[2] Shepler, S., Eisler, M., and D. Noveck, "Network File System
(NFS) Version 4 Minor Version 1 Protocol", RFC 5661, (NFS) Version 4 Minor Version 1 Protocol", RFC 5661,
January 2010. January 2010.
[3] Haynes, T., "Network File System (NFS) Version 4 Minor Version [2] Haynes, T., "Network File System (NFS) Version 4 Minor Version
2 External Data Representation Standard (XDR) Description", 2 External Data Representation Standard (XDR) Description",
March 2011. March 2011.
[4] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform [3] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986,
January 2005. January 2005.
[5] Haynes, T. and N. Williams, "Remote Procedure Call (RPC) [4] Haynes, T. and N. Williams, "Remote Procedure Call (RPC)
Security Version 3", draft-williams-rpcsecgssv3 (work in Security Version 3", draft-williams-rpcsecgssv3 (work in
progress), 2011. progress), 2011.
[6] The Open Group, "Section 'posix_fadvise()' of System Interfaces [5] The Open Group, "Section 'posix_fadvise()' of System Interfaces
of The Open Group Base Specifications Issue 6, IEEE Std 1003.1, of The Open Group Base Specifications Issue 6, IEEE Std 1003.1,
2004 Edition", 2004. 2004 Edition", 2004.
[7] Haynes, T., "Requirements for Labeled NFS", [6] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol
draft-ietf-nfsv4-labreqs-00 (work in progress).
[8] Eisler, M., Chiu, A., and L. Ling, "RPCSEC_GSS Protocol
Specification", RFC 2203, September 1997. Specification", RFC 2203, September 1997.
[9] Halevy, B., Welch, B., and J. Zelenka, "Object-Based Parallel [7] Halevy, B., Welch, B., and J. Zelenka, "Object-Based Parallel
NFS (pNFS) Operations", RFC 5664, January 2010. NFS (pNFS) Operations", RFC 5664, January 2010.
16.2. Informative References 16.2. Informative References
[10] Haynes, T. and D. Noveck, "Network File System (NFS) version 4 [8] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Protocol", draft-ietf-nfsv4-rfc3530bis-09 (Work In Progress), Levels", March 1997.
March 2011.
[11] Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Naik, [9] Haynes, T. and D. Noveck, "Network File System (NFS) version 4
Protocol", draft-ietf-nfsv4-rfc3530bis-20 (Work In Progress),
October 2012.
[10] Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Naik,
"NSDB Protocol for Federated Filesystems", "NSDB Protocol for Federated Filesystems",
draft-ietf-nfsv4-federated-fs-protocol (Work In Progress), draft-ietf-nfsv4-federated-fs-protocol (Work In Progress),
2010. 2010.
[12] Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Naik, [11] Lentini, J., Everhart, C., Ellard, D., Tewari, R., and M. Naik,
"Administration Protocol for Federated Filesystems", "Administration Protocol for Federated Filesystems",
draft-ietf-nfsv4-federated-fs-admin (Work In Progress), 2010. draft-ietf-nfsv4-federated-fs-admin (Work In Progress), 2010.
[13] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., [12] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L.,
Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol --
HTTP/1.1", RFC 2616, June 1999. HTTP/1.1", RFC 2616, June 1999.
[14] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9, [13] Postel, J. and J. Reynolds, "File Transfer Protocol", STD 9,
RFC 959, October 1985. RFC 959, October 1985.
[15] Simpson, W., "PPP Challenge Handshake Authentication Protocol [14] Simpson, W., "PPP Challenge Handshake Authentication Protocol
(CHAP)", RFC 1994, August 1996. (CHAP)", RFC 1994, August 1996.
[16] Strohm, R., "Chapter 2, Data Blocks, Extents, and Segments, of [15] Strohm, R., "Chapter 2, Data Blocks, Extents, and Segments, of
Oracle Database Concepts 11g Release 1 (11.1)", January 2011. Oracle Database Concepts 11g Release 1 (11.1)", January 2011.
[17] Ashdown, L., "Chapter 15, Validating Database Files and [16] Ashdown, L., "Chapter 15, Validating Database Files and
Backups, of Oracle Database Backup and Recovery User's Guide Backups, of Oracle Database Backup and Recovery User's Guide
11g Release 1 (11.1)", August 2008. 11g Release 1 (11.1)", August 2008.
[18] McDougall, R. and J. Mauro, "Section 11.4.3, Detecting Memory [17] McDougall, R. and J. Mauro, "Section 11.4.3, Detecting Memory
Corruption of Solaris Internals", 2007. Corruption of Solaris Internals", 2007.
[19] Bairavasundaram, L., Goodson, G., Schroeder, B., Arpaci- [18] 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 USENIX Corruption in the Storage Stack", Proceedings of the 6th USENIX
Symposium on File and Storage Technologies (FAST '08) , 2008. Symposium on File and Storage Technologies (FAST '08) , 2008.
[19] Haynes, T., "Requirements for Labeled NFS",
draft-ietf-nfsv4-labreqs-03 (work in progress).
[20] "Section 46.6. Multi-Level Security (MLS) of Deployment Guide: [20] "Section 46.6. Multi-Level Security (MLS) of Deployment Guide:
Deployment, configuration and administration of Red Hat Deployment, configuration and administration of Red Hat
Enterprise Linux 5, Edition 6", 2011. Enterprise Linux 5, Edition 6", 2011.
[21] Quigley, D. and J. Lu, "Registry Specification for MAC Security [21] Quigley, D. and J. Lu, "Registry Specification for MAC Security
Label Formats", draft-quigley-label-format-registry (work in Label Formats", draft-quigley-label-format-registry (work in
progress), 2011. progress), 2011.
[22] ISEG, "IESG Processing of RFC Errata for the IETF Stream", [22] ISEG, "IESG Processing of RFC Errata for the IETF Stream",
2008. 2008.
[23] Eisler, M., "XDR: External Data Representation Standard", [23] Eisler, M., "XDR: External Data Representation Standard",
RFC 4506, May 2006. RFC 4506, May 2006.
[24] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA [24] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
Considerations Section in RFCs", BCP 26, RFC 5226, May 2008. Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.
[25] VanDeBogart, S., Frost, C., and E. Kohler, "Reducing Seek
Overhead with Application-Directed Prefetching", Proceedings of
USENIX Annual Technical Conference , June 2009.
Appendix A. Acknowledgments Appendix A. Acknowledgments
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.
skipping to change at page 86, line 10 skipping to change at page 91, line 28
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.
For the sparse file support, the original draft was by Dean For the sparse file support, the original draft was by Dean
Hildebrand and Marc Eshel. Valuable input and advice was received Hildebrand and Marc Eshel. Valuable input and advice was received
from Sorin Faibish, Bruce Fields, Benny Halevy, Trond Myklebust, and from Sorin Faibish, Bruce Fields, Benny Halevy, Trond Myklebust, and
Richard Scheffenegger. Richard Scheffenegger.
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 reviwers 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, Sorrin Faibish, Nico Williams, and David Black also Stephen Smalley, Sorrin 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.
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, and Peter Staubach. Lever, Trond Myklebust, David Noveck, and Peter Staubach.
 End of changes. 206 change blocks. 
477 lines changed or deleted 710 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/