NFSv4                                                         S. Shepler
Internet-Draft                                                    Editor
Intended status: Standards Track                           March 6,                           June 20, 2006
Expires: September 7, December 22, 2006

                         NFSv4 Minor Version 1
                 draft-ietf-nfsv4-minorversion1-02.txt
                 draft-ietf-nfsv4-minorversion1-03.txt

Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on September 7, December 22, 2006.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   This Internet-Draft describes the NFSv4 minor version 1 protocol
   extensions.  These most significant of these extensions are commonly
   called: Sessions, Directory Delegations, and parallel NFS or pNFS

Requirements Language

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [1].

Table of Contents

   1.  Protocol Data Types . . . . . . . . . . . . . . . . . . . . .   9
     1.1.   Basic Data Types . . . . . . . . . . . . . . . . . . . .   9
     1.2.   Structured Data Types  . . . . . . . . . . . . . . . . .  10
   2.  Filehandles . . . . . . . . . . . . . . . . . . . . . . . . .  19
     2.1.   Obtaining the First Filehandle . . . . . . . . . . . . .  19
       2.1.1.  Root Filehandle . . . . . . . . . . . . . . . . . . .  20
       2.1.2.  Public Filehandle . . . . . . . . . . . . . . . . . .  20
     2.2.   Filehandle Types . . . . . . . . . . . . . . . . . . . .  20
       2.2.1.  General Properties of a Filehandle  . . . . . . . . .  21
       2.2.2.  Persistent Filehandle . . . . . . . . . . . . . . .  22 .  21
       2.2.3.  Volatile Filehandle . . . . . . . . . . . . . . . . .  22
     2.3.   One Method of Constructing a Volatile Filehandle . . . .  23
     2.4.   Client Recovery from Filehandle Expiration . . . . . . .  24
   3.  File Attributes . . . . . . . . . . . . . . . . . . . . . . .  25
     3.1.   Mandatory Attributes . . . . . . . . . . . . . . . . . .  26
     3.2.   Recommended Attributes . . . . . . . . . . . . . . . . .  26
     3.3.   Named Attributes . . . . . . . . . . . . . . . . . . . .  27
     3.4.   Classification of Attributes . . . . . . . . . . . . . .  27
     3.5.   Mandatory Attributes - Definitions . . . . . . . . . . .  28
     3.6.   Recommended Attributes - Definitions . . . . . . . . . .  30
     3.7.   Time Access  . . . . . . . . . . . . . . . . . . . . . .  38
     3.8.   Interpreting owner and owner_group . . . . . . . . . . .  38
     3.9.   Character Case Attributes  . . . . . . . . . . . . . . .  40
     3.10.  Quota Attributes . . . . . . . . . . . . . . . . . . . .  40  41
     3.11.  mounted_on_fileid  . . . . . . . . . . . . . . . . . . .  41
     3.12.  send_impl_id and recv_impl_id  . . . . . . . . . . . . .  42
     3.13.  fs_layouttype  . . . . . . . . . . . . . . . . . . . . .  43
     3.14.  layouttype . . . . . . . . . . . . . . . . . . . . . . .  43
     3.15.  layouthint . . . . . . . . . . . . . . . . . . . . . . .  43
     3.16.  Access Control Lists . . . . . . . . . . . . . . . . . .  43  44
       3.16.1. ACE type  . . . . . . . . . . . . . . . . . . . . . .  45  46
       3.16.2. ACE Access Mask . . . . . . . . . . . . . . . . . .  46 .  47
       3.16.3. ACE flag  . . . . . . . . . . . . . . . . . . . . . .  51  52
       3.16.4. ACE who . . . . . . . . . . . . . . . . . . . . . .  53 .  54
       3.16.5. Mode Attribute  . . . . . . . . . . . . . . . . . . .  54  55
       3.16.6. Interaction Between Mode and ACL Attributes . . . .  55
   4.  Filesystem Migration and Replication  . . . . . . . . . . . .  69
     4.1.   Replication  . . . . . . . . . . . . . . . . . . . . . .  69
     4.2.   Migration  . . . . . . . . . . . . . . . . . . . . . . .  70
     4.3.   Interpretation of the fs_locations Attribute . . . . . .  70
     4.4.   Filehandle Recovery for Migration or Replication . . . .  72
   5.  NFS Server  56
   4.  Single-server Name Space  . . . . . . . . . . . . . . . . . . . .  72
     5.1.  69
     4.1.   Server Exports . . . . . . . . . . . . . . . . . . . . .  72
     5.2.  69
     4.2.   Browsing Exports . . . . . . . . . . . . . . . . . . . .  72
     5.3.  69
     4.3.   Server Pseudo Filesystem . . . . . . . . . . . . . . . .  73
     5.4.  70
     4.4.   Multiple Roots . . . . . . . . . . . . . . . . . . . . .  73
     5.5.  71
     4.5.   Filehandle Volatility  . . . . . . . . . . . . . . . . .  74
     5.6.  71
     4.6.   Exported Root  . . . . . . . . . . . . . . . . . . . . .  74
     5.7.  71
     4.7.   Mount Point Crossing . . . . . . . . . . . . . . . . . .  74
     5.8.  71
     4.8.   Security Policy and Name Space Presentation  . . . . . .  75
   6.  72
   5.  File Locking and Share Reservations . . . . . . . . . . . . .  76
     6.1.  73
     5.1.   Locking  . . . . . . . . . . . . . . . . . . . . . . . .  76
       6.1.1.  73
       5.1.1.  Client ID . . . . . . . . . . . . . . . . . . . . .  77
       6.1.2. .  74
       5.1.2.  Server Release of Clientid  . . . . . . . . . . . . .  79
       6.1.3.  76
       5.1.3.  lock_owner and stateid Definition . . . . . . . . .  80
       6.1.4. .  77
       5.1.4.  Use of the stateid and Locking  . . . . . . . . . . .  82
       6.1.5.  79
       5.1.5.  Sequencing of Lock Requests . . . . . . . . . . . .  84
       6.1.6. .  81
       5.1.6.  Recovery from Replayed Requests . . . . . . . . . .  85
       6.1.7. .  82
       5.1.7.  Releasing lock_owner State  . . . . . . . . . . . . .  85
       6.1.8.  82
       5.1.8.  Use of Open Confirmation  . . . . . . . . . . . . . .  85
     6.2.  82
     5.2.   Lock Ranges  . . . . . . . . . . . . . . . . . . . . . .  87
     6.3.  84
     5.3.   Upgrading and Downgrading Locks  . . . . . . . . . . . .  87
     6.4.  84
     5.4.   Blocking Locks . . . . . . . . . . . . . . . . . . . . .  87
     6.5.  84
     5.5.   Lease Renewal  . . . . . . . . . . . . . . . . . . . . .  88
     6.6.  85
     5.6.   Crash Recovery . . . . . . . . . . . . . . . . . . . . .  89
       6.6.1.  86
       5.6.1.  Client Failure and Recovery . . . . . . . . . . . .  89
       6.6.2. .  86
       5.6.2.  Server Failure and Recovery . . . . . . . . . . . .  90
       6.6.3. .  87
       5.6.3.  Network Partitions and Recovery . . . . . . . . . .  92
     6.7. .  89
     5.7.   Recovery from a Lock Request Timeout or Abort  . . . . .  95
     6.8.  92
     5.8.   Server Revocation of Locks . . . . . . . . . . . . . . .  96
     6.9.  93
     5.9.   Share Reservations . . . . . . . . . . . . . . . . . . .  97
     6.10.  94
     5.10.  OPEN/CLOSE Operations  . . . . . . . . . . . . . . . . .  97
       6.10.1.  94
       5.10.1. Close and Retention of State Information  . . . . . .  98
     6.11.  95
     5.11.  Open Upgrade and Downgrade . . . . . . . . . . . . . . .  99
     6.12.  96
     5.12.  Short and Long Leases  . . . . . . . . . . . . . . . . .  99
     6.13.  96
     5.13.  Clocks, Propagation Delay, and Calculating Lease
            Expiration . . . . . . . . . . . . . . . . . . . . . . . 100
     6.14.  Migration, Replication and State . . . . . . . . . . . . 100
       6.14.1.  Migration and State  . . . . . . . . . . . . . . . . 101
       6.14.2.  Replication and State  . . . . . . . . . . . . . . . 102
       6.14.3.  Notification of Migrated Lease . . . . . . . . . . . 102
       6.14.4.  Migration and the Lease_time Attribute . . . . . . . 103
   7.  97
   6.  Client-Side Caching . . . . . . . . . . . . . . . . . . . . . 103
     7.1.  97
     6.1.   Performance Challenges for Client-Side Caching . . . . . 104
     7.2.  98
     6.2.   Delegation and Callbacks . . . . . . . . . . . . . . . . 105
       7.2.1.  99
       6.2.1.  Delegation Recovery . . . . . . . . . . . . . . . . 106
     7.3. . 100
     6.3.   Data Caching . . . . . . . . . . . . . . . . . . . . . . 108
       7.3.1. 102
       6.3.1.  Data Caching and OPENs  . . . . . . . . . . . . . . . 108
       7.3.2. 102
       6.3.2.  Data Caching and File Locking . . . . . . . . . . . 109
       7.3.3. . 103
       6.3.3.  Data Caching and Mandatory File Locking . . . . . . 111
       7.3.4. . 105
       6.3.4.  Data Caching and File Identity  . . . . . . . . . . . 111
     7.4. 105
     6.4.   Open Delegation  . . . . . . . . . . . . . . . . . . . . 112
       7.4.1. 106
       6.4.1.  Open Delegation and Data Caching  . . . . . . . . . . 115
       7.4.2. 109
       6.4.2.  Open Delegation and File Locks  . . . . . . . . . . . 116
       7.4.3. 110
       6.4.3.  Handling of CB_GETATTR  . . . . . . . . . . . . . . . 116
       7.4.4. 110
       6.4.4.  Recall of Open Delegation . . . . . . . . . . . . . 119
       7.4.5. . 113
       6.4.5.  Clients that Fail to Honor Delegation Recalls . . . 121
       7.4.6. . 115
       6.4.6.  Delegation Revocation . . . . . . . . . . . . . . . 122
     7.5. . 116
     6.5.   Data Caching and Revocation  . . . . . . . . . . . . . . 122
       7.5.1. 116
       6.5.1.  Revocation Recovery for Write Open Delegation . . . 123
     7.6. . 117
     6.6.   Attribute Caching  . . . . . . . . . . . . . . . . . . . 124
     7.7. 118
     6.7.   Data and Metadata Caching and Memory Mapped Files  . . . 126
     7.8. 120
     6.8.   Name Caching . . . . . . . . . . . . . . . . . . . . . . 128
     7.9. 122
     6.9.   Directory Caching  . . . . . . . . . . . . . . . . . . . 129
   8. 123
   7.  Security Negotiation  . . . . . . . . . . . . . . . . . . . . 130
   9. 124
   8.  Clarification of Security Negotiation in NFSv4.1  . . . . . . 130
     9.1. 124
     8.1.   PUTFH + LOOKUP . . . . . . . . . . . . . . . . . . . . . 130
     9.2. 125
     8.2.   PUTFH + LOOKUPP  . . . . . . . . . . . . . . . . . . . . 131
     9.3. 125
     8.3.   PUTFH + SECINFO  . . . . . . . . . . . . . . . . . . . . 131
     9.4. 125
     8.4.   PUTFH + Anything Else  . . . . . . . . . . . . . . . . . 131
   10. 126
   9.  NFSv4.1 Sessions  . . . . . . . . . . . . . . . . . . . . . . 132
     10.1. 126
     9.1.   Sessions Background  . . . . . . . . . . . . . . . . . . 132
       10.1.1. 126
       9.1.1.  Introduction to Sessions  . . . . . . . . . . . . . . 132
       10.1.2. 126
       9.1.2.  Motivation  . . . . . . . . . . . . . . . . . . . . . 133
       10.1.3. 127
       9.1.3.  Problem Statement . . . . . . . . . . . . . . . . . 134
       10.1.4. . 128
       9.1.4.  NFSv4 Session Extension Characteristics . . . . . . 136
     10.2. . 130
     9.2.   Transport Issues . . . . . . . . . . . . . . . . . . . . 136
       10.2.1. 130
       9.2.1.  Session Model . . . . . . . . . . . . . . . . . . . 136
       10.2.2. . 130
       9.2.2.  Connection State  . . . . . . . . . . . . . . . . . . 137
       10.2.3. 132
       9.2.3.  NFSv4 Channels, Sessions and Connections  . . . . . . 138
       10.2.4. 132
       9.2.4.  Reconnection, Trunking and Failover . . . . . . . . 140
       10.2.5. . 134
       9.2.5.  Server Duplicate Request Cache  . . . . . . . . . . . 141
     10.3. 135
     9.3.   Session Initialization and Transfer Models . . . . . . . 142
       10.3.1. 136
       9.3.1.  Session Negotiation . . . . . . . . . . . . . . . . 142
       10.3.2. . 136
       9.3.2.  RDMA Requirements . . . . . . . . . . . . . . . . . 144
       10.3.3. . 138
       9.3.3.  RDMA Connection Resources . . . . . . . . . . . . . 144
       10.3.4. . 138
       9.3.4.  TCP and RDMA Inline Transfer Model  . . . . . . . . . 145
       10.3.5. 139
       9.3.5.  RDMA Direct Transfer Model  . . . . . . . . . . . . . 148
     10.4. 142
     9.4.   Connection Models  . . . . . . . . . . . . . . . . . . . 151
       10.4.1. 145
       9.4.1.  TCP Connection Model  . . . . . . . . . . . . . . . . 152
       10.4.2. 146
       9.4.2.  Negotiated RDMA Connection Model  . . . . . . . . . . 153
       10.4.3. 147
       9.4.3.  Automatic RDMA Connection Model . . . . . . . . . . 154
     10.5. . 148
     9.5.   Buffer Management, Transfer, Flow Control  . . . . . . . 154
     10.6. 148
     9.6.   Retry and Replay . . . . . . . . . . . . . . . . . . . . 157
     10.7. 151
     9.7.   The Back Channel . . . . . . . . . . . . . . . . . . . . 158
     10.8. 152
     9.8.   COMPOUND Sizing Issues . . . . . . . . . . . . . . . . . 159
     10.9. 153
     9.9.   Data Alignment . . . . . . . . . . . . . . . . . . . . . 159
     10.10. 153
     9.10.  NFSv4 Integration  . . . . . . . . . . . . . . . . . . . 161
       10.10.1. 155
       9.10.1. Minor Versioning  . . . . . . . . . . . . . . . . . . 161
       10.10.2. 155
       9.10.2. Slot Identifiers and Server Duplicate Request Cache . . . . . . . . . . . . . . . . . . . . . . . 161
       10.10.3. 155
       9.10.3. Resolving server callback races with sessions . . . 165
       10.10.4. . 159
       9.10.4. COMPOUND and CB_COMPOUND  . . . . . . . . . . . . . . 166
       10.10.5. 160
       9.10.5. eXternal Data Representation Efficiency . . . . . . 167
       10.10.6. . 161
       9.10.6. Effect of Sessions on Existing Operations . . . . . 167
       10.10.7. . 161
       9.10.7. Authentication Efficiencies . . . . . . . . . . . . 168
     10.11. . 162
     9.11.  Sessions Security Considerations . . . . . . . . . . . . 169
       10.11.1. 163
       9.11.1. Authentication  . . . . . . . . . . . . . . . . . . . 171
   11. Directory Delegations . . . . . 165
   10. Multi-server Name Space . . . . . . . . . . . . . . . 172
     11.1.  Introduction to Directory Delegations . . . . 166
     10.1.  Location attributes  . . . . . 172
     11.2.  Directory Delegation Design (in brief) . . . . . . . . . 173
     11.3.  Recommended Attributes in support of Directory
            Delegations . . . . 166
     10.2.  File System Presence or Absence  . . . . . . . . . . . . 166
     10.3.  Getting Attributes for an Absent File System . . . . . . 168
       10.3.1. GETATTR Within an Absent File System  . . . . . . . . 168
       10.3.2. READDIR and Absent File Systems . . . . . . . . . . . 169
     10.4.  Uses of Location Information . . . . . . . . . . . . . . 170
       10.4.1. File System Replication . . . . . . . . . . . . . . . 170
       10.4.2. File System Migration . . . . . . . . . . . . . . . . 171
       10.4.3. Referrals . . . . . . . . . . . . . . . . . . . . . . 172
     10.5.  Additional Client-side Considerations  . . . . . . . . . 172
     10.6.  Effecting File System Transitions  . . . . . . . . . . . 173
       10.6.1. Transparent File System Transitions . . . . . . . . . 174
       10.6.2. Filehandles and File System Transitions . . . . . . . 176
       10.6.3. Fileid's and File System Transitions  . . . . . . . . 176
       10.6.4. Fsid's and File System Transitions  . . . . . . . . . 177
       10.6.5. The Change Attribute and File System Transitions  . . 177
       10.6.6. Lock State and File System Transitions  . . . . . . . 178
       10.6.7. Write Verifiers and File System Transitions . . . . . 181
     10.7.  Effecting File System Referrals  . . . . . . . . . . . . 181
       10.7.1. Referral Example (LOOKUP) . . . . . . . . . . . . . . 182
       10.7.2. Referral Example (READDIR)  . . . . . . . . . . . . . 186
     10.8.  The Attribute fs_absent  . . . . . . . . . . . . . . . . 188
     10.9.  The Attribute fs_locations . . . . . . . . . . . . . . . 188
     10.10. The Attribute fs_locations_info  . . . . . . . . . . . . 190
     10.11. The Attribute fs_status  . . . . . . . . . . . . . . . . 199
   11. Directory Delegations . . . . . . . . . . . . . . . . . . . . 202
     11.1.  Introduction to Directory Delegations  . . . . . . . . . 203
     11.2.  Directory Delegation Design (in brief) . . . . . . . . . 204
     11.3.  Recommended Attributes in support of Directory
            Delegations  . . . . . . . . . . . . . . . . . . . . . . 205
     11.4.  Delegation Recall  . . . . . . . . . . . . . . . . . . . 175 206
     11.5.  Delegation Recovery  . . . . . . . . . . . . . . . . . . 175 206
   12. Introduction  . . . . . . . . . . . . . . . . . . . . . . . . 175 206
   13. General Definitions . . . . . . . . . . . . . . . . . . . . . 178 209
     13.1.  Metadata Server  . . . . . . . . . . . . . . . . . . . . 178 209
     13.2.  Client . . . . . . . . . . . . . . . . . . . . . . . . . 178 209
     13.3.  Storage Device . . . . . . . . . . . . . . . . . . . . . 178 209
     13.4.  Storage Protocol . . . . . . . . . . . . . . . . . . . . 179 209
     13.5.  Control Protocol . . . . . . . . . . . . . . . . . . . . 179 210
     13.6.  Metadata . . . . . . . . . . . . . . . . . . . . . . . . 179 210
     13.7.  Layout . . . . . . . . . . . . . . . . . . . . . . . . . 180 210
   14. pNFS protocol semantics . . . . . . . . . . . . . . . . . . . 180 211
     14.1.  Definitions  . . . . . . . . . . . . . . . . . . . . . . 180 211
       14.1.1. Layout Types  . . . . . . . . . . . . . . . . . . . . 180 211
       14.1.2. Layout Iomode . . . . . . . . . . . . . . . . . . . 181 . 211
       14.1.3. Layout Segments . . . . . . . . . . . . . . . . . . 181 . 212
       14.1.4. Device IDs  . . . . . . . . . . . . . . . . . . . . . 182 213
       14.1.5. Aggregation Schemes . . . . . . . . . . . . . . . . 183 . 213
     14.2.  Guarantees Provided by Layouts . . . . . . . . . . . . . 183 214
     14.3.  Getting a Layout . . . . . . . . . . . . . . . . . . . . 184 215
     14.4.  Committing a Layout  . . . . . . . . . . . . . . . . . . 185 216
       14.4.1. LAYOUTCOMMIT and mtime/atime/change . . . . . . . . 186 . 216
       14.4.2. LAYOUTCOMMIT and size . . . . . . . . . . . . . . . 186 . 217
       14.4.3. LAYOUTCOMMIT and layoutupdate . . . . . . . . . . . 187 . 218
     14.5.  Recalling a Layout . . . . . . . . . . . . . . . . . . . 187 218
       14.5.1. Basic Operation . . . . . . . . . . . . . . . . . . 188 . 218
       14.5.2. Recall Callback Robustness  . . . . . . . . . . . . . 189 220
       14.5.3. Recall/Return Sequencing  . . . . . . . . . . . . . . 190 221
     14.6.  Metadata Server Write Propagation  . . . . . . . . . . . 192 223
     14.7.  Crash Recovery . . . . . . . . . . . . . . . . . . . . . 193 223
       14.7.1. Leases  . . . . . . . . . . . . . . . . . . . . . . . 193 224
       14.7.2. Client Recovery . . . . . . . . . . . . . . . . . . 194 . 225
       14.7.3. Metadata Server Recovery  . . . . . . . . . . . . . . 195 226
       14.7.4. Storage Device Recovery . . . . . . . . . . . . . . 197 . 228
   15. Security Considerations . . . . . . . . . . . . . . . . . . . 198 229
     15.1.  File Layout Security . . . . . . . . . . . . . . . . . . 199 230
     15.2.  Object Layout Security . . . . . . . . . . . . . . . . . 199 230
     15.3.  Block/Volume Layout Security . . . . . . . . . . . . . . 201 232
   16. The NFSv4 File Layout Type  . . . . . . . . . . . . . . . . . 201 232
     16.1.  File Striping and Data Access  . . . . . . . . . . . . . 202 232
       16.1.1. Sparse and Dense Storage Device Data Layouts  . . . . 203 234
       16.1.2. Metadata and Storage Device Roles . . . . . . . . . 205 . 236
       16.1.3. Device Multipathing . . . . . . . . . . . . . . . . 206 . 237
       16.1.4. Operations Issued to Storage Devices  . . . . . . . . 206 237
       16.1.5. COMMIT through metadata server  . . . . . . . . . . . 238
     16.2.  Global Stateid Requirements  . . . . . . . . . . . . . . 207 238
     16.3.  The Layout Iomode  . . . . . . . . . . . . . . . . . . . 207 239
     16.4.  Storage Device State Propagation . . . . . . . . . . . . 208 239
       16.4.1. Lock State Propagation  . . . . . . . . . . . . . . . 208 240
       16.4.2. Open-mode Validation  . . . . . . . . . . . . . . . . 209 240
       16.4.3. File Attributes . . . . . . . . . . . . . . . . . . 209 . 240
     16.5.  Storage Device Component File Size . . . . . . . . . . . 210 241
     16.6.  Crash Recovery Considerations  . . . . . . . . . . . . . 211 242
     16.7.  Security Considerations  . . . . . . . . . . . . . . . . 211 243
     16.8.  Alternate Approaches . . . . . . . . . . . . . . . . . . 211 243
   17. Layouts and Aggregation . . . . . . . . . . . . . . . . . . . 212 244
     17.1.  Simple Map . . . . . . . . . . . . . . . . . . . . . . . 213 244
     17.2.  Block Extent Map . . . . . . . . . . . . . . . . . . . . 213 245
     17.3.  Striped Map (RAID 0) . . . . . . . . . . . . . . . . . . 213 245
     17.4.  Replicated Map . . . . . . . . . . . . . . . . . . . . . 213 245
     17.5.  Concatenated Map . . . . . . . . . . . . . . . . . . . . 214 245
     17.6.  Nested Map . . . . . . . . . . . . . . . . . . . . . . . 214 246
   18. Minor Versioning  . . . . . . . . . . . . . . . . . . . . . . 214 246
   19. Internationalization  . . . . . . . . . . . . . . . . . . . . 216 248
     19.1.  Stringprep profile for the utf8str_cs type . . . . . . . 218 249
     19.2.  Stringprep profile for the utf8str_cis type  . . . . . . 219 251
     19.3.  Stringprep profile for the utf8str_mixed type  . . . . . 221 252
     19.4.  UTF-8 Related Errors . . . . . . . . . . . . . . . . . . 222 254
   20. Error Definitions . . . . . . . . . . . . . . . . . . . . . . 222 254
   21. NFS version 4.1 Procedures  . . . . . . . . . . . . . . . . . 231 263
     21.1.  Procedure 0: NULL - No Operation . . . . . . . . . . . . 231 263
     21.2.  Procedure 1: COMPOUND - Compound Operations  . . . . . . 232 264
   22. NFS version 4.1 Operations  . . . . . . . . . . . . . . . . . 234 266
     22.1.  Operation 3: ACCESS - Check Access Rights  . . . . . . . 235 267
     22.2.  Operation 4: CLOSE - Close File  . . . . . . . . . . . . 237 269
     22.3.  Operation 5: COMMIT - Commit Cached Data . . . . . . . . 238 270
     22.4.  Operation 6: CREATE - Create a Non-Regular File Object . 241 273
     22.5.  Operation 7: DELEGPURGE - Purge Delegations Awaiting
            Recovery . . . . . . . . . . . . . . . . . . . . . . . . 244 276
     22.6.  Operation 8: DELEGRETURN - Return Delegation . . . . . . 245 277
     22.7.  Operation 9: GETATTR - Get Attributes  . . . . . . . . . 245 277
     22.8.  Operation 10: GETFH - Get Current Filehandle . . . . . . 247 279
     22.9.  Operation 11: LINK - Create Link to a File . . . . . . . 248 280
     22.10. Operation 12: LOCK - Create Lock . . . . . . . . . . . . 249 281
     22.11. Operation 13: LOCKT - Test For Lock  . . . . . . . . . . 253 285
     22.12. Operation 14: LOCKU - Unlock File  . . . . . . . . . . . 255 287
     22.13. Operation 15: LOOKUP - Lookup Filename . . . . . . . . . 256 288
     22.14. Operation 16: LOOKUPP - Lookup Parent Directory  . . . . 258 290
     22.15. Operation 17: NVERIFY - Verify Difference in
            Attributes . . . . . . . . . . . . . . . . . . . . . . . 259 291
     22.16. Operation 18: OPEN - Open a Regular File . . . . . . . . 260 292
     22.17. Operation 19: OPENATTR - Open Named Attribute
            Directory  . . . . . . . . . . . . . . . . . . . . . . . 269 306
     22.18. Operation 20: OPEN_CONFIRM - Confirm Open  . . . . . . . 271 307
     22.19. Operation 21: OPEN_DOWNGRADE - Reduce Open File Access . 273 309
     22.20. Operation 22: PUTFH - Set Current Filehandle . . . . . . 274 310
     22.21. Operation 23: PUTPUBFH - Set Public Filehandle . . . . . 311
     22.22. Operation 24: PUTROOTFH - Set Root Filehandle  . . . . . 275
     22.22. 313
     22.23. Operation 25: READ - Read from File  . . . . . . . . . . 276
     22.23. 314
     22.24. Operation 26: READDIR - Read Directory . . . . . . . . . 278
     22.24. 316
     22.25. Operation 27: READLINK - Read Symbolic Link  . . . . . . 282
     22.25. 320
     22.26. Operation 28: REMOVE - Remove Filesystem Object  . . . . 283
     22.26. 321
     22.27. Operation 29: RENAME - Rename Directory Entry  . . . . . 285
     22.27. 323
     22.28. Operation 30: RENEW - Renew a Lease  . . . . . . . . . . 287
     22.28. 325
     22.29. Operation 31: RESTOREFH - Restore Saved Filehandle . . . 288
     22.29. 326
     22.30. Operation 32: SAVEFH - Save Current Filehandle . . . . . 289
     22.30. 327
     22.31. Operation 33: SECINFO - Obtain Available Security  . . . 290
     22.31. 328
     22.32. Operation 34: SETATTR - Set Attributes . . . . . . . . . 293
     22.32. 331
     22.33. Operation 35: SETCLIENTID - Negotiate Clientid . . . . . 296
     22.33. 334
     22.34. Operation 36: SETCLIENTID_CONFIRM - Confirm Clientid . . 300
     22.34. 338
     22.35. Operation 37: VERIFY - Verify Same Attributes  . . . . . 303
     22.35. 341
     22.36. Operation 38: WRITE - Write to File  . . . . . . . . . . 304
     22.36. 342
     22.37. Operation 39: RELEASE_LOCKOWNER - Release Lockowner
            State  . . . . . . . . . . . . . . . . . . . . . . . . . 309
     22.37. 347
     22.38. Operation 10044: ILLEGAL - Illegal operation . . . . . . 310
     22.38. 348
     22.39. SECINFO_NO_NAME - Get Security on Unnamed Object . . . . 310
     22.39. 348
     22.40. CREATECLIENTID - Instantiate Clientid  . . . . . . . . . 312
     22.40. 350
     22.41. CREATESESSION - Create New Session and Confirm
            Clientid . . . . . . . . . . . . . . . . . . . . . . . . 317
     22.41. 355
     22.42. BIND_BACKCHANNEL - Create a callback channel binding . . 322
     22.42. 360
     22.43. DESTROYSESSION - Destroy existing session  . . . . . . . 324
     22.43. 362
     22.44. SEQUENCE - Supply per-procedure sequencing and control . 325
     22.44. 363
     22.45. GET_DIR_DELEGATION - Get a directory delegation  . . . . 326
     22.45. 364
     22.46. LAYOUTGET - Get Layout Information . . . . . . . . . . . 330
     22.46. 368
     22.47. LAYOUTCOMMIT - Commit writes made using a layout . . . . 332
     22.47. 371
     22.48. LAYOUTRETURN - Release Layout Information  . . . . . . . 336
     22.48. 375
     22.49. GETDEVICEINFO - Get Device Information . . . . . . . . . 337
     22.49. 376
     22.50. GETDEVICELIST  . . . . . . . . . . . . . . . . . . . . . 338 377
     22.51. WANT_DELEGATION  . . . . . . . . . . . . . . . . . . . . 379
   23. NFS version 4.1 Callback Procedures . . . . . . . . . . . . . 340 382
     23.1.  Procedure 0: CB_NULL - No Operation  . . . . . . . . . . 340 382
     23.2.  Procedure 1: CB_COMPOUND - Compound Operations . . . . . 340 383
   24. NFS version 4.1 Callback Operations CB_RECALLCREDIT - change flow control limits  . . . . . . . . 385
   25. CB_SEQUENCE - Supply callback channel sequencing and
       control . . . . . 342
     24.1.  Operation 3: CB_GETATTR - Get Attributes . . . . . . . . 342
     24.2.  Operation 4: CB_RECALL - Recall an Open Delegation . . . 343
     24.3.  Operation 10044: CB_ILLEGAL - Illegal Callback
            Operation . . . . . . . . . . . 385
   26. CB_NOTIFY - Notify directory changes  . . . . . . . . . . . . 344
     24.4.  CB_RECALLCREDIT 387
   27. CB_RECALL_ANY - change flow control limits Keep any N delegations  . . . . . . 345
     24.5.  CB_SEQUENCE - Supply callback channel sequencing and
            control . . . . . 390
   28. CB_SIZECHANGED  . . . . . . . . . . . . . . . . . . . 346
     24.6.  CB_NOTIFY - Notify directory changes . . . . 393
   29. CB_LAYOUTRECALL . . . . . . 348
     24.7.  CB_RECALL_ANY - Keep any N delegations . . . . . . . . . 351
     24.8.  CB_SIZECHANGED . . . . . . . . 394
   30. CB_PUSH_DELEG . . . . . . . . . . . . . 354
     24.9.  CB_LAYOUTRECALL . . . . . . . . . . . 397
   31. CB_RECALLABLE_OBJ_AVAIL . . . . . . . . . 355
   25. . . . . . . . . . . 398
   32. References  . . . . . . . . . . . . . . . . . . . . . . . . . 357
     25.1. 398
     32.1.  Normative References . . . . . . . . . . . . . . . . . . 357
     25.2. 398
     32.2.  Informative References . . . . . . . . . . . . . . . . . 357 399
   Appendix A.  Acknowledgments  . . . . . . . . . . . . . . . . . . 358 399
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . . 358 400
   Intellectual Property and Copyright Statements  . . . . . . . . . 360 401

1.  Protocol Data Types

   The syntax and semantics to describe the data types of the NFS
   version 4 protocol are defined in the XDR RFC1832 [2] and RPC RFC1831
   [3] documents.  The next sections build upon the XDR data types to
   define types and structures specific to this protocol.

1.1.  Basic Data Types

                   These are the base NFSv4 data types.

   +---------------+---------------------------------------------------+
   | Data Type     | Definition                                        |
   +---------------+---------------------------------------------------+
   | int32_t       | typedef int int32_t;                              |
   | uint32_t      | typedef unsigned int uint32_t;                    |
   | int64_t       | typedef hyper int64_t;                            |
   | uint64_t      | typedef unsigned hyper uint64_t;                  |
   | attrlist4     | typedef opaque attrlist4&lt> attrlist4<>;                       |
   |               | Used for file/directory attributes                |
   | bitmap4       | typedef uint32_t bitmap4&lt> bitmap4<>;                       |
   |               | Used in attribute array encoding.                 |
   | changeid4     | typedef uint64_t changeid4;                       |
   |               | Used in definition of change_info                 |
   | clientid4     | typedef uint64_t clientid4;                       |
   |               | Shorthand reference to client identification      |
   | component4    | typedef utf8str_cs component4;                    |
   |               | Represents path name components                   |
   | count4        | typedef uint32_t count4;                          |
   |               | Various count parameters (READ, WRITE, COMMIT)    |
   | length4       | typedef uint64_t length4;                         |
   |               | Describes LOCK lengths                            |
   | linktext4     | typedef utf8str_cs linktext4;                     |
   |               | Symbolic link contents                            |
   | mode4         | typedef uint32_t mode4;                           |
   |               | Mode attribute data type                          |
   | nfs_cookie4   | typedef uint64_t nfs_cookie4;                     |
   |               | Opaque cookie value for READDIR                   |
   | nfs_fh4       | typedef opaque nfs_fh4&ltNFS4_FHSIZE> nfs_fh4<NFS4_FHSIZE>               |
   |               | Filehandle definition; NFS4_FHSIZE is defined as  |
   |               | 128                                               |
   | nfs_ftype4    | enum nfs_ftype4;                                  |
   |               | Various defined file types                        |
   | nfsstat4      | enum nfsstat4;                                    |
   |               | Return value for operations                       |
   | offset4       | typedef uint64_t offset4;                         |
   |               | Various offset designations (READ, WRITE, LOCK,   |
   |               | COMMIT)                                           |
   | pathname4     | typedef component4 pathname4&lt> pathname4<>;                   |
   |               | Represents path name for fs_locations             |
   | qop4          | typedef uint32_t qop4;                            |
   |               | Quality of protection designation in SECINFO      |
   | sec_oid4      | typedef opaque sec_oid4&lt> sec_oid4<>;                        |
   |               | Security Object Identifier The sec_oid4 data type |
   |               | is not really opaque. Instead contains an ASN.1   |
   |               | OBJECT IDENTIFIER as used by GSS-API in the       |
   |               | mech_type argument to GSS_Init_sec_context. See   |
   |               | RFC2743 [4] for details.                          |
   | seqid4        | typedef uint32_t seqid4;                          |
   |               | Sequence identifier used for file locking         |
   | utf8string    | typedef opaque utf8string&lt> utf8string<>;                      |
   |               | UTF-8 encoding for strings                        |
   | utf8str_cis   | typedef opaque utf8str_cis;                       |
   |               | Case-insensitive UTF-8 string                     |
   | utf8str_cs    | typedef opaque utf8str_cs;                        |
   |               | Case-sensitive UTF-8 string                       |
   | utf8str_mixed | typedef opaque utf8str_mixed;                     |
   |               | UTF-8 strings with a case sensitive prefix and a  |
   |               | case insensitive suffix.                          |
   | verifier4     | typedef opaque verifier4[NFS4_VERIFIER_SIZE];     |
   |               | Verifier used for various operations (COMMIT,     |
   |               | CREATE, OPEN, READDIR, SETCLIENTID,               |
   |               | SETCLIENTID_CONFIRM, WRITE) NFS4_VERIFIER_SIZE is |
   |               | defined as 8.                                     |
   +---------------+---------------------------------------------------+

                          End of Base Data Types

                                  Table 1

1.2.  Structured Data Types

1.2.1.  nfstime4

   struct nfstime4 {
       int64_t seconds;
       uint32_t nseconds;
   }

   The nfstime4 structure gives the number of seconds and nanoseconds
   since midnight or 0 hour January 1, 1970 Coordinated Universal Time
   (UTC).  Values greater than zero for the seconds field denote dates
   after the 0 hour January 1, 1970.  Values less than zero for the
   seconds field denote dates before the 0 hour January 1, 1970.  In
   both cases, the nseconds field is to be added to the seconds field
   for the final time representation.  For example, if the time to be
   represented is one-half second before 0 hour January 1, 1970, the
   seconds field would have a value of negative one (-1) and the
   nseconds fields would have a value of one-half second (500000000).
   Values greater than 999,999,999 for nseconds are considered invalid.

   This data type is used to pass time and date information.  A server
   converts to and from its local representation of time when processing
   time values, preserving as much accuracy as possible.  If the
   precision of timestamps stored for a filesystem object is less than
   defined, loss of precision can occur.  An adjunct time maintenance
   protocol is recommended to reduce client and server time skew.

1.2.2.  time_how4

   enum time_how4 {
       SET_TO_SERVER_TIME4 = 0,
       SET_TO_CLIENT_TIME4 = 1
   };

1.2.3.  settime4

   union settime4 switch (time_how4 set_it) {
       case SET_TO_CLIENT_TIME4:
           nfstime4       time;
       default:
           void;
   };

   The above definitions are used as the attribute definitions to set
   time values.  If set_it is SET_TO_SERVER_TIME4, then the server uses
   its local representation of time for the time value.

1.2.4.  specdata4

   struct specdata4 {
       uint32_t specdata1; /* major device number */
       uint32_t specdata2; /* minor device number */
   };

   This data type represents additional information for the device file
   types NF4CHR and NF4BLK.

1.2.5.  fsid4

   struct fsid4 {
       uint64_t        major;
       uint64_t        minor;
   };

1.2.6.  fs_location4

   struct fs_location4 {
       utf8str_cis    server&lt>    server<>;
       pathname4     rootpath;
   };

1.2.7.  fs_locations4

   struct fs_locations4 {
       pathname4     fs_root;
       fs_location4  locations&lt>  locations<>;
   };

   The fs_location4 and fs_locations4 data types are used for the
   fs_locations recommended attribute which is used for migration and
   replication support.

1.2.8.  fattr4

   struct fattr4 {
       bitmap4       attrmask;
       attrlist4     attr_vals;
   };

   The fattr4 structure is used to represent file and directory
   attributes.

   The bitmap is a counted array of 32 bit integers used to contain bit
   values.  The position of the integer in the array that contains bit n
   can be computed from the expression (n / 32) and its bit within that
   integer is (n mod 32).

   0            1
   +-----------+-----------+-----------+--
   |  count    | 31  ..  0 | 63  .. 32 |
   +-----------+-----------+-----------+--

1.2.9.  change_info4

   struct change_info4 {
       bool          atomic;
       changeid4     before;
       changeid4     after;
   };

   This structure is used with the CREATE, LINK, REMOVE, RENAME
   operations to let the client know the value of the change attribute
   for the directory in which the target filesystem object resides.

1.2.10.  clientaddr4

   struct clientaddr4 {
       /* see struct rpcb in RFC1833 */
       string r_netid&lt> r_netid<>;    /* network id */
       string r_addr&lt> r_addr<>;     /* universal address */
   };

   The clientaddr4 structure is used as part of the SETCLIENTID
   operation to either specify the address of the client that is using a
   clientid or as part of the callback registration.  The r_netid and
   r_addr fields are specified in RFC1833 [9], but they are
   underspecified in RFC1833 [9] as far as what they should look like
   for specific protocols.

   For TCP over IPv4 and for UDP over IPv4, the format of r_addr is the
   US-ASCII string:

   h1.h2.h3.h4.p1.p2

   The prefix, "h1.h2.h3.h4", is the standard textual form for
   representing an IPv4 address, which is always four octets long.
   Assuming big-endian ordering, h1, h2, h3, and h4, are respectively,
   the first through fourth octets each converted to ASCII-decimal.
   Assuming big-endian ordering, p1 and p2 are, respectively, the first
   and second octets each converted to ASCII-decimal.  For example, if a
   host, in big-endian order, has an address of 0x0A010307 and there is
   a service listening on, in big endian order, port 0x020F (decimal
   527), then complete universal address is "10.1.3.7.2.15".

   For TCP over IPv4 the value of r_netid is the string "tcp".  For UDP
   over IPv4 the value of r_netid is the string "udp".

   For TCP over IPv6 and for UDP over IPv6, the format of r_addr is the
   US-ASCII string:

   x1:x2:x3:x4:x5:x6:x7:x8.p1.p2

   The suffix "p1.p2" is the service port, and is computed the same way
   as with universal addresses for TCP and UDP over IPv4.  The prefix,
   "x1:x2:x3:x4:x5:x6:x7:x8", is the standard textual form for
   representing an IPv6 address as defined in Section 2.2 of RFC1884
   [5].  Additionally, the two alternative forms specified in Section
   2.2 of RFC1884 [5] are also acceptable.

   For TCP over IPv6 the value of r_netid is the string "tcp6".  For UDP
   over IPv6 the value of r_netid is the string "udp6".

1.2.11.  cb_client4

   struct cb_client4 {
       unsigned int  cb_program;
       clientaddr4   cb_location;
   };

   This structure is used by the client to inform the server of its call
   back address; includes the program number and client address.

1.2.12.  nfs_client_id4

   struct nfs_client_id4 {
       verifier4     verifier;
       opaque        id&ltNFS4_OPAQUE_LIMIT>        id<NFS4_OPAQUE_LIMIT>
   };

   This structure is part of the arguments to the SETCLIENTID operation.
   NFS4_OPAQUE_LIMIT is defined as 1024.

1.2.13.  open_owner4

   struct open_owner4 {
       clientid4     clientid;
       opaque        owner&ltNFS4_OPAQUE_LIMIT>        owner<NFS4_OPAQUE_LIMIT>
   };

   This structure is used to identify the owner of open state.
   NFS4_OPAQUE_LIMIT is defined as 1024.

1.2.14.  lock_owner4

   struct lock_owner4 {
       clientid4     clientid;
       opaque        owner&ltNFS4_OPAQUE_LIMIT>        owner<NFS4_OPAQUE_LIMIT>
   };

   This structure is used to identify the owner of file locking state.
   NFS4_OPAQUE_LIMIT is defined as 1024.

1.2.15.  open_to_lock_owner4

   struct open_to_lock_owner4 {
       seqid4          open_seqid;
       stateid4        open_stateid;
       seqid4          lock_seqid;
       lock_owner4     lock_owner;
   };

   This structure is used for the first LOCK operation done for an
   open_owner4.  It provides both the open_stateid and lock_owner such
   that the transition is made from a valid open_stateid sequence to
   that of the new lock_stateid sequence.  Using this mechanism avoids
   the confirmation of the lock_owner/lock_seqid pair since it is tied
   to established state in the form of the open_stateid/open_seqid.

1.2.16.  stateid4

   struct stateid4 {
       uint32_t        seqid;
       opaque          other[12];
   };

   This structure is used for the various state sharing mechanisms
   between the client and server.  For the client, this data structure
   is read-only.  The starting value of the seqid field is undefined.
   The server is required to increment the seqid field monotonically at
   each transition of the stateid.  This is important since the client
   will inspect the seqid in OPEN stateids to determine the order of
   OPEN processing done by the server.

1.2.17.  layouttype4

   enum layouttype4 {
       LAYOUT_NFSV4_FILES  = 1,
       LAYOUT_OSD2_OBJECTS = 2,
       LAYOUT_BLOCK_VOLUME = 3
   };

   A layout type specifies the layout being used.  The implication is
   that clients have "layout drivers" that support one or more layout
   types.  The file server advertises the layout types it supports
   through the LAYOUT_TYPES file system attribute.  A client asks for
   layouts of a particular type in LAYOUTGET, and passes those layouts
   to its layout driver.  The set of well known layout types must be
   defined.  As well, a private range of layout types is to be defined
   by this document.  This would allow custom installations to introduce
   new layout types.

   [[Comment.1: Determine private range of layout types]]

   New layout types must be specified in RFCs approved by the IESG
   before becoming part of the pNFS specification.

   The LAYOUT_NFSV4_FILES enumeration specifies that the NFSv4 file
   layout type is to be used.  The LAYOUT_OSD2_OBJECTS enumeration
   specifies that the object layout, as defined in [10], is to be used.
   Similarly, the LAYOUT_BLOCK_VOLUME enumeration that the block/volume
   layout, as defined in [11], is to be used.

1.2.18.  pnfs_deviceid4

   typedef uint32_t pnfs_deviceid4;  /* 32-bit device ID */

   Layout information includes device IDs that specify a storage device
   through a compact handle.  Addressing and type information is
   obtained with the GETDEVICEINFO operation.  A client must not assume
   that device IDs are valid across metadata server reboots.  The device
   ID is qualified by the layout type and are unique per file system
   (FSID).  This allows different layout drivers to generate device IDs
   without the need for co-ordination.  See Section 14.1.4 for more
   details.

1.2.19.  pnfs_deviceaddr4  pnfs_netaddr4

   struct pnfs_netaddr4 {
       string  r_netid&lt>  r_netid<>; /* network ID */
       string  r_addr&lt>  r_addr<>;  /* universal address */
   };

   For a description of the r_netid and r_addr fields see the
   descriptions provided in the clientaddr4 structure description.

1.2.20.  pnfs_devlist_item4

   struct pnfs_deviceaddr4 pnfs_devlist_item4 {
       pnfs_layouttype4 type;
           pnfs_deviceid4          id;
           opaque           device_addr&lt>                  device_addr<>;
   };

   An array of these values is returned by the GETDEVICELIST operation.
   They define the set of devices associated with a file system for the
   layout type specified in the GETDEVICELIST4args.

   The device address is used to set up a communication channel with the
   storage device.  Different layout types will require different types
   of structures to define how they communicate with storage devices.

   The opaque device_addr field must be interpreted based on the
   specified layout type.

   Currently,

   This document defines the only defined device address is that for the NFSv4 file layout
   (struct pnfs_netaddr4), which identifies a storage device by network
   IP address and port number. number (similar to struct clientaddr4).  This is
   sufficient for the clients to communicate with the NFSv4 storage
   devices, and may also be sufficient for object-based storage drivers to communicate with
   OSDs.  The other device address we expect to support is a SCSI volume
   identifier.  The final protocol specification will detail the allowed
   values for device_type and the format of their associated location
   information.

   [NOTE: other device addresses will be added as the respective
   specifications mature.  It has been suggested that a separate
   device_type enumeration is used layout types as a switch to the pnfs_deviceaddr4
   structure (e.g., if multiple well.
   Device types of addresses exist for the same
   layout type).  Until such a time as a real case is made object storage devices and the
   respective layout types have matured, the device address structure block storage devices
   (e.g., SCSI volume labels) will be left as is.]

1.2.20.  pnfs_devlist_item4

   struct pnfs_devlist_item4 {
       pnfs_deviceid4          id;
       pnfs_deviceaddr4        addr;
   };

   An array of these values is returned defined by the GETDEVICELIST operation.
   They define the set of devices associated with a file system. their respective layout
   specifications.

1.2.21.  pnfs_layout4

   struct pnfs_layout4 {
       offset4                 offset;
       length4                 length;
       pnfs_layoutiomode4      iomode;
       pnfs_layouttype4        type;
       opaque                  layout<>;
   };

   The pnfs_layout4 structure defines a layout for a file.  The layout
   type specific data is opaque within this structure and must be
   interepreted based on the layout type.  Currently, only the NFSv4
   file layout type is defined; see Section 16.1 for its definition.
   Since layouts are sub-dividable, the offset and length together with
   the file's filehandle, the clientid, iomode, and layout type,
   identifies the layout.

   [[Comment.2: there is a discussion of moving the striping
   information, or more generally the "aggregation scheme", up to the
   generic layout level.  This creates a two-layer system where the top
   level is a switch on different data placement layouts, and the next
   level down is a switch on different data storage types.  This lets
   different layouts (e.g., striping or mirroring or redundant servers)
   to be layered over different storage devices.  This would move
   geometry information out of nfsv4_file_layouttype4 and up into a
   generic pnfs_striped_layout type that would specify a set of
   pnfs_deviceid4 and pnfs_devicetype4 to use for storage.  Instead of
   nfsv4_file_layouttype4, there would be pnfs_nfsv4_devicetype4.]]

1.2.22.  pnfs_layoutupdate4

   struct pnfs_layoutupdate4 {
       pnfs_layouttype4        type;
       opaque                  layoutupdate_data<>;
   };
   The pnfs_layoutupdate4 structure is used by the client to return
   'updated' layout information to the metadata server at LAYOUTCOMMIT
   time.  This structure provides a channel to pass layout type specific
   information back to the metadata server.  E.g., for block/volume
   layout types this could include the list of reserved blocks that were
   written.  The contents of the opaque layoutupdate_data argument are
   determined by the layout type and are defined in their context.  The
   NFSv4 file-based layout does not use this structure, thus the
   update_data field should have a zero length.

1.2.23.  layouthint4

   struct pnfs_layouthint4 {
       pnfs_layouttype4      type;
       opaque                layouthint_data&lt>                layouthint_data<>;
   };

   The layouthint4 structure is used by the client to pass in a hint
   about the type of layout it would like created for a particular file.
   It is the structure specified by the FILE_LAYOUT_HINT attribute
   described below.  The metadata server may ignore the hint, or may
   selectively ignore fields within the hint.  This hint should be
   provided at create time as part of the initial attributes within
   OPEN.  The NFSv4 file-based layout uses the "nfsv4_file_layouthint"
   structure as defined in Section 16.1.

1.2.24.  pnfs_layoutiomode4

   enum pnfs_layoutiomode4 {
       LAYOUTIOMODE_READ          = 1,
       LAYOUTIOMODE_RW            = 2,
       LAYOUTIOMODE_ANY           = 3
   };

   The iomode specifies whether the client intends to read or write
   (with the possibility of reading) the data represented by the layout.
   The ANY iomode MUST NOT be used for LAYOUTGET, however, it can be
   used for LAYOUTRETURN and LAYOUTRECALL.  The ANY iomode specifies
   that layouts pertaining to both READ and RW iomodes are being
   returned or recalled, respectively.  The metadata server's use of the
   iomode may depend on the layout type being used.  The storage devices
   may validate I/O accesses against the iomode and reject invalid
   accesses.

1.2.25.  nfs_impl_id4

   struct nfs_impl_id4 {
       utf8str_cis   nii_domain;
       utf8str_cs    nii_name;
       nfstime4      nii_date;
   };

   This structure is used to identify client and server implementation
   detail.  The nii_domain field is the DNS domain name that the
   implementer is associated with.  The nii_name field is the product
   name of the implementation and is completely free form.  It is
   encouraged that the nii_name be used to distinguish machine
   architecture, machine platforms, revisions, versions, and patch
   levels.  The nii_date field is the timestamp of when the software
   instance was published or built.

1.2.26.  impl_ident4

   struct impl_ident4 {
       clientid4           ii_clientid;
       struct nfs_impl_id4 ii_impl_id;
   };

   This is used for exchanging implementation identification between
   client and server.

2.  Filehandles

   The filehandle in the NFS protocol is a per server unique identifier
   for a filesystem object.  The contents of the filehandle are opaque
   to the client.  Therefore, the server is responsible for translating
   the filehandle to an internal representation of the filesystem
   object.

2.1.  Obtaining the First Filehandle

   The operations of the NFS protocol are defined in terms of one or
   more filehandles.  Therefore, the client needs a filehandle to
   initiate communication with the server.  With the NFS version 2
   protocol [RFC1094] and the NFS version 3 protocol [RFC1813], there
   exists an ancillary protocol to obtain this first filehandle.  The
   MOUNT protocol, RPC program number 100005, provides the mechanism of
   translating a string based filesystem path name to a filehandle which
   can then be used by the NFS protocols.

   The MOUNT protocol has deficiencies in the area of security and use
   via firewalls.  This is one reason that the use of the public
   filehandle was introduced in [RFC2054] and [RFC2055].  With the use
   of the public filehandle in combination with the LOOKUP operation in
   the NFS version 2 and 3 protocols, it has been demonstrated that the
   MOUNT protocol is unnecessary for viable interaction between NFS
   client and server.

   Therefore, the NFS version 4 protocol will not use an ancillary
   protocol for translation from string based path names to a
   filehandle.  Two special filehandles will be used as starting points
   for the NFS client.

2.1.1.  Root Filehandle

   The first of the special filehandles is the ROOT filehandle.  The
   ROOT filehandle is the "conceptual" root of the filesystem name space
   at the NFS server.  The client uses or starts with the ROOT
   filehandle by employing the PUTROOTFH operation.  The PUTROOTFH
   operation instructs the server to set the "current" filehandle to the
   ROOT of the server's file tree.  Once this PUTROOTFH operation is
   used, the client can then traverse the entirety of the server's file
   tree with the LOOKUP operation.  A complete discussion of the server
   name space is in the section "NFS Server Name Space".

2.1.2.  Public Filehandle

   The second special filehandle is the PUBLIC filehandle.  Unlike the
   ROOT filehandle, the PUBLIC filehandle may be bound or represent an
   arbitrary filesystem object at the server.  The server is responsible
   for this binding.  It may be that the PUBLIC filehandle and the ROOT
   filehandle refer to the same filesystem object.  However, it is up to
   the administrative software at the server and the policies of the
   server administrator to define the binding of the PUBLIC filehandle
   and server filesystem object.  The client may not make any
   assumptions about this binding.  The client uses the PUBLIC
   filehandle via the PUTPUBFH operation.

2.2.  Filehandle Types

   In the NFS version 2 and 3 protocols, there was one type of
   filehandle with a single set of semantics.  This type of filehandle
   is termed "persistent" in NFS Version 4.  The semantics of a
   persistent filehandle remain the same as before.  A new type of
   filehandle introduced in NFS Version 4 is the "volatile" filehandle,
   which attempts to accommodate certain server environments.

   The volatile filehandle type was introduced to address server
   functionality or implementation issues which make correct
   implementation of a persistent filehandle infeasible.  Some server
   environments do not provide a filesystem level invariant that can be
   used to construct a persistent filehandle.  The underlying server
   filesystem may not provide the invariant or the server's filesystem
   programming interfaces may not provide access to the needed
   invariant.  Volatile filehandles may ease the implementation of
   server functionality such as hierarchical storage management or
   filesystem reorganization or migration.  However, the volatile
   filehandle increases the implementation burden for the client.

   Since the client will need to handle persistent and volatile
   filehandles differently, a file attribute is defined which may be
   used by the client to determine the filehandle types being returned
   by the server.

2.2.1.  General Properties of a Filehandle

   The filehandle contains all the information the server needs to
   distinguish an individual file.  To the client, the filehandle is
   opaque.  The client stores filehandles for use in a later request and
   can compare two filehandles from the same server for equality by
   doing a byte-by-byte comparison.  However, the client MUST NOT
   otherwise interpret the contents of filehandles.  If two filehandles
   from the same server are equal, they MUST refer to the same file.
   Servers SHOULD try to maintain a one-to-one correspondence between
   filehandles and files but this is not required.  Clients MUST use
   filehandle comparisons only to improve performance, not for correct
   behavior.  All clients need to be prepared for situations in which it
   cannot be determined whether two filehandles denote the same object
   and in such cases, avoid making invalid assumptions which might cause
   incorrect behavior.  Further discussion of filehandle and attribute
   comparison in the context of data caching is presented in the section
   "Data Caching and File Identity".

   As an example, in the case that two different path names when
   traversed at the server terminate at the same filesystem object, the
   server SHOULD return the same filehandle for each path.  This can
   occur if a hard link is used to create two file names which refer to
   the same underlying file object and associated data.  For example, if
   paths /a/b/c and /a/d/c refer to the same file, the server SHOULD
   return the same filehandle for both path names traversals.

2.2.2.  Persistent Filehandle

   A persistent filehandle is defined as having a fixed value for the
   lifetime of the filesystem object to which it refers.  Once the
   server creates the filehandle for a filesystem object, the server
   MUST accept the same filehandle for the object for the lifetime of
   the object.  If the server restarts or reboots the NFS server must
   honor the same filehandle value as it did in the server's previous
   instantiation.  Similarly, if the filesystem is migrated, the new NFS
   server must honor the same filehandle as the old NFS server.

   The persistent filehandle will be become stale or invalid when the
   filesystem object is removed.  When the server is presented with a
   persistent filehandle that refers to a deleted object, it MUST return
   an error of NFS4ERR_STALE.  A filehandle may become stale when the
   filesystem containing the object is no longer available.  The file
   system may become unavailable if it exists on removable media and the
   media is no longer available at the server or the filesystem in whole
   has been destroyed or the filesystem has simply been removed from the
   server's name space (i.e. unmounted in a UNIX environment).

2.2.3.  Volatile Filehandle

   A volatile filehandle does not share the same longevity
   characteristics of a persistent filehandle.  The server may determine
   that a volatile filehandle is no longer valid at many different
   points in time.  If the server can definitively determine that a
   volatile filehandle refers to an object that has been removed, the
   server should return NFS4ERR_STALE to the client (as is the case for
   persistent filehandles).  In all other cases where the server
   determines that a volatile filehandle can no longer be used, it
   should return an error of NFS4ERR_FHEXPIRED.

   The mandatory attribute "fh_expire_type" is used by the client to
   determine what type of filehandle the server is providing for a
   particular filesystem.  This attribute is a bitmask with the
   following values:

   FH4_PERSISTENT  The value of FH4_PERSISTENT is used to indicate a
      persistent filehandle, which is valid until the object is removed
      from the filesystem.  The server will not return NFS4ERR_FHEXPIRED
      for this filehandle.  FH4_PERSISTENT is defined as a value in
      which none of the bits specified below are set.

   FH4_VOLATILE_ANY  The filehandle may expire at any time, except as
      specifically excluded (i.e.  FH4_NO_EXPIRE_WITH_OPEN).

   FH4_NOEXPIRE_WITH_OPEN  May only be set when FH4_VOLATILE_ANY is set.
      If this bit is set, then the meaning of FH4_VOLATILE_ANY is
      qualified to exclude any expiration of the filehandle when it is
      open.

   FH4_VOL_MIGRATION  The filehandle will expire as a result of
      migration.  If FH4_VOL_ANY a file
      system transition (migration or replication), in those case in
      which the continuity of filehandle use is set, FH4_VOL_MIGRATION not specified by
      _handle_ class information within the fs_locations_info attribute.
      When this bit is redundant. set, clients without access to fs_locations_info
      information should assume file handles will expire on file system
      transitions.

   FH4_VOL_RENAME  The filehandle will expire during rename.  This
      includes a rename by the requesting client or a rename by any
      other client.  If FH4_VOL_ANY is set, FH4_VOL_RENAME is redundant.

   Servers which provide volatile filehandles that may expire while open
   (i.e. if FH4_VOL_MIGRATION or FH4_VOL_RENAME is set or if
   FH4_VOLATILE_ANY is set and FH4_NOEXPIRE_WITH_OPEN not set), should
   deny a RENAME or REMOVE that would affect an OPEN file of any of the
   components leading to the OPEN file.  In addition, the server should
   deny all RENAME or REMOVE requests during the grace period upon
   server restart.

   Note

   Servers which provide volatile filehandles that the bits FH4_VOL_MIGRATION may expire while open
   require special care as regards handling of RENAMESs and REMOVEs.
   This situation can arise if FH4_VOL_MIGRATION or FH4_VOL_RENAME allow the
   client to determine that expiration is
   set, if FH4_VOLATILE_ANY is set and FH4_NOEXPIRE_WITH_OPEN not set,
   or if a non-readonly file system has occurred whenever a specific
   event occurs, without an explicit filehandle expiration error from transition target in a
   different _handle _ class.  In these cases, the server.  FH4_VOL_ANY does not provide this form server should deny a
   RENAME or REMOVE that would affect an OPEN file of information. any of the
   components leading to the OPEN file.  In situations where addition, the server will expire many, but not all
   filehandles upon migration (e.g. should
   deny all but those that are open),
   FH4_VOLATILE_ANY (in this case with FH4_NOEXPIRE_WITH_OPEN) is a
   better choice since RENAME or REMOVE requests during the client may not assume grace period, in order
   to make sure that all reclaims of files where filehandles
   will expire when migration occurs, and it is likely that additional
   expirations will occur (as may have
   expired do not do a result of file CLOSE) that are separated
   in time from reclaim for the migration event itself. wrong file.

2.3.  One Method of Constructing a Volatile Filehandle

   A volatile filehandle, while opaque to the client could contain:

   [volatile bit = 1 | server boot time | slot | generation number]

   o  slot is an index in the server volatile filehandle table

   o  generation number is the generation number for the table entry/
      slot

   When the client presents a volatile filehandle, the server makes the
   following checks, which assume that the check for the volatile bit
   has passed.  If the server boot time is less than the current server
   boot time, return NFS4ERR_FHEXPIRED.  If slot is out of range, return
   NFS4ERR_BADHANDLE.  If the generation number does not match, return
   NFS4ERR_FHEXPIRED.

   When the server reboots, the table is gone (it is volatile).

   If volatile bit is 0, then it is a persistent filehandle with a
   different structure following it.

2.4.  Client Recovery from Filehandle Expiration

   If possible, the client SHOULD recover from the receipt of an
   NFS4ERR_FHEXPIRED error.  The client must take on additional
   responsibility so that it may prepare itself to recover from the
   expiration of a volatile filehandle.  If the server returns
   persistent filehandles, the client does not need these additional
   steps.

   For volatile filehandles, most commonly the client will need to store
   the component names leading up to and including the filesystem object
   in question.  With these names, the client should be able to recover
   by finding a filehandle in the name space that is still available or
   by starting at the root of the server's filesystem name space.

   If the expired filehandle refers to an object that has been removed
   from the filesystem, obviously the client will not be able to recover
   from the expired filehandle.

   It is also possible that the expired filehandle refers to a file that
   has been renamed.  If the file was renamed by another client, again
   it is possible that the original client will not be able to recover.
   However, in the case that the client itself is renaming the file and
   the file is open, it is possible that the client may be able to
   recover.  The client can determine the new path name based on the
   processing of the rename request.  The client can then regenerate the
   new filehandle based on the new path name.  The client could also use
   the compound operation mechanism to construct a set of operations
   like:

             RENAME A B
             LOOKUP B
             GETFH

   Note that the COMPOUND procedure does not provide atomicity.  This
   example only reduces the overhead of recovering from an expired
   filehandle.

3.  File Attributes

   To meet the requirements of extensibility and increased
   interoperability with non-UNIX platforms, attributes must be handled
   in a flexible manner.  The NFS version 3 fattr3 structure contains a
   fixed list of attributes that not all clients and servers are able to
   support or care about.  The fattr3 structure can not be extended as
   new needs arise and it provides no way to indicate non-support.  With
   the NFS version 4 protocol, the client is able query what attributes
   the server supports and construct requests with only those supported
   attributes (or a subset thereof).

   To this end, attributes are divided into three groups: mandatory,
   recommended, and named.  Both mandatory and recommended attributes
   are supported in the NFS version 4 protocol by a specific and well-
   defined encoding and are identified by number.  They are requested by
   setting a bit in the bit vector sent in the GETATTR request; the
   server response includes a bit vector to list what attributes were
   returned in the response.  New mandatory or recommended attributes
   may be added to the NFS protocol between major revisions by
   publishing a standards-track RFC which allocates a new attribute
   number value and defines the encoding for the attribute.  See the
   section "Minor Versioning" for further discussion.

   Named attributes are accessed by the new OPENATTR operation, which
   accesses a hidden directory of attributes associated with a file
   system object.  OPENATTR takes a filehandle for the object and
   returns the filehandle for the attribute hierarchy.  The filehandle
   for the named attributes is a directory object accessible by LOOKUP
   or READDIR and contains files whose names represent the named
   attributes and whose data bytes are the value of the attribute.  For
   example:

        +----------+-----------+---------------------------------+
        | LOOKUP   | "foo"     | ; look up file                  |
        | GETATTR  | attrbits  |                                 |
        | OPENATTR |           | ; access foo's named attributes |
        | LOOKUP   | "x11icon" | ; look up specific attribute    |
        | READ     | 0,4096    | ; read stream of bytes          |
        +----------+-----------+---------------------------------+

   Named attributes are intended for data needed by applications rather
   than by an NFS client implementation.  NFS implementors are strongly
   encouraged to define their new attributes as recommended attributes
   by bringing them to the IETF standards-track process.

   The set of attributes which are classified as mandatory is
   deliberately small since servers must do whatever it takes to support
   them.  A server should support as many of the recommended attributes
   as possible but by their definition, the server is not required to
   support all of them.  Attributes are deemed mandatory if the data is
   both needed by a large number of clients and is not otherwise
   reasonably computable by the client when support is not provided on
   the server.

   Note that the hidden directory returned by OPENATTR is a convenience
   for protocol processing.  The client should not make any assumptions
   about the server's implementation of named attributes and whether the
   underlying filesystem at the server has a named attribute directory
   or not.  Therefore, operations such as SETATTR and GETATTR on the
   named attribute directory are undefined.

3.1.  Mandatory Attributes

   These MUST be supported by every NFS version 4 client and server in
   order to ensure a minimum level of interoperability.  The server must
   store and return these attributes and the client must be able to
   function with an attribute set limited to these attributes.  With
   just the mandatory attributes some client functionality may be
   impaired or limited in some ways.  A client may ask for any of these
   attributes to be returned by setting a bit in the GETATTR request and
   the server must return their value.

3.2.  Recommended Attributes

   These attributes are understood well enough to warrant support in the
   NFS version 4 protocol.  However, they may not be supported on all
   clients and servers.  A client may ask for any of these attributes to
   be returned by setting a bit in the GETATTR request but must handle
   the case where the server does not return them.  A client may ask for
   the set of attributes the server supports and should not request
   attributes the server does not support.  A server should be tolerant
   of requests for unsupported attributes and simply not return them
   rather than considering the request an error.  It is expected that
   servers will support all attributes they comfortably can and only
   fail to support attributes which are difficult to support in their
   operating environments.  A server should provide attributes whenever
   they don't have to "tell lies" to the client.  For example, a file
   modification time should be either an accurate time or should not be
   supported by the server.  This will not always be comfortable to
   clients but the client is better positioned decide whether and how to
   fabricate or construct an attribute or whether to do without the
   attribute.

3.3.  Named Attributes

   These attributes are not supported by direct encoding in the NFS
   Version 4 protocol but are accessed by string names rather than
   numbers and correspond to an uninterpreted stream of bytes which are
   stored with the filesystem object.  The name space for these
   attributes may be accessed by using the OPENATTR operation.  The
   OPENATTR operation returns a filehandle for a virtual "attribute
   directory" and further perusal of the name space may be done using
   READDIR and LOOKUP operations on this filehandle.  Named attributes
   may then be examined or changed by normal READ and WRITE and CREATE
   operations on the filehandles returned from READDIR and LOOKUP.
   Named attributes may have attributes.

   It is recommended that servers support arbitrary named attributes.  A
   client should not depend on the ability to store any named attributes
   in the server's filesystem.  If a server does support named
   attributes, a client which is also able to handle them should be able
   to copy a file's data and meta-data with complete transparency from
   one location to another; this would imply that names allowed for
   regular directory entries are valid for named attribute names as
   well.

   Names of attributes will not be controlled by this document or other
   IETF standards track documents.  See the section "IANA
   Considerations" for further discussion.

3.4.  Classification of Attributes

   Each of the Mandatory and Recommended attributes can be classified in
   one of three categories: per server, per filesystem, or per
   filesystem object.  Note that it is possible that some per filesystem
   attributes may vary within the filesystem.  See the "homogeneous"
   attribute for its definition.  Note that the attributes
   time_access_set and time_modify_set are not listed in this section
   because they are write-only attributes corresponding to time_access
   and time_modify, and are used in a special instance of SETATTR.

   o  The per server attribute is:

         lease_time

   o  The per filesystem attributes are:

         supp_attr, fh_expire_type, link_support, symlink_support,
         unique_handles, aclsupport, cansettime, case_insensitive,
         case_preserving, chown_restricted, files_avail, files_free,
         files_total, fs_locations, homogeneous, maxfilesize, maxname,
         maxread, maxwrite, no_trunc, space_avail, space_free,
         space_total, time_delta, fs_layouttype, send_impl_id,
         recv_impl_id

   o  The per filesystem object attributes are:

         type, change, size, named_attr, fsid, rdattr_error, filehandle,
         ACL, archive, fileid, hidden, maxlink, mimetype, mode,
         numlinks, owner, owner_group, rawdev, space_used, system,
         time_access, time_backup, time_create, time_metadata,
         time_modify, mounted_on_fileid, layouttype, layouthint,
         layout_blksize, layout_alignment

   For quota_avail_hard, quota_avail_soft, and quota_used see their
   definitions below for the appropriate classification.

3.5.  Mandatory Attributes - Definitions

   +-----------------+----+------------+--------+----------------------+
   | name            | #  | Data Type  | Access | Description          |
   +-----------------+----+------------+--------+----------------------+
   | supp_attr       | 0  | bitmap     | READ   | The bit vector which |
   |                 |    |            |        | would retrieve all   |
   |                 |    |            |        | mandatory and        |
   |                 |    |            |        | recommended          |
   |                 |    |            |        | attributes that are  |
   |                 |    |            |        | supported for this   |
   |                 |    |            |        | object. The scope of |
   |                 |    |            |        | this attribute       |
   |                 |    |            |        | applies to all       |
   |                 |    |            |        | objects with a       |
   |                 |    |            |        | matching fsid.       |
   | type            | 1  | nfs4_ftype | READ   | The type of the      |
   |                 |    |            |        | object (file,        |
   |                 |    |            |        | directory, symlink,  |
   |                 |    |            |        | etc.)                |
   | fh_expire_type  | 2  | uint32     | READ   | Server uses this to  |
   |                 |    |            |        | specify filehandle   |
   |                 |    |            |        | expiration behavior  |
   |                 |    |            |        | to the client. See   |
   |                 |    |            |        | the section          |
   |                 |    |            |        | "Filehandles" for    |
   |                 |    |            |        | additional           |
   |                 |    |            |        | description.         |
   | change          | 3  | uint64     | READ   | A value created by   |
   |                 |    |            |        | the server that the  |
   |                 |    |            |        | client can use to    |
   |                 |    |            |        | determine if file    |
   |                 |    |            |        | data, directory      |
   |                 |    |            |        | contents or          |
   |                 |    |            |        | attributes of the    |
   |                 |    |            |        | object have been     |
   |                 |    |            |        | modified. The server |
   |                 |    |            |        | may return the       |
   |                 |    |            |        | object's             |
   |                 |    |            |        | time_metadata        |
   |                 |    |            |        | attribute for this   |
   |                 |    |            |        | attribute's value    |
   |                 |    |            |        | but only if the      |
   |                 |    |            |        | filesystem object    |
   |                 |    |            |        | can not be updated   |
   |                 |    |            |        | more frequently than |
   |                 |    |            |        | the resolution of    |
   |                 |    |            |        | time_metadata.       |
   | size            | 4  | uint64     | R/W    | The size of the      |
   |                 |    |            |        | object in bytes.     |
   | link_support    | 5  | bool       | READ   | True, if the         |
   |                 |    |            |        | object's filesystem  |
   |                 |    |            |        | supports hard links. |
   | symlink_support | 6  | bool       | READ   | True, if the         |
   |                 |    |            |        | object's filesystem  |
   |                 |    |            |        | supports symbolic    |
   |                 |    |            |        | links.               |
   | named_attr      | 7  | bool       | READ   | True, if this object |
   |                 |    |            |        | has named            |
   |                 |    |            |        | attributes. In other |
   |                 |    |            |        | words, object has a  |
   |                 |    |            |        | non-empty named      |
   |                 |    |            |        | attribute directory. |
   | fsid            | 8  | fsid4      | READ   | Unique filesystem    |
   |                 |    |            |        | identifier for the   |
   |                 |    |            |        | filesystem holding   |
   |                 |    |            |        | this object. fsid    |
   |                 |    |            |        | contains major and   |
   |                 |    |            |        | minor components     |
   |                 |    |            |        | each of which are    |
   |                 |    |            |        | uint64.              |
   | unique_handles  | 9  | bool       | READ   | True, if two         |
   |                 |    |            |        | distinct filehandles |
   |                 |    |            |        | guaranteed to refer  |
   |                 |    |            |        | to two different     |
   |                 |    |            |        | filesystem objects.  |
   | lease_time      | 10 | nfs_lease4 | READ   | Duration of leases   |
   |                 |    |            |        | at server in         |
   |                 |    |            |        | seconds.             |
   | rdattr_error    | 11 | enum       | READ   | Error returned from  |
   |                 |    |            |        | getattr during       |
   |                 |    |            |        | readdir.             |
   | filehandle      | 19 | nfs_fh4    | READ   | The filehandle of    |
   |                 |    |            |        | this object          |
   |                 |    |            |        | (primarily for       |
   |                 |    |            |        | readdir requests).   |
   +-----------------+----+------------+--------+----------------------+

3.6.  Recommended Attributes - Definitions

   +--------------------+-----+--------------+--------+----------------+
   | name               | #   | Data Type    | Access | Description    |
   +--------------------+-----+--------------+--------+----------------+
   | ACL                | 12  | nfsace4<>    | R/W    | The access     |
   |                    |     |              |        | control list   |
   |                    |     |              |        | for the        |
   |                    |     |              |        | object.        |
   | aclsupport         | 13  | uint32       | READ   | Indicates what |
   |                    |     |              |        | types of ACLs  |
   |                    |     |              |        | are supported  |
   |                    |     |              |        | on the current |
   |                    |     |              |        | filesystem.    |
   | archive            | 14  | bool         | R/W    | True, if this  |
   |                    |     |              |        | file has been  |
   |                    |     |              |        | archived since |
   |                    |     |              |        | the time of    |
   |                    |     |              |        | last           |
   |                    |     |              |        | modification   |
   |                    |     |              |        | (deprecated in |
   |                    |     |              |        | favor of       |
   |                    |     |              |        | time_backup).  |
   | cansettime         | 15  | bool         | READ   | True, if the   |
   |                    |     |              |        | server able to |
   |                    |     |              |        | change the     |
   |                    |     |              |        | times for a    |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | object as      |
   |                    |     |              |        | specified in a |
   |                    |     |              |        | SETATTR        |
   |                    |     |              |        | operation.     |
   | case_insensitive   | 16  | bool         | READ   | True, if       |
   |                    |     |              |        | filename       |
   |                    |     |              |        | comparisons on |
   |                    |     |              |        | this           |
   |                    |     |              |        | filesystem are |
   |                    |     |              |        | case           |
   |                    |     |              |        | insensitive.   |
   | case_preserving    | 17  | bool         | READ   | True, if       |
   |                    |     |              |        | filename case  |
   |                    |     |              |        | on this        |
   |                    |     |              |        | filesystem are |
   |                    |     |              |        | preserved.     |
   | chown_restricted   | 18  | bool         | READ   | If TRUE, the   |
   |                    |     |              |        | server will    |
   |                    |     |              |        | reject any     |
   |                    |     |              |        | request to     |
   |                    |     |              |        | change either  |
   |                    |     |              |        | the owner or   |
   |                    |     |              |        | the group      |
   |                    |     |              |        | associated     |
   |                    |     |              |        | with a file if |
   |                    |     |              |        | the caller is  |
   |                    |     |              |        | not a          |
   |                    |     |              |        | privileged     |
   |                    |     |              |        | user (for      |
   |                    |     |              |        | example,       |
   |                    |     |              |        | "root" in UNIX |
   |                    |     |              |        | operating      |
   |                    |     |              |        | environments   |
   |                    |     |              |        | or in Windows  |
   |                    |     |              |        | 2000 the "Take |
   |                    |     |              |        | Ownership"     |
   |                    |     |              |        | privilege).    |
   | fileid             | 20  | uint64       | READ   | A number       |
   |                    |     |              |        | uniquely       |
   |                    |     |              |        | identifying    |
   |                    |     |              |        | the file       |
   |                    |     |              |        | within the     |
   |                    |     |              |        | filesystem.    |
   | files_avail        | 21  | uint64       | READ   | File slots     |
   |                    |     |              |        | available to   |
   |                    |     |              |        | this user on   |
   |                    |     |              |        | the filesystem |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object -  |
   |                    |     |              |        | this should be |
   |                    |     |              |        | the smallest   |
   |                    |     |              |        | relevant       |
   |                    |     |              |        | limit.         |
   | files_free         | 22  | uint64       | READ   | Free file      |
   |                    |     |              |        | slots on the   |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object -  |
   |                    |     |              |        | this should be |
   |                    |     |              |        | the smallest   |
   |                    |     |              |        | relevant       |
   |                    |     |              |        | limit.         |
   | files_total        | 23  | uint64       | READ   | Total file     |
   |                    |     |              |        | slots on the   |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object.   |
   | fs_locations       | 24  | fs_locations | READ   | Locations      |
   |                    |     |              |        | where this     |
   |                    |     |              |        | filesystem may |
   |                    |     |              |        | be found. If   |
   |                    |     |              |        | the server     |
   |                    |     |              |        | returns        |
   |                    |     |              |        | NFS4ERR_MOVED  |
   |                    |     |              |        | as an error,   |
   |                    |     |              |        | this attribute |
   |                    |     |              |        | MUST be        |
   |                    |     |              |        | supported.     |
   | hidden             | 25  | bool         | R/W    | True, if the   |
   |                    |     |              |        | file is        |
   |                    |     |              |        | considered     |
   |                    |     |              |        | hidden with    |
   |                    |     |              |        | respect to the |
   |                    |     |              |        | Windows API?   |
   | homogeneous        | 26  | bool         | READ   | True, if this  |
   |                    |     |              |        | object's       |
   |                    |     |              |        | filesystem is  |
   |                    |     |              |        | homogeneous,   |
   |                    |     |              |        | i.e. are per   |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | attributes the |
   |                    |     |              |        | same for all   |
   |                    |     |              |        | filesystem's   |
   |                    |     |              |        | objects.       |
   | maxfilesize        | 27  | uint64       | READ   | Maximum        |
   |                    |     |              |        | supported file |
   |                    |     |              |        | size for the   |
   |                    |     |              |        | filesystem of  |
   |                    |     |              |        | this object.   |
   | maxlink            | 28  | uint32       | READ   | Maximum number |
   |                    |     |              |        | of links for   |
   |                    |     |              |        | this object.   |
   | maxname            | 29  | uint32       | READ   | Maximum        |
   |                    |     |              |        | filename size  |
   |                    |     |              |        | supported for  |
   |                    |     |              |        | this object.   |
   | maxread            | 30  | uint64       | READ   | Maximum read   |
   |                    |     |              |        | size supported |
   |                    |     |              |        | for this       |
   |                    |     |              |        | object.        |
   | maxwrite           | 31  | uint64       | READ   | Maximum write  |
   |                    |     |              |        | size supported |
   |                    |     |              |        | for this       |
   |                    |     |              |        | object. This   |
   |                    |     |              |        | attribute      |
   |                    |     |              |        | SHOULD be      |
   |                    |     |              |        | supported if   |
   |                    |     |              |        | the file is    |
   |                    |     |              |        | writable. Lack |
   |                    |     |              |        | of this        |
   |                    |     |              |        | attribute can  |
   |                    |     |              |        | lead to the    |
   |                    |     |              |        | client either  |
   |                    |     |              |        | wasting        |
   |                    |     |              |        | bandwidth or   |
   |                    |     |              |        | not receiving  |
   |                    |     |              |        | the best       |
   |                    |     |              |        | performance.   |
   | mimetype           | 32  | utf8<>       | R/W    | MIME body      |
   |                    |     |              |        | type/subtype   |
   |                    |     |              |        | of this        |
   |                    |     |              |        | object.        |
   | mode               | 33  | mode4        | R/W    | UNIX-style     |
   |                    |     |              |        | mode and       |
   |                    |     |              |        | permission     |
   |                    |     |              |        | bits for this  |
   |                    |     |              |        | object.        |
   | no_trunc           | 34  | bool         | READ   | True, if a     |
   |                    |     |              |        | name longer    |
   |                    |     |              |        | than name_max  |
   |                    |     |              |        | is used, an    |
   |                    |     |              |        | error be       |
   |                    |     |              |        | returned and   |
   |                    |     |              |        | name is not    |
   |                    |     |              |        | truncated.     |
   | numlinks           | 35  | uint32       | READ   | Number of hard |
   |                    |     |              |        | links to this  |
   |                    |     |              |        | object.        |
   | owner              | 36  | utf8<>       | R/W    | The string     |
   |                    |     |              |        | name of the    |
   |                    |     |              |        | owner of this  |
   |                    |     |              |        | object.        |
   | owner_group        | 37  | utf8<>       | R/W    | The string     |
   |                    |     |              |        | name of the    |
   |                    |     |              |        | group          |
   |                    |     |              |        | ownership of   |
   |                    |     |              |        | this object.   |
   | quota_avail_hard   | 38  | uint64       | READ   | For definition |
   |                    |     |              |        | see "Quota     |
   |                    |     |              |        | Attributes"    |
   |                    |     |              |        | section below. |
   | quota_avail_soft   | 39  | uint64       | READ   | For definition |
   |                    |     |              |        | see "Quota     |
   |                    |     |              |        | Attributes"    |
   |                    |     |              |        | section below. |
   | quota_used         | 40  | uint64       | READ   | For definition |
   |                    |     |              |        | see "Quota     |
   |                    |     |              |        | Attributes"    |
   |                    |     |              |        | section below. |
   | rawdev             | 41  | specdata4    | READ   | Raw device     |
   |                    |     |              |        | identifier.    |
   |                    |     |              |        | UNIX device    |
   |                    |     |              |        | major/minor    |
   |                    |     |              |        | node           |
   |                    |     |              |        | information.   |
   |                    |     |              |        | If the value   |
   |                    |     |              |        | of type is not |
   |                    |     |              |        | NF4BLK or      |
   |                    |     |              |        | NF4CHR, the    |
   |                    |     |              |        | value return   |
   |                    |     |              |        | SHOULD NOT be  |
   |                    |     |              |        | considered     |
   |                    |     |              |        | useful.        |
   | space_avail        | 42  | uint64       | READ   | Disk space in  |
   |                    |     |              |        | bytes          |
   |                    |     |              |        | available to   |
   |                    |     |              |        | this user on   |
   |                    |     |              |        | the filesystem |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object -  |
   |                    |     |              |        | this should be |
   |                    |     |              |        | the smallest   |
   |                    |     |              |        | relevant       |
   |                    |     |              |        | limit.         |
   | space_free         | 43  | uint64       | READ   | Free disk      |
   |                    |     |              |        | space in bytes |
   |                    |     |              |        | on the         |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object -  |
   |                    |     |              |        | this should be |
   |                    |     |              |        | the smallest   |
   |                    |     |              |        | relevant       |
   |                    |     |              |        | limit.         |
   | space_total        | 44  | uint64       | READ   | Total disk     |
   |                    |     |              |        | space in bytes |
   |                    |     |              |        | on the         |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | containing     |
   |                    |     |              |        | this object.   |
   | space_used         | 45  | uint64       | READ   | Number of      |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | bytes          |
   |                    |     |              |        | allocated to   |
   |                    |     |              |        | this object.   |
   | system             | 46  | bool         | R/W    | True, if this  |
   |                    |     |              |        | file is a      |
   |                    |     |              |        | "system" file  |
   |                    |     |              |        | with respect   |
   |                    |     |              |        | to the Windows |
   |                    |     |              |        | API?           |
   | time_access        | 47  | nfstime4     | READ   | The time of    |
   |                    |     |              |        | last access to |
   |                    |     |              |        | the object by  |
   |                    |     |              |        | a read that    |
   |                    |     |              |        | was satisfied  |
   |                    |     |              |        | by the server. |
   | time_access_set    | 48  | settime4     | WRITE  | Set the time   |
   |                    |     |              |        | of last access |
   |                    |     |              |        | to the object. |
   |                    |     |              |        | SETATTR use    |
   |                    |     |              |        | only.          |
   | time_backup        | 49  | nfstime4     | R/W    | The time of    |
   |                    |     |              |        | last backup of |
   |                    |     |              |        | the object.    |
   | time_create        | 50  | nfstime4     | R/W    | The time of    |
   |                    |     |              |        | creation of    |
   |                    |     |              |        | the object.    |
   |                    |     |              |        | This attribute |
   |                    |     |              |        | does not have  |
   |                    |     |              |        | any relation   |
   |                    |     |              |        | to the         |
   |                    |     |              |        | traditional    |
   |                    |     |              |        | UNIX file      |
   |                    |     |              |        | attribute      |
   |                    |     |              |        | "ctime" or     |
   |                    |     |              |        | "change time". |
   | time_delta         | 51  | nfstime4     | READ   | Smallest       |
   |                    |     |              |        | useful server  |
   |                    |     |              |        | time           |
   |                    |     |              |        | granularity.   |
   | time_metadata      | 52  | nfstime4     | READ   | The time of    |
   |                    |     |              |        | last meta-data |
   |                    |     |              |        | modification   |
   |                    |     |              |        | of the object. |
   | time_modify        | 53  | nfstime4     | READ   | The time of    |
   |                    |     |              |        | last           |
   |                    |     |              |        | modification   |
   |                    |     |              |        | to the object. |
   | time_modify_set    | 54  | settime4     | WRITE  | Set the time   |
   |                    |     |              |        | of last        |
   |                    |     |              |        | modification   |
   |                    |     |              |        | to the object. |
   |                    |     |              |        | SETATTR use    |
   |                    |     |              |        | only.          |
   | mounted_on_fileid  | 55  | uint64       | READ   | Like fileid,   |
   |                    |     |              |        | but if the     |
   |                    |     |              |        | target         |
   |                    |     |              |        | filehandle is  |
   |                    |     |              |        | the root of a  |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | return the     |
   |                    |     |              |        | fileid of the  |
   |                    |     |              |        | underlying     |
   |                    |     |              |        | directory.     |
   | send_impl_id       | TBD | impl_ident4  | WRITE  | Client         |
   |                    |     |              |        | provides       |
   |                    |     |              |        | server with    |
   |                    |     |              |        | implementation |
   |                    |     |              |        | identity via   |
   |                    |     |              |        | SETATTR.       |
   | recv_impl_id       | TBD | nfs_impl_id4 | READ   | Client obtains |
   |                    |     |              |        | server         |
   |                    |     |              |        | implementation |
   |                    |     |              |        | via GETATTR.   |
   | dir_notif_delay    | TBD | R/W          | READ   | notification   |
   |                    |     |              |        | delays on      |
   |                    |     |              |        | directory      |
   |                    |     |              |        | attributes     |
   | dirent_notif_delay | TBD | R/W          | READ   | notification   |
   |                    |     |              |        | delays on      |
   |                    |     |              |        | child          |
   |                    |     |              |        | attributes     |
   | fs_layouttype      | TBD | layouttype4  | READ   | Layout types   |
   |                    |     |              |        | available for  |
   |                    |     |              |        | the            |
   |                    |     |              |        | filesystem.    |
   | layouttype         | TBD | layouttype4  | READ   | Layout types   |
   |                    |     |              |        | available for  |
   |                    |     |              |        | the file.      |
   | layouthint         | TBD | layouthint4  | WRITE  | Client         |
   |                    |     |              |        | specified hint |
   |                    |     |              |        | for file       |
   |                    |     |              |        | layout.        |
   | layout_blksize     | TBD | uint32_t     | READ   | Preferred      |
   |                    |     |              |        | block size for |
   |                    |     |              |        | layout related |
   |                    |     |              |        | I/O.           |
   | layout_alignment   | TBD | uint32_t     | READ   | Preferred      |
   |                    |     |              |        | alignment for  |
   |                    |     |              |        | layout related |
   |                    |     |              |        | I/O.           |
   | fs_absent          | TBD | bool         | READ   | Is current     |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | present or     |
   |                    |     |              |        | absent.        |
   | fs_locations_info  | TBD |              | READ   | Full function  |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | location.      |
   | fs_status          | TBD | fs4_status   | READ   | Generic        |
   |                    |     |              |        | filesystem     |
   |                    |     |              |        | type           |
   |                    |     |              |        | information.   |
   |                    | TBD |              | READ   | desc           |
   |                    | TBD |              | READ   | desc           |
   +--------------------+-----+--------------+--------+----------------+

3.7.  Time Access

   As defined above, the time_access attribute represents the time of
   last access to the object by a read that was satisfied by the server.
   The notion of what is an "access" depends on server's operating
   environment and/or the server's filesystem semantics.  For example,
   for servers obeying POSIX semantics, time_access would be updated
   only by the READLINK, READ, and READDIR operations and not any of the
   operations that modify the content of the object.  Of course, setting
   the corresponding time_access_set attribute is another way to modify
   the time_access attribute.

   Whenever the file object resides on a writable filesystem, the server
   should make best efforts to record time_access into stable storage.
   However, to mitigate the performance effects of doing so, and most
   especially whenever the server is satisfying the read of the object's
   content from its cache, the server MAY cache access time updates and
   lazily write them to stable storage.  It is also acceptable to give
   administrators of the server the option to disable time_access
   updates.

3.8.  Interpreting owner and owner_group

   The recommended attributes "owner" and "owner_group" (and also users
   and groups within the "acl" attribute) are represented in terms of a
   UTF-8 string.  To avoid a representation that is tied to a particular
   underlying implementation at the client or server, the use of the
   UTF-8 string has been chosen.  Note that section 6.1 of [RFC2624]
   provides additional rationale.  It is expected that the client and
   server will have their own local representation of owner and
   owner_group that is used for local storage or presentation to the end
   user.  Therefore, it is expected that when these attributes are
   transferred between the client and server that the local
   representation is translated to a syntax of the form "user@
   dns_domain".  This will allow for a client and server that do not use
   the same local representation the ability to translate to a common
   syntax that can be interpreted by both.

   Similarly, security principals may be represented in different ways
   by different security mechanisms.  Servers normally translate these
   representations into a common format, generally that used by local
   storage, to serve as a means of identifying the users corresponding
   to these security principals.  When these local identifiers are
   translated to the form of the owner attribute, associated with files
   created by such principals they identify, in a common format, the
   users associated with each corresponding set of security principals.

   The translation used to interpret owner and group strings is not
   specified as part of the protocol.  This allows various solutions to
   be employed.  For example, a local translation table may be consulted
   that maps between a numeric id to the user@dns_domain syntax.  A name
   service may also be used to accomplish the translation.  A server may
   provide a more general service, not limited by any particular
   translation (which would only translate a limited set of possible
   strings) by storing the owner and owner_group attributes in local
   storage without any translation or it may augment a translation
   method by storing the entire string for attributes for which no
   translation is available while using the local representation for
   those cases in which a translation is available.

   Servers that do not provide support for all possible values of the
   owner and owner_group attributes, should return an error
   (NFS4ERR_BADOWNER) when a string is presented that has no
   translation, as the value to be set for a SETATTR of the owner,
   owner_group, or acl attributes.  When a server does accept an owner
   or owner_group value as valid on a SETATTR (and similarly for the
   owner and group strings in an acl), it is promising to return that
   same string when a corresponding GETATTR is done.  Configuration
   changes and ill-constructed name translations (those that contain
   aliasing) may make that promise impossible to honor.  Servers should
   make appropriate efforts to avoid a situation in which these
   attributes have their values changed when no real change to ownership
   has occurred.

   The "dns_domain" portion of the owner string is meant to be a DNS
   domain name.  For example, user@ietf.org.  Servers should accept as
   valid a set of users for at least one domain.  A server may treat
   other domains as having no valid translations.  A more general
   service is provided when a server is capable of accepting users for
   multiple domains, or for all domains, subject to security
   constraints.

   In the case where there is no translation available to the client or
   server, the attribute value must be constructed without the "@".
   Therefore, the absence of the @ from the owner or owner_group
   attribute signifies that no translation was available at the sender
   and that the receiver of the attribute should not use that string as
   a basis for translation into its own internal format.  Even though
   the attribute value can not be translated, it may still be useful.
   In the case of a client, the attribute string may be used for local
   display of ownership.

   To provide a greater degree of compatibility with previous versions
   of NFS (i.e. v2 and v3), which identified users and groups by 32-bit
   unsigned uid's and gid's, owner and group strings that consist of
   decimal numeric values with no leading zeros can be given a special
   interpretation by clients and servers which choose to provide such
   support.  The receiver may treat such a user or group string as
   representing the same user as would be represented by a v2/v3 uid or
   gid having the corresponding numeric value.  A server is not
   obligated to accept such a string, but may return an NFS4ERR_BADOWNER
   instead.  To avoid this mechanism being used to subvert user and
   group translation, so that a client might pass all of the owners and
   groups in numeric form, a server SHOULD return an NFS4ERR_BADOWNER
   error when there is a valid translation for the user or owner
   designated in this way.  In that case, the client must use the
   appropriate name@domain string and not the special form for
   compatibility.

   The owner string "nobody" may be used to designate an anonymous user,
   which will be associated with a file created by a security principal
   that cannot be mapped through normal means to the owner attribute.

3.9.  Character Case Attributes

   With respect to the case_insensitive and case_preserving attributes,
   each UCS-4 character (which UTF-8 encodes) has a "long descriptive
   name" [RFC1345] which may or may not included the word "CAPITAL" or
   "SMALL".  The presence of SMALL or CAPITAL allows an NFS server to
   implement unambiguous and efficient table driven mappings for case
   insensitive comparisons, and non-case-preserving storage.  For
   general character handling and internationalization issues, see the
   section "Internationalization".

3.10.  Quota Attributes

   For the attributes related to filesystem quotas, the following
   definitions apply:

   quota_avail_soft  The value in bytes which represents the amount of
      additional disk space that can be allocated to this file or
      directory before the user may reasonably be warned.  It is
      understood that this space may be consumed by allocations to other
      files or directories though there is a rule as to which other
      files or directories.

   quota_avail_hard  The value in bytes which represent the amount of
      additional disk space beyond the current allocation that can be
      allocated to this file or directory before further allocations
      will be refused.  It is understood that this space may be consumed
      by allocations to other files or directories.

   quota_used  The value in bytes which represent the amount of disc
      space used by this file or directory and possibly a number of
      other similar files or directories, where the set of "similar"
      meets at least the criterion that allocating space to any file or
      directory in the set will reduce the "quota_avail_hard" of every
      other file or directory in the set.

      Note that there may be a number of distinct but overlapping sets
      of files or directories for which a quota_used value is
      maintained.  E.g. "all files with a given owner", "all files with
      a given group owner". etc.

      The server is at liberty to choose any of those sets but should do
      so in a repeatable way.  The rule may be configured per-filesystem
      or may be "choose the set with the smallest quota".

3.11.  mounted_on_fileid

   UNIX-based operating environments connect a filesystem into the
   namespace by connecting (mounting) the filesystem onto the existing
   file object (the mount point, usually a directory) of an existing
   filesystem.  When the mount point's parent directory is read via an
   API like readdir(), the return results are directory entries, each
   with a component name and a fileid.  The fileid of the mount point's
   directory entry will be different from the fileid that the stat()
   system call returns.  The stat() system call is returning the fileid
   of the root of the mounted filesystem, whereas readdir() is returning
   the fileid stat() would have returned before any filesystems were
   mounted on the mount point.

   Unlike NFS version 3, NFS version 4 allows a client's LOOKUP request
   to cross other filesystems.  The client detects the filesystem
   crossing whenever the filehandle argument of LOOKUP has an fsid
   attribute different from that of the filehandle returned by LOOKUP.
   A UNIX-based client will consider this a "mount point crossing".
   UNIX has a legacy scheme for allowing a process to determine its
   current working directory.  This relies on readdir() of a mount
   point's parent and stat() of the mount point returning fileids as
   previously described.  The mounted_on_fileid attribute corresponds to
   the fileid that readdir() would have returned as described
   previously.

   While the NFS version 4 client could simply fabricate a fileid
   corresponding to what mounted_on_fileid provides (and if the server
   does not support mounted_on_fileid, the client has no choice), there
   is a risk that the client will generate a fileid that conflicts with
   one that is already assigned to another object in the filesystem.
   Instead, if the server can provide the mounted_on_fileid, the
   potential for client operational problems in this area is eliminated.

   If the server detects that there is no mounted point at the target
   file object, then the value for mounted_on_fileid that it returns is
   the same as that of the fileid attribute.

   The mounted_on_fileid attribute is RECOMMENDED, so the server SHOULD
   provide it if possible, and for a UNIX-based server, this is
   straightforward.  Usually, mounted_on_fileid will be requested during
   a READDIR operation, in which case it is trivial (at least for UNIX-
   based servers) to return mounted_on_fileid since it is equal to the
   fileid of a directory entry returned by readdir().  If
   mounted_on_fileid is requested in a GETATTR operation, the server
   should obey an invariant that has it returning a value that is equal
   to the file object's entry in the object's parent directory, i.e.
   what readdir() would have returned.  Some operating environments
   allow a series of two or more filesystems to be mounted onto a single
   mount point.  In this case, for the server to obey the aforementioned
   invariant, it will need to find the base mount point, and not the
   intermediate mount points.

3.12.  send_impl_id and recv_impl_id

   These recommended attributes are used to identify the client and
   server.  In the case of the send_impl_id attribute, the client sends
   its clientid4 value along with the nfs_impl_id4.  The use of the
   clientid4 value allows the server to identify and match specific
   client interaction.  In the case of the recv_impl_id attribute, the
   client receives the nfs_impl_id4 value.

   Access to this identification information can be most useful at both
   client and server.  Being able to identify specific implementations
   can help in planning by administrators or implementers.  For example,
   diagnostic software may extract this information in an attempt to
   identify implementation problems, performance workload behaviors or
   general usage statistics.  Since the intent of having access to this
   information is for planning or general diagnosis only, the client and
   server MUST NOT interpret this implementation identity information in
   a way that affects interoperational behavior of the implementation.
   The reason is the if clients and servers did such a thing, they might
   use fewer capabilities of the protocol than the peer can support, or
   the client and server might refuse to interoperate.

   Because it is likely some implementations will violate the protocol
   specification and interpret the identity information, implementations
   MUST allow the users of the NFSv4 client and server to set the
   contents of the sent nfs_impl_id structure to any value.

   Even though these attributes are recommended, if the server supports
   one of them it MUST support the other.

3.13.  fs_layouttype

   This attribute applies to a file system and indicates what layout
   types are supported by the file system.  We expect this attribute to
   be queried when a client encounters a new fsid.  This attribute is
   used by the client to determine if it has applicable layout drivers.

3.14.  layouttype

   This attribute indicates the particular layout type(s) used for a
   file.  This is for informational purposes only.  The client needs to
   use the LAYOUTGET operation in order to get enough information (e.g.,
   specific device information) in order to perform I/O.

3.15.  layouthint

   This attribute may be set on newly created files to influence the
   metadata server's choice for the file's layout.  It is suggested that
   this attribute is set as one of the initial attributes within the
   OPEN call.  The metadata server may ignore this attribute.  This
   attribute is a sub-set of the layout structure returned by LAYOUTGET.
   For example, instead of specifying particular devices, this would be
   used to suggest the stripe width of a file.  It is up to the server
   implementation to determine which fields within the layout it uses.

   [[Comment.3: it has been suggested that the HINT is a well defined
   type other than pnfs_layoutdata4, similar to pnfs_layoutupdate4.]]

3.16.  Access Control Lists

   The NFS version 4 ACL attribute is an array of access control entries
   (ACE).  Although, the client can read and write the ACL attribute,
   the NFSv4 model is the server does all access control based on the
   server's interpretation of the ACL.  If at any point the client wants
   to check access without issuing an operation that modifies or reads
   data or metadata, the client can use the OPEN and ACCESS operations
   to do so.  There are various access control entry types, as defined
   in Section 3.16.1.  The server is able to communicate which ACE types
   are supported by returning the appropriate value within the
   aclsupport attribute.  Each ACE covers one or more operations on a
   file or directory as described in Section 3.16.2.  It may also
   contain one or more flags that modify the semantics of the ACE as
   defined in Section 3.16.3.

   The NFS ACE attribute is defined as follows:

            typedef uint32_t        acetype4;
            typedef uint32_t        aceflag4;
            typedef uint32_t        acemask4;

            struct nfsace4 {
                    acetype4        type;
                    aceflag4        flag;
                    acemask4        access_mask;
                    utf8str_mixed   who;
            };

   To determine if a request succeeds, each nfsace4 entry is processed
   in order by the server.  Only ACEs which have a "who" that matches
   the requester are considered.  Each ACE is processed until all of the
   bits of the requester's access have been ALLOWED.  Once a bit (see
   below) has been ALLOWED by an ACCESS_ALLOWED_ACE, it is no longer
   considered in the processing of later ACEs.  If an ACCESS_DENIED_ACE
   is encountered where the requester's access still has unALLOWED bits
   in common with the "access_mask" of the ACE, the request is denied.
   However, unlike the ALLOWED and DENIED ACE types, the ALARM and AUDIT
   ACE types do not affect a requester's access, and instead are for
   triggering events as a result of a requester's access attempt.

   Therefore, all AUDIT and ALARM ACEs are processed until end of the
   ACL.  When the ACL is fully processed, if there are bits in
   requester's mask that have not been considered whether the server
   allows or denies, the access is denied.  Even though a request is
   denied, servers may choose to have other restrictions or
   implementation defined security policies in place.  In those cases,
   access may be decided outside of what is in the ACL.  Examples of
   such security policies or restrictions are:

   o  The owner of the file will always be able granted ACE4_WRITE_ACL
      and ACE4_READ_ACL permissions.  This would prevent the user from
      getting into the situation where they can't ever modify the ACL.

   o  The ACL may say that an entity is to be granted ACE4_WRITE_DATA
      permission, but the file system is mounted read only, therefore
      write access is denied.

   As mentioned before, this is one of the reasons that client
   implementations are not recommended to do their own access checking.

   The NFS version 4 ACL model is quite rich.  Some server platforms may
   provide access control functionality that goes beyond the UNIX-style
   mode attribute, but which is not as rich as the NFS ACL model.  So
   that users can take advantage of this more limited functionality, the
   server may indicate that it supports ACLs as long as it follows the
   guidelines for mapping between its ACL model and the NFS version 4
   ACL model.

   The situation is complicated by the fact that a server may have
   multiple modules that enforce ACLs.  For example, the enforcement for
   NFS version 4 access may be different from the enforcement for local
   access, and both may be different from the enforcement for access
   through other protocols such as SMB.  So it may be useful for a
   server to accept an ACL even if not all of its modules are able to
   support it.

   The guiding principle in all cases is that the server must not accept
   ACLs that appear to make the file more secure than it really is.

3.16.1.  ACE type

      Type         Description
      _____________________________________________________
      ALLOW        Explicitly grants the access defined in
                   acemask4 to the file or directory.

      DENY         Explicitly denies the access defined in
                   acemask4 to the file or directory.

      AUDIT        LOG (system dependent) any access
                   attempt to a file or directory which
                   uses any of the access methods specified
                   in acemask4.

      ALARM        Generate a system ALARM (system
                   dependent) when any access attempt is
                   made to a file or directory for the
                   access methods specified in acemask4.

   A server need not support all of the above ACE types.  The bitmask
   constants used to represent the above definitions within the
   aclsupport attribute are as follows:

         const ACL4_SUPPORT_ALLOW_ACL    = 0x00000001;
         const ACL4_SUPPORT_DENY_ACL     = 0x00000002;
         const ACL4_SUPPORT_AUDIT_ACL    = 0x00000004;
         const ACL4_SUPPORT_ALARM_ACL    = 0x00000008;

   The semantics of the "type" field follow the descriptions provided
   above.

   The constants used for the type field (acetype4) are as follows:

         const ACE4_ACCESS_ALLOWED_ACE_TYPE      = 0x00000000;
         const ACE4_ACCESS_DENIED_ACE_TYPE       = 0x00000001;
         const ACE4_SYSTEM_AUDIT_ACE_TYPE        = 0x00000002;
         const ACE4_SYSTEM_ALARM_ACE_TYPE        = 0x00000003;

   Clients should not attempt to set an ACE unless the server claims
   support for that ACE type.  If the server receives a request to set
   an ACE that it cannot store, it MUST reject the request with
   NFS4ERR_ATTRNOTSUPP.  If the server receives a request to set an ACE
   that it can store but cannot enforce, the server SHOULD reject the
   request with NFS4ERR_ATTRNOTSUPP.

   Example: suppose a server can enforce NFS ACLs for NFS access but
   cannot enforce ACLs for local access.  If arbitrary processes can run
   on the server, then the server SHOULD NOT indicate ACL support.  On
   the other hand, if only trusted administrative programs run locally,
   then the server may indicate ACL support.

3.16.2.  ACE Access Mask

   The access_mask field contains values based on the following:

      ACE4_READ_DATA
         Operation(s) affected:
              READ
              OPEN
         Discussion:
              Permission to read the data of the file.

      ACE4_LIST_DIRECTORY
          Operation(s) affected:
              READDIR
          Discussion:
              Permission to list the contents of a directory.

      ACE4_WRITE_DATA
          Operation(s) affected:
              WRITE
              OPEN
          Discussion:
              Permission to modify a file's data anywhere in the file's
              offset range.  This includes the ability to write to any
              arbitrary offset and as a result to grow the file.

      ACE4_ADD_FILE
          Operation(s) affected:
              CREATE
              OPEN
          Discussion:
              Permission to add a new file in a directory.  The CREATE
              operation is affected when nfs_ftype4 is NF4LNK, NF4BLK,
              NF4CHR, NF4SOCK, or NF4FIFO. (NF4DIR is not listed because
              it is covered by ACE4_ADD_SUBDIRECTORY.) OPEN is affected
              when used to create a regular file.

      ACE4_APPEND_DATA
          Operation(s) affected:
              WRITE
              OPEN
          Discussion:
               The ability to modify a file's data, but only starting at
               EOF.  This allows for the notion of append-only files, by
               allowing ACE4_APPEND_DATA and denying ACE4_WRITE_DATA to
               the same user or group.  If a file has an ACL such as the
               one described above and a WRITE request is made for
               somewhere other than EOF, the server SHOULD return
               NFS4ERR_ACCESS.

      ACE4_ADD_SUBDIRECTORY
          Operation(s) affected:
              CREATE
          Discussion:
              Permission to create a subdirectory in a directory.  The
              CREATE operation is affected when nfs_ftype4 is NF4DIR.

      ACE4_READ_NAMED_ATTRS
          Operation(s) affected:
              OPENATTR
          Discussion:
              Permission to read the named attributes of a file or to
              lookup the named attributes directory.  OPENATTR is
              affected when it is not used to create a named attribute
              directory.  This is when 1.) createdir is TRUE, but a
              named attribute directory already exists, or 2.) createdir
              is FALSE.

      ACE4_WRITE_NAMED_ATTRS
          Operation(s) affected:
              OPENATTR
          Discussion:
              Permission to write the named attributes of a file or
              to create a named attribute directory.  OPENATTR is
              affected when it is used to create a named attribute
              directory.  This is when createdir is TRUE and no named
              attribute directory exists.  The ability to check whether
              or not a named attribute directory exists depends on the
              ability to look it up, therefore, users also need the
              ACE4_READ_NAMED_ATTRS permission in order to create a
              named attribute directory.

      ACE4_EXECUTE
          Operation(s) affected:
              LOOKUP
          Discussion:
              Permission to execute a file or traverse/search a
              directory.

      ACE4_DELETE_CHILD
          Operation(s) affected:

              REMOVE
          Discussion:
              Permission to delete a file or directory within a
              directory.  See section "ACE4_DELETE vs.
              ACE4_DELETE_CHILD" for information on how these two access
              mask bits interact.

      ACE4_READ_ATTRIBUTES
          Operation(s) affected:
              GETATTR of file system object attributes
          Discussion:
              The ability to read basic attributes (non-ACLs) of a file.
              On a UNIX system, basic attributes can be thought of as
              the stat level attributes.  Allowing this access mask bit
              would mean the entity can execute "ls -l" and stat.

      ACE4_WRITE_ATTRIBUTES
          Operation(s) affected:
              SETATTR of time_access_set, time_backup,
              time_create, time_modify_set
          Discussion:
              Permission to change the times associated with a file
              or directory to an arbitrary value.  A user having
              ACE4_WRITE_DATA permission, but lacking
              ACE4_WRITE_ATTRIBUTES must be allowed to implicitly set
              the times associated with a file.

      ACE4_DELETE
          Operation(s) affected:
              REMOVE
          Discussion:
              Permission to delete the file or directory.  See section
              "ACE4_DELETE vs. ACE4_DELETE_CHILD" for information on how
              these two access mask bits interact.

      ACE4_READ_ACL
          Operation(s) affected:
              GETATTR of acl
          Discussion:
              Permission to read the ACL.

      ACE4_WRITE_ACL
          Operation(s) affected:
              SETATTR of acl and mode
          Discussion:
              Permission to write the acl and mode attributes.

      ACE4_WRITE_OWNER
          Operation(s) affected:
              SETATTR of owner and owner_group
          Discussions:
              Permission to write the owner and owner_group attributes.
              On UNIX systems, this is the ability to execute chown or
              chgrp.

      ACE4_SYNCHRONIZE
          Operation(s) affected:
              NONE
          Discussion:
              Permission to access file locally at the server with
              synchronized reads and writes.

   The bitmask constants used for the access mask field are as follows:

      const ACE4_READ_DATA            = 0x00000001;
      const ACE4_LIST_DIRECTORY       = 0x00000001;
      const ACE4_WRITE_DATA           = 0x00000002;
      const ACE4_ADD_FILE             = 0x00000002;
      const ACE4_APPEND_DATA          = 0x00000004;
      const ACE4_ADD_SUBDIRECTORY     = 0x00000004;
      const ACE4_READ_NAMED_ATTRS     = 0x00000008;
      const ACE4_WRITE_NAMED_ATTRS    = 0x00000010;
      const ACE4_EXECUTE              = 0x00000020;
      const ACE4_DELETE_CHILD         = 0x00000040;
      const ACE4_READ_ATTRIBUTES      = 0x00000080;
      const ACE4_WRITE_ATTRIBUTES     = 0x00000100;
      const ACE4_DELETE               = 0x00010000;
      const ACE4_READ_ACL             = 0x00020000;
      const ACE4_WRITE_ACL            = 0x00040000;
      const ACE4_WRITE_OWNER          = 0x00080000;
      const ACE4_SYNCHRONIZE          = 0x00100000;

   Server implementations need not provide the granularity of control
   that is implied by this list of masks.  For example, POSIX-based
   systems might not distinguish APPEND_DATA (the ability to append to a
   file) from WRITE_DATA (the ability to modify existing contents); both
   masks would be tied to a single "write" permission.  When such a
   server returns attributes to the client, it would show both
   APPEND_DATA and WRITE_DATA if and only if the write permission is
   enabled.

   If a server receives a SETATTR request that it cannot accurately
   implement, it should error in the direction of more restricted
   access.  For example, suppose a server cannot distinguish overwriting
   data from appending new data, as described in the previous paragraph.
   If a client submits an ACE where APPEND_DATA is set but WRITE_DATA is
   not (or vice versa), the server should reject the request with
   NFS4ERR_ATTRNOTSUPP.  Nonetheless, if the ACE has type DENY, the
   server may silently turn on the other bit, so that both APPEND_DATA
   and WRITE_DATA are denied.

3.16.2.1.  ACE4_DELETE vs. ACE4_DELETE_CHILD

   There are two separate access mask bits that govern the ability to
   delete a file: ACE4_DELETE and ACE4_DELETE_CHILD.  ACE4_DELETE is
   intended to be specified by the ACL for the object to be deleted, and
   ACE4_DELETE_CHILD is intended to be specified by the ACL of the
   parent directory.

   In addition to ACE4_DELETE and ACE4_DELETE_CHILD, many systems also
   consider the "sticky bit" (MODE4_SVTX) and the appropriate "write"
   mode bit when determining whether to allow a file to be deleted.  The
   mode bit for write corresponds to ACE4_WRITE_DATA, which is the same
   physical bit as ACE4_ADD_FILE.  Therefore, ACE4_ADD_FILE can come
   into play when determining permission to delete.

   In the algorithm below, the strategy is that ACE4_DELETE and
   ACE4_DELETE_CHILD take precedence over the sticky bit, and the sticky
   bit takes precedence over the "write" mode bits (reflected in
   ACE4_ADD_FILE).

   Server implementations SHOULD grant or deny permission to delete
   based on the following algorithm.

          if ACE4_EXECUTE is denied by the parent directory ACL:
              deny delete
          else if ACE4_EXECUTE is unspecified by the parent
          directory ACL:
              deny delete
          else if ACE4_DELETE is allowed by the target object ACL:
              allow delete
          else if ACE4_DELETE_CHILD is allowed by the parent
          directory ACL:
              allow delete
          else if ACE4_DELETE_CHILD is denied by the
          parent directory ACL:
              deny delete
          else if ACE4_ADD_FILE is allowed by the parent directory ACL:
              if MODE4_SVTX is set for the parent directory:
                  if the principal owns the parent directory OR
                      the principal owns the target object OR
                      ACE4_WRITE_DATA is allowed by the target
                      object ACL:
                          allow delete
                      else:
                          deny delete
              else:
                  allow delete
          else:
              deny delete

3.16.3.  ACE flag

   The "flag" field contains values based on the following descriptions.

   ACE4_FILE_INHERIT_ACE
      Can be placed on a directory and indicates that this ACE should be
      added to each new non-directory file created.

   ACE4_DIRECTORY_INHERIT_ACE
      Can be placed on a directory and indicates that this ACE should be
      added to each new directory created.

   ACE4_INHERIT_ONLY_ACE
      Can be placed on a directory but does not apply to the directory,
      only to newly created files/directories as specified by the above
      two flags.

   ACE4_NO_PROPAGATE_INHERIT_ACE
      Can be placed on a directory.  Normally when a new directory is
      created and an ACE exists on the parent directory which is marked
      ACE4_DIRECTORY_INHERIT_ACE, two ACEs are placed on the new
      directory.  One for the directory itself and one which is an
      inheritable ACE for newly created directories.  This flag tells
      the server to not place an ACE on the newly created directory
      which is inheritable by subdirectories of the created directory.

   ACE4_SUCCESSFUL_ACCESS_ACE_FLAG

   ACE4_FAILED_ACCESS_ACE_FLAG
      The ACE4_SUCCESSFUL_ACCESS_ACE_FLAG (SUCCESS) and
      ACE4_FAILED_ACCESS_ACE_FLAG (FAILED) flag bits relate only to
      ACE4_SYSTEM_AUDIT_ACE_TYPE (AUDIT) and ACE4_SYSTEM_ALARM_ACE_TYPE
      (ALARM) ACE types.  If during the processing of the file's ACL,
      the server encounters an AUDIT or ALARM ACE that matches the
      principal attempting the OPEN, the server notes that fact, and the
      presence, if any, of the SUCCESS and FAILED flags encountered in
      the AUDIT or ALARM ACE.  Once the server completes the ACL
      processing, and the share reservation processing, and the OPEN
      call, it then notes if the OPEN succeeded or failed.  If the OPEN
      succeeded, and if the SUCCESS flag was set for a matching AUDIT or
      ALARM, then the appropriate AUDIT or ALARM event occurs.  If the
      OPEN failed, and if the FAILED flag was set for the matching AUDIT
      or ALARM, then the appropriate AUDIT or ALARM event occurs.
      Clearly either or both of the SUCCESS or FAILED can be set, but if
      neither is set, the AUDIT or ALARM ACE is not useful.

      The previously described processing applies to that of the ACCESS
      operation as well.  The difference being that "success" or
      "failure" does not mean whether ACCESS returns NFS4_OK or not.
      Success means whether ACCESS returns all requested and supported
      bits.  Failure means whether ACCESS failed to return a bit that
      was requested and supported.

   ACE4_IDENTIFIER_GROUP
      Indicates that the "who" refers to a GROUP as defined under UNIX
      or a GROUP ACCOUNT as defined under Windows.  Clients and servers
      may ignore the ACE4_IDENTIFIER_GROUP flag on ACEs with a who value
      equal to one of the special identifiers outlined in section "ACE
      who".

   The bitmask constants used for the flag field are as follows:

      const ACE4_FILE_INHERIT_ACE             = 0x00000001;
      const ACE4_DIRECTORY_INHERIT_ACE        = 0x00000002;
      const ACE4_NO_PROPAGATE_INHERIT_ACE     = 0x00000004;
      const ACE4_INHERIT_ONLY_ACE             = 0x00000008;
      const ACE4_SUCCESSFUL_ACCESS_ACE_FLAG   = 0x00000010;
      const ACE4_FAILED_ACCESS_ACE_FLAG       = 0x00000020;
      const ACE4_IDENTIFIER_GROUP             = 0x00000040;
   A server need not support any of these flags.  If the server supports
   flags that are similar to, but not exactly the same as, these flags,
   the implementation may define a mapping between the protocol-defined
   flags and the implementation-defined flags.  Again, the guiding
   principle is that the file not appear to be more secure than it
   really is.

   For example, suppose a client tries to set an ACE with
   ACE4_FILE_INHERIT_ACE set but not ACE4_DIRECTORY_INHERIT_ACE.  If the
   server does not support any form of ACL inheritance, the server
   should reject the request with NFS4ERR_ATTRNOTSUPP.  If the server
   supports a single "inherit ACE" flag that applies to both files and
   directories, the server may reject the request (i.e., requiring the
   client to set both the file and directory inheritance flags).  The
   server may also accept the request and silently turn on the
   ACE4_DIRECTORY_INHERIT_ACE flag.

3.16.4.  ACE who

   There are several special identifiers ("who") which need to be
   understood universally, rather than in the context of a particular
   DNS domain.  Some of these identifiers cannot be understood when an
   NFS client accesses the server, but have meaning when a local process
   accesses the file.  The ability to display and modify these
   permissions is permitted over NFS, even if none of the access methods
   on the server understands the identifiers.

      Who                    Description
      _______________________________________________________________
      "OWNER"                The owner of the file.
      "GROUP"                The group associated with the file.
      "EVERYONE"             The world, including the owner and
                             owning group.
      "INTERACTIVE"          Accessed from an interactive terminal.
      "NETWORK"              Accessed via the network.
      "DIALUP"               Accessed as a dialup user to the server.
      "BATCH"                Accessed from a batch job.
      "ANONYMOUS"            Accessed without any authentication.
      "AUTHENTICATED"        Any authenticated user (opposite of
                             ANONYMOUS)
      "SERVICE"              Access from a system service.

   To avoid conflict, these special identifiers are distinguish by an
   appended "@" and should appear in the form "xxxx@" (note: no domain
   name after the "@").  For example: ANONYMOUS@.

3.16.4.1.  Discussion on EVERYONE@

   It is important to note that "EVERYONE@" is not equivalent to the
   UNIX "other" entity.  This is because, by definition, UNIX "other"
   does not include the owner or owning group of a file.  "EVERYONE@"
   means literally everyone, including the owner or owning group.

3.16.4.2.  Discussion on OWNER@ and GROUP@

   Due to the use of the special identifiers "OWNER@" and "GROUP@" to
   indicate that an ACE applies to the the owner and owning group,
   respectively, associated with a file, the ACL cannot be used to
   determine the owner and owning group of a file.  This information
   should be indicated by the values of the owner and owner_group file
   attributes returned by the server.

3.16.5.  Mode Attribute

   The NFS version 4 mode attribute is based on the UNIX mode bits.  The
   following bits are defined:

         const MODE4_SUID = 0x800;  /* set user id on execution */
         const MODE4_SGID = 0x400;  /* set group id on execution */
         const MODE4_SVTX = 0x200;  /* save text even after use */
         const MODE4_RUSR = 0x100;  /* read permission: owner */
         const MODE4_WUSR = 0x080;  /* write permission: owner */
         const MODE4_XUSR = 0x040;  /* execute permission: owner */
         const MODE4_RGRP = 0x020;  /* read permission: group */
         const MODE4_WGRP = 0x010;  /* write permission: group */
         const MODE4_XGRP = 0x008;  /* execute permission: group */
         const MODE4_ROTH = 0x004;  /* read permission: other */
         const MODE4_WOTH = 0x002;  /* write permission: other */
         const MODE4_XOTH = 0x001;  /* execute permission: other */

   Bits MODE4_RUSR, MODE4_WUSR, and MODE4_XUSR apply to the principal
   identified in the owner attribute.  Bits MODE4_RGRP, MODE4_WGRP, and
   MODE4_XGRP apply to the principals identified in the owner_group
   attribute.  Bits MODE4_ROTH, MODE4_WOTH, MODE4_XOTH apply to any
   principal that does not match that in the owner group, and does not
   have a group matching that of the owner_group attribute.

   The remaining bits are not defined by this protocol and MUST NOT be
   used.  The minor version mechanism must be used to define further bit
   usage.

   Note that in UNIX, if a file has the MODE4_SGID bit set and no
   MODE4_XGRP bit set, then READ and WRITE must use mandatory file
   locking.

3.16.6.  Interaction Between Mode and ACL Attributes

   As defined, there is a certain amount of overlap between ACL and mode
   file attributes.  Even though there is overlap, ACLs don't contain
   all the information specified by a mode and modes can't possibly
   contain all the information specified by an ACL.

   For servers that support both mode and ACL, the mode's MODE4_R*,
   MODE4_W* and MODE4_X* values should be computed from the ACL and
   should be recomputed upon each SETATTR of ACL.  Similarly, upon
   SETATTR of mode, the ACL should be modified in order to allow the
   mode computed from the ACL to be the same as the mode given to
   SETATTR.  The mode computed from any given ACL should be
   deterministic.  This means that given an ACL, the same mode will
   always be computed.

   For servers that support ACL and not mode, clients may handle
   applications which set and get the mode by creating the correct ACL
   to send to the server and by computing the mode from the ACL,
   respectively.  In this case, the methods used by the server to keep
   the mode in sync with the ACL can also be used by the client.  These
   methods are explained in sections Section 3.16.6.3 Section 3.16.6.1
   and Section 3.16.6.2.

   Since the mode can't possibly represent all of the information that
   is defined by an ACL, there are some descrepencies to be aware of.
   As explained in the section "Deficiencies in a Mode Representation of
   an ACL", the mode bits computed from the ACL could potentially convey
   more restrictive permissions than what would be granted via the ACL.
   Because of this clients are not recommended to do their own access
   checks based on the mode of a file.

   Because the mode attribute includes bits (i.e.  MODE4_SUID,
   MODE4_SGID, MODE4_SVTX) that have nothing to do with ACL semantics,
   it is permitted for clients to specify both the ACL attribute and
   mode in the same SETATTR operation.  However, because there is no
   prescribed order for processing the attributes in a SETATTR, clients
   may see differing results.  For recommendations on how to achieve
   consistent behavior, see Section 3.16.6.4 for recommendations.

3.16.6.1.  Recomputing mode upon SETATTR of ACL

   Keeping the mode and ACL attributes synchronized is important, but as
   mentioned previously, the mode cannot possibly represent all of the
   information in the ACL.  Still, the mode should be modified to
   represent the access as accurately as possible.

   The general algorithm to assign a new mode attribute to an object
   based on a new ACL being set is:

   1.  Walk through the ACEs in order, looking for ACEs with a "who"
       value of OWNER@, GROUP@, or EVERYONE@.

   2.  It is understood that ACEs with a "who" value of OWNER@ affect
       the *USR bits of the mode, GROUP@ affect *GRP bits, and EVERYONE@
       affect *USR, *GRP, and *OTH bits.

   3.  If such an ACE specifies ALLOW or DENY for ACE4_READ_DATA,
       ACE4_WRITE_DATA, or ACE4_EXECUTE, and the mode bits affected have
       not been determined yet, set them to one (if ALLOW) or zero (if
       DENY).

   4.  Upon completion, any mode bits as yet undetermined have a value
       of zero.

   This pseudocode more precisely describes the algorithm:

          /* octal constants for the mode bits */

          RUSR = 0400
          WUSR = 0200
          XUSR = 0100
          RGRP = 0040
          WGRP = 0020
          XGRP = 0010
          ROTH = 0004
          WOTH = 0002
          XOTH = 0001

         /*
          * old_mode represents the previous value
          * of the mode of the object.
          */

          mode_t mode = 0, seen = 0;
          for each ACE a {
              if a.type is ALLOW or DENY and
              ACE4_INHERIT_ONLY_ACE is not set in a.flags {
                  if a.who is OWNER@ {
                      if ((a.mask & ACE4_READ_DATA) &&
                          (! (seen & RUSR))) {
                              seen |= RUSR;
                              if a.type is ALLOW {
                                  mode |= RUSR;
                              }
                      }
                      if ((a.mask & ACE4_WRITE_DATA) &&
                          (! (seen & WUSR))) {
                              seen |= WUSR;
                              if a.type is ALLOW {
                                  mode |= WUSR;
                              }
                      }
                      if ((a.mask & ACE4_EXECUTE) &&
                          (! (seen & XUSR))) {
                              seen |= XUSR;
                              if a.type is ALLOW {
                                  mode |= XUSR;
                              }
                      }
                  } else if a.who is GROUP@ {
                      if ((a.mask & ACE4_READ_DATA) &&
                          (! (seen & RGRP))) {
                              seen |= RGRP;
                              if a.type is ALLOW {
                                  mode |= RGRP;
                              }
                      }
                      if ((a.mask & ACE4_WRITE_DATA) &&
                          (! (seen & WGRP))) {
                              seen |= WGRP;
                              if a.type is ALLOW {
                                  mode |= WGRP;
                              }
                      }
                      if ((a.mask & ACE4_EXECUTE) &&
                          (! (seen & XGRP))) {
                              seen |= XGRP;
                              if a.type is ALLOW {
                                  mode |= XGRP;
                              }
                      }
                  } else if a.who is EVERYONE@ {
                      if (a.mask & ACE4_READ_DATA) {
                          if ! (seen & RUSR) {
                              seen |= RUSR;
                              if a.type is ALLOW {
                                  mode |= RUSR;
                              }
                          }
                          if ! (seen & RGRP) {
                              seen |= RGRP;
                              if a.type is ALLOW {
                                  mode |= RGRP;
                              }
                          }
                          if ! (seen & ROTH) {
                              seen |= ROTH;
                              if a.type is ALLOW {
                                  mode |= ROTH;
                              }
                          }
                      }
                      if (a.mask & ACE4_WRITE_DATA) {
                          if ! (seen & WUSR) {
                              seen |= WUSR;
                              if a.type is ALLOW {
                                  mode |= WUSR;
                              }
                          }
                          if ! (seen & WGRP) {
                              seen |= WGRP;
                              if a.type is ALLOW {
                                  mode |= WGRP;
                              }
                          }
                          if ! (seen & WOTH) {
                              seen |= WOTH;
                              if a.type is ALLOW {
                                  mode |= WOTH;
                              }
                          }
                      }
                      if (a.mask & ACE4_EXECUTE) {
                          if ! (seen & XUSR) {
                              seen |= XUSR;
                              if a.type is ALLOW {
                                  mode |= XUSR;
                              }
                          }
                          if ! (seen & XGRP) {
                              seen |= XGRP;
                              if a.type is ALLOW {
                                  mode |= XGRP;
                              }
                          }
                          if ! (seen & XOTH) {
                              seen |= XOTH;
                              if a.type is ALLOW {
                                  mode |= XOTH;
                              }
                          }
                      }
                  }
              }
          }
          return mode | (old_mode & (SUID | SGID | SVTX))

3.16.6.2.  Applying the mode given to CREATE or OPEN to an inherited ACL

   The goal of implementing ACL inheritance is for newly created objects
   to inherit the ACLs they were intended to inherit, but without
   disregarding the mode that is given with the arguments to the CREATE
   or OPEN operations.  The general algorithm is as follows:

   1.  Form an ACL on the newly created object that is the concatenation
       of all inheritable ACEs from its parent directory.  Note that
       there may be zero inheritable ACEs; thus, an object may start
       with an empty ACL.

   2.  For each ACE in the new ACL, adjust its flags if necessary, and
       possibly create two ACEs in place of one.  This is necessary to
       honor the intent of the inheritance- related flags and to
       preserve information about the original inheritable ACEs in the
       case that they will be modified by other steps.  The algorithm is
       as follows:

       A.  If the ACE4_NO_PROPAGATE_INHERIT_ACE is set, or if the object
           being created is not a directory, then clear the following
           flags:

              ACE4_NO_PROPAGATE_INHERIT_ACE

              ACE4_FILE_INHERIT_ACE

              ACE4_DIRECTORY_INHERIT_ACE

              ACE4_INHERIT_ONLY_ACE

           Continue on to the next ACE.

       B.  If the object being created is a directory and
           ACE4_FILE_INHERIT_ACE is set, but ACE4_DIRECTORY_INHERIT_ACE
           is NOT set, then we ensure that ACE4_INHERIT_ONLY_ACE is set.
           Continue on to the next ACE.  Otherwise:

       C.  If the type of the ACE is neither ALLOW nor DENY, then
           continue on to the next ACE.

       D.  Copy the original ACE into a second, adjacent ACE.

       E.  On the first ACE, ensure that ACE4_INHERIT_ONLY_ACE is set.

       F.  On the second ACE, clear the following flags:

              ACE4_NO_PROPAGATE_INHERIT_ACE

              ACE4_FILE_INHERIT_ACE

              ACE4_DIRECTORY_INHERIT_ACE

              ACE4_INHERIT_ONLY_ACE

       G.  On the second ACE, if the type field is ALLOW, an
           implementation MAY clear the following mask bits:

              ACE4_WRITE_ACL

              ACE4_WRITE_OWNER

   3.  To ensure that the mode is honored, apply the algorithm for
       applying a mode to a file/directory with an existing ACL on the
       new object as described in Section 3.16.6.3, using the mode that
       is to be used for file creation.

3.16.6.3.  Applying a Mode to an Existing ACL

   An existing ACL can mean two things in this context.  One, that a
   file/directory already exists and it has an ACL.  Two, that a
   directory has inheritable ACEs that will make up the ACL for any new
   files or directories created therein.

   The high-level goal of the behavior when a mode is set on a file with
   an existing ACL is to take the new mode into account, without needing
   to delete a pre-existing ACL.

   When a mode is applied to an object, e.g. via SETATTR or CREATE/OPEN,
   the ACL must be modified to accommodate the mode.

   1.  The ACL is traversed, one ACE at a time.  For each ACE:

       1.  If the type of the ACE is neither ALLOW nor DENY, the ACE is
           left unchanged.  Continue to the next ACE.

       2.  If the ACE4_INHERIT_ONLY_ACE flag is set on the ACE, it is
           left unchanged.  Continue to the next ACE.

       3.  If either or both of ACE4_FILE_INHERIT_ACE or
           ACE4_DIRECTORY_INHERIT_ACE are set:

           1.  A copy of the ACE is made, and placed in the ACL
               immediately following the current ACE.

           2.  In the first ACE, the flag ACE4_INHERIT_ONLY_ACE is set.

           3.  In the second ACE, the following flags are cleared:

                  ACE4_FILE_INHERIT_ACE

                  ACE4_DIRECTORY_INHERIT_ACE

                  ACE4_NO_PROPAGATE_INHERIT_ACE

           The algorithm continues on with the second ACE.

       4.  If the "who" field is one of the following:

              OWNER@

              GROUP@

              EVERYONE@

           then the following mask bits are cleared:

              ACE4_READ_DATA / ACE4_LIST_DIRECTORY

              ACE4_WRITE_DATA / ACE4_ADD_FILE

              ACE4_APPEND_DATA / ACE4_ADD_SUBDIRECTORY

              ACE4_EXECUTE

           At this point, we proceed to the next ACE.

       5.  Otherwise, if the "who" field did not match one of OWNER@,
           GROUP@, or EVERYONE@, the following steps SHOULD be
           performed.

           1.  If the type of the ACE is ALLOW, we check the preceding
               ACE (if any).  If it does not meet all of the following
               criteria:

               1.  The type field is DENY.

               2.  The who field is the same as the current ACE.

               3.  The flag bit ACE4_IDENTIFIER_GROUP is the same as it
                   is in the current ACE, and no other flag bits are
                   set.

               4.  The mask bits are a subset of the mask bits of the
                   current ACE, and are also a subset of the following:

                      ACE4_READ_DATA / ACE4_LIST_DIRECTORY

                      ACE4_WRITE_DATA / ACE4_ADD_FILE

                      ACE4_APPEND_DATA / ACE4_ADD_SUBDIRECTORY

                      ACE4_EXECUTE

               then an ACE of type DENY, with a who equal to the current
               ACE, flag bits equal to (<current-ACE-flags> &
               ACE4_IDENTIFIER_GROUP), and no mask bits, is prepended.

           2.  The following modifications are made to the prepended
               ACE.  The intent is to mask the following ACE to disallow
               ACE4_READ_DATA, ACE4_WRITE_DATA, ACE4_APPEND_DATA, or
               ACE4_EXECUTE, based upon the group permissions of the new
               mode.  As a special case, if the ACE matches the current
               owner of the file, the owner bits are used, rather than
               the group bits.  This is reflected in the algorithm
               below.

          Let there be three bits defined:

          #define READ    04
          #define WRITE   02
          #define EXEC    01

          Let "amode" be the new mode, right-shifted three
          bits, in order to have the group permission bits
          placed in the three low order bits of amode,
          i.e. amode = mode >> 3

          If ACE4_IDENTIFIER_GROUP is not set in the flags,
          and the "who" field of the ACE matches the owner
          of the file, we shift amode three more bits, in
          order to have the owner permission bits placed in
          the three low order bits of amode:

          amode = amode >> 3

          amode is now used as follows:

          If ACE4_READ_DATA is set on the current ACE:
                     If READ is set on amode:
                         ACE4_READ_DATA is cleared on the prepended ACE
                     else:
                         ACE4_READ_DATA is set on the prepended ACE

              If ACE4_WRITE_DATA is set on the current ACE:
                     If WRITE is set on amode:
                         ACE4_WRITE_DATA is cleared on the prepended ACE
                     else:
                         ACE4_WRITE_DATA is set on the prepended ACE
              If ACE4_APPEND_DATA is set on the current ACE:
                     If WRITE is set on amode:
                         ACE4_APPEND_DATA is cleared on the
                         prepended ACE
                     else:
                         ACE4_APPEND_DATA is set on the prepended ACE

              If ACE4_EXECUTE is set on the current ACE:
                     If EXEC is set on amode:
                         ACE4_EXECUTE is cleared on the prepended ACE
                     else:
                         ACE4_EXECUTE is set on the prepended ACE

           3.  To conform with POSIX, and prevent cases where the owner
               of the file is given permissions via an explicit group,
               we implement the following step.

                  If ACE4_IDENTIFIER_GROUP is set in the flags field of
                  the ALLOW ACE:
                      Let "mode" be the mode that we are chmoding to:
                          extramode = (mode >> 3) & 07
                          ownermode = mode >> 6
                          extramode &= ~ownermode
                      If extramode is not zero:
                          If extramode & READ:
                              Clear ACE4_READ_DATA in both the
                              prepended DENY ACE and the ALLOW ACE
                          If extramode & WRITE:
                              Clear ACE4_WRITE_DATA and ACE_APPEND_DATA
                              in both the prepended DENY ACE and the
                              ALLOW ACE
                      If extramode & EXEC:
                              Clear ACE4_EXECUTE in both the prepended
                              DENY ACE and the ALLOW ACE

   2.  If there are at least six ACEs, the final six ACEs are examined.
       If they are not equal to the following ACEs:

          A1) OWNER@:::DENY
          A2) OWNER@:ACE4_WRITE_ACL/ACE4_WRITE_OWNER/
              ACE4_WRITE_ATTRIBUTES/ACE4_WRITE_NAMED_ATTRIBUTES::ALLOW
          A3) GROUP@::ACE4_IDENTIFIER_GROUP:DENY
          A4) GROUP@::ACE4_IDENTIFIER_GROUP:ALLOW
          A5) EVERYONE@:ACE4_WRITE_ACL/ACE4_WRITE_OWNER/
              ACE4_WRITE_ATTRIBUTES/ACE4_WRITE_NAMED_ATTRIBUTES::DENY
          A6) EVERYONE@:ACE4_READ_ACL/ACE4_READ_ATTRIBUTES/
              ACE4_READ_NAMED_ATTRIBUTES/ACE4_SYNCHRONIZE::ALLOW

       Then six ACEs matching the above are appended.

   3.  The final six ACEs are adjusted according to the incoming mode.

          /* octal constants for the mode bits */

          RUSR = 0400
          WUSR = 0200
          XUSR = 0100
          RGRP = 0040
          WGRP = 0020
          XGRP = 0010
          ROTH = 0004
          WOTH = 0002
          XOTH = 0001

          If RUSR is set: set ACE4_READ_DATA in A2
              else: set ACE4_READ_DATA in A1
          If WUSR is set: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A2
              else: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A1
          If XUSR is set: set ACE4_EXECUTE in A2
              else: set ACE4_EXECUTE in A1
          If RGRP is set: set ACE4_READ_DATA in A4
              else: set ACE4_READ_DATA in A3
          If WGRP is set: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A4
              else: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A3
          If XGRP is set: set ACE4_EXECUTE in A4
              else: set ACE4_EXECUTE in A3
          If ROTH is set: set ACE4_READ_DATA in A6
              else: set ACE4_READ_DATA in A5
          If WOTH is set: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A6
              else: set ACE4_WRITE_DATA and ACE4_APPEND_DATA in A5
          If XOTH is set: set ACE4_EXECUTE in A6
              else: set ACE4_EXECUTE in A5

3.16.6.4.  ACL and mode in the same SETATTR

   The only reason that a mode and ACL should be set in the same SETATTR
   is if the user wants to set the SUID, SGID and SVTX bits along with
   setting the permissions by means of an ACL.  There is still no way to
   enforce which order the attributes will be set in, and it is likely
   that different orders of operations will produce different results.

3.16.6.4.1.  Client Side Recommendations

   If an application needs to enforce a certain behavior, it is
   recommended that the client implementations set mode and ACL in
   separate SETATTR requests.  This will produce consistent and expected
   results.

   If an application wants to set SUID, SGID and SVTX bits and an ACL:

      In the first SETATTR, set the mode with SUID, SGID and SVTX bits
      as desired and all other bits with a value of 0.

      In a following SETATTR (preferably in the same COMPOUND) set the
      ACL.

3.16.6.4.2.  Server Side Recommendations

   If both mode and ACL are given to SETATTR, server implementations
   should verify that the mode and ACL don't conflict, i.e. the mode
   computed from the given ACL must be the same as the given mode,
   excluding the SUID, SGID and SVTX bits.  The algorithm for assigning
   a new mode based on the ACL can be used.  This is described in
   section Section 3.16.6.1.  If a server receives a request to set both
   mode and ACL, but the two conflict, the server should return
   NFS4ERR_INVAL.

3.16.6.5.  Inheritance and turning it off

   The inheritance of access permissions may be problematic if a user
   cannot prevent their file from inheriting unwanted permissions.  For
   example, a user, "samf", sets up a shared project directory to be
   used by everyone working on Project Foo. "lisagab" is a part of
   Project Foo, but is working on something that should not be seen by
   anyone else.  How can "lisagab" make sure that any new files that she
   creates in this shared project directory do not inherit anything that
   could compromise the security of her work?

   More relevant to the implementors of NFS version 4 clients and
   servers is the question of how to communicate the fact that user,
   "lisagab", doesn't want any permissions to be inherited to her newly
   created file or directory.

   To do this, implementors should standardize on what the behavior of
   CREATE and OPEN must be if:

   1.  just mode is given

       In this case, inheritance will take place, but the mode will be
       applied to the inherited ACL as described in Section 3.16.6.1,
       thereby modifying the ACL.

   2.  just ACL is given

       In this case, inheritance will not take place, and the ACL as
       defined in the CREATE or OPEN will be set without modification.

   3.  both mode and ACL are given

       In this case, implementors should verify that the mode and ACL
       don't conflict, i.e. the mode computed from the given ACL must be
       the same as the given mode.  The algorithm for assigning a new
       mode based on the ACL can be used.  This is described in
       Section 3.16.6.1) If a server receives a request to set both mode
       and ACL, but the two conflict, the server should return
       NFS4ERR_INVAL.  If the mode and ACL don't conflict, inheritance
       will not take placeand both, the mode and ACL, will be set
       without modification.

   4.  neither mode nor ACL are given

       In this case, inheritance will take place and no modifications to
       the ACL will happen.  It is worth noting that if no inheritable
       ACEs exist on the parent directory, the file will be created with
       an empty ACL, thus granting no accesses.

3.16.6.6.  Deficiencies in a Mode Representation of an ACL

   In the presence of an ACL, there are certain cases when the
   representation of the mode is not guaranteed to be accurate.  An
   example of a situation is detailed below.

   As mentioned in Section 3.16.6, the representation of the mode is
   deterministic, but not guaranteed to be accurate.  The mode bits
   potentially convey a more restrictive permission than what will
   actually be granted via the ACL.

   Given the following ACL of two ACEs:

          GROUP@:ACE4_READ_DATA/ACE4_WRITE_DATA/ACE4_EXECUTE:
              ACE4_IDENTIFIER_GROUP:ALLOW
          EVERYONE@:ACE4_READ_DATA/ACE4_WRITE_DATA/ACE4_EXECUTE::DENY

   we would compute a mode of 0070.  However, it is possible, even
   likely, that the owner might be a member of the object's owning
   group, and thus, the owner would be granted read, write, and execute
   access to the object.  This would conflict with the mode of 0070,
   where an owner would be denied this access.

   The only way to overcome this deficiency would be to determine
   whether the object's owner is a member of the object's owning group.
   This is difficult, but worse, on a POSIX or any UNIX-like system, it
   is a process' membership in a group that is important, not a user's.
   Thus, any fixed mode intended to represent the above ACL can be
   incorrect.

   Example: administrative databases (possibly /etc/passwd and /etc/
   group) indicate that the user "bob" is a member of the group "staff".
   An object has the ACL given above, is owned by "bob", and has an
   owning group of "staff".  User "bob" has logged into the system, and
   thus processes have been created owned by "bob" and having membership
   in group "staff".

   A mode representation of the above ACL could thus be 0770, due to
   user "bob" having membership in group "staff".  Now, the
   administrative databases are changed, such that user "bob" is no
   longer in group "staff".  User "bob" logs in to the system again, and
   thus more processes are created, this time owned by "bob" but NOT in
   group "staff".

   A mode of 0770 is inaccurate for processes not belonging to group
   "staff".  But even if the mode of the file were proactively changed
   to 0070 at the time the group database was edited, mode 0070 would be
   inaccurate for the pre-existing processes owned by user "bob" and
   having membership in group "staff".

4.  Filesystem Migration and Replication

   With the use of the recommended attribute "fs_locations",  Single-server Name Space

   This chapter describes the NFS
   version 4 NFSv4 single-server name space.  Single-
   server has a method of providing filesystem migration namespaces may be presented directly to clients, or
   replication services.  For the purposes of migration and replication, they may
   be used as a filesystem will basis to form larger multi-server namespaces (e.g. site-
   wide or organization-wide) to be defined presented to clients, as all files that share described
   in Section 10.

4.1.  Server Exports

   On a given fsid
   (both major and minor values are UNIX server, the same).

   The fs_locations attribute provides a list of filesystem locations.
   These locations are specified name space describes all the files reachable by providing
   pathnames under the server name (either
   DNS domain root directory or IP address) and "/".  On a Windows NT server
   the path name representing the root of space constitutes all the filesystem.  Depending files on disks named by mapped
   disk letters.  NFS server administrators rarely make the type entire
   server's filesystem name space available to NFS clients.  More often
   portions of service being provided, the
   list will provide a new location or a set name space are made available via an "export"
   feature.  In previous versions of alternate locations for the filesystem.  The client will use this information to redirect its
   requests to NFS protocol, the new server.

4.1.  Replication

   It root
   filehandle for each export is expected that filesystem replication will be used in obtained through the case
   of read-only data.  Typically, MOUNT protocol;
   the filesystem will be replicated on
   two or more servers.  The fs_locations attribute will provide client sends a string that identifies the
   list export of these locations to the client.  On first access of the
   filesystem, the client should obtain the value of the fs_locations
   attribute.  If, in the future, the client finds the server
   unresponsive, name space
   and the client may attempt to use another server specified
   by fs_locations.

   If applicable, returns the client must take root filehandle for it.  The MOUNT
   protocol supports an EXPORTS procedure that will enumerate the appropriate steps
   server's exports.

4.2.  Browsing Exports

   The NFS version 4 protocol provides a root filehandle that clients
   can use to recover
   valid obtain filehandles from the new server.  This is described in more
   detail in for the following sections.

4.2.  Migration

   Filesystem migration exports of a particular server,
   via a series of LOOKUP operations within a COMPOUND, to traverse a
   path.  A common user experience is used to move use a filesystem from one server graphical user interface
   (perhaps a file "Open" dialog window) to
   another.  Migration is typically used for find a filesystem that is
   writable and has file via progressive
   browsing through a single copy.  The expected use of migration is for
   load balancing or general resource reallocation. directory tree.  The protocol does
   not specify how the filesystem will client must be moved between servers.  This
   server-to-server transfer mechanism is left to the server
   implementor.  However, the method used able to communicate the migration
   event between client and server is specified here.

   Once the servers participating in the migration have completed the move
   from one export to another export via single-component, progressive
   LOOKUP operations.

   This style of the filesystem, the error NFS4ERR_MOVED will be returned for
   subsequent requests received browsing is not well supported by the original server. NFS version 2 and
   3 protocols.  The
   NFS4ERR_MOVED error is returned for client expects all LOOKUP operations except PUTFH and
   GETATTR.  Upon receiving to remain
   within a single server filesystem.  For example, the NFS4ERR_MOVED error, device attribute
   will not change.  This prevents a client from taking name space paths
   that span exports.

   An automounter on the client will can obtain the value a snapshot of the fs_locations attribute.  The client will then
   use server's
   name space using the contents EXPORTS procedure of the attribute to redirect its requests to MOUNT protocol.  If it
   understands the
   specified server.  To facilitate server's pathname syntax, it can create an image of
   the use server's name space on the client.  The parts of GETATTR, operations such
   as PUTFH must also be accepted the name space
   that are not exported by the server for the migrated file
   system's filehandles.  Note are filled in with a "pseudo
   filesystem" that if allows the server returns NFS4ERR_MOVED, user to browse from one mounted
   filesystem to another.  There is a drawback to this representation of
   the server MUST support server's name space on the fs_locations attribute. client: it is static.  If the client requests more attributes than just fs_locations, the server may return fs_locations only.  This is to
   administrator adds a new export the client will be expected since unaware of it.

4.3.  Server Pseudo Filesystem

   NFS version 4 servers avoid this name space inconsistency by
   presenting all the exports for a given server has migrated within the filesystem and may not have framework of
   a method single namespace, for that server.  An NFS version 4 client uses
   LOOKUP and READDIR operations to browse seamlessly from one export to
   another.  Portions of
   obtaining additional attribute data.

   The the server implementor needs to be careful in developing name space that are not exported are
   bridged via a migration
   solution.  The server must consider all "pseudo filesystem" that provides a view of exported
   directories only.  A pseudo filesystem has a unique fsid and behaves
   like a normal, read only filesystem.

   Based on the state information
   clients may have outstanding at construction of the server.  This includes but server's name space, it is not
   limited to locking/share state, delegation state, and asynchronous
   file writes which possible
   that multiple pseudo filesystems may exist.  For example,

           /a              pseudo filesystem
           /a/b            real filesystem
           /a/b/c          pseudo filesystem
           /a/b/c/d        real filesystem

   Each of the pseudo filesystems are represented by WRITE considered separate entities and COMMIT verifiers.  The
   server should strive to minimize the impact on
   therefore will have its clients during own unique fsid.

4.4.  Multiple Roots

   The DOS and
   after Windows operating environments are sometimes described as
   having "multiple roots".  Filesystems are commonly represented as
   disk letters.  MacOS represents filesystems as top level names.  NFS
   version 4 servers for these platforms can construct a pseudo file
   system above these root names so that disk letters or volume names
   are simply directory names in the migration process.

4.3.  Interpretation pseudo root.

4.5.  Filehandle Volatility

   The nature of the fs_locations Attribute

   The fs_location attribute server's pseudo filesystem is structured in that it is a logical
   representation of filesystem(s) available from the following way:

           struct fs_location {
           utf8str_cis     server&lt>;
           pathname4       rootpath;
           };

           struct fs_locations {
           pathname4       fs_root;
           fs_location     locations&lt>;
           };

   The fs_location struct server.
   Therefore, the pseudo filesystem is used to represent most likely constructed
   dynamically when the location of a server is first instantiated.  It is expected
   that the pseudo filesystem by providing a may not have an on disk counterpart from
   which persistent filehandles could be constructed.  Even though it is
   preferable that the server name and provide persistent filehandles for the path to
   pseudo filesystem, the root of NFS client should expect that pseudo file
   system filehandles are volatile.  This can be confirmed by checking
   the
   filesystem.  For associated "fh_expire_type" attribute for those filehandles in
   question.  If the filehandles are volatile, the NFS client must be
   prepared to recover a multi-homed server or filehandle value (e.g. with a set series of servers that use
   the same rootpath, LOOKUP
   operations) when receiving an array error of server names may be provided.  An
   entry in NFS4ERR_FHEXPIRED.

4.6.  Exported Root

   If the server array server's root filesystem is an UTF8 string and represents exported, one of might conclude that
   a
   traditional DNS host name, IPv4 address, or IPv6 address.  It pseudo-filesystem is unneeded.  This not
   a requirement that all servers that share necessarily so.  Assume
   the same rootpath following filesystems on a server:

           /       disk1  (exported)
           /a      disk2  (not exported)
           /a/b    disk3  (exported)

   Because disk2 is not exported, disk3 cannot be listed
   in one fs_location struct. reached with simple
   LOOKUPs.  The array of server names is provided for
   convenience.  Servers that share the same rootpath may also be listed
   in separate fs_location entries in must bridge the fs_locations attribute. gap with a pseudo-filesystem.

4.7.  Mount Point Crossing

   The fs_locations struct and attribute then contains an array of
   locations.  Since the name space of each server filesystem environment may be constructed
   differently, the "fs_root" field in such a way
   that one filesystem contains a directory which is provided.  The path represented 'covered' or
   mounted upon by fs_root represents the location of the a second filesystem.  For example:

           /a/b            (filesystem 1)
           /a/b/c/d        (filesystem 2)

   The pseudo filesystem in the server's
   name space.  Therefore, the fs_root path for this server may be constructed to look
   like:

           /               (place holder/not exported)
           /a/b            (filesystem 1)
           /a/b/c/d        (filesystem 2)

   It is only associated with the
   server from which server's responsibility to present the fs_locations attribute was obtained.  The
   fs_root path pseudo filesystem
   that is meant complete to aid the client in locating the filesystem at client.  If the various servers listed.

   As an example, there is client sends a replicated filesystem located at two
   servers (servA and servB).  At servA lookup request
   for the filesystem is located at path "/a/b/c".  At servB "/a/b/c/d", the filesystem server's response is located at path "/x/y/z".
   In this example the client accesses filehandle of
   the filesystem first at servA
   with a multi-component lookup path of "/a/b/c/d".  Since  In previous versions of the client
   used a multi-component lookup to obtain NFS protocol,
   the filehandle at "/a/b/c/d",
   it is unaware that server would respond with the filesystem's root is located in servA's name
   space at "/a/b/c".  When filehandle of directory "/a/b/c/d"
   within the filesystem "/a/b".

   The NFS client switches to servB, it will need be able to determine that the directory if it first referenced at servA is now
   represented by the path "/x/y/z/d" on servB.  To facilitate this, the
   fs_locations attribute provided crosses a server mount
   point by servA would have a fs_root change in the value of "/a/b/c" and two entries in fs_location.  One entry in fs_location
   will be for itself (servA) and the other will be for servB with a
   path "fsid" attribute.

4.8.  Security Policy and Name Space Presentation

   The application of "/x/y/z".  With this information, the client is able server's security policy needs to
   substitute "/x/y/z" for the "/a/b/c" at be carefully
   considered by the beginning of its access
   path and construct "/x/y/z/d" implementor.  One may choose to use for limit the new server.

   See
   viewability of portions of the section "Security Considerations" for a discussion pseudo filesystem based on the
   recommendations for
   server's perception of the client's ability to authenticate itself
   properly.  However, with the support of multiple security flavor mechanisms
   and the ability to be used by any GETATTR
   operation that requests negotiate the "fs_locations" attribute.

4.4.  Filehandle Recovery for Migration or Replication

   Filehandles for filesystems that are replicated or migrated generally
   have appropriate use of these mechanisms,
   the same semantics as for filesystems that are not replicated or
   migrated.  For example, server is unable to properly determine if a filesystem has persistent filehandles
   and it is migrated client will be able
   to another server, authenticate itself.  If, based on its policies, the filehandle values for server
   chooses to limit the
   filesystem will be valid at contents of the new server.

   For volatile filehandles, pseudo filesystem, the servers involved likely do not have a
   mechanism to transfer filehandle format and content between
   themselves.  Therefore, a server
   may have difficulty in determining
   if a volatile filehandle effectively hide filesystems from an old a client that may otherwise
   have legitimate access.

   As suggested practice, the server should return an error of
   NFS4ERR_FHEXPIRED.  Therefore, the client is informed, with apply the use security policy of the fh_expire_type attribute, whether volatile filehandles will
   expire at the migration or replication event.  If the bit
   FH4_VOL_MIGRATION is set
   a shared resource in the fh_expire_type attribute, server's namespace to the client
   must treat components of the volatile filehandle as if
   resource's ancestors.  For example:

           /
           /a/b
           /a/b/c

   The /a/b/c directory is a real filesystem and is the shared resource.
   The security policy for /a/b/c is Kerberos with integrity.  The
   server had returned the
   NFS4ERR_FHEXPIRED error.  At should apply the migration or replication event in same security policy to /, /a, and /a/b.
   This allows for the presence extension of the FH4_VOL_MIGRATION bit, the client will not
   present protection of the original or old volatile filehandle server's
   namespace to the new server.
   The client will start its communication with ancestors of the new server by
   recovering its filehandles using real shared resource.

   For the saved file names.

5.  NFS Server Name Space

5.1.  Server Exports

   On a UNIX server case of the name space describes all use of multiple, disjoint security mechanisms in
   the files reachable by
   pathnames under server's resources, the root directory or "/".  On security for a Windows NT server particular object in the name space constitutes
   server's namespace should be the union of all security mechanisms of
   all direct descendants.

5.  File Locking and Share Reservations

   Integrating locking into the files on disks named by mapped
   disk letters. NFS server administrators rarely make the entire
   server's filesystem name space available protocol necessarily causes it to NFS clients.  More often
   portions of be
   stateful.  With the name space are made available via an "export"
   feature.  In previous versions inclusion of share reservations the protocol
   becomes substantially more dependent on state than the traditional
   combination of NFS protocol, and NLM [XNFS].  There are three components to
   making this state manageable:

   o  Clear division between client and server

   o  Ability to reliably detect inconsistency in state between client
      and server

   o  Simple and robust recovery mechanisms

   In this model, the root
   filehandle for each export is obtained through server owns the MOUNT protocol; state information.  The client
   communicates its view of this state to the server as needed.  The
   client sends is also able to detect inconsistent state before modifying a string that identifies the export
   file.

   To support Win32 share reservations it is necessary to atomically
   OPEN or CREATE files.  Having a separate share/unshare operation
   would not allow correct implementation of name space
   and the server returns Win32 OpenFile API.  In
   order to correctly implement share semantics, the root filehandle for it.  The MOUNT previous NFS
   protocol supports an EXPORTS procedure that will enumerate the
   server's exports.

5.2.  Browsing Exports mechanisms used when a file is opened or created (LOOKUP,
   CREATE, ACCESS) need to be replaced.  The NFS version 4 protocol provides a root filehandle has
   an OPEN operation that clients
   can use to obtain filehandles for these exports via subsumes the NFS version 3 methodology of
   LOOKUP, CREATE, and ACCESS.  However, because many operations require
   a multi-component
   LOOKUP.  A common user experience filehandle, the traditional LOOKUP is preserved to use a graphical user
   interface (perhaps map a file "Open" dialog window) name
   to find a file via
   progressive browsing through a directory tree. filehandle without establishing state on the server.  The client must be
   able to move from one export to another export via single-component,
   progressive LOOKUP operations.

   This style policy
   of browsing granting access or modifying files is not well supported managed by the NFS version 2 and
   3 protocols.  The client expects all LOOKUP operations to remain
   within a single server filesystem.  For example, based
   on the device attribute
   will not change.  This prevents a client client's state.  These mechanisms can implement policy ranging
   from taking name space paths advisory only locking to full mandatory locking.

5.1.  Locking

   It is assumed that span exports.

   An automounter on the client can obtain manipulating a snapshot of the server's
   name space using the EXPORTS procedure of the MOUNT protocol.  If lock is rare when compared to READ
   and WRITE operations.  It is also assumed that crashes and network
   partitions are relatively rare.  Therefore it
   understands is important that the server's pathname syntax, it can create an image of
   READ and WRITE operations have a lightweight mechanism to indicate if
   they possess a held lock.  A lock request contains the server's name space on heavyweight
   information required to establish a lock and uniquely define the client. lock
   owner.

   The parts of following sections describe the name space
   that are not exported by transition from the heavy weight
   information to the eventual stateid used for most client and server are filled in with a "pseudo
   filesystem" that allows
   locking and lease interactions.

5.1.1.  Client ID

   For each LOCK request, the user to browse from one mounted
   filesystem client must identify itself to another.  There the server.
   This is done in such a drawback way as to this representation allow for correct lock
   identification and crash recovery.  A sequence of
   the server's name space on the client: it a SETCLIENTID
   operation followed by a SETCLIENTID_CONFIRM operation is static.  If required to
   establish the server
   administrator adds a new export identification onto the client will be unaware server.  Establishment of it.

5.3.  Server Pseudo Filesystem

   NFS version 4 servers avoid this name space inconsistency
   identification by
   presenting all a new incarnation of the exports within client also has the framework effect
   of immediately breaking any leased state that a single server
   name space.  An NFS version 4 previous incarnation
   of the client uses LOOKUP and READDIR
   operations might have had on the server, as opposed to browse seamlessly from one export forcing the
   new client incarnation to wait for the leases to expire.  Breaking
   the lease state amounts to another.  Portions
   of the server name space that are removing all lock, share
   reservation, and, where the server is not exported are bridged via supporting the
   CLAIM_DELEGATE_PREV claim type, all delegation state associated with
   same client with the same identity.  For discussion of delegation
   state recovery, see the section "Delegation Recovery".

   Client identification is encapsulated in the following structure:

               struct nfs_client_id4 {
               verifier4     verifier;
               opaque        id<NFS4_OPAQUE_LIMIT>;
               };

   The first field, verifier is a
   "pseudo filesystem" client incarnation verifier that provides a view of exported directories
   only.  A pseudo filesystem is
   used to detect client reboots.  Only if the verifier is different
   from that the server has a unique fsid and behaves like a
   normal, read only filesystem.

   Based on previously recorded the construction client (as
   identified by the second field of the server's name space, it structure, id) does the server
   start the process of canceling the client's leased state.

   The second field, id is possible a variable length string that multiple pseudo filesystems may exist.  For example,

           /a              pseudo filesystem
           /a/b            real filesystem
           /a/b/c          pseudo filesystem
           /a/b/c/d        real filesystem

   Each of uniquely
   defines the pseudo filesystems client.

   There are considered separate entities and
   therefore will have a unique fsid.

5.4.  Multiple Roots

   The DOS and Windows operating environments are sometimes described as
   having "multiple roots".  Filesystems are commonly represented as
   disk letters.  MacOS represents filesystems as top level names.  NFS
   version 4 servers several considerations for these platforms can construct a pseudo file
   system above these root names how the client generates the id
   string:

   o  The string should be unique so that disk letters or volume names
   are simply directory names in multiple clients do not
      present the pseudo root.

5.5.  Filehandle Volatility same string.  The nature consequences of two clients
      presenting the server's pseudo filesystem is that it is a logical
   representation of filesystem(s) available same string range from the server.
   Therefore, the pseudo filesystem is most likely constructed
   dynamically when the server is first instantiated.  It is expected
   that the pseudo filesystem may not have one client getting an on disk counterpart from
   which persistent filehandles could be constructed.  Even though it is
   preferable that the server provide persistent filehandles for the
   pseudo filesystem, the NFS error
      to one client having its leased state abruptly and unexpectedly
      canceled.

   o  The string should expect that pseudo file
   system filehandles are volatile.  This can be confirmed by checking selected so the associated "fh_expire_type" attribute for those filehandles in
   question.  If subsequent incarnations (e.g.
      reboots) of the filehandles are volatile, same client cause the NFS client must be
   prepared to recover a filehandle value (e.g. with a multi-component
   LOOKUP) when receiving an error of NFS4ERR_FHEXPIRED.

5.6.  Exported Root

   If present the server's root filesystem same
      string.  The implementor is exported, one might conclude cautioned from an approach that
   a pseudo-filesystem is not needed.  This would be wrong.  Assume the
   following filesystems on a server:

           /       disk1  (exported)
           /a      disk2  (not exported)
           /a/b    disk3  (exported)

   Because disk2 is not exported, disk3 cannot be reached with simple
   LOOKUPs.  The server must bridge
      requires the gap with a pseudo-filesystem.

5.7.  Mount Point Crossing

   The server filesystem environment may string to be constructed recorded in such a way
   that one filesystem contains a directory which local file because this
      precludes the use of the implementation in an environment where
      there is 'covered' or
   mounted upon by a second filesystem.  For example:

           /a/b            (filesystem 1)
           /a/b/c/d        (filesystem 2) no local disk and all file access is from an NFS version
      4 server.

   o  The pseudo filesystem string should be different for this each server may be constructed network address
      that the client accesses, rather than common to look
   like:

           /               (place holder/not exported)
           /a/b            (filesystem 1)
           /a/b/c/d        (filesystem 2)

   It all server network
      addresses.  The reason is that it may not be possible for the server's responsibility
      client to present the pseudo filesystem
   that tell if same server is complete to the client. listening on multiple network
      addresses.  If the client sends a lookup request
   for the path "/a/b/c/d", the server's response is issues SETCLIENTID with the filehandle same id
      string to each network address of such a server, the filesystem "/a/b/c/d".  In previous versions of server will
      think it is the NFS protocol, same client, and each successive SETCLIENTID will
      cause the server would respond with to begin the filehandle process of directory "/a/b/c/d"
   within removing the filesystem "/a/b". client's
      previous leased state.

   o  The NFS algorithm for generating the string should not assume that the
      client's network address won't change.  This includes changes
      between client will be able to determine if it crosses a server mount
   point by a change incarnations and even changes while the client is
      stilling running in its current incarnation.  This means that if
      the value of client includes just the "fsid" attribute.

5.8.  Security Policy client's and Name Space Presentation

   The application of the server's security policy needs to be carefully
   considered by network address
      in the implementor.  One may choose to limit id string, there is a real risk, after the
   viewability of portions of client gives up
      the pseudo filesystem based on network address, that another client, using a similar
      algorithm for generating the
   server's perception of id string, will generate a
      conflicting id string.

   o  Given the above considerations, an example of a well generated id
      string is one that includes:

   o  The server's network address.

   o  The client's ability network address.

   o  For a user level NFS version 4 client, it should contain
      additional information to authenticate itself
   properly.  However, with distinguish the support of multiple security mechanisms
   and client from other user
      level clients running on the ability same host, such as a process id or
      other unique sequence.

   o  Additional information that tends to negotiate be unique, such as one or
      more of:

      *  The client machine's serial number (for privacy reasons, it is
         best to perform some one way function on the appropriate use serial number).

      *  A MAC address.

      *  The timestamp of these mechanisms, when the server NFS version 4 software was first
         installed on the client (though this is unable subject to properly determine if the
         previously mentioned caution about using information that is
         stored in a client will file, because the file might only be able accessible
         over NFS version 4).

      *  A true random number.  However since this number ought to authenticate itself.  If, based on its policies, be
         the server
   chooses to limit same between client incarnations, this shares the contents same
         problem as that of the pseudo filesystem, using the server
   may effectively hide filesystems from a client that may otherwise
   have legitimate access. timestamp of the software
         installation.

   As suggested practice, a security measure, the server should apply the security policy of MUST NOT cancel a shared resource in the server's namespace to the components of client's leased
   state if the
   resource's ancestors.  For example:

           /
           /a/b
           /a/b/c

   The /a/b/c directory is a real filesystem and is principal established the shared resource.
   The security policy state for /a/b/c a given id string is Kerberos with integrity.  The
   server should apply
   not the same security policy to /, /a, and /a/b.
   This allows for as the extension of principal issuing the protection SETCLIENTID.

   Note that SETCLIENTID and SETCLIENTID_CONFIRM has a secondary purpose
   of establishing the server's
   namespace to the ancestors of information the real shared resource.

   For server needs to make callbacks to
   the case client for purpose of supporting delegations.  It is permitted to
   change this information via SETCLIENTID and SETCLIENTID_CONFIRM
   within the use same incarnation of multiple, disjoint security mechanisms in the server's resources, client without removing the security for
   client's leased state.

   Once a particular object in SETCLIENTID and SETCLIENTID_CONFIRM sequence has successfully
   completed, the
   server's namespace should be client uses the union short hand client identifier, of all security mechanisms type
   clientid4, instead of
   all direct descendants.

6.  File Locking and Share Reservations

   Integrating locking into the NFS protocol necessarily causes it to be
   stateful.  With the inclusion of share reservations the protocol
   becomes substantially more dependent on state than the traditional
   combination of NFS longer and NLM [XNFS].  There are three components to
   making this state manageable:

   o  Clear division between less compact nfs_client_id4
   structure.  This short hand client identifier (a clientid) is
   assigned by the server and should be chosen so that it will not
   conflict with a clientid previously assigned by the server.  This
   applies across server

   o  Ability restarts or reboots.  When a clientid is
   presented to reliably detect inconsistency in state between client
      and a server

   o  Simple and robust recovery mechanisms

   In this model, that clientid is not recognized, as would
   happen after a server reboot, the server owns will reject the request with
   the error NFS4ERR_STALE_CLIENTID.  When this happens, the state information.  The client
   communicates its view must
   obtain a new clientid by use of this state the SETCLIENTID operation and then
   proceed to any other necessary recovery for the server as needed. reboot case
   (See the section "Server Failure and Recovery").

   The client is must also able to detect inconsistent state before modifying a
   file.

   To support Win32 share reservations it is necessary to atomically
   OPEN or CREATE files.  Having a separate share/unshare operation
   would not allow correct implementation of the Win32 OpenFile API.  In
   order to correctly implement share semantics, employ the previous NFS
   protocol mechanisms used SETCLIENTID operation when it
   receives a file is opened or created (LOOKUP,
   CREATE, ACCESS) need to be replaced.  The NFS version 4 protocol NFS4ERR_STALE_STATEID error using a stateid derived from
   its current clientid, since this also indicates a server reboot which
   has
   an OPEN operation that subsumes invalidated the NFS version 3 methodology existing clientid (see the next section
   "lock_owner and stateid Definition" for details).

   See the detailed descriptions of
   LOOKUP, CREATE, SETCLIENTID and ACCESS.  However, because many operations require SETCLIENTID_CONFIRM
   for a filehandle, complete specification of the traditional LOOKUP is preserved to map a file name
   to filehandle without establishing operations.

5.1.2.  Server Release of Clientid

   If the server determines that the client holds no associated state on
   for its clientid, the server. server may choose to release the clientid.  The policy
   of granting access or modifying files is managed
   server may make this choice for an inactive client so that resources
   are not consumed by those intermittently active clients.  If the
   client contacts the server based
   on after this release, the client's state.  These mechanisms can implement policy ranging
   from advisory only locking to full mandatory locking.

6.1.  Locking

   It is assumed that manipulating a lock is rare when compared to READ
   and WRITE operations.  It is also assumed server must ensure
   the client receives the appropriate error so that crashes and network
   partitions are relatively rare.  Therefore it is important that will use the
   READ and WRITE operations have a lightweight mechanism
   SETCLIENTID/SETCLIENTID_CONFIRM sequence to indicate if
   they possess establish a held lock.  A lock request contains new identity.

   It should be clear that the heavyweight
   information required server must be very hesitant to establish release a lock and uniquely define
   clientid since the lock
   owner.

   The following sections describe resulting work on the transition client to recover from such
   an event will be the heavy weight
   information to same burden as if the eventual stateid used for most client and server
   locking had failed and lease interactions.

6.1.1.  Client ID

   For each LOCK request, the
   restarted.  Typically a server would not release a clientid unless
   there had been no activity from that client must identify itself to for many minutes.

   Note that if the server.
   This is done id string in such a way as to allow for correct lock
   identification and crash recovery.  A sequence of a SETCLIENTID
   operation followed by a SETCLIENTID_CONFIRM operation request is required to
   establish properly
   constructed, and if the identification onto client takes care to use the server.  Establishment same principal
   for each successive use of
   identification by a new incarnation SETCLIENTID, then, barring an active
   denial of the service attack, NFS4ERR_CLID_INUSE should never be
   returned.

   However, client also has the effect
   of immediately breaking any leased state that bugs, server bugs, or perhaps a previous incarnation deliberate change of
   the client might have had on principal owner of the server, id string (such as opposed to forcing the
   new case of a client incarnation to wait for
   that changes security flavors, and under the leases new flavor, there is no
   mapping to expire.  Breaking the lease state amounts to previous owner) will in rare cases result in
   NFS4ERR_CLID_INUSE.

   In that event, when the server removing all lock, share
   reservation, and, where gets a SETCLIENTID for a client id
   that currently has no state, or it has state, but the server is not supporting lease has
   expired, rather than returning NFS4ERR_CLID_INUSE, the
   CLAIM_DELEGATE_PREV claim type, all delegation state associated with
   same client with server MUST
   allow the same identity.  For discussion of delegation
   state recovery, see SETCLIENTID, and confirm the section "Delegation Recovery".

   Client identification is encapsulated in new clientid if followed by
   the following structure:

               struct nfs_client_id4 {
               verifier4     verifier;
               opaque        id&ltNFS4_OPAQUE_LIMIT>;
               };

   The first field, verifier is appropriate SETCLIENTID_CONFIRM.

5.1.3.  lock_owner and stateid Definition

   When requesting a lock, the client incarnation verifier that is
   used must present to detect client reboots.  Only if the verifier is different
   from that the server has previously recorded the client (as
   identified by
   clientid and an identifier for the second field owner of the structure, id) does requested lock.
   These two fields are referred to as the server
   start lock_owner and the process definition
   of those fields are:

   o  A clientid returned by the server as part of canceling the client's leased state.

   The second field, id is a use of
      the SETCLIENTID operation.

   o  A variable length string that opaque array used to uniquely
   defines the client.

   There are several considerations for how define the client generates owner
      of a lock managed by the id
   string:

   o  The string should client.

      This may be a thread id, process id, or other unique so that multiple clients do not
      present value.

   When the same string.  The consequences of two clients
      presenting server grants the same string range from one client getting an error
      to one client having its leased state abruptly and unexpectedly
      canceled.

   o lock, it responds with a unique stateid.
   The string should be selected so the subsequent incarnations (e.g.
      reboots) of stateid is used as a shorthand reference to the same client cause lock_owner, since
   the client to present server will be maintaining the same
      string. correspondence between them.

   The implementor server is cautioned from an approach that
      requires the string free to be recorded in a local file because this
      precludes the use of form the implementation stateid in an environment where
      there any manner that it chooses
   as long as it is no local disk able to recognize invalid and all file access is from an NFS version
      4 out-of-date stateids.
   This requirement includes those stateids generated by earlier
   instances of the server.

   o  The string should  From this, the client can be different for each properly
   notified of a server network address
      that restart.  This notification will occur when the
   client accesses, rather than common presents a stateid to all the server network
      addresses. from a previous
   instantiation.

   The reason is that it may not server must be possible for the
      client able to tell if same server is listening on multiple network
      addresses.  If distinguish the client issues SETCLIENTID with following situations and
   return the same id
      string to each network address of such error as specified:

   o  The stateid was generated by an earlier server instance (i.e.
      before a server, the server will
      think it is the same client, and each successive SETCLIENTID will
      cause reboot).  The error NFS4ERR_STALE_STATEID should
      be returned.

   o  The stateid was generated by the current server to begin instance but the process of removing
      stateid no longer designates the client's
      previous leased state.

   o  The algorithm current locking state for generating the string
      lockowner-file pair in question (i.e. one or more locking
      operations has occurred).  The error NFS4ERR_OLD_STATEID should not assume that the
      client's network address won't change. be
      returned.

      This includes changes
      between error condition will only occur when the client incarnations and even issues a
      locking request which changes a stateid while the client is
      stilling running in its current incarnation.  This means an I/O request that if
      the client includes just the client's and server's network address
      in the id string, there
      uses that stateid is a real risk, after outstanding.

   o  The stateid was generated by the client gives up current server instance but the network address, that another client, using
      stateid does not designate a similar
      algorithm locking state for generating the id string, any active
      lockowner-file pair.  The error NFS4ERR_BAD_STATEID should be
      returned.

      This error condition will generate occur when there has been a
      conflicting id string.

   o  Given logic error
      on the above considerations, an example part of a well generated id
      string is one that includes:

   o  The server's network address.

   o  The client's network address.

   o  For a user level NFS version 4 client, it should contain
      additional information to distinguish the client from other user
      level clients running on the same host, such as a process id or
      other unique sequence.

   o  Additional information server.  This should not happen.

   One mechanism that tends to may be unique, such as one or
      more of:

      *  The client machine's serial number (for privacy reasons, it is
         best used to perform some one way function on satisfy these requirements is for
   the serial number). server to,

   o  divide the "other" field of each stateid into two fields:

      *  A MAC address. server verifier which uniquely designates a particular server
         instantiation.

      *  The timestamp  An index into a table of when the NFS version 4 software was first
         installed on locking-state structures.

   o  utilize the client (though this "seqid" field of each stateid, such that seqid is subject to the
         previously mentioned caution about using information
      monotonically incremented for each stateid that is
         stored in a file, because the file might only be accessible
         over NFS version 4).

      *  A true random number.  However since this number ought to be associated with
      the same between client incarnations, this shares index into the same
         problem as that of locking-state table.

   By matching the using incoming stateid and its field values with the timestamp of state
   held at the software
         installation.

   As a security measure, server, the server MUST NOT cancel a client's leased
   state is able to easily determine if the principal established the state for a given id string
   stateid is valid for its current instantiation and state.  If the
   stateid is not valid, the same as appropriate error can be supplied to the principal issuing
   client.

5.1.4.  Use of the SETCLIENTID.

   Note that SETCLIENTID stateid and SETCLIENTID_CONFIRM has Locking

   All READ, WRITE and SETATTR operations contain a secondary purpose
   of establishing the information the server needs to make callbacks to stateid.  For the client for purpose
   purposes of supporting delegations.  It is permitted to
   change this information via SETCLIENTID and SETCLIENTID_CONFIRM
   within section, SETATTR operations which change the same incarnation size
   attribute of a file are treated as if they are writing the client without removing area
   between the
   client's leased state.

   Once a SETCLIENTID old and SETCLIENTID_CONFIRM sequence has successfully
   completed, new size (i.e. the client uses range truncated or added to
   the short hand client identifier, of type
   clientid4, instead file by means of the longer and less compact nfs_client_id4
   structure.  This short hand client identifier (a clientid) SETATTR), even where SETATTR is
   assigned by the server and should be chosen so that it will not
   conflict with a clientid previously assigned by
   explicitly mentioned in the server.  This
   applies across server restarts or reboots.  When text.

   If the lock_owner performs a clientid is
   presented to READ or WRITE in a server and that clientid is not recognized, as would
   happen after situation in which it
   has established a server reboot, lock or share reservation on the server will reject the request with
   the error NFS4ERR_STALE_CLIENTID.  When this happens, the client must
   obtain (any OPEN
   constitutes a new clientid share reservation) the stateid (previously returned by use of
   the SETCLIENTID operation and then
   proceed server) must be used to any other necessary recovery for the server reboot case
   (See the section "Server Failure indicate what locks, including both
   record locks and Recovery").

   The client must also employ share reservations, are held by the SETCLIENTID operation when it
   receives a NFS4ERR_STALE_STATEID error using lockowner.  If
   no state is established by the client, either record lock or share
   reservation, a stateid derived from
   its current clientid, since this also indicates of all bits 0 is used.  Regardless whether a server reboot which
   has invalidated the existing clientid (see the next section
   "lock_owner and
   stateid Definition" for details).

   See the detailed descriptions of SETCLIENTID and SETCLIENTID_CONFIRM
   for all bits 0, or a complete specification of the operations.

6.1.2.  Server Release of Clientid

   If stateid returned by the server determines that is used,
   if there is a conflicting share reservation or mandatory record lock
   held on the client holds no associated state
   for its clientid, file, the server may choose MUST refuse to release service the clientid.  The
   server may make this choice for an inactive client so that resources READ or WRITE
   operation.

   Share reservations are not consumed established by those intermittently active clients.  If the
   client contacts the server after this release, the server must ensure
   the client receives the appropriate error so OPEN operations and by their
   nature are mandatory in that it will use when the
   SETCLIENTID/SETCLIENTID_CONFIRM sequence to establish a new identity.

   It should be clear OPEN denies READ or WRITE
   operations, that denial results in such operations being rejected
   with error NFS4ERR_LOCKED.  Record locks may be implemented by the
   server must as either mandatory or advisory, or the choice of mandatory or
   advisory behavior may be very hesitant to release a
   clientid since determined by the resulting work server on the client to recover from such
   an event will be the same burden as if basis of the server had failed and
   restarted.  Typically a server would not release
   file being accessed (for example, some UNIX-based servers support a clientid unless
   there had been no activity from that client for many minutes.

   Note
   "mandatory lock bit" on the mode attribute such that if set, record
   locks are required on the id string in a SETCLIENTID request file before I/O is properly
   constructed, possible).  When record
   locks are advisory, they only prevent the granting of conflicting
   lock requests and if have no effect on READs or WRITEs.  Mandatory
   record locks, however, prevent conflicting I/O operations.  When they
   are attempted, they are rejected with NFS4ERR_LOCKED.  When the
   client takes care gets NFS4ERR_LOCKED on a file it knows it has the proper share
   reservation for, it will need to use issue a LOCK request on the same principal
   for each successive use of SETCLIENTID, then, barring an active
   denial region
   of service attack, NFS4ERR_CLID_INUSE should never the file that includes the region the I/O was to be
   returned.

   However, client bugs, server bugs, or perhaps performed on,
   with an appropriate locktype (i.e.  READ*_LT for a deliberate change READ operation,
   WRITE*_LT for a WRITE operation).

   With NFS version 3, there was no notion of a stateid so there was no
   way to tell if the principal owner application process of the id string (such as the case of a client
   that changes security flavors, and under sending the new flavor, READ
   or WRITE operation had also acquired the appropriate record lock on
   the file.  Thus there is was no
   mapping way to implement mandatory locking.
   With the previous owner) will in rare cases result in
   NFS4ERR_CLID_INUSE.

   In stateid construct, this barrier has been removed.

   Note that event, when the server gets a SETCLIENTID for a client id UNIX environments that currently has no state, or it has state, but support mandatory file locking,
   the lease has
   expired, rather than returning NFS4ERR_CLID_INUSE, distinction between advisory and mandatory locking is subtle.  In
   fact, advisory and mandatory record locks are exactly the server MUST
   allow same in so
   far as the SETCLIENTID, APIs and confirm requirements on implementation.  If the new clientid mandatory
   lock attribute is set on the file, the server checks to see if followed by the
   lockowner has an appropriate SETCLIENTID_CONFIRM.

6.1.3.  lock_owner and stateid Definition

   When requesting a lock, shared (read) or exclusive (write)
   record lock on the client must present region it wishes to read or write to.  If there is
   no appropriate lock, the server checks if there is a conflicting lock
   (which can be done by attempting to acquire the
   clientid and an identifier for conflicting lock on
   the owner behalf of the requested lock.
   These two fields are referred to as the lock_owner lockowner, and if successful, release the definition
   of those fields are:

   o  A clientid returned by lock
   after the READ or WRITE is done), and if there is, the server as part of returns
   NFS4ERR_LOCKED.

   For Windows environments, there are no advisory record locks, so the client's use of
   server always checks for record locks during I/O requests.

   Thus, the SETCLIENTID operation.

   o  A variable length opaque array used NFS version 4 LOCK operation does not need to uniquely define distinguish
   between advisory and mandatory record locks.  It is the owner NFS version 4
   server's processing of a lock managed by the client.

      This may be READ and WRITE operations that introduces
   the distinction.

   Every stateid other than the special stateid values noted in this
   section, whether returned by an OPEN-type operation (i.e.  OPEN,
   OPEN_DOWNGRADE), or by a thread id, process id, LOCK-type operation (i.e.  LOCK or other unique value.

   When LOCKU),
   defines an access mode for the server grants file (i.e.  READ, WRITE, or READ-
   WRITE) as established by the original OPEN which began the lock, it responds with a unique stateid.
   The stateid is used
   sequence, and as modified by subsequent OPENs and OPEN_DOWNGRADEs
   within that stateid sequence.  When a shorthand reference to the lock_owner, since READ, WRITE, or SETATTR which
   specifies the server will be maintaining size attribute, is done, the correspondence between them.

   The server operation is free subject to form
   checking against the stateid in any manner access mode to verify that it chooses
   as long as it the operation is able to recognize invalid and out-of-date stateids.
   This requirement includes those stateids generated by earlier
   instances of
   appropriate given the server.  From this, OPEN with which the client can be properly
   notified of a server restart.  This notification will occur when operation is associated.

   In the
   client presents a stateid to case of WRITE-type operations (i.e.  WRITEs and SETATTRs which
   set size), the server from a previous
   instantiation.

   The server must be able to distinguish verify that the following situations access mode allows writing
   and return the error as specified:

   o  The stateid was generated by an earlier server instance (i.e.
      before a server reboot).  The NFS4ERR_OPENMODE error NFS4ERR_STALE_STATEID should
      be returned.

   o  The stateid was generated by if it does not.  In the case, of
   READ, the current server instance but may perform the
      stateid no longer designates corresponding check on the current locking state access
   mode, or it may choose to allow READ on opens for the
      lockowner-file pair WRITE only, to
   accommodate clients whose write implementation may unavoidably do
   reads (e.g. due to buffer cache constraints).  However, even if READs
   are allowed in question (i.e. one or more locking
      operations has occurred).  The error NFS4ERR_OLD_STATEID should be
      returned.

      This error condition will only occur when these circumstances, the client issues a
      locking request which changes a stateid while an I/O request that
      uses server MUST still check for
   locks that stateid is outstanding.

   o  The stateid was generated by conflict with the current READ (e.g. another open specify denial
   of READs).  Note that a server instance but the
      stateid which does enforce the access mode
   check on READs need not designate a locking state explicitly check for any active
      lockowner-file pair.  The error NFS4ERR_BAD_STATEID should be
      returned.

      This error condition will occur when there has been a logic error
      on conflicting share
   reservations since the part existence of the client or server.  This should not happen.

   One mechanism that may be used to satisfy these requirements is OPEN for
   the server to,

   o  divide the "other" field of each stateid into two fields:

      * read access guarantees
   that no conflicting share reservation can exist.

   A server verifier which uniquely designates a particular server
         instantiation.

      *  An index into a table stateid of locking-state structures.

   o  utilize all bits 1 (one) MAY allow READ operations to bypass
   locking checks at the "seqid" field of each stateid, such that seqid is
      monotonically incremented for each stateid that is associated server.  However, WRITE operations with
      the same index into the locking-state table.

   By matching the incoming a
   stateid and its field values with bits all 1 (one) MUST NOT bypass locking checks and are
   treated exactly the state
   held at the server, the server is able to easily determine same as if a stateid of all bits 0 were used.

   A lock may not be granted while a READ or WRITE operation using one
   of the special stateids is valid for its current instantiation being performed and state.  If the
   stateid is not valid, range of the appropriate error can be supplied to lock
   request conflicts with the
   client.

6.1.4.  Use range of the stateid and Locking

   All READ, READ or WRITE and SETATTR operations contain a stateid. operation.  For
   the purposes of this section, SETATTR operations which change the size
   attribute of paragraph, a file are treated as if they are writing the area
   between the old conflict occurs when a shared lock
   is requested and new size (i.e. the range truncated a WRITE operation is being performed, or added to
   the file by means of the SETATTR), even where SETATTR an
   exclusive lock is not
   explicitly mentioned in the text.

   If the lock_owner performs requested and either a READ or a WRITE in operation is
   being performed.  A SETATTR that sets size is treated similarly to a situation in which
   WRITE as discussed above.

5.1.5.  Sequencing of Lock Requests

   Locking is different than most NFS operations as it
   has established a lock or share reservation on the server (any OPEN
   constitutes a share reservation) the stateid (previously returned by
   the server) must be used to indicate what locks, including both
   record locks and share reservations, requires "at-
   most-one" semantics that are held by the lockowner.  If
   no state is established not provided by the client, either record lock or share
   reservation, ONCRPC.  ONCRPC over a stateid of all bits 0
   reliable transport is used.  Regardless whether not sufficient because a
   stateid sequence of all bits 0, locking
   requests may span multiple TCP connections.  In the face of
   retransmission or reordering, lock or unlock requests must have a stateid returned by the server is used,
   if there
   well defined and consistent behavior.  To accomplish this, each lock
   request contains a sequence number that is a conflicting share reservation or mandatory record lock
   held on the file, the consecutively increasing
   integer.  Different lock_owners have different sequences.  The server MUST refuse to service
   maintains the READ or WRITE
   operation.

   Share reservations are established by OPEN operations last sequence number (L) received and by their
   nature are mandatory in that when the OPEN denies READ or WRITE
   operations, response that denial results in such operations being rejected
   was returned.  The first request issued for any given lock_owner is
   issued with error NFS4ERR_LOCKED.  Record locks may be implemented by the
   server as either mandatory or advisory, or the choice a sequence number of mandatory or
   advisory behavior may zero.

   Note that for requests that contain a sequence number, for each
   lock_owner, there should be determined by the server on no more than one outstanding request.

   If a request (r) with a previous sequence number (r < L) is received,
   it is rejected with the basis return of the
   file being accessed (for example, some UNIX-based servers support error NFS4ERR_BAD_SEQID.  Given a
   "mandatory lock bit" on the mode attribute such that if set, record
   locks are required on
   properly-functioning client, the file response to (r) must have been
   received before I/O is possible).  When record
   locks are advisory, they only prevent the granting last request (L) was sent.  If a duplicate of conflicting
   lock requests and have no effect on READs or WRITEs.  Mandatory
   record locks, however, prevent conflicting I/O operations.  When they
   are attempted, they are rejected with NFS4ERR_LOCKED.  When
   last request (r == L) is received, the
   client gets NFS4ERR_LOCKED on stored response is returned.
   If a file it knows it has request beyond the proper share
   reservation for, next sequence (r == L + 2) is received, it will need to issue a LOCK request on is
   rejected with the region return of error NFS4ERR_BAD_SEQID.  Sequence
   history is reinitialized whenever the file that includes SETCLIENTID/SETCLIENTID_CONFIRM
   sequence changes the region client verifier.

   Since the I/O was to be performed on, sequence number is represented with an appropriate locktype (i.e.  READ*_LT for a READ operation,
   WRITE*_LT for a WRITE operation).

   With NFS version 3, there was no notion unsigned 32-bit
   integer, the arithmetic involved with the sequence number is mod
   2^32.  For an example of a stateid so there was no
   way modulo arithetic involving sequence numbers
   see [RFC793].

   It is critical the server maintain the last response sent to tell if the application process
   client to provide a more reliable cache of duplicate non-idempotent
   requests than that of the client sending traditional cache described in [Juszczak].
   The traditional duplicate request cache uses a least recently used
   algorithm for removing unneeded requests.  However, the READ
   or WRITE operation had also acquired last lock
   request and response on a given lock_owner must be cached as long as
   the appropriate record lock state exists on the file.  Thus there was no way to implement mandatory locking.
   With server.

   The client MUST monotonically increment the stateid construct, this barrier has been removed.

   Note that sequence number for UNIX environments that support mandatory file locking, the distinction between advisory
   CLOSE, LOCK, LOCKU, OPEN, OPEN_CONFIRM, and mandatory locking OPEN_DOWNGRADE
   operations.  This is subtle.  In
   fact, advisory and mandatory record locks are exactly the same true even in so
   far as the APIs and requirements on implementation.  If the mandatory
   lock attribute is set on the file, event that the server checks to see if previous
   operation that used the
   lockowner has sequence number received an appropriate shared (read) or exclusive (write)
   record lock on the region it wishes error.  The only
   exception to read or write to.  If there this rule is
   no appropriate lock, the server checks if there is a conflicting lock
   (which can be done by attempting to acquire the conflicting lock on the behalf previous operation received one of
   the lockowner, and if successful, release the lock
   after following errors: NFS4ERR_STALE_CLIENTID, NFS4ERR_STALE_STATEID,
   NFS4ERR_BAD_STATEID, NFS4ERR_BAD_SEQID, NFS4ERR_BADXDR,
   NFS4ERR_RESOURCE, NFS4ERR_NOFILEHANDLE.

5.1.6.  Recovery from Replayed Requests

   As described above, the READ or WRITE sequence number is done), and if there is, per lock_owner.  As long
   as the server returns
   NFS4ERR_LOCKED.

   For Windows environments, maintains the last sequence number received and follows
   the methods described above, there are no advisory record locks, so the
   server always checks for record locks during I/O risks of a Byzantine router
   re-sending old requests.

   Thus, the NFS version 4 LOCK operation does not  The server need to distinguish
   between advisory only maintain the
   (lock_owner, sequence number) state as long as there are open files
   or closed files with locks outstanding.

   LOCK, LOCKU, OPEN, OPEN_DOWNGRADE, and mandatory record locks.  It is CLOSE each contain a sequence
   number and therefore the NFS version 4
   server's processing risk of the READ and WRITE replay of these operations that introduces
   resulting in undesired effects is non-existent while the distinction.

   Every stateid other than server
   maintains the special stateid values noted in this
   section, whether returned by an OPEN-type operation (i.e.  OPEN,
   OPEN_DOWNGRADE), or by lock_owner state.

5.1.7.  Releasing lock_owner State

   When a LOCK-type operation (i.e.  LOCK particular lock_owner no longer holds open or LOCKU),
   defines an access mode for the file (i.e.  READ, WRITE, or READ-
   WRITE) as established by locking
   state at the original OPEN which began server, the stateid
   sequence, and as modified by subsequent OPENs and OPEN_DOWNGRADEs
   within that stateid sequence.  When a READ, WRITE, server may choose to release the sequence
   number state associated with the lock_owner.  The server may make
   this choice based on lease expiration, for the reclamation of server
   memory, or SETATTR which
   specifies other implementation specific details.  In any event, the size attribute,
   server is done, able to do this safely only when the operation lock_owner no longer
   is subject to
   checking against being utilized by the access mode client.  The server may choose to verify that hold the operation is
   appropriate given
   lock_owner state in the OPEN with which event that retransmitted requests are
   received.  However, the operation period to hold this state is associated. implementation
   specific.

   In the case of WRITE-type operations (i.e.  WRITEs and SETATTRs which
   set size), that a LOCK, LOCKU, OPEN_DOWNGRADE, or CLOSE is
   retransmitted after the server must verify has previously released the lock_owner
   state, the server will find that the access mode allows writing lock_owner has no files open and return
   an NFS4ERR_OPENMODE error if it will be returned to the client.  If the lock_owner does not.  In have
   a file open, the case, stateid will not match and again an error is
   returned to the client.

5.1.8.  Use of
   READ, Open Confirmation

   In the server may perform case that an OPEN is retransmitted and the corresponding check on lock_owner is being
   used for the access
   mode, first time or it may choose to allow READ on opens for WRITE only, to
   accommodate clients whose write implementation may unavoidably do
   reads (e.g. due to buffer cache constraints).  However, even if READs
   are allowed in these circumstances, the server MUST still check for
   locks that conflict with lock_owner state has been previously
   released by the READ (e.g. another open specify denial server, the use of READs).  Note that a server which does enforce the access mode
   check on READs need not explicitly check for conflicting share
   reservations since the existence of OPEN for read access guarantees
   that no conflicting share reservation can exist.

   A stateid of all bits 1 (one) MAY allow READ operations to bypass
   locking checks at OPEN_CONFIRM operation will
   prevent incorrect behavior.  When the server.  However, WRITE operations with a
   stateid with bits all 1 (one) MUST NOT bypass locking checks and are
   treated exactly server observes the same as if a stateid of all bits 0 were used.

   A lock may not be granted while a READ or WRITE operation using one use of the special stateids is being performed and
   lock_owner for the range of first time, it will direct the lock
   request conflicts with client to perform
   the range of OPEN_CONFIRM for the READ or WRITE operation.  For corresponding OPEN.  This sequence
   establishes the purposes use of this paragraph, a conflict occurs when a shared lock
   is requested and a WRITE operation is being performed, or an
   exclusive lock is requested lock_owner and either a READ or a WRITE operation is
   being performed.  A SETATTR that sets size is treated similarly to a
   WRITE as discussed above.

6.1.5.  Sequencing of Lock Requests

   Locking is different than most NFS operations as it requires "at-
   most-one" semantics that are not provided by ONCRPC.  ONCRPC over a
   reliable transport is not sufficient because a associated sequence of locking
   requests may span multiple TCP connections.  In number.
   Since the face of
   retransmission or reordering, lock or unlock requests must have OPEN_CONFIRM sequence connects a
   well defined and consistent behavior.  To accomplish this, each lock
   request contains new open_owner on the
   server with an existing open_owner on a client, the sequence number that is a consecutively increasing
   integer.  Different lock_owners
   may have different sequences. any value.  The OPEN_CONFIRM step assures the server
   maintains that
   the last sequence number (L) value received and is the response that
   was returned.  The first request issued correct one.  See the section "OPEN_CONFIRM
   - Confirm Open" for any given lock_owner is
   issued with further details.

   There are a sequence number of zero.

   Note that situations in which the requirement to confirm
   an OPEN would pose difficulties for requests the client and server, in that contain a sequence number, for each
   lock_owner, there should
   they would be no more than one outstanding request.

   If a request (r) with prevented from acting in a previous sequence number (r < L) is timely fashion on
   information received,
   it is rejected with because that information would be provisional,
   subject to deletion upon non-confirmation.  Fortunately, these are
   situations in which the return of error NFS4ERR_BAD_SEQID.  Given a
   properly-functioning client, server can avoid the response need for confirmation
   when responding to (r) open requests.  The two constraints are:

   o  The server must have been
   received before the last request (L) was sent.  If not bestow a duplicate of
   last request (r == L) is received, the stored response is returned.
   If delegation for any open which would
      require confirmation.

   o  The server MUST NOT require confirmation on a request beyond reclaim-type open
      (i.e. one specifying claim type CLAIM_PREVIOUS or
      CLAIM_DELEGATE_PREV).

   These constraints are related in that reclaim-type opens are the next sequence (r == L + 2) is received, it is
   rejected with only
   ones in which the return of error NFS4ERR_BAD_SEQID.  Sequence
   history is reinitialized whenever the SETCLIENTID/SETCLIENTID_CONFIRM
   sequence changes the client verifier.

   Since server may be required to send a delegation.  For
   CLAIM_NULL, sending the sequence number delegation is represented optional while for
   CLAIM_DELEGATE_CUR, no delegation is sent.

   Delegations being sent with an unsigned 32-bit
   integer, open requiring confirmation are
   troublesome because recovering from non-confirmation adds undue
   complexity to the arithmetic involved with protocol while requiring confirmation on reclaim-
   type opens poses difficulties in that the sequence number is mod
   2^32.  For an example of modulo arithetic involving sequence numbers
   see [RFC793].

   It is critical inability to resolve the server maintain
   status of the last response sent reclaim until lease expiration may make it difficult to
   have timely determination of the
   client to provide a more reliable cache set of duplicate non-idempotent
   requests than that locks being reclaimed (since
   the grace period may expire).

   Requiring open confirmation on reclaim-type opens is avoidable
   because of the traditional cache described nature of the environments in [Juszczak].
   The traditional duplicate request cache uses which such opens are
   done.  For CLAIM_PREVIOUS opens, this is immediately after server
   reboot, so there should be no time for lockowners to be created,
   found to be unused, and recycled.  For CLAIM_DELEGATE_PREV opens, we
   are dealing with a least recently used
   algorithm client reboot situation.  A server which supports
   delegation can be sure that no lockowners for removing unneeded requests.  However, the last that client have been
   recycled since client initialization and thus can ensure that
   confirmation will not be required.

5.2.  Lock Ranges

   The protocol allows a lock owner to request a lock with a byte range
   and response on then either upgrade or unlock a given lock_owner must be cached as long as sub-range of the initial lock.
   It is expected that this will be an uncommon type of request.  In any
   case, servers or server filesystems may not be able to support sub-
   range lock state exists on the server.

   The client MUST monotonically increment semantics.  In the sequence number event that a server receives a locking
   request that represents a sub-range of current locking state for the
   CLOSE, LOCK, LOCKU, OPEN, OPEN_CONFIRM, and OPEN_DOWNGRADE
   operations.  This is true even in
   lock owner, the event that server is allowed to return the previous
   operation error
   NFS4ERR_LOCK_RANGE to signify that used it does not support sub-range lock
   operations.  Therefore, the sequence number received an error.  The only
   exception client should be prepared to receive this rule is
   error and, if appropriate, report the previous operation received one of error to the following errors: NFS4ERR_STALE_CLIENTID, NFS4ERR_STALE_STATEID,
   NFS4ERR_BAD_STATEID, NFS4ERR_BAD_SEQID, NFS4ERR_BADXDR,
   NFS4ERR_RESOURCE, NFS4ERR_NOFILEHANDLE.

6.1.6.  Recovery requesting
   application.

   The client is discouraged from Replayed Requests

   As described above, combining multiple independent locking
   ranges that happen to be adjacent into a single request since the sequence number is per lock_owner.  As long
   as
   server may not support sub-range requests and for reasons related to
   the recovery of file locking state in the event of server maintains failure.
   As discussed in the last sequence number received section "Server Failure and follows Recovery" below, the methods described above, there are no risks of a Byzantine router
   re-sending old requests.  The
   server need may employ certain optimizations during recovery that work
   effectively only maintain when the
   (lock_owner, sequence number) state as long as there are open files
   or closed files with locks outstanding.

   LOCK, LOCKU, OPEN, OPEN_DOWNGRADE, and CLOSE each contain a sequence
   number and therefore the risk of the replay of these operations
   resulting in undesired effects client's behavior during lock recovery is non-existent while
   similar to the client's locking behavior prior to server
   maintains failure.

5.3.  Upgrading and Downgrading Locks

   If a client has a write lock on a record, it can request an atomic
   downgrade of the lock_owner state.

6.1.7.  Releasing lock_owner State

   When lock to a particular lock_owner no longer holds open or file locking
   state at read lock via the server, LOCK request, by setting
   the server may choose type to release READ_LT.  If the sequence
   number state associated with server supports atomic downgrade, the lock_owner.
   request will succeed.  If not, it will return NFS4ERR_LOCK_NOTSUPP.
   The server may make client should be prepared to receive this choice based on lease expiration, for error, and if
   appropriate, report the reclamation error to the requesting application.

   If a client has a read lock on a record, it can request an atomic
   upgrade of server
   memory, or other implementation specific details.  In any event, the
   server is able lock to do this safely only when a write lock via the lock_owner no longer
   is being utilized LOCK request by setting
   the client.  The server may choose type to hold WRITE_LT or WRITEW_LT.  If the
   lock_owner state in server does not support
   atomic upgrade, it will return NFS4ERR_LOCK_NOTSUPP.  If the event that retransmitted requests are
   received.  However, upgrade
   can be achieved without an existing conflict, the period to hold this state is implementation
   specific.

   In request will
   succeed.  Otherwise, the case that a LOCK, LOCKU, OPEN_DOWNGRADE, server will return either NFS4ERR_DENIED or CLOSE
   NFS4ERR_DEADLOCK.  The error NFS4ERR_DEADLOCK is
   retransmitted after returned if the server has previously released
   client issued the lock_owner
   state, LOCK request with the server will find that type set to WRITEW_LT and the lock_owner
   server has no files open and
   an error will detected a deadlock.  The client should be returned prepared to
   receive such errors and if appropriate, report the client.  If error to the lock_owner does have
   a file open,
   requesting application.

5.4.  Blocking Locks

   Some clients require the stateid will support of blocking locks.  The NFS version
   4 protocol must not match rely on a callback mechanism and again an error therefore is
   returned
   unable to notify a client when a previously denied lock has been
   granted.  Clients have no choice but to continually poll for the client.

6.1.8.  Use of Open Confirmation

   In the case that an OPEN is retransmitted
   lock.  This presents a fairness problem.  Two new lock types are
   added, READW and the lock_owner is being WRITEW, and are used for the first time or the lock_owner state has been previously
   released by to indicate to the server, server that
   the use client is requesting a blocking lock.  The server should maintain
   an ordered list of the OPEN_CONFIRM operation will
   prevent incorrect behavior. pending blocking locks.  When the server observes conflicting lock
   is released, the use of server may wait the
   lock_owner lease period for the first time, it will direct the
   waiting client to perform
   the OPEN_CONFIRM for re-request the corresponding OPEN.  This sequence
   establishes lock.  After the use of an lock_owner and associated sequence number.
   Since lease period
   expires the OPEN_CONFIRM sequence connects a new open_owner on next waiting client request is allowed the
   server with an existing open_owner on a client, the sequence number
   may have any value.  The OPEN_CONFIRM step assures the server that
   the value received is the correct one.  See the section "OPEN_CONFIRM
   - Confirm Open" for further details.

   There lock.  Clients
   are a number of situations in which the requirement required to confirm poll at an OPEN would pose difficulties for the client and server, in interval sufficiently small that
   they would be prevented from acting it is
   likely to acquire the lock in a timely fashion on
   information received, because that information would be provisional,
   subject to deletion upon non-confirmation.  Fortunately, these are
   situations in which the server can avoid the need for confirmation
   when responding to open requests.  The two constraints are:

   o manner.  The server must is not bestow a delegation for any open which would
      require confirmation.

   o  The server MUST NOT require confirmation on a reclaim-type open
      (i.e. one specifying claim type CLAIM_PREVIOUS or
      CLAIM_DELEGATE_PREV).

   These constraints are related in that reclaim-type opens are the only
   ones in which the server may be
   required to send maintain a delegation.  For
   CLAIM_NULL, sending the delegation is optional while for
   CLAIM_DELEGATE_CUR, no delegation is sent.

   Delegations being sent with an open requiring confirmation are
   troublesome because recovering from non-confirmation adds undue
   complexity to the protocol while requiring confirmation on reclaim-
   type opens poses difficulties in that the inability to resolve the
   status list of the reclaim until lease expiration may make pending blocked locks as it difficult is used to
   have timely determination
   increase fairness and not correct operation.  Because of the set
   unordered nature of locks being reclaimed (since
   the grace period may expire).

   Requiring open confirmation on reclaim-type opens is avoidable
   because crash recovery, storing of lock state to stable
   storage would be required to guarantee ordered granting of blocking
   locks.

   Servers may also note the nature lock types and delay returning denial of
   the environments in which such opens are
   done.  For CLAIM_PREVIOUS opens, this is immediately after server
   reboot, so there should be no request to allow extra time for lockowners to be created,
   found a conflicting lock to be unused, and recycled.  For CLAIM_DELEGATE_PREV opens, we
   are dealing with
   released, allowing a client reboot situation.  A server which supports
   delegation successful return.  In this way, clients can be sure that no lockowners
   avoid the burden of needlessly frequent polling for that client have been
   recycled since blocking locks.
   The server should take care in the length of delay in the event the
   client initialization and thus can ensure that
   confirmation will not be required.

6.2.  Lock Ranges retransmits the request.

5.5.  Lease Renewal

   The protocol allows purpose of a lock owner lease is to request allow a lock with server to remove stale locks
   that are held by a byte range
   and then either upgrade client that has crashed or unlock a sub-range of the initial lock. is otherwise
   unreachable.  It is expected that this will be an uncommon type of request.  In any
   case, servers or server filesystems not a mechanism for cache consistency and lease
   renewals may not be able to support sub-
   range lock semantics.  In denied if the event that a server receives a locking
   request that represents a sub-range lease interval has not expired.

   The following events cause implicit renewal of all of current locking state for the
   lock owner, the server leases for
   a given client (i.e. all those sharing a given clientid).  Each of
   these is allowed to return a positive indication that the error
   NFS4ERR_LOCK_RANGE to signify client is still active and
   that it the associated state held at the server, for the client, is
   still valid.

   o  An OPEN with a valid clientid.

   o  Any operation made with a valid stateid (CLOSE, DELEGRETURN, LOCK,
      LOCKU, OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, READ, SETATTR, WRITE).
      This does not support sub-range lock
   operations.  Therefore, include the client should be prepared to receive this
   error and, special stateids of all bits 0 or all
      bits 1.

      Note that if appropriate, report the error to the requesting
   application.

   The client is discouraged from combining multiple independent locking
   ranges that happen to be adjacent into a single request since had restarted or rebooted, the
   server may client
      would not support sub-range be making these requests and for reasons related to without issuing the recovery
      SETCLIENTID/SETCLIENTID_CONFIRM sequence.  The use of file locking state in the event of server failure.
   As discussed in
      SETCLIENTID/SETCLIENTID_CONFIRM sequence (one that changes the section "Server Failure and Recovery" below,
      client verifier) notifies the server may employ certain optimizations during recovery that work
   effectively only when the client's behavior during lock recovery is
   similar to drop the client's locking behavior prior to server failure.

6.3.  Upgrading and Downgrading Locks

   If a client has a write lock on a record, it can request an atomic
   downgrade of state
      associated with the lock to client.  SETCLIENTID/SETCLIENTID_CONFIRM never
      renews a read lock via the LOCK request, by setting
   the type to READ_LT. lease.

      If the server supports atomic downgrade, has rebooted, the
   request will succeed.  If not, it stateids (NFS4ERR_STALE_STATEID
      error) or the clientid (NFS4ERR_STALE_CLIENTID error) will return NFS4ERR_LOCK_NOTSUPP.
   The client should not be prepared to receive this error, and if
   appropriate, report
      valid hence preventing spurious renewals.

   This approach allows for low overhead lease renewal which scales
   well.  In the error to typical case no extra RPC calls are required for lease
   renewal and in the requesting application.

   If a client has a read lock on worst case one RPC is required every lease period
   (i.e. a record, it can request an atomic
   upgrade RENEW operation).  The number of locks held by the lock to client is
   not a write lock via factor since all state for the LOCK request by setting client is involved with the type to WRITE_LT or WRITEW_LT.  If
   lease renewal action.

   Since all operations that create a new lease also renew existing
   leases, the server does not support
   atomic upgrade, it will return NFS4ERR_LOCK_NOTSUPP.  If the upgrade must maintain a common lease expiration time for
   all valid leases for a given client.  This lease time can then be achieved without an existing conflict, the request will
   succeed.  Otherwise, the server will return either NFS4ERR_DENIED or
   NFS4ERR_DEADLOCK.
   easily updated upon implicit lease renewal actions.

5.6.  Crash Recovery

   The error NFS4ERR_DEADLOCK important requirement in crash recovery is returned if that both the client issued the LOCK request with the type set to WRITEW_LT
   and the server know when the other has detected failed.  Additionally, it is
   required that a deadlock.  The client should be prepared to
   receive such errors and if appropriate, report the error to the
   requesting application.

6.4.  Blocking Locks

   Some clients require the support sees a consistent view of blocking locks.  The NFS version
   4 protocol must not rely on a callback mechanism data across server
   restarts or reboots.  All READ and therefore is
   unable to notify a WRITE operations that may have
   been queued within the client or network buffers must wait until the
   client when a previously denied lock has been
   granted.  Clients have no choice but to continually poll for successfully recovered the
   lock.  This presents a fairness problem.  Two new lock types are
   added, READW locks protecting the READ and WRITEW,
   WRITE operations.

5.6.1.  Client Failure and are used to indicate to Recovery

   In the server event that
   the client is requesting a blocking lock.  The client fails, the server should maintain
   an ordered list of pending blocking locks.  When may recover the conflicting lock
   is released, client's
   locks when the server associated leases have expired.  Conflicting locks
   from another client may wait only be granted after this lease expiration.
   If the client is able to restart or reinitialize within the lease
   period for the first
   waiting client may be forced to re-request wait the lock.  After remainder of the lease
   period
   expires the next waiting before obtaining new locks.

   To minimize client request is allowed the lock.  Clients delay upon restart, lock requests are required to poll at associated
   with an interval sufficiently small that it is
   likely to acquire instance of the lock in client by a timely manner. client supplied verifier.  This
   verifier is part of the initial SETCLIENTID call made by the client.
   The server is not
   required to maintain returns a list of pending blocked locks clientid as it is used to
   increase fairness and not correct operation.  Because a result of the
   unordered nature of crash recovery, storing SETCLIENTID
   operation.  The client then confirms the use of lock state to stable
   storage would be required the clientid with
   SETCLIENTID_CONFIRM.  The clientid in combination with an opaque
   owner field is then used by the client to guarantee ordered granting of blocking
   locks.

   Servers may also note identify the lock types and delay returning denial owner for
   OPEN.  This chain of
   the request associations is then used to allow extra time identify all locks
   for a conflicting lock to be
   released, allowing a successful return.  In this way, clients can
   avoid the burden of needlessly frequent polling for blocking locks.
   The server should take care in the length of delay in particular client.

   Since the event verifier will be changed by the client retransmits upon each
   initialization, the request.

6.5.  Lease Renewal

   The purpose of server can compare a lease is new verifier to allow the verifier
   associated with currently held locks and determine that they do not
   match.  This signifies the client's new instantiation and subsequent
   loss of locking state.  As a result, the server is free to remove stale release
   all locks
   that are held by a client which are associated with the old clientid which was
   derived from the old verifier.

   Note that has crashed or is otherwise
   unreachable.  It is not a mechanism for cache consistency and lease
   renewals may not be denied if the lease interval has not expired.

   The following events cause implicit renewal of all verifier must have the same uniqueness properties of
   the leases verifier for the COMMIT operation.

5.6.2.  Server Failure and Recovery

   If the server loses locking state (usually as a given client (i.e. all those sharing a given clientid).  Each result of
   these is a positive indication that the client is still active and
   that the associated state held at the server, for the client, is
   still valid.

   o  An OPEN with a valid clientid.

   o  Any operation made with a valid stateid (CLOSE, DELEGRETURN, LOCK,
      LOCKU, OPEN, OPEN_CONFIRM, OPEN_DOWNGRADE, READ, SETATTR, WRITE).
      This does not include the special stateids of all bits 0 or all
      bits 1.

      Note that if the client had restarted restart
   or rebooted, the client
      would not be making these requests without issuing reboot), it must allow clients time to discover this fact and re-
   establish the
      SETCLIENTID/SETCLIENTID_CONFIRM sequence. lost locking state.  The use of the
      SETCLIENTID/SETCLIENTID_CONFIRM sequence (one that changes the client verifier) notifies the server must be able to drop re-
   establish the locking state
      associated with the client.  SETCLIENTID/SETCLIENTID_CONFIRM never
      renews a lease.

      If without having the server has rebooted, the stateids (NFS4ERR_STALE_STATEID
      error) or the clientid (NFS4ERR_STALE_CLIENTID error) will not be deny valid hence preventing spurious renewals.

   This approach allows for low overhead lease renewal which scales
   well.  In the typical case no extra RPC calls are required for lease
   renewal and in
   requests because the worst case one RPC server has granted conflicting access to another
   client.  Likewise, if there is required every lease period
   (i.e. a RENEW operation).  The number of locks held by the client is possibility that clients have not a factor since all
   yet re-established their locking state for the client is involved with the
   lease renewal action.

   Since all operations that create a new lease also renew existing
   leases, file, the server must maintain a common lease expiration time for
   all valid leases
   disallow READ and WRITE operations for a given client.  This lease time can then be
   easily updated upon implicit lease renewal actions.

6.6.  Crash Recovery that file.  The important requirement in crash duration of
   this recovery period is that both equal to the client
   and duration of the lease period.

   A client can determine that server know when the other failure (and thus loss of locking
   state) has failed.  Additionally, occurred, when it is
   required that receives one of two errors.  The
   NFS4ERR_STALE_STATEID error indicates a client sees stateid invalidated by a consistent view of data across server
   restarts
   reboot or reboots.  All READ and WRITE operations that may have
   been queued within restart.  The NFS4ERR_STALE_CLIENTID error indicates a
   clientid invalidated by reboot or restart.  When either of these are
   received, the client or network buffers must wait until establish a new clientid (See the
   client has successfully recovered section
   "Client ID") and re-establish the locking state as discussed below.

   The period of special handling of locking and READs and WRITEs, equal
   in duration to the lease period, is referred to as the "grace
   period".  During the grace period, clients recover locks protecting and the
   associated state by reclaim-type locking requests (i.e.  LOCK
   requests with reclaim set to true and OPEN operations with a claim
   type of CLAIM_PREVIOUS).  During the grace period, the server must
   reject READ and WRITE operations.

6.6.1.  Client Failure operations and Recovery

   In non-reclaim locking requests
   (i.e. other LOCK and OPEN operations) with an error of NFS4ERR_GRACE.

   If the event server can reliably determine that granting a client fails, the server may recover the client's non-reclaim
   request will not conflict with reclamation of locks when by other clients,
   the associated leases NFS4ERR_GRACE error does not have expired.  Conflicting locks
   from another client may only to be granted after this lease expiration.
   If returned and the non-
   reclaim client is request can be serviced.  For the server to be able to restart or reinitialize within the lease
   period
   service READ and WRITE operations during the client may grace period, it must
   again be forced able to wait the remainder of the lease
   period before obtaining new locks.

   To minimize client delay upon restart, lock requests are associated
   with guarantee that no possible conflict could arise
   between an instance of impending reclaim locking request and the client by a client supplied verifier.  This
   verifier READ or WRITE
   operation.  If the server is part of unable to offer that guarantee, the initial SETCLIENTID call made by
   NFS4ERR_GRACE error must be returned to the client.
   The server returns a clientid as

   For a result of the SETCLIENTID
   operation.  The client then confirms server to provide simple, valid handling during the use of grace
   period, the clientid with
   SETCLIENTID_CONFIRM.  The clientid in combination with an opaque
   owner field easiest method is then used to simply reject all non-reclaim
   locking requests and READ and WRITE operations by returning the client to identify
   NFS4ERR_GRACE error.  However, a server may keep information about
   granted locks in stable storage.  With this information, the server
   could determine if a regular lock owner for
   OPEN.  This chain or READ or WRITE operation can be
   safely processed.

   For example, if a count of associations is then used to identify all locks
   for on a particular client.

   Since the verifier will be changed by the client upon each
   initialization, given file is available in
   stable storage, the server can compare a new verifier to the verifier
   associated with currently held track reclaimed locks for the file and determine that they do not
   match.
   when all reclaims have been processed, non-reclaim locking requests
   may be processed.  This signifies way the client's new instantiation and subsequent
   loss of server can ensure that non-reclaim
   locking state.  As a result, requests will not conflict with potential reclaim requests.
   With respect to I/O requests, if the server is free able to release
   all locks held which determine that
   there are associated with the old clientid which was
   derived no outstanding reclaim requests for a file by information
   from stable storage or another similar mechanism, the old verifier.

   Note processing of
   I/O requests could proceed normally for the file.

   To reiterate, for a server that allows non-reclaim lock and I/O
   requests to be processed during the verifier must grace period, it MUST determine
   that no lock subsequently reclaimed will be rejected and that no lock
   subsequently reclaimed would have prevented any I/O operation
   processed during the same uniqueness properties of
   the verifier grace period.

   Clients should be prepared for the COMMIT operation.

6.6.2.  Server Failure return of NFS4ERR_GRACE errors for
   non-reclaim lock and Recovery

   If I/O requests.  In this case the server loses locking state (usually as client should
   employ a result retry mechanism for the request.  A delay (on the order of a restart
   or reboot), it must allow clients time
   several seconds) between retries should be used to discover this fact and re-
   establish avoid overwhelming
   the lost locking state. server.  Further discussion of the general issue is included in
   [Floyd].  The client must be account for the server that is able to re-
   establish the
   perform I/O and non-reclaim locking state without having the server deny valid requests because the server has granted conflicting access to another
   client.  Likewise, if there is within the possibility grace period
   as well as those that clients have can not
   yet re-established their do so.

   A reclaim-type locking state for a file, request outside the server must
   disallow READ and WRITE operations for that file.  The duration of
   this recovery server's grace period is equal to the duration of can
   only succeed if the lease period.

   A client server can determine guarantee that server failure (and thus loss of locking
   state) no conflicting lock or
   I/O request has occurred, when it receives one of two errors.  The
   NFS4ERR_STALE_STATEID error indicates a stateid invalidated by a been granted since reboot or restart.  The NFS4ERR_STALE_CLIENTID error indicates

   A server may, upon restart, establish a
   clientid invalidated by reboot or restart.  When either of these are
   received, new value for the client must establish lease
   period.  Therefore, clients should, once a new clientid (See is
   established, refetch the section
   "Client ID") lease_time attribute and re-establish the locking state use it as discussed below.

   The period of special handling of locking and READs and WRITEs, equal
   in duration to the basis
   for lease period, is referred to as the "grace
   period".  During the grace period, clients recover locks and renewal for the lease associated state by reclaim-type locking requests (i.e.  LOCK
   requests with reclaim set to true and OPEN operations with a claim
   type of CLAIM_PREVIOUS).  During the grace period, that server.
   However, the server must
   reject READ and WRITE operations and non-reclaim locking requests
   (i.e. other LOCK and OPEN operations) with an error of NFS4ERR_GRACE.

   If the server can reliably determine that granting establish, for this restart event, a non-reclaim
   request will not conflict with reclamation of locks by other clients, grace
   period at least as long as the NFS4ERR_GRACE error does not have to be returned and lease period for the previous server
   instantiation.  This allows the non-
   reclaim client request can be serviced.  For state obtained during the
   previous server instance to be able to
   service READ reliably re-established.

5.6.3.  Network Partitions and WRITE operations during Recovery

   If the grace period, it must
   again be able to guarantee that no possible conflict could arise
   between an impending reclaim locking request and duration of a network partition is greater than the READ or WRITE
   operation.  If lease
   period provided by the server, the server is unable to offer that guarantee, will have not received a
   lease renewal from the
   NFS4ERR_GRACE error must be returned to client.  If this occurs, the server may free
   all locks held for the client.

   For  As a server to provide simple, valid handling during result, all stateids held by the grace
   period,
   client will become invalid or stale.  Once the easiest method client is able to simply reject
   reach the server after such a network partition, all non-reclaim
   locking requests and READ and WRITE operations I/O submitted by
   the client with the now invalid stateids will fail with the server
   returning the
   NFS4ERR_GRACE error.  However, error NFS4ERR_EXPIRED.  Once this error is received,
   the client will suitably notify the application that held the lock.

   As a courtesy to the client or as an optimization, the server may keep information about
   granted
   continue to hold locks in stable storage.  With this information, the server
   could determine if a regular lock or READ or WRITE operation can be
   safely processed.

   For example, if a count of locks on a given file is available in
   stable storage, the server can track reclaimed locks for the file and
   when all reclaims have been processed, non-reclaim locking requests
   may be processed.  This way the server can ensure that non-reclaim
   locking requests will not conflict with potential reclaim requests.
   With respect to I/O requests, if the server is able to determine that
   there are no outstanding reclaim requests for a file by information
   from stable storage or another similar mechanism, the processing of
   I/O requests could proceed normally for the file.

   To reiterate, for a server that allows non-reclaim lock and I/O
   requests to be processed during the grace period, it MUST determine
   that no lock subsequently reclaimed will be rejected and that no lock
   subsequently reclaimed would have prevented any I/O operation
   processed during the grace period.

   Clients should be prepared for the return of NFS4ERR_GRACE errors for
   non-reclaim lock and I/O requests.  In this case the client should
   employ a retry mechanism for the request.  A delay (on the order of
   several seconds) between retries should be used to avoid overwhelming
   the server.  Further discussion of the general issue is included in
   [Floyd].  The client must account for the server that is able to
   perform I/O and non-reclaim locking requests within the grace period
   as well as those that can not do so.

   A reclaim-type locking request outside the server's grace period can
   only succeed if the server can guarantee that no conflicting lock or
   I/O request has been granted since reboot or restart.

   A server may, upon restart, establish a new value for the lease
   period.  Therefore, clients should, once a new clientid is
   established, refetch the lease_time attribute and use it as the basis
   for lease renewal for the lease associated with that server.
   However, the server must establish, for this restart event, a grace
   period at least as long as the lease period for the previous server
   instantiation.  This allows the client state obtained during the
   previous server instance to be reliably re-established.

6.6.3.  Network Partitions and Recovery

   If the duration of a network partition is greater than the lease
   period provided by the server, the server will have not received a
   lease renewal from the client.  If this occurs, the server may free
   all locks held for the client.  As a result, all stateids held by the
   client will become invalid or stale.  Once the client is able to
   reach the server after such a network partition, all I/O submitted by
   the client with the now invalid stateids will fail with the server
   returning the error NFS4ERR_EXPIRED.  Once this error is received,
   the client will suitably notify the application that held the lock.

   As a courtesy to the client or as an optimization, the server may
   continue to hold locks on behalf of a client for which recent
   communication has extended beyond the lease period.  If on behalf of a client for which recent
   communication has extended beyond the lease period.  If the server
   receives a lock or I/O request that conflicts with one of these
   courtesy locks, the server must free the courtesy lock and grant the
   new request.

   When a network partition is combined with a server reboot, there are
   edge conditions that place requirements on the server in order to
   avoid silent data corruption following the server reboot.  Two of
   these edge conditions are known, and are discussed below.

   The first edge condition has the following scenario:

   1.  Client A acquires a lock.

   2.  Client A and server experience mutual network partition, such
       that client A is unable to renew its lease.

   3.  Client A's lease expires, so server releases lock.

   4.  Client B acquires a lock that would have conflicted with that of
       Client A.

   5.  Client B releases the lock

   6.  Server reboots

   7.  Network partition between client A and server heals.

   8.  Client A issues a RENEW operation, and gets back a
       NFS4ERR_STALE_CLIENTID.

   9.  Client A reclaims its lock within the server's grace period.

   Thus, at the final step, the server has erroneously granted client
   A's lock reclaim.  If client B modified the object the lock was
   protecting, client A will experience object corruption.

   The second known edge condition follows:

   1.   Client A acquires a lock.

   2.   Server reboots.

   3.   Client A and server experience mutual network partition, such
        that client A is unable to reclaim its lock within the grace
        period.

   4.   Server's reclaim grace period ends.  Client A has no locks
        recorded on server.

   5.   Client B acquires a lock that would have conflicted with that of
        Client A.

   6.   Client B releases the lock

   7.   Server reboots a second time

   8.   Network partition between client A and server heals.

   9.   Client A issues a RENEW operation, and gets back a
        NFS4ERR_STALE_CLIENTID.

   10.  Client A reclaims its lock within the server's grace period.

   As with the first edge condition, the final step of the scenario of
   the second edge condition has the server erroneously granting client
   A's lock reclaim.

   Solving the first and second edge conditions requires that the server
   either assume after it reboots that edge condition occurs, and thus
   return NFS4ERR_NO_GRACE for all reclaim attempts, or that the server
   record some information stable storage.  The amount of information
   the server records in stable storage is in inverse proportion to how
   harsh the server wants to be whenever the edge conditions occur.  The
   server that is completely tolerant of all edge conditions will record
   in stable storage every lock that is acquired, removing the lock
   record from stable storage only when the lock is unlocked by the
   client and the lock's lockowner advances the sequence number such
   that the lock release is not the last stateful event for the
   lockowner's sequence.  For the two aforementioned edge conditions,
   the harshest a server can be, and still support a grace period for
   reclaims, requires that the server record in stable storage
   information some minimal information.  For example, a server
   implementation could, for each client, save in stable storage a
   record containing:

   o  the client's id string

   o  a boolean that indicates if the client's lease expired or if there
      was administrative intervention (see the section, Server
      Revocation of Locks) to revoke a record lock, share reservation,
      or delegation

   o  a timestamp that is updated the first time after a server boot or
      reboot the client acquires record locking, share reservation, or
      delegation state on the server.  The timestamp need not be updated
      on subsequent lock requests until the server reboots.

   The server implementation would also record in the stable storage the
   timestamps from the two most recent server reboots.

   Assuming the above record keeping, for the first edge condition,
   after the server reboots, the record that client A's lease expired
   means that another client could have acquired a conflicting record
   lock, share reservation, or delegation.  Hence the server must reject
   a reclaim from client A with the error NFS4ERR_NO_GRACE.

   For the second edge condition, after the server reboots for a second
   time, the record that the client had an unexpired record lock, share
   reservation, or delegation established before the server's previous
   incarnation means that the server must reject a reclaim from client A
   with the error NFS4ERR_NO_GRACE.

   Regardless of the level and approach to record keeping, the server
   MUST implement one of the following strategies (which apply to
   reclaims of share reservations, record locks, and delegations):

   1.  Reject all reclaims with NFS4ERR_NO_GRACE.  This is superharsh,
       but necessary if the server does not want to record lock state in
       stable storage.

   2.  Record sufficient state in stable storage such that all known
       edge conditions involving server reboot, including the two noted
       in this section, are detected.  False positives are acceptable.
       Note that at this time, it is not known if there are other edge
       conditions.

       In the event, after a server reboot, the server determines that
       there is unrecoverable damage or corruption to the the stable
       storage, then for all clients and/or locks affected, the server
       MUST return NFS4ERR_NO_GRACE.

   A mandate for the client's handling of the NFS4ERR_NO_GRACE error is
   outside the scope of this specification, since the strategies for
   such handling are very dependent on the client's operating
   environment.  However, one potential approach is described below.

   When the client receives NFS4ERR_NO_GRACE, it could examine the
   change attribute of the objects the client is trying to reclaim state
   for, and use that to determine whether to re-establish the state via
   normal OPEN or LOCK requests.  This is acceptable provided the
   client's operating environment allows it.  In otherwords, the client
   implementor is advised to document for his users the behavior.  The
   client could also inform the application that its record lock or
   share reservations (whether they were delegated or not) have been
   lost, such as via a UNIX signal, a GUI pop-up window, etc.  See the
   section, "Data Caching and Revocation" for a discussion of what the
   client should do for dealing with unreclaimed delegations on client
   state.

   For further discussion of revocation of locks see the section "Server
   Revocation of Locks".

6.7.

5.7.  Recovery from a Lock Request Timeout or Abort

   In the event a lock request times out, a client may decide to not
   retry the request.  The client may also abort the request when the
   process for which it was issued is terminated (e.g. in UNIX due to a
   signal).  It is possible though that the server received the request
   and acted upon it.  This would change the state on the server without
   the client being aware of the change.  It is paramount that the
   client re-synchronize state with server before it attempts any other
   operation that takes a seqid and/or a stateid with the same
   lock_owner.  This is straightforward to do without a special re-
   synchronize operation.

   Since the server maintains the last lock request and response
   received on the lock_owner, for each lock_owner, the client should
   cache the last lock request it sent such that the lock request did
   not receive a response.  From this, the next time the client does a
   lock operation for the lock_owner, it can send the cached request, if
   there is one, and if the request was one that established state (e.g.
   a LOCK or OPEN operation), the server will return the cached result
   or if never saw the request, perform it.  The client can follow up
   with a request to remove the state (e.g. a LOCKU or CLOSE operation).
   With this approach, the sequencing and stateid information on the
   client and server for the given lock_owner will re-synchronize and in
   turn the lock state will re-synchronize.

6.8.

5.8.  Server Revocation of Locks

   At any point, the server can revoke locks held by a client and the
   client must be prepared for this event.  When the client detects that
   its locks have been or may have been revoked, the client is
   responsible for validating the state information between itself and
   the server.  Validating locking state for the client means that it
   must verify or reclaim state for each lock currently held.

   The first instance of lock revocation is upon server reboot or re-
   initialization.  In this instance the client will receive an error
   (NFS4ERR_STALE_STATEID or NFS4ERR_STALE_CLIENTID) and the client will
   proceed with normal crash recovery as described in the previous
   section.

   The second lock revocation event is the inability to renew the lease
   before expiration.  While this is considered a rare or unusual event,
   the client must be prepared to recover.  Both the server and client
   will be able to detect the failure to renew the lease and are capable
   of recovering without data corruption.  For the server, it tracks the
   last renewal event serviced for the client and knows when the lease
   will expire.  Similarly, the client must track operations which will
   renew the lease period.  Using the time that each such request was
   sent and the time that the corresponding reply was received, the
   client should bound the time that the corresponding renewal could
   have occurred on the server and thus determine if it is possible that
   a lease period expiration could have occurred.

   The third lock revocation event can occur as a result of
   administrative intervention within the lease period.  While this is
   considered a rare event, it is possible that the server's
   administrator has decided to release or revoke a particular lock held
   by the client.  As a result of revocation, the client will receive an
   error of NFS4ERR_ADMIN_REVOKED.  In this instance the client may
   assume that only the lock_owner's locks have been lost.  The client
   notifies the lock holder appropriately.  The client may not assume
   the lease period has been renewed as a result of failed operation.

   When the client determines the lease period may have expired, the
   client must mark all locks held for the associated lease as
   "unvalidated".  This means the client has been unable to re-establish
   or confirm the appropriate lock state with the server.  As described
   in the previous section on crash recovery, there are scenarios in
   which the server may grant conflicting locks after the lease period
   has expired for a client.  When it is possible that the lease period
   has expired, the client must validate each lock currently held to
   ensure that a conflicting lock has not been granted.  The client may
   accomplish this task by issuing an I/O request, either a pending I/O
   or a zero-length read, specifying the stateid associated with the
   lock in question.  If the response to the request is success, the
   client has validated all of the locks governed by that stateid and
   re-established the appropriate state between itself and the server.
   If the I/O request is not successful, then one or more of the locks
   associated with the stateid was revoked by the server and the client
   must notify the owner.

6.9.

5.9.  Share Reservations

   A share reservation is a mechanism to control access to a file.  It
   is a separate and independent mechanism from record locking.  When a
   client opens a file, it issues an OPEN operation to the server
   specifying the type of access required (READ, WRITE, or BOTH) and the
   type of access to deny others (deny NONE, READ, WRITE, or BOTH).  If
   the OPEN fails the client will fail the application's open request.

   Pseudo-code definition of the semantics:

           if (request.access == 0)
           return (NFS4ERR_INVAL)
           else
           if ((request.access & file_state.deny)) ||
           (request.deny & file_state.access))
           return (NFS4ERR_DENIED)

   This checking of share reservations on OPEN is done with no exception
   for an existing OPEN for the same open_owner.

   The constants used for the OPEN and OPEN_DOWNGRADE operations for the
   access and deny fields are as follows:

           const OPEN4_SHARE_ACCESS_READ   = 0x00000001;
           const OPEN4_SHARE_ACCESS_WRITE  = 0x00000002;
           const OPEN4_SHARE_ACCESS_BOTH   = 0x00000003;

           const OPEN4_SHARE_DENY_NONE     = 0x00000000;
           const OPEN4_SHARE_DENY_READ     = 0x00000001;
           const OPEN4_SHARE_DENY_WRITE    = 0x00000002;
           const OPEN4_SHARE_DENY_BOTH     = 0x00000003;

6.10.

5.10.  OPEN/CLOSE Operations

   To provide correct share semantics, a client MUST use the OPEN
   operation to obtain the initial filehandle and indicate the desired
   access and what if any access to deny.  Even if the client intends to
   use a stateid of all 0's or all 1's, it must still obtain the
   filehandle for the regular file with the OPEN operation so the
   appropriate share semantics can be applied.  For clients that do not
   have a deny mode built into their open programming interfaces, deny
   equal to NONE should be used.

   The OPEN operation with the CREATE flag, also subsumes the CREATE
   operation for regular files as used in previous versions of the NFS
   protocol.  This allows a create with a share to be done atomically.

   The CLOSE operation removes all share reservations held by the
   lock_owner on that file.  If record locks are held, the client SHOULD
   release all locks before issuing a CLOSE.  The server MAY free all
   outstanding locks on CLOSE but some servers may not support the CLOSE
   of a file that still has record locks held.  The server MUST return
   failure, NFS4ERR_LOCKS_HELD, if any locks would exist after the
   CLOSE.

   The LOOKUP operation will return a filehandle without establishing
   any lock state on the server.  Without a valid stateid, the server
   will assume the client has the least access.  For example, a file
   opened with deny READ/WRITE cannot be accessed using a filehandle
   obtained through LOOKUP because it would not have a valid stateid
   (i.e. using a stateid of all bits 0 or all bits 1).

6.10.1.

5.10.1.  Close and Retention of State Information

   Since a CLOSE operation requests deallocation of a stateid, dealing
   with retransmission of the CLOSE, may pose special difficulties,
   since the state information, which normally would be used to
   determine the state of the open file being designated, might be
   deallocated, resulting in an NFS4ERR_BAD_STATEID error.

   Servers may deal with this problem in a number of ways.  To provide
   the greatest degree assurance that the protocol is being used
   properly, a server should, rather than deallocate the stateid, mark
   it as close-pending, and retain the stateid with this status, until
   later deallocation.  In this way, a retransmitted CLOSE can be
   recognized since the stateid points to state information with this
   distinctive status, so that it can be handled without error.

   When adopting this strategy, a server should retain the state
   information until the earliest of:

   o  Another validly sequenced request for the same lockowner, that is
      not a retransmission.

   o  The time that a lockowner is freed by the server due to period
      with no activity.

   o  All locks for the client are freed as a result of a SETCLIENTID.

   Servers may avoid this complexity, at the cost of less complete
   protocol error checking, by simply responding NFS4_OK in the event of
   a CLOSE for a deallocated stateid, on the assumption that this case
   must be caused by a retransmitted close.  When adopting this
   approach, it is desirable to at least log an error when returning a
   no-error indication in this situation.  If the server maintains a
   reply-cache mechanism, it can verify the CLOSE is indeed a
   retransmission and avoid error logging in most cases.

6.11.

5.11.  Open Upgrade and Downgrade

   When an OPEN is done for a file and the lockowner for which the open
   is being done already has the file open, the result is to upgrade the
   open file status maintained on the server to include the access and
   deny bits specified by the new OPEN as well as those for the existing
   OPEN.  The result is that there is one open file, as far as the
   protocol is concerned, and it includes the union of the access and
   deny bits for all of the OPEN requests completed.  Only a single
   CLOSE will be done to reset the effects of both OPENs.  Note that the
   client, when issuing the OPEN, may not know that the same file is in
   fact being opened.  The above only applies if both OPENs result in
   the OPENed object being designated by the same filehandle.

   When the server chooses to export multiple filehandles corresponding
   to the same file object and returns different filehandles on two
   different OPENs of the same file object, the server MUST NOT "OR"
   together the access and deny bits and coalesce the two open files.
   Instead the server must maintain separate OPENs with separate
   stateids and will require separate CLOSEs to free them.

   When multiple open files on the client are merged into a single open
   file object on the server, the close of one of the open files (on the
   client) may necessitate change of the access and deny status of the
   open file on the server.  This is because the union of the access and
   deny bits for the remaining opens may be smaller (i.e. a proper
   subset) than previously.  The OPEN_DOWNGRADE operation is used to
   make the necessary change and the client should use it to update the
   server so that share reservation requests by other clients are
   handled properly.

6.12.

5.12.  Short and Long Leases

   When determining the time period for the server lease, the usual
   lease tradeoffs apply.  Short leases are good for fast server
   recovery at a cost of increased RENEW or READ (with zero length)
   requests.  Longer leases are certainly kinder and gentler to servers
   trying to handle very large numbers of clients.  The number of RENEW
   requests drop in proportion to the lease time.  The disadvantages of
   long leases are slower recovery after server failure (the server must
   wait for the leases to expire and the grace period to elapse before
   granting new lock requests) and increased file contention (if client
   fails to transmit an unlock request then server must wait for lease
   expiration before granting new locks).

   Long leases are usable if the server is able to store lease state in
   non-volatile memory.  Upon recovery, the server can reconstruct the
   lease state from its non-volatile memory and continue operation with
   its clients and therefore long leases would not be an issue.

6.13.

5.13.  Clocks, Propagation Delay, and Calculating Lease Expiration

   To avoid the need for synchronized clocks, lease times are granted by
   the server as a time delta.  However, there is a requirement that the
   client and server clocks do not drift excessively over the duration
   of the lock.  There is also the issue of propagation delay across the
   network which could easily be several hundred milliseconds as well as
   the possibility that requests will be lost and need to be
   retransmitted.

   To take propagation delay into account, the client should subtract it
   from lease times (e.g. if the client estimates the one-way
   propagation delay as 200 msec, then it can assume that the lease is
   already 200 msec old when it gets it).  In addition, it will take
   another 200 msec to get a response back to the server.  So the client
   must send a lock renewal or write data back to the server 400 msec
   before the lease would expire.

   The server's lease period configuration should take into account the
   network distance of the clients that will be accessing the server's
   resources.  It is expected that the lease period will take into
   account the network propagation delays and other network delay
   factors for the client population.  Since the protocol does not allow
   for an automatic method to determine an appropriate lease period, the
   server's administrator may have to tune the lease period.

6.14.  Migration, Replication and State

   When responsibility for handling a given

6.  Client-Side Caching

   Client-side caching of data, of file system attributes, and of file names is transferred
   essential to providing good performance with the NFS protocol.
   Providing distributed cache coherence is a new server (migration) or difficult problem and
   previous versions of the NFS protocol have not attempted it.
   Instead, several NFS client chooses to use an alternate
   server (e.g. in response implementation techniques have been used
   to server unresponsiveness) in the context
   of file system replication, reduce the appropriate handling problems that a lack of state shared
   between the client and server (i.e. locks, leases, stateids, coherence poses for users.

   These techniques have not been clearly defined by earlier protocol
   specifications and
   clientids) it is as described below. often unclear what is valid or invalid
   client behavior.

   The handling differs between
   migration and replication.  For related discussion of file server
   state and recover NFS version 4 protocol uses many techniques similar to those that
   have been used in previous protocol versions.  The NFS version 4
   protocol does not provide distributed cache coherence.  However, it
   defines a more limited set of such see the sections under "File Locking caching guarantees to allow locks and
   Share Reservations"

   If server replica or a server immigrating a filesystem agrees to, or
   is expected to, accept opaque values
   share reservations to be used without destructive interference from the
   client that originated
   from another server, then it is side caching.

   In addition, the NFS version 4 protocol introduces a wise implementation practice for delegation
   mechanism which allows many decisions normally made by the servers server to encode the "opaque" values in network byte order.
   be made locally by clients.  This way, servers acting as replicas mechanism provides efficient
   support of the common cases where sharing is infrequent or immigrating filesystems will
   be able to parse values like stateids, directory cookies,
   filehandles, etc. even if their native byte order where
   sharing is different from
   other servers cooperating read-only.

6.1.  Performance Challenges for Client-Side Caching

   Caching techniques used in the replication and migration of the
   filesystem.

6.14.1.  Migration and State

   In the case previous versions of migration, the servers involved NFS protocol have
   been successful in providing good performance.  However, several
   scalability challenges can arise when those techniques are used with
   very large numbers of clients.  This is particularly true when
   clients are geographically distributed which classically increases
   the migration latency for cache revalidation requests.

   The previous versions of a
   filesystem SHOULD transfer all server state from the original to NFS protocol repeat their file data
   cache validation requests at the
   new server. time the file is opened.  This must be done
   behavior can have serious performance drawbacks.  A common case is
   one in which a way that file is transparent to the only accessed by a single client.  This state transfer will ease  Therefore,
   sharing is infrequent.

   In this case, repeated reference to the client's transition when server to find that no
   conflicts exist is expensive.  A better option with regards to
   performance is to allow a
   filesystem migration occurs.  If the servers are successful in
   transferring all state, the client will continue that repeatedly opens a file to do
   so without reference to use stateids
   assigned by the original server.  Therefore the new server must
   recognize these stateids as valid.  This holds true for the clientid
   as well.  Since responsibility for an entire filesystem is
   transferred done until potentially
   conflicting operations from another client actually occur.

   A similar situation arises in connection with a migration event, there is no possibility that
   conflicts will arise on file locking.  Sending
   file lock and unlock requests to the new server as a result of the transfer of
   locks.

   As part of the transfer of information between servers, leases would
   be transferred well as well.  The leases being transferred the read and
   write requests necessary to make data caching consistent with the new
   server will typically have a different expiration time from those for
   locking semantics (see the same client, previously on section "Data Caching and File Locking")
   can severely limit performance.  When locking is used to provide
   protection against infrequent conflicts, a large penalty is incurred.
   This penalty may discourage the old server.  To maintain use of file locking by applications.

   The NFS version 4 protocol provides more aggressive caching
   strategies with the
   property that all leases on following design goals:

   .IP o Compatibility with a given large range of server for a given client expire
   at semantics. .IP o
   Provide the same time, the server should advance the expiration time to
   the later caching benefits as previous versions of the leases being transferred or the leases already
   present.  This allows the client NFS
   protocol when unable to maintain lease renewal provide the more aggressive model. .IP o
   Requirements for aggressive caching are organized so that a large
   portion of both
   classes without special effort.

   The servers may choose not to transfer the state information upon
   migration.  However, this choice is discouraged.  In this case, benefit can be obtained even when not all of the client presents state information from the original server, the
   client must
   requirements can be prepared to receive either NFS4ERR_STALE_CLIENTID or
   NFS4ERR_STALE_STATEID from the new server.  The client should then
   recover its state information as it normally would in response to a
   server failure. met. .LP The new server must take care to allow appropriate requirements for the
   recovery of state information as it would
   server are discussed in later sections in which specific forms of
   caching are covered. (see the event section "Open Delegation").

6.2.  Delegation and Callbacks

   Recallable delegation of server
   restart.

6.14.2.  Replication and State

   Since responsibilities for a file to a
   client switch-over improves performance by avoiding repeated requests to the
   server in the case absence of replication is not under
   server control, inter-client conflict.  With the handling use of state is different.  In this case,
   leases, stateids and clientids do not have validity across a
   transition
   "callback" RPC from one server to another.  The client, a server recalls delegated
   responsibilities when another client must re-establish
   its locks on engages in sharing of a
   delegated file.

   A delegation is passed from the new server.  This can be compared server to the re-
   establishment client, specifying the
   object of locks by means the delegation and the type of reclaim-type requests after delegation.  There are
   different types of delegations but each type contains a
   server reboot.  The difference is stateid to be
   used to represent the delegation when performing operations that
   depend on the server has no provision delegation.  This stateid is similar to
   distinguish requests reclaiming locks from those obtaining new
   associated with locks
   or to defer and share reservations but differs in that the latter.  Thus,
   stateid for a client re-establishing delegation is associated with a lock clientid and may be
   used on the
   new server (by means behalf of a LOCK or OPEN request), may have all the
   requests denied due to a conflicting lock.  Since replication is
   intended open_owners for read-only use of filesystems, such denial of locks
   should not pose large difficulties in practice.  When an attempt to
   re-establish a lock on a new server the given client.  A
   delegation is denied, made to the client should
   treat the situation as if his original lock had been revoked.

6.14.3.  Notification of Migrated Lease

   In the case a whole and not to any specific
   process or thread of lease renewal, the client control within it.

   Because callback RPCs may not be submitting
   requests work in all environments (due to
   firewalls, for example), correct protocol operation does not depend
   on them.  Preliminary testing of callback functionality by means of a filesystem that has been migrated to another server.
   This
   CB_NULL procedure determines whether callbacks can occur because be supported.  The
   CB_NULL procedure checks the continuity of the implicit lease renewal mechanism.  The
   client renews leases for all filesystems when submitting callback path.  A
   server makes a request preliminary assessment of callback availability to
   any one filesystem at the server.

   In order for the a
   given client to schedule renewal of leases and avoids delegating responsibilities until it has
   determined that may have
   been relocated to callbacks are supported.  Because the new server, granting of a
   delegation is always conditional upon the client absence of conflicting
   access, clients must find out about
   lease relocation before those leases expire.  To accomplish this, all
   operations which implicitly renew leases for not assume that a client (i.e.  OPEN,
   CLOSE, READ, WRITE, RENEW, LOCK, LOCKT, LOCKU), delegation will return the error
   NFS4ERR_LEASE_MOVED if responsibility be granted and
   they must always be prepared for OPENs to be processed without any
   delegations being granted.

   Once granted, a delegation behaves in most ways like a lock.  There
   is an associated lease that is subject to renewal together with all
   of the other leases to be
   renewed has been transferred held by that client.

   Unlike locks, an operation by a second client to a new server.  This condition delegated file
   will
   continue until the client receives an NFS4ERR_MOVED error and cause the server receives the subsequent GETATTR(fs_locations) for an access to
   each filesystem for which a lease has been moved to recall a new server.

   When delegation through a client receives an NFS4ERR_LEASE_MOVED error, it should
   perform an operation on each filesystem associated with the server in
   question.  When the client receives an NFS4ERR_MOVED error, callback.

   On recall, the client can follow holding the normal process delegation must flush modified
   state (such as modified data) to obtain the new server
   information (through the fs_locations attribute) and perform renewal
   of those leases on the new server.  If the server has not had state
   transferred to it transparently, return the client
   delegation.  The conflicting request will not receive either
   NFS4ERR_STALE_CLIENTID or NFS4ERR_STALE_STATEID from a response
   until the new server,
   as described above, and recall is complete.  The recall is considered complete when
   the client can then recover state information
   as it does in returns the delegation or the event of server failure.

6.14.4.  Migration times out on the
   recall and revokes the Lease_time Attribute

   In order that delegation as a result of the client may appropriately manage its leases in timeout.
   Following the
   case resolution of migration, the destination recall, the server must establish proper
   values for has the lease_time attribute.

   When state is transferred transparently, that state should include
   information necessary to grant or deny the correct value of second client's request.

   At the lease_time attribute.  The lease_time
   attribute on time the destination server must never be less than client receives a delegation recall, it may have
   substantial state that on
   the source since this would result in premature expiration of leases
   granted by needs to be flushed to the source server.  Upon migration in which state is
   transferred transparently,  Therefore,
   the client is under no obligation to re-
   fetch server should allow sufficient time for the lease_time attribute and delegation to be
   returned since it may continue involve numerous RPCs to use the value
   previously fetched (on the source server). server.  If state has not been transferred transparently (i.e. the client sees
   a real or simulated
   server reboot), is able to determine that the client should fetch is diligently flushing
   state to the value server as a result of lease_time on the new (i.e. destination) server, and use it for
   subsequent locking requests.  However recall, the server must respect a grace
   period at least as long as the lease_time on may extend
   the source server, in
   order to ensure that clients have ample usual time to reclaim their locks
   before potentially conflicting non-reclaimed locks are granted.  The
   means by which the new server obtains allowed for a recall.  However, the value time allowed for
   recall completion should not be unbounded.

   An example of lease_time this is when responsibility to mediate opens on the
   old server a given
   file is left delegated to a client (see the section "Open Delegation").
   The server implementations.  It is will not
   specified by know what opens are in effect on the NFS version 4 protocol.

7.  Client-Side Caching

   Client-side caching of data, of file attributes, and of file names is
   essential client.
   Without this knowledge the server will be unable to providing good performance with determine if the NFS protocol.
   Providing distributed cache coherence is a difficult problem
   access and
   previous versions of deny state for the NFS protocol have not attempted it.
   Instead, several NFS client implementation techniques have file allows any particular open until
   the delegation for the file has been used returned.

   A client failure or a network partition can result in failure to reduce
   respond to a recall callback.  In this case, the problems server will revoke
   the delegation which in turn will render useless any modified state
   still on the client.

6.2.1.  Delegation Recovery

   There are three situations that a lack of coherence poses for users.
   These techniques have not been clearly defined by earlier protocol
   specifications and it is often unclear what is valid delegation recovery must deal with:

   o  Client reboot or invalid restart

   o  Server reboot or restart

   o  Network partition (full or callback-only)

   In the event the client behavior.

   The NFS version 4 protocol uses many techniques similar reboots or restarts, the failure to those that
   have been used renew
   leases will result in previous protocol versions.  The NFS version 4
   protocol does not provide distributed cache coherence.  However, it
   defines a more limited set the revocation of caching guarantees to allow record locks and share reservations to
   reservations.  Delegations, however, may be used without destructive interference from
   client side caching.

   In addition, the NFS version 4 protocol introduces treated a delegation
   mechanism bit
   differently.

   There will be situations in which allows many decisions normally made by the server delegations will need to be made locally by clients.  This mechanism provides efficient
   support of the common cases where sharing is infrequent
   reestablished after a client reboots or where
   sharing is read-only.

7.1.  Performance Challenges restarts.  The reason for Client-Side Caching

   Caching techniques used in previous versions of
   this is the NFS protocol client may have
   been successful in providing good performance.  However, several
   scalability challenges can arise when those techniques are used file data stored locally and this data
   was associated with
   very large numbers of clients.  This is particularly true when
   clients are geographically distributed which classically increases the latency for cache revalidation requests. previously held delegations.  The previous versions of client will
   need to reestablish the NFS protocol repeat their appropriate file data
   cache validation requests at the time state on the file is opened.  This
   behavior can have serious performance drawbacks.  A common case is
   one in which a file is only accessed by a single client.  Therefore,
   sharing is infrequent.

   In server.

   To allow for this case, repeated reference to type of client recovery, the server to find that no
   conflicts exist is expensive.  A better option with regards to
   performance is to allow a client that repeatedly opens a file to do
   so without reference to MAY extend the server.
   period for delegation recovery beyond the typical lease expiration
   period.  This is done until potentially
   conflicting operations implies that requests from another client actually occur.

   A similar situation arises in connection other clients that conflict
   with file locking.  Sending
   file lock and unlock requests these delegations will need to wait.  Because the server as well as normal recall
   process may require significant time for the read and
   write requests necessary client to make data caching consistent with the
   locking semantics (see the section "Data Caching and File Locking")
   can severely limit performance.  When locking is used flush changed
   state to provide
   protection against infrequent conflicts, a large penalty is incurred.
   This penalty may discourage the use server, other clients need be prepared for delays that
   occur because of file locking by applications.

   The NFS version 4 protocol provides more aggressive caching
   strategies with the following design goals:

   .IP o Compatibility with a large range of server semantics. .IP o
   Provide the same caching benefits as previous versions of the NFS
   protocol when unable to provide conflicting delegation.  This longer interval
   would increase the more aggressive model. .IP o
   Requirements window for aggressive caching are organized clients to reboot and consult stable
   storage so that a large
   portion of the benefit can be obtained even when not all of the
   requirements delegations can be met. .LP The appropriate requirements for the
   server reclaimed.  For open
   delegations, such delegations are discussed in later sections in which specific forms reclaimed using OPEN with a claim
   type of
   caching are covered. (see CLAIM_DELEGATE_PREV.  (See the section "Open Delegation").

7.2.  Delegation sections on "Data Caching and Callbacks

   Recallable delegation of server responsibilities
   Revocation" and "Operation 18: OPEN" for a file to a
   client improves performance by avoiding repeated requests to the
   server in the absence discussion of inter-client conflict.  With open
   delegation and the use details of a
   "callback" RPC from OPEN respectively).

   A server to client, MAY support a server recalls delegated
   responsibilities when another client engages in sharing claim type of CLAIM_DELEGATE_PREV, but if it
   does, it MUST NOT remove delegations upon SETCLIENTID_CONFIRM, and
   instead MUST, for a
   delegated file.

   A delegation is passed from the server to the client, specifying period of time no less than that of the
   object value of
   the delegation and lease_time attribute, maintain the type of delegation.  There are
   different types of client's delegations but each type contains a stateid to be
   used to represent allow
   time for the delegation when performing operations client to issue CLAIM_DELEGATE_PREV requests.  The
   server that
   depend on supports CLAIM_DELEGATE_PREV MUST support the delegation.  This stateid is DELEGPURGE
   operation.

   When the server reboots or restarts, delegations are reclaimed (using
   the OPEN operation with CLAIM_PREVIOUS) in a similar fashion to those
   associated with
   record locks and share reservations but differs in that reservations.  However, there is a slight
   semantic difference.  In the
   stateid for normal case if the server decides that a
   delegation is associated with a clientid and may should not be
   used on behalf of all granted, it performs the open_owners for requested action
   (e.g.  OPEN) without granting any delegation.  For reclaim, the
   server grants the given client.  A delegation but a special designation is made to applied so
   that the client treats the delegation as a whole and not to any specific
   process or thread of control within it.

   Because callback RPCs may not work in all environments (due to
   firewalls, for example), correct protocol operation does not depend
   on them.  Preliminary testing of callback functionality having been granted but
   recalled by means of a
   CB_NULL procedure determines whether callbacks can be supported.  The
   CB_NULL procedure checks the continuity server.  Because of this, the callback path.  A
   server makes a preliminary assessment of callback availability to a
   given client and avoids delegating responsibilities until it has
   determined that callbacks are supported.  Because the granting duty to
   write all modified state to the server and then return the
   delegation.  This process of a handling delegation is always conditional upon the absence reclaim reconciles
   three principles of conflicting
   access, clients must not assume that the NFS version 4 protocol:

   o  Upon reclaim, a delegation will be granted and
   they client reporting resources assigned to it by an
      earlier server instance must always be prepared for OPENs granted those resources.

   o  The server has unquestionable authority to be processed without any determine whether
      delegations being granted.

   Once are to be granted and, once granted, a delegation behaves in most ways like a lock.  There
   is an associated lease that is subject whether they are
      to renewal together with all be continued.

   o  The use of callbacks is not to be depended upon until the other leases held by that client.

   Unlike locks, an operation by a second client
      has proven its ability to receive them.

   When a delegated file
   will cause the server network partition occurs, delegations are subject to recall a delegation through a callback.

   On recall, freeing
   by the client holding server when the delegation must flush modified
   state (such as modified data) lease renewal period expires.  This is similar
   to the server behavior for locks and return share reservations.  For delegations,
   however, the
   delegation.  The server may extend the period in which conflicting
   requests are held off.  Eventually the occurrence of a conflicting
   request from another client will not receive a response
   until cause revocation of the recall is complete.  The recall is considered complete when delegation.
   A loss of the client returns callback path (e.g. by later network configuration
   change) will have the delegation or same effect.  A recall request will fail and
   revocation of the server times delegation will result.

   A client normally finds out on the
   recall about revocation of a delegation when it
   uses a stateid associated with a delegation and revokes receives the error
   NFS4ERR_EXPIRED.  It also may find out about delegation as revocation
   after a result client reboot when it attempts to reclaim a delegation and
   receives that same error.  Note that in the case of a revoked write
   open delegation, there are issues because data may have been modified
   by the timeout.
   Following client whose delegation is revoked and separately by other
   clients.  See the resolution section "Revocation Recovery for Write Open
   Delegation" for a discussion of such issues.  Note also that when
   delegations are revoked, information about the recall, revoked delegation
   will be written by the server has the
   information necessary to grant or deny the second client's request.

   At stable storage (as described in the time
   section "Crash Recovery").  This is done to deal with the client receives case in
   which a server reboots after revoking a delegation recall, it may have
   substantial state that needs to be flushed to the server.  Therefore, but before the server should allow sufficient time for
   client holding the revoked delegation is notified about the
   revocation.

6.3.  Data Caching

   When applications share access to a set of files, they need to be
   returned since it may involve numerous RPCs
   implemented so as to take account of the server.  If the
   server possibility of conflicting
   access by another application.  This is able to determine that true whether the client is diligently flushing
   state to applications
   in question execute on different clients or reside on the server as a result of same
   client.

   Share reservations and record locks are the recall, facilities the server may extend NFS
   version 4 protocol provides to allow applications to coordinate
   access by providing mutual exclusion facilities.  The NFS version 4
   protocol's data caching must be implemented such that it does not
   invalidate the usual time allowed for a recall.  However, assumptions that those using these facilities depend
   upon.

6.3.1.  Data Caching and OPENs

   In order to avoid invalidating the time allowed for
   recall completion sharing assumptions that
   applications rely on, NFS version 4 clients should not be unbounded.

   An example of this is when responsibility provide cached
   data to mediate opens applications or modify it on a given
   file is delegated behalf of an application when it
   would not be valid to obtain or modify that same data via a client READ or
   WRITE operation.

   Furthermore, in the absence of open delegation (see the section "Open Delegation").
   The server will not know what opens
   Delegation") two additional rules apply.  Note that these rules are
   obeyed in effect practice by many NFS version 2 and version 3 clients.

   o  First, cached data present on a client must be revalidated after
      doing an OPEN.  Revalidating means that the client.
   Without this knowledge client fetches the server will be unable to determine if
      change attribute from the
   access server, compares it with the cached
      change attribute, and deny state for if different, declares the file allows any particular open until cached data (as
      well as the delegation for the file has been returned.

   A client failure or a network partition can result in failure to
   respond cached attributes) as invalid.  This is to a recall callback.  In this case, ensure that
      the server will revoke data for the delegation which in turn will render useless any modified state OPENed file is still on correctly reflected in the client.

7.2.1.  Delegation Recovery

   There are three situations that delegation recovery
      client's cache.  This validation must deal with:

   o  Client reboot or restart

   o  Server reboot or restart

   o  Network partition (full be done at least when the
      client's OPEN operation includes DENY=WRITE or callback-only)

   In BOTH thus
      terminating a period in which other clients may have had the event
      opportunity to open the client reboots or restarts, file with WRITE access.  Clients may
      choose to do the failure revalidation more often (i.e. at OPENs specifying
      DENY=NONE) to renew
   leases will result in parallel the revocation NFS version 3 protocol's practice for
      the benefit of record locks users assuming this degree of cache revalidation.

      Since the change attribute is updated for data and share
   reservations.  Delegations, however, metadata
      modifications, some client implementors may be treated a bit
   differently.

   There will be situations in which delegations will need tempted to be
   reestablished after a client reboots or restarts. use the
      time_modify attribute and not change to validate cached data, so
      that metadata changes do not spuriously invalidate clean data.
      The reason for implementor is cautioned in this approach.  The change
      attribute is guaranteed to change for each update to the client may have file file,
      whereas time_modify is guaranteed to change only at the
      granularity of the time_delta attribute.  Use by the client's data stored locally
      cache validation logic of time_modify and this data
   was associated with not change runs the risk
      of the previously held delegations.  The client will
   need incorrectly marking stale data as valid.

   o  Second, modified data must be flushed to reestablish the appropriate server before closing
      a file state on the server.

   To allow OPENed for this type of client recovery, write.  This is complementary to the server MAY extend first rule.
      If the
   period for delegation recovery beyond data is not flushed at CLOSE, the typical lease expiration
   period.  This implies that requests from revalidation done after
      client OPENs as file is unable to achieve its purpose.  The other clients that conflict
   with these delegations will need
      aspect to wait.  Because flushing the normal recall
   process may require significant time for data before close is that the client to flush changed
   state data must be
      committed to stable storage, at the server, other clients need be prepared for delays that
   occur because before the CLOSE
      operation is requested by the client.  In the case of a conflicting delegation.  This longer interval
   would increase the window for clients to server
      reboot or restart and consult stable
   storage so that a CLOSEd file, it may not be possible to
      retransmit the delegations can data to be reclaimed.  For open
   delegations, such delegations are reclaimed using OPEN with a claim
   type of CLAIM_DELEGATE_PREV.  (See written to the sections on "Data file.  Hence, this
      requirement.

6.3.2.  Data Caching and
   Revocation" and "Operation 18: OPEN" for discussion of open
   delegation and the details File Locking

   For those applications that choose to use file locking instead of OPEN respectively).

   A server MAY support a claim type
   share reservations to exclude inconsistent file access, there is an
   analogous set of CLAIM_DELEGATE_PREV, but constraints that apply to client side data caching.
   These rules are effective only if it
   does, it MUST NOT remove delegations upon SETCLIENTID_CONFIRM, and
   instead MUST, for the file locking is used in a period of time no less than way
   that of the value of matches in an equivalent way the lease_time attribute, maintain actual READ and WRITE
   operations executed.  This is as opposed to file locking that is
   based on pure convention.  For example, it is possible to manipulate
   a two-megabyte file by dividing the client's delegations file into two one-megabyte
   regions and protecting access to allow
   time the two regions by file locks on
   bytes zero and one.  A lock for write on byte zero of the client file would
   represent the right to issue CLAIM_DELEGATE_PREV requests.  The
   server that supports CLAIM_DELEGATE_PREV MUST support do READ and WRITE operations on the DELEGPURGE
   operation.

   When first
   region.  A lock for write on byte one of the server reboots or restarts, delegations are reclaimed (using file would represent the OPEN operation with CLAIM_PREVIOUS) in a similar fashion
   right to
   record locks do READ and share reservations.  However, there is a slight
   semantic difference.  In WRITE operations on the normal case if second region.  As long
   as all applications manipulating the server decides that file obey this convention, they
   will work on a
   delegation should local filesystem.  However, they may not be granted, it performs the requested action
   (e.g.  OPEN) without granting any delegation.  For reclaim, work with the
   server grants
   NFS version 4 protocol unless clients refrain from data caching.

   The rules for data caching in the delegation but file locking environment are:

   o  First, when a special designation is applied so client obtains a file lock for a particular region,
      the data cache corresponding to that region (if any cache data
      exists) must be revalidated.  If the client treats change attribute indicates
      that the delegation as having file may have been granted but
   recalled by updated since the server.  Because of this, cached data was
      obtained, the client has must flush or invalidate the duty cached data for
      the newly locked region.  A client might choose to
   write invalidate all modified state to
      of non-modified cached data that it has for the server and then return file but the
   delegation.  This process of handling delegation reclaim reconciles
   three principles only
      requirement for correct operation is to invalidate all of the NFS version 4 protocol: data
      in the newly locked region.

   o  Upon reclaim,  Second, before releasing a client reporting resources assigned to it by an
      earlier server instance write lock for a region, all modified
      data for that region must be granted those resources.

   o  The server has unquestionable authority to determine whether
      delegations are to be granted and, once granted, whether they are flushed to be continued.

   o the server.  The use of callbacks is not to modified
      data must also be depended upon until the client
      has proven its ability written to receive them.

   When a network partition occurs, delegations are subject stable storage.

   Note that flushing data to freeing
   by the server when the lease renewal period expires.  This is similar
   to the behavior for locks and share reservations.  For delegations,
   however, the server may extend the period in which conflicting
   requests are held off.  Eventually the occurrence invalidation of a conflicting
   request from another cached
   data must reflect the actual byte ranges locked or unlocked.
   Rounding these up or down to reflect client cache block boundaries
   will cause revocation of the delegation.
   A loss problems if not carefully done.  For example, writing a
   modified block when only half of that block is within an area being
   unlocked may cause invalid modification to the callback path (e.g. by later network configuration
   change) will have the same effect.  A recall request will fail and
   revocation of region outside the delegation will result.

   A client normally finds out about revocation
   unlocked area.  This, in turn, may be part of a delegation when it
   uses region locked by
   another client.  Clients can avoid this situation by synchronously
   performing portions of write operations that overlap that portion
   (initial or final) that is not a stateid associated with full block.  Similarly, invalidating
   a delegation and receives locked area which is not an integral number of full buffer blocks
   would require the error
   NFS4ERR_EXPIRED.  It also may find out about delegation revocation
   after a client reboot when it attempts to reclaim a delegation and
   receives that same error.  Note read one or two partial blocks from the
   server if the revalidation procedure shows that in the case of a revoked write
   open delegation, there are issues because data may have been modified
   by which the
   client whose delegation possesses may not be valid.

   The data that is revoked and separately by other
   clients.  See written to the section "Revocation Recovery for Write Open
   Delegation" for server as a discussion of such issues.  Note also that when
   delegations are revoked, information about prerequisite to the revoked delegation
   will
   unlocking of a region must be written by written, at the server server, to stable storage (as described in the
   section "Crash Recovery").
   storage.  The client may accomplish this either with synchronous
   writes or by following asynchronous writes with a COMMIT operation.
   This is done to deal with required because retransmission of the case in
   which modified data after a
   server reboots after revoking reboot might conflict with a delegation but before the lock held by another client.

   A client holding the revoked delegation is notified about the
   revocation.

7.3.  Data Caching

   When applications share access implementation may choose to accommodate applications which
   use record locking in non-standard ways (e.g. using a set of files, they need to be
   implemented so record lock as
   a global semaphore) by flushing to take account of the possibility of conflicting
   access server more data upon an LOCKU
   than is covered by another application. the locked range.  This is true whether may include modified data
   within files other than the applications
   in question execute on different clients or reside on one for which the same
   client.

   Share reservations unlocks are being done.
   In such cases, the client must not interfere with applications whose
   READs and record locks WRITEs are being done only within the facilities bounds of record
   locks which the NFS
   version 4 protocol provides application holds.  For example, an application locks
   a single byte of a file and proceeds to allow applications write that single byte.  A
   client that chose to coordinate
   access handle a LOCKU by providing mutual exclusion facilities.  The NFS version 4
   protocol's flushing all modified data caching must be implemented such that it does not
   invalidate the assumptions that those using these facilities depend
   upon.

7.3.1.  Data Caching and OPENs

   In order to avoid invalidating
   the sharing assumptions server could validly write that
   applications rely on, NFS version 4 clients should not provide cached
   data single byte in response to applications or modify it on behalf of an application when
   unrelated unlock.  However, it would not be valid to obtain or modify write the entire
   block in which that same single written byte was located since it includes
   an area that is not locked and might be locked by another client.
   Client implementations can avoid this problem by dividing files with
   modified data via into those for which all modifications are done to
   areas covered by an appropriate record lock and those for which there
   are modifications not covered by a READ or
   WRITE operation.

   Furthermore, in record lock.  Any writes done for
   the absence former class of open delegation (see files must not include areas not locked and thus
   not modified on the section "Open
   Delegation") two additional rules apply.  Note that these rules are
   obeyed in practice by many NFS version 2 client.

6.3.3.  Data Caching and version 3 clients.

   o  First, cached Mandatory File Locking

   Client side data present on caching needs to respect mandatory file locking when
   it is in effect.  The presence of mandatory file locking for a client must be revalidated after
      doing an OPEN.  Revalidating means that given
   file is indicated when the client fetches the
      change attribute gets back NFS4ERR_LOCKED from the server, compares a
   READ or WRITE on a file it with the cached
      change attribute, and if different, declares the cached data (as
      well as the cached attributes) as invalid.  This has an appropriate share reservation for.
   When mandatory locking is to ensure that in effect for a file, the client must check
   for an appropriate file lock for data being read or written.  If a
   lock exists for the OPENed file is still correctly reflected in range being read or written, the client may
   satisfy the request using the client's validated cache.  This validation  If an
   appropriate file lock is not held for the range of the read or write,
   the read or write request must not be done at least when satisfied by the client's OPEN operation includes DENY=WRITE cache
   and the request must be sent to the server for processing.  When a
   read or BOTH thus
      terminating write request partially overlaps a period in which other clients may have had locked region, the
      opportunity to open request
   should be subdivided into multiple pieces with each region (locked or
   not) treated appropriately.

6.3.4.  Data Caching and File Identity

   When clients cache data, the file with WRITE access.  Clients may
      choose data needs to be organized
   according to do the revalidation more often (i.e. at OPENs specifying
      DENY=NONE) filesystem object to parallel which the data belongs.  For
   NFS version 3 protocol's clients, the typical practice has been to assume for
   the benefit of users assuming this degree purpose of caching that distinct filehandles represent distinct
   filesystem objects.  The client then has the choice to organize and
   maintain the data cache revalidation.

      Since on this basis.

   In the change attribute NFS version 4 protocol, there is updated for data and metadata
      modifications, some client implementors may be tempted to use now the
      time_modify attribute and not change possibility to validate cached data, so
      that metadata changes do not spuriously invalidate clean data.
      The implementor is cautioned in this approach.  The change
      attribute is guaranteed to change for each update to the file,
      whereas time_modify is guaranteed to change only at have
   significant deviations from a "one filehandle per object" model
   because a filehandle may be constructed on the
      granularity basis of the time_delta attribute.  Use by object's
   pathname.  Therefore, clients need a reliable method to determine if
   two filehandles designate the client's data
      cache validation logic of time_modify same filesystem object.  If clients
   were simply to assume that all distinct filehandles denote distinct
   objects and not change runs the risk
      of proceed to do data caching on this basis, caching
   inconsistencies would arise between the distinct client incorrectly marking stale data as valid.

   o  Second, modified data must be flushed side objects
   which mapped to the same server before closing side object.

   By providing a file OPENed for write.  This is complementary method to differentiate filehandles, the first rule.
      If NFS version 4
   protocol alleviates a potential functional regression in comparison
   with the data is not flushed at CLOSE, NFS version 3 protocol.  Without this method, caching
   inconsistencies within the revalidation done after same client OPENs as file is unable to achieve its purpose.  The other
      aspect to flushing could occur and this has not
   been present in previous versions of the data before close is NFS protocol.  Note that the data must be
      committed it
   is possible to stable storage, at the server, before the CLOSE
      operation have such inconsistencies with applications executing
   on multiple clients but that is requested by not the client.  In issue being addressed here.

   For the case purposes of a server
      reboot or restart and a CLOSEd file, it may not be possible to
      retransmit the data caching, the following steps allow an NFS
   version 4 client to be written to determine whether two distinct filehandles denote
   the file.  Hence, this
      requirement.

7.3.2.  Data Caching and File Locking

   For those applications that choose same server side object:

   o  If GETATTR directed to use file locking instead two filehandles returns different values of
   share reservations to exclude inconsistent
      the fsid attribute, then the filehandles represent distinct
      objects.

   o  If GETATTR for any file access, there is with an
   analogous set of constraints fsid that apply to client side data caching.
   These rules are effective only if matches the file locking is used fsid of the
      two filehandles in question returns a way
   that matches in an equivalent way the actual READ and WRITE
   operations executed.  This is as opposed to file locking that is
   based on pure convention.  For example, it is possible to manipulate unique_handles attribute
      with a two-megabyte file by dividing value of TRUE, then the file into two one-megabyte
   regions and protecting access objects are distinct.

   o  If GETATTR directed to the two regions by file locks on
   bytes zero and one.  A lock filehandles does not return the
      fileid attribute for write on byte zero both of the file would
   represent handles, then it cannot be
      determined whether the right to do READ and WRITE two objects are the same.  Therefore,
      operations which depend on that knowledge (e.g. client side data
      caching) cannot be done reliably.

   o  If GETATTR directed to the first
   region.  A lock two filehandles returns different
      values for write on byte one of the file would represent the
   right to do READ and WRITE operations on the second region.  As long
   as all applications manipulating the file obey this convention, fileid attribute, then they
   will work on a local filesystem.  However, are distinct objects.

   o  Otherwise they may not work with the
   NFS version 4 protocol unless clients refrain from data caching.

   The rules for data caching in are the file locking environment are:

   o  First, when a client obtains same object.

6.4.  Open Delegation

   When a file lock for a particular region, is being OPENed, the data cache corresponding to server may delegate further handling
   of opens and closes for that region (if any cache data
      exists) must be revalidated.  If file to the change attribute indicates opening client.  Any such
   delegation is recallable, since the circumstances that allowed for
   the file may have been updated since delegation are subject to change.  In particular, the cached data was
      obtained, server may
   receive a conflicting OPEN from another client, the client server must flush or invalidate the cached data for
   recall the newly locked region.  A client might choose to invalidate all
      of non-modified cached data that it has for delegation before deciding whether the file but OPEN from the only
      requirement for correct operation other
   client may be granted.  Making a delegation is up to invalidate all of the data server and
   clients should not assume that any particular OPEN either will or
   will not result in the newly locked region.

   o  Second, before releasing a write lock for an open delegation.  The following is a region, all modified
      data for typical
   set of conditions that region must servers might use in deciding whether OPEN
   should be flushed to the server. delegated:

   o  The modified
      data client must also be written able to stable storage.

   Note that flushing data respond to the server's callback
      requests.  The server and will use the invalidation CB_NULL procedure for a test of cached
   data
      callback ability.

   o  The client must reflect the actual byte ranges locked or unlocked.
   Rounding these up or down have responded properly to reflect client cache block boundaries
   will cause problems if not carefully done.  For example, writing a
   modified block when only half of previous recalls.

   o  There must be no current open conflicting with the requested
      delegation.

   o  There should be no current delegation that block is within an area conflicts with the
      delegation being
   unlocked may cause invalid modification to requested.

   o  The probability of future conflicting open requests should be low
      based on the region outside recent history of the
   unlocked area.  This, in turn, may be part file.

   o  The existence of a region locked by
   another client.  Clients can avoid this situation by synchronously
   performing portions any server-specific semantics of write operations that overlap that portion
   (initial or final) OPEN/CLOSE that is not a full block.  Similarly, invalidating
   a locked area which is not an integral number of full buffer blocks
      would require the client to read one or two partial blocks from make the
   server if required handling incompatible with the revalidation procedure shows prescribed
      handling that the data which the delegated client possesses may not be valid.

   The data that is written to the server as a prerequisite to the
   unlocking would apply (see below).

   There are two types of a region must open delegations, read and write.  A read open
   delegation allows a client to handle, on its own, requests to open a
   file for reading that do not deny read access to others.  Multiple
   read open delegations may be written, at outstanding simultaneously and do not
   conflict.  A write open delegation allows the server, to stable
   storage.  The client to handle, on
   its own, all opens.  Only one write open delegation may accomplish this either with synchronous
   writes or by following asynchronous writes with exist for a COMMIT operation.
   This is required because retransmission of the modified data after
   given file at a
   server reboot might conflict given time and it is inconsistent with any read open
   delegations.

   When a lock held by another client.

   A client implementation may choose to accommodate applications which
   use record locking in non-standard ways (e.g. using a record lock as has a global semaphore) by flushing read open delegation, it may not make any changes
   to the server more data upon an LOCKU
   than is covered by contents or attributes of the locked range.  This file but it is assured that no
   other client may include modified do so.  When a client has a write open delegation,
   it may modify the file data
   within files since no other than client will be accessing
   the one for file's data.  The client holding a write delegation may only
   affect file attributes which the unlocks are being done.
   In such cases, intimately connected with the file
   data: size, time_modify, change.

   When a client must has an open delegation, it does not interfere with applications whose
   READs and WRITEs are being done only within send OPENs or
   CLOSEs to the bounds of record
   locks which server but updates the application holds. appropriate status internally.
   For example, an application locks
   a single byte of a file and proceeds to write that single byte.  A
   client read open delegation, opens that chose to handle a LOCKU by flushing all modified data to
   the server could validly cannot be handled locally
   (opens for write or that single byte in response to an
   unrelated unlock.  However, it would not deny read access) must be valid sent to write the entire
   block in which that single written byte was located since it includes
   server.

   When an area that open delegation is not locked and might be locked by another client.
   Client implementations can avoid this problem by dividing files with
   modified data into those for which all modifications are done made, the response to
   areas covered by the OPEN contains an appropriate record lock and those for
   open delegation structure which there
   are modifications not covered by a record lock.  Any writes done for specifies the former class following:

   o  the type of files must not include areas not locked and thus
   not modified delegation (read or write)

   o  space limitation information to control flushing of data on close
      (write open delegation only, see the client.

7.3.3. section "Open Delegation and
      Data Caching Caching")

   o  an nfsace4 specifying read and Mandatory File Locking

   Client side data caching needs to respect mandatory file locking when
   it is in effect.  The presence of mandatory file locking for write permissions

   o  a given
   file is indicated when stateid to represent the client gets back NFS4ERR_LOCKED from a delegation for READ or and WRITE on a file it has an appropriate share reservation for.
   When mandatory locking

   The delegation stateid is in effect for a file, separate and distinct from the client must check
   for an appropriate file lock for data being read or written.  If a
   lock exists stateid for
   the range being read or written, OPEN proper.  The standard stateid, unlike the client may
   satisfy delegation
   stateid, is associated with a particular lock_owner and will continue
   to be valid after the delegation is recalled and the file remains
   open.

   When a request using internal to the client's validated cache.  If an
   appropriate client is made to open a file lock and open
   delegation is not held for in effect, it will be accepted or rejected solely on
   the range basis of the read or write,
   the read or write request must not following conditions.  Any requirement for other
   checks to be satisfied made by the client's cache
   and delegate should result in open delegation
   being denied so that the request must checks can be sent to made by the server itself.

   o  The access and deny bits for processing.  When a
   read or write request partially overlaps a locked region, the request
   should be subdivided into multiple pieces with each region (locked or
   not) treated appropriately.

7.3.4.  Data Caching and File Identity

   When clients cache data, the file data needs to be organized
   according to as described
      in the filesystem object section "Share Reservations".

   o  The read and write permissions as determined below.

   The nfsace4 passed with delegation can be used to which avoid frequent
   ACCESS calls.  The permission check should be as follows:

   o  If the data belongs.  For
   NFS version 3 clients, nfsace4 indicates that the typical practice has been open may be done, then it should
      be granted without reference to assume for the purpose of caching server.

   o  If the nfsace4 indicates that distinct filehandles represent distinct
   filesystem objects.  The client then has the choice open may not be done, then an
      ACCESS request must be sent to organize and
   maintain the data cache on this basis.

   In the NFS version 4 protocol, there is now the possibility server to have
   significant deviations from a "one filehandle per object" model
   because a filehandle obtain the definitive
      answer.

   The server may be constructed on return an nfsace4 that is more restrictive than the basis
   actual ACL of the object's
   pathname.  Therefore, clients need a reliable method to determine if
   two filehandles designate the same filesystem object.  If clients
   were simply to assume file.  This includes an nfsace4 that specifies
   denial of all distinct filehandles denote distinct
   objects and proceed to do data caching on this basis, caching
   inconsistencies would arise between access.  Note that some common practices such as
   mapping the distinct client side objects
   which mapped traditional user "root" to the same server side object.

   By providing a method user "nobody" may make it
   incorrect to differentiate filehandles, return the NFS version 4
   protocol alleviates a potential functional regression actual ACL of the file in comparison
   with the NFS version 3 protocol.  Without this method, delegation
   response.

   The use of delegation together with various other forms of caching
   inconsistencies within
   creates the same client could occur and this has not
   been present in previous versions possibility that no server authentication will ever be
   performed for a given user since all of the NFS protocol.  Note that it
   is possible to have such inconsistencies with applications executing
   on multiple clients but that is not the issue being addressed here.

   For the purposes of data caching, user's requests might be
   satisfied locally.  Where the following steps allow an NFS
   version 4 client to determine whether two distinct filehandles denote is depending on the same server side object:

   o  If GETATTR directed to two filehandles returns different values for
   authentication, the client should be sure authentication occurs for
   each user by use of the fsid attribute, then ACCESS operation.  This should be the filehandles represent distinct
      objects.

   o  If GETATTR for any file with case
   even if an fsid that matches ACCESS operation would not be required otherwise.  As
   mentioned before, the fsid server may enforce frequent authentication by
   returning an nfsace4 denying all access with every open delegation.

6.4.1.  Open Delegation and Data Caching

   OPEN delegation allows much of the
      two filehandles in question returns a unique_handles attribute message overhead associated with a value of TRUE, then
   the two objects are distinct.

   o  If GETATTR directed opening and closing files to the two filehandles be eliminated.  An open when an open
   delegation is in effect does not return the
      fileid attribute for both of the handles, then it cannot be
      determined whether the two objects are the same.  Therefore,
      operations which depend on require that knowledge (e.g. client side data
      caching) cannot a validation message be done reliably.

   o  If GETATTR directed
   sent to the two filehandles returns different
      values for the fileid attribute, then they are distinct objects.

   o  Otherwise they are server.  The continued endurance of the same object.

7.4.  Open Delegation

   When "read open
   delegation" provides a file is being OPENed, the server may delegate further handling
   of opens and closes for guarantee that no OPEN for write and thus no
   write has occurred.  Similarly, when closing a file to the opening client.  Any such opened for write
   and if write open delegation is recallable, since the circumstances that allowed for in effect, the delegation are subject data written does not
   have to be flushed to change.  In particular, the server may
   receive a conflicting OPEN from another client, until the server must
   recall open delegation is
   recalled.  The continued endurance of the open delegation before deciding whether provides a
   guarantee that no open and thus no read or write has been done by
   another client.

   For the purposes of open delegation, READs and WRITEs done without an
   OPEN from are treated as the other
   client may be granted.  Making functional equivalents of a delegation is up corresponding
   type of OPEN.  This refers to the server READs and
   clients should not assume WRITEs that any particular OPEN either will use the
   special stateids consisting of all zero bits or all one bits.
   Therefore, READs or WRITEs with a special stateid done by another
   client will not result in an force the server to recall a write open delegation.  The following is  A
   WRITE with a typical
   set special stateid done by another client will force a
   recall of conditions that servers might use in deciding whether OPEN
   should be delegated:

   o  The read open delegations.

   With delegations, a client must be is able to respond avoid writing data to the server's callback
      requests.  The
   server will use when the CB_NULL procedure for a test CLOSE of
      callback ability.

   o a file is serviced.  The client must have responded properly file close system
   call is the usual point at which the client is notified of a lack of
   stable storage for the modified file data generated by the
   application.  At the close, file data is written to previous recalls.

   o  There must be no current open conflicting with the requested
      delegation.

   o  There should be no current delegation that conflicts with server and
   through normal accounting the
      delegation being requested.

   o server is able to determine if the
   available filesystem space for the data has been exceeded (i.e.
   server returns NFS4ERR_NOSPC or NFS4ERR_DQUOT).  This accounting
   includes quotas.  The probability introduction of future conflicting open requests should delegations requires that a
   alternative method be low
      based on in place for the recent history same type of communication to
   occur between client and server.

   In the file.

   o  The existence of any server-specific semantics delegation response, the server provides either the limit of OPEN/CLOSE that
      would make
   the required handling incompatible with size of the prescribed
      handling that file or the delegated client would apply (see below).

   There are two types number of open delegations, read modified blocks and write.  A read open
   delegation allows a associated
   block size.  The server must ensure that the client will be able to handle, on its own, requests
   flush data to open the server of a
   file for reading that do not deny read access size equal to others.  Multiple
   read open delegations may be that provided in the
   original delegation.  The server must make this assurance for all
   outstanding simultaneously and do not
   conflict.  A write open delegation allows delegations.  Therefore, the client to handle, on server must be careful in
   its own, all opens.  Only one write open delegation may exist management of available space for a
   given file at a given time new or modified data taking
   into account available filesystem space and it is inconsistent with any read open
   delegations.

   When a client has applicable quotas.
   The server can recall delegations as a read open delegation, it may not make any changes
   to the contents or attributes result of managing the file but it is assured that no
   other client may do so.  When a
   available filesystem space.  The client has a write open delegation,
   it may modify should abide by the file data since no other client will be accessing server's
   state space limits for delegations.  If the file's data.  The client holding a write delegation may only
   affect file attributes which are intimately connected with exceeds the stated
   limits for the file
   data: size, time_modify, change.

   When a client has an open delegation, it does not send OPENs or
   CLOSEs to the server's behavior is undefined.

   Based on server but updates conditions, quotas or available filesystem space, the appropriate status internally.
   For a read
   server may grant write open delegation, opens that cannot delegations with very restrictive space
   limitations.  The limitations may be handled locally
   (opens for write or defined in a way that deny read access) must will
   always force modified data to be sent flushed to the
   server.

   When an open delegation is made, the response server on close.

   With respect to authentication, flushing modified data to the OPEN contains an
   open delegation structure which specifies the following:

   o server
   after a CLOSE has occurred may be problematic.  For example, the type user
   of delegation (read or write)

   o  space limitation information to control flushing of data on close
      (write open delegation only, see the section "Open Delegation and
      Data Caching")
   o  an nfsace4 specifying read application may have logged off the client and write permissions

   o  a stateid unexpired
   authentication credentials may not be present.  In this case, the
   client may need to represent take special care to ensure that local unexpired
   credentials will in fact be available.  This may be accomplished by
   tracking the delegation for READ expiration time of credentials and WRITE

   The delegation stateid is separate flushing data well in
   advance of their expiration or by making private copies of
   credentials to assure their availability when needed.

6.4.2.  Open Delegation and distinct from the stateid File Locks

   When a client holds a write open delegation, lock operations are
   performed locally.  This includes those required for
   the OPEN proper.  The standard stateid, unlike mandatory file
   locking.  This can be done since the delegation
   stateid, is implies that there
   can be no conflicting locks.  Similarly, all of the revalidations
   that would normally be associated with a particular lock_owner obtaining locks and will continue
   to be valid after the delegation is recalled and
   flushing of data associated with the file remains
   open. releasing of locks need not be
   done.

   When a request internal client holds a read open delegation, lock operations are not
   performed locally.  All lock operations, including those requesting
   non-exclusive locks, are sent to the client is made server for resolution.

6.4.3.  Handling of CB_GETATTR

   The server needs to open employ special handling for a GETATTR where the
   target is a file and that has a write open delegation is in effect, it will be accepted or rejected solely on
   the basis of the following conditions.  Any requirement effect.  The
   reason for other
   checks to be made by this is that the delegate should result in open client holding the write delegation
   being denied so that may
   have modified the checks can be made by data and the server itself.

   o  The access and deny bits for needs to reflect this change to
   the request and second client that submitted the file as described
      in GETATTR.  Therefore, the client
   holding the section "Share Reservations".

   o  The read and write permissions as determined below.

   The nfsace4 passed with delegation can be used needs to avoid frequent
   ACCESS calls.  The permission check should be as follows:

   o  If interrogated.  The server
   will use the nfsace4 indicates CB_GETATTR operation.  The only attributes that the open may be done, then it should
      be granted without reference
   server can reliably query via CB_GETATTR are size and change.

   Since CB_GETATTR is being used to satisfy another client's GETATTR
   request, the server.

   o server only needs to know if the client holding the
   delegation has a modified version of the file.  If the nfsace4 indicates that client's copy
   of the open may delegated file is not be done, then an
      ACCESS modified (data or size), the server can
   satisfy the second client's GETATTR request must be sent to from the attributes
   stored locally at the server.  If the file is modified, the server
   only needs to obtain know about this modified state.  If the definitive
      answer.

   The server may return an nfsace4
   determines that the file is more restrictive than currently modified, it will respond to
   the
   actual ACL of second client's GETATTR as if the file.  This includes an nfsace4 that specifies
   denial file had been modified locally
   at the server.

   Since the form of all access.  Note that some common practices such as
   mapping the traditional user "root" change attribute is determined by the server
   and is opaque to the user "nobody" may make it
   incorrect client, the client and server need to return agree on a
   method of communicating the actual ACL modified state of the file.  For the size
   attribute, the client will report its current view of the file in size.
   For the delegation
   response. change attribute, the handling is more involved.

   For the client, the following steps will be taken when receiving a
   write delegation:

   o  The use of delegation together with various other forms value of caching
   creates the possibility that no change attribute will be obtained from the server authentication
      and cached.  Let this value be represented by c.

   o  The client will create a value greater than c that will ever be
   performed used
      for a given user since all of communicating modified data is held at the user's requests might client.  Let this
      value be
   satisfied locally.  Where represented by d.

   o  When the client is depending on queried via CB_GETATTR for the server change
      attribute, it checks to see if it holds modified data.  If the
      file is modified, the value d is returned for
   authentication, the change attribute
      value.  If this file is not currently modified, the client should be sure authentication occurs returns
      the value c for
   each user by use the change attribute.

   For simplicity of implementation, the ACCESS operation.  This should be client MAY for each CB_GETATTR
   return the case same value d.  This is true even if an ACCESS operation would not be required otherwise.  As
   mentioned before, if, between successive
   CB_GETATTR operations, the server may enforce frequent authentication by
   returning an nfsace4 denying all access with every open delegation.

7.4.1.  Open Delegation and Data Caching

   OPEN delegation allows much of client again modifies in the message overhead associated with file's data
   or metadata in its cache.  The client can return the opening and closing files to be eliminated.  An open when an open
   delegation same value
   because the only requirement is in effect does not require that a validation message the client be
   sent able to indicate
   to the server.  The continued endurance server that the client holds modified data.  Therefore, the
   value of d may always be c + 1.

   While the "read open
   delegation" provides a guarantee change attribute is opaque to the client in the sense that no OPEN for write and thus no
   write
   it has occurred.  Similarly, when closing a file opened for write
   and no idea what units of time, if write open delegation any, the server is counting
   change with, it is not opaque in effect, that the data written does not
   have to be flushed client has to treat it as
   an unsigned integer, and the server until the open delegation is
   recalled.  The continued endurance of the open delegation provides a
   guarantee that no open and thus no read or write has been done by
   another client.

   For to be able to see the purposes results
   of open delegation, READs and WRITEs done without an
   OPEN are treated as the functional equivalents of a corresponding
   type of OPEN.  This refers client's changes to the READs and WRITEs that use the
   special stateids consisting of all zero bits or all one bits.
   Therefore, READs or WRITEs with a special stateid done by another
   client will force integer.  Therefore, the server MUST
   encode the change attribute in network order when sending it to recall a write open delegation.  A
   WRITE with a special stateid done by another client will force a
   recall of read open delegations.

   With delegations, a the
   client.  The client is able to avoid writing data MUST decode it from network order to its native
   order when receiving it and the
   server client MUST encode it network order
   when sending it to the CLOSE of a file is serviced.  The file close system
   call server.  For this reason, change is defined as
   an unsigned integer rather than an opaque array of octets.

   For the usual point at which server, the client is notified of following steps will be taken when providing a lack
   write delegation:

   o  Upon providing a write delegation, the server will cache a copy of
   stable storage for
      the modified file change attribute in the data generated by structure it uses to record the
   application.  At
      delegation.  Let this value be represented by sc.

   o  When a second client sends a GETATTR operation on the close, same file data is written to
      the server and
   through normal accounting server, the server is able to determine if obtains the
   available filesystem space for change attribute from the data has been exceeded (i.e.
   server returns NFS4ERR_NOSPC or NFS4ERR_DQUOT).  This accounting
   includes quotas.  The introduction of delegations requires that a
   alternative method first
      client.  Let this value be in place for cc.

   o  If the same type of communication value cc is equal to
   occur between client and server.

   In sc, the delegation response, file is not modified and the
      server provides either returns the limit of current values for change, time_metadata, and
      time_modify (for example) to the size of second client.

   o  If the file or value cc is NOT equal to sc, the number of file is currently modified blocks and associated
   block size.  The server must ensure that
      at the first client and most likely will be able to
   flush data to modified at the server of
      at a size equal to that provided in the
   original delegation. future time.  The server must make this assurance for all
   outstanding delegations.  Therefore, the server must be careful in then uses its management of available space current time to
      construct attribute values for new or modified data taking
   into account available filesystem space time_metadata and any applicable quotas.
   The server can recall delegations as a result time_modify.  A
      new value of managing sc, which we will call nsc, is computed by the
   available filesystem space.
      server, such that nsc >= sc + 1.  The client should abide by server then returns the server's
   state space limits for delegations.  If
      constructed time_metadata, time_modify, and nsc values to the client exceeds
      requester.  The server replaces sc in the stated
   limits for delegation record with
      nsc.  To prevent the delegation, possibility of time_modify, time_metadata,
      and change from appearing to go backward (which would happen if
      the server's behavior is undefined.

   Based on server conditions, quotas or available filesystem space, client holding the
   server may grant delegation fails to write open delegations with very restrictive space
   limitations.  The limitations may be defined in a way that will
   always force its modified data
      to be flushed to the server on close.

   With respect to authentication, flushing modified data to before the delegation is revoked or returned), the
      server
   after a CLOSE has occurred may be problematic.  For example, SHOULD update the user
   of file's metadata record with the application may have logged off
      constructed attribute values.  For reasons of reasonable
      performance, committing the client and unexpired
   authentication credentials may not be present.  In constructed attribute values to stable
      storage is OPTIONAL.

   As discussed earlier in this case, section, the client may need to MAY return the same
   cc value on subsequent CB_GETATTR calls, even if the file was
   modified in the client's cache yet again between successive
   CB_GETATTR calls.  Therefore, the server must assume that the file
   has been modified yet again, and MUST take special care to ensure that local unexpired
   credentials will in fact be available.  This may be accomplished by
   tracking the expiration time of credentials
   new nsc it constructs and flushing data well in
   advance of their expiration or returns is greater than the previous nsc it
   returned.  An example implementation's delegation record would
   satisfy this mandate by making private copies of
   credentials including a boolean field (let us call it
   "modified") that is set to assure their availability false when needed.

7.4.2.  Open Delegation and File Locks

   When a client holds a write open delegation, lock operations are
   performed locally.  This includes those required for mandatory file
   locking.  This can be done since the delegation implies that there
   can be no conflicting locks.  Similarly, all of the revalidations
   that would normally be associated with obtaining locks is granted, and
   an sc value set at the
   flushing of data associated with the releasing time of locks need not be
   done.

   When a client holds a read open delegation, lock operations are not
   performed locally.  All lock operations, including those requesting
   non-exclusive locks, are sent grant to the server for resolution.

7.4.3.  Handling of CB_GETATTR change attribute value.
   The server needs modified field would be set to employ special handling for a GETATTR where true the first time cc != sc, and
   would stay true until the
   target is a file that has a write open delegation in effect. is returned or revoked.  The
   reason
   processing for constructing nsc, time_modify, and time_metadata would
   use this is that the pseudo code:

   if (!modified) {
       do CB_GETATTR for change and size;

       if (cc != sc)
           modified = TRUE;
   } else {
       do CB_GETATTR for size;
   }

   if (modified) {
       sc = sc + 1;
       time_modify = time_metadata = current_time;
       update sc, time_modify, time_metadata into file's metadata;
   }

   return to client holding (that sent GETATTR) the write delegation may
   have attributes
   it requested, but make sure size comes from what
   CB_GETATTR returned. Do not update the file's metadata
   with the client's modified size.

   In the data and case that the file attribute size is different than the
   server's current value, the server needs to reflect treats this as a modification
   regardless of the value of the change attribute retrieved via
   CB_GETATTR and responds to the second client that submitted the GETATTR.  Therefore, as in the last step.

   This methodology resolves issues of clock differences between client
   holding the write delegation needs to be interrogated.  The
   and server
   will use and other scenarios where the use of CB_GETATTR operation.  The only attributes break
   down.

   It should be noted that the server can reliably query via CB_GETATTR are size and change.

   Since CB_GETATTR is being used under no obligation to satisfy another client's GETATTR
   request, use
   CB_GETATTR and therefore the server only needs to know if the client holding MAY simply recall the delegation has a modified version
   to avoid its use.

6.4.4.  Recall of the file.  If the client's copy Open Delegation

   The following events necessitate recall of an open delegation:

   o  Potentially conflicting OPEN request (or READ/WRITE done with
      "special" stateid)

   o  SETATTR issued by another client

   o  REMOVE request for the delegated file is not modified (data
   o  RENAME request for the file as either source or size), target of the server can
   satisfy
      RENAME

   Whether a RENAME of a directory in the second client's GETATTR request from path leading to the attributes
   stored locally at file
   results in recall of an open delegation depends on the server.  If semantics of
   the server filesystem.  If that filesystem denies such RENAMEs when a
   file is modified, open, the server
   only needs recall must be performed to know about this modified state.  If the server
   determines that determine whether the
   file is currently modified, it will respond in question is, in fact, open.

   In addition to the second client's GETATTR as if situations above, the file had been modified locally server may choose to recall
   open delegations at any time if resource constraints make it
   advisable to do so.  Clients should always be prepared for the server.

   Since the form
   possibility of the change attribute is determined by the server
   and is opaque recall.

   When a client receives a recall for an open delegation, it needs to
   update state on the client, server before returning the delegation.  These
   same updates must be done whenever a client and server need chooses to agree on return a
   method
   delegation voluntarily.  The following items of communicating the modified state of need to be
   dealt with:

   o  If the file.  For file associated with the size
   attribute, delegation is no longer open and
      no previous CLOSE operation has been sent to the client will report its current view of server, a CLOSE
      operation must be sent to the server.

   o  If a file size.
   For the change attribute, the handling is more involved.

   For has other open references at the client, the following steps will then OPEN
      operations must be taken when receiving a
   write delegation:

   o  The value of sent to the change attribute server.  The appropriate stateids
      will be obtained from provided by the server
      and cached.  Let this value be represented for subsequent use by c.

   o  The the client
      since the delegation stateid will create a value greater than c that will not longer be used
      for communicating modified data is held at valid.  These OPEN
      requests are done with the client.  Let this
      value be represented by d.

   o  When claim type of CLAIM_DELEGATE_CUR.  This
      will allow the presentation of the delegation stateid so that the
      client is queried via CB_GETATTR for can establish the change
      attribute, it checks appropriate rights to see if it holds modified data.  If perform the
      file is modified, OPEN.
      (see the value d is returned section "Operation 18: OPEN" for the change attribute
      value. details.)

   o  If this there are granted file is not currently modified, the client returns locks, the value c for corresponding LOCK operations
      need to be performed.  This applies to the change attribute. write open delegation
      case only.

   o  For simplicity of implementation, the client MAY for each CB_GETATTR
   return a write open delegation, if at the same value d.  This time of recall the file is true even if, between successive
   CB_GETATTR operations,
      not open for write, all modified data for the client again modifies in file must be flushed
      to the file's data
   or metadata in its cache.  The client can return server.  If the same value
   because delegation had not existed, the only requirement client
      would have done this data flush before the CLOSE operation.

   o  For a write open delegation when a file is that still open at the client be able time
      of recall, any modified data for the file needs to indicate be flushed to
      the server server.

   o  With the write open delegation in place, it is possible that the client holds modified data.  Therefore,
      file was truncated during the
   value duration of d may always be c + 1.

   While the change delegation.  For
      example, the truncation could have occurred as a result of an OPEN
      UNCHECKED with a size attribute value of zero.  Therefore, if a
      truncation of the file has occurred and this operation has not
      been propagated to the server, the truncation must occur before
      any modified data is opaque written to the client in server.

   In the sense that
   it has no idea what units case of time, if any, write open delegation, file locking imposes some
   additional requirements.  To precisely maintain the server is counting
   change with, associated
   invariant, it is not opaque required to flush any modified data in that any region
   for which a write lock was released while the client has write delegation was in
   effect.  However, because the write open delegation implies no other
   locking by other clients, a simpler implementation is to treat it as
   an unsigned integer, and flush all
   modified data for the server file (as described just above) if any write
   lock has been released while the write open delegation was in effect.

   An implementation need not wait until delegation recall (or deciding
   to be able voluntarily return a delegation) to see the results perform any of the client's changes to above
   actions, if implementation considerations (e.g. resource availability
   constraints) make that integer.  Therefore, desirable.  Generally, however, the server MUST
   encode fact that
   the change attribute in network order when sending it to actual open state of the
   client.  The client MUST decode it from network order file may continue to its native
   order when receiving change makes it not
   worthwhile to send information about opens and the client MUST encode it network order
   when sending it closes to the server.  For this reason, change is defined server,
   except as
   an unsigned integer rather than an opaque array part of octets.

   For delegation return.  Only in the server, case of closing the following steps will
   open that resulted in obtaining the delegation would clients be taken when providing a
   write delegation:

   o  Upon providing a write delegation,
   likely to do this early, since, in that case, the server close once done
   will cache a copy not be undone.  Regardless of the change attribute in client's choices on scheduling
   these actions, all must be performed before the data structure it uses delegation is
   returned, including (when applicable) the close that corresponds to record
   the open that resulted in the delegation.  Let this value  These actions can be represented by sc.

   o  When a second client sends a GETATTR operation on
   performed either in previous requests or in previous operations in
   the same file COMPOUND request.

6.4.5.  Clients that Fail to Honor Delegation Recalls

   A client may fail to respond to a recall for various reasons, such as
   a failure of the server, the server obtains the change attribute callback path from server to the first client.  Let this value  The client
   may be cc.

   o  If unaware of a failure in the value cc is equal to sc, callback path.  This lack of
   awareness could result in the file is not modified client finding out long after the
   failure that its delegation has been revoked, and another client has
   modified the data for which the client had a delegation.  This is
   especially a problem for the client that held a write delegation.

   The server returns also has a dilemma in that the current values client that fails to
   respond to the recall might also be sending other NFS requests,
   including those that renew the lease before the lease expires.
   Without returning an error for change, time_metadata, and
      time_modify (for example) those lease renewing operations, the
   server leads the client to believe that the second client. delegation it has is in
   force.

   This difficulty is solved by the following rules:

   o  If  When the value cc callback path is down, the server MUST NOT equal to sc, revoke the file is currently modified
      at
      delegation if one of the first following occurs:

      *  The client has issued a RENEW operation and most likely will be modified at the server
      at a future time. has
         returned an NFS4ERR_CB_PATH_DOWN error.  The server then uses its current time to
      construct attribute values MUST renew
         the lease for time_metadata any record locks and time_modify.  A
      new value of sc, which we will call nsc, is computed by share reservations the
      server, such
         client has that nsc >= sc + 1.  The server then returns the
      constructed time_metadata, time_modify, server has known about (as opposed to those
         locks and nsc values share reservations the client has established but not
         yet sent to the
      requester. server, due to the delegation).  The server replaces sc in the delegation record with
      nsc.  To prevent the possibility of time_modify, time_metadata,
      and change from appearing to go backward (which would happen if
         SHOULD give the client holding the delegation fails a reasonable time to write return its modified data
         delegations to the server before revoking the delegation is revoked or returned), client's
         delegations.

      *  The client has not issued a RENEW operation for some period of
         time after the server SHOULD update attempted to recall the file's metadata record with delegation.  This
         period of time MUST NOT be less than the
      constructed attribute values.  For reasons value of reasonable
      performance, committing the constructed attribute values to stable
      storage is OPTIONAL.

   As discussed earlier in this section,
         lease_time attribute.

   o  When the client MAY return the same
   cc value holds a delegation, it can not rely on subsequent CB_GETATTR calls, even if the file was
   modified in the client's cache yet again between successive
   CB_GETATTR calls.  Therefore, the server must assume operations,
      except for RENEW, that the file
   has been modified yet again, and MUST take care a stateid, to ensure renew delegation leases
      across callback path failures.  The client that wants to keep
      delegations in force across callback path failures must use RENEW
      to do so.

6.4.6.  Delegation Revocation

   At the
   new nsc it constructs and returns point a delegation is greater than revoked, if there are associated opens
   on the previous nsc it
   returned.  An example implementation's delegation record would
   satisfy this mandate client, the applications holding these opens need to be
   notified.  This notification usually occurs by including returning errors for
   READ/WRITE operations or when a boolean field (let us call it
   "modified") that close is set to false when attempted for the open file.

   If no opens exist for the file at the point the delegation is granted, and
   an sc value set
   revoked, then notification of the revocation is unnecessary.
   However, if there is modified data present at the time client for the
   file, the user of grant to the change attribute value.
   The modified field would application should be set notified.  Unfortunately,
   it may not be possible to true notify the first time cc != sc, and
   would stay true until user since active applications
   may not be present at the delegation is returned or revoked.  The
   processing client.  See the section "Revocation
   Recovery for constructing nsc, time_modify, and time_metadata would
   use this pseudo code:

   if (!modified) {
       do CB_GETATTR Write Open Delegation" for change additional details.

6.5.  Data Caching and size;

       if (cc != sc)
           modified = TRUE;
   } else {
       do CB_GETATTR for size;
   }

   if (modified) {
       sc = sc + 1;
       time_modify = time_metadata = current_time;
       update sc, time_modify, time_metadata into file's metadata;
   }

   return to client (that sent GETATTR) Revocation

   When locks and delegations are revoked, the attributes
   it requested, but make sure size comes from what
   CB_GETATTR returned. Do not update assumptions upon which
   successful caching depend are no longer guaranteed.  For any locks or
   share reservations that have been revoked, the file's metadata corresponding owner
   needs to be notified.  This notification includes applications with a
   file open that has a corresponding delegation which has been revoked.

   Cached data associated with the client's modified size. revocation must be removed from the
   client.  In the case of modified data existing in the client's cache,
   that data must be removed from the file attribute size is different than client without it being written to
   the
   server's current value, server.  As mentioned, the server treats this as assumptions made by the client are no
   longer valid at the point when a modification
   regardless of lock or delegation has been revoked.
   For example, another client may have been granted a conflicting lock
   after the value revocation of the change attribute retrieved via
   CB_GETATTR and responds to lock at the second client as in first client.  Therefore, the last step.

   This methodology resolves issues of clock differences between client
   and server and other scenarios where
   data within the use of CB_GETATTR break
   down.

   It should be noted that lock range may have been modified by the server other
   client.  Obviously, the first client is under no obligation unable to guarantee to use
   CB_GETATTR and therefore the server MAY simply recall the delegation
   application what has occurred to avoid its use.

7.4.4.  Recall of Open Delegation

   The following events necessitate recall of an open delegation:

   o  Potentially conflicting OPEN request (or READ/WRITE done with
      "special" stateid)

   o  SETATTR issued by another client

   o  REMOVE request for the file

   o  RENAME request for in the file as either source or target case of the
      RENAME

   Whether a RENAME of a directory in the path leading revocation.

   Notification to the file
   results a lock owner will in recall many cases consist of simply
   returning an open delegation depends error on the semantics of
   the server filesystem.  If that filesystem denies such RENAMEs when a
   file is open, the recall must be performed next and all subsequent READs/WRITEs to determine whether the
   open file in question is, in fact, open.

   In addition to or on the situations above, close.  Where the server may choose methods available to recall
   open delegations at any time if resource constraints a client
   make it
   advisable to do so.  Clients should always such notification impossible because errors for certain
   operations may not be prepared returned, more drastic action such as signals
   or process termination may be appropriate.  The justification for the
   possibility of recall.

   When a client receives a recall
   this is that an invariant for which an open delegation, it needs to
   update state application depends on the server before returning the delegation.  These
   same updates must may be done whenever a
   violated.  Depending on how errors are typically treated for the
   client chooses to return operating environment, further levels of notification
   including logging, console messages, and GUI pop-ups may be
   appropriate.

6.5.1.  Revocation Recovery for Write Open Delegation

   Revocation recovery for a write open delegation voluntarily.  The following items poses the special
   issue of state need to be
   dealt with:

   o  If modified data in the file associated with client cache while the delegation file is no longer open and
      no previous CLOSE operation has been sent not
   open.  In this situation, any client which does not flush modified
   data to the server, a CLOSE
      operation server on each close must be sent to ensure that the server.

   o  If user receives
   appropriate notification of the failure as a file has other open references at result of the client, then OPEN
      operations must be sent
   revocation.  Since such situations may require human action to
   correct problems, notification schemes in which the server.  The appropriate stateids
      will user
   or administrator is notified may be provided by the server for subsequent use by the client
      since necessary.  Logging and console
   messages are typical examples.

   If there is modified data on the delegation stateid will client, it must not longer be valid.  These OPEN
      requests are done with flushed
   normally to the claim type server.  A client may attempt to provide a copy of CLAIM_DELEGATE_CUR.  This
      will allow
   the presentation of file data as modified during the delegation stateid so under a different
   name in the filesystem name space to ease recovery.  Note that when
   the client can establish the appropriate rights to perform the OPEN.
      (see determine that the section "Operation 18: OPEN" for details.)

   o  If there are granted file locks, the corresponding LOCK operations
      need to be performed.  This applies to has not been modified by any
   other client, or when the write open delegation
      case only.

   o  For client has a write open delegation, if at complete cached copy of file
   in question, such a saved copy of the time client's view of recall the file is
      not open for write, all modified data may
   be of particular value for recovery.  In other case, recovery using a
   copy of the file must be flushed
      to the server.  If based partially on the delegation had not existed, client's cached data and
   partially on the client
      would have done this data flush before server copy as modified by other clients, will be
   anything but straightforward, so clients may avoid saving file
   contents in these situations or mark the CLOSE operation.

   o  For a write open results specially to warn
   users of possible problems.

   Saving of such modified data in delegation when revocation situations may
   be limited to files of a file certain size or might be used only when
   sufficient disk space is still open at available within the time target filesystem.
   Such saving may also be restricted to situations when the client has
   sufficient buffering resources to keep the cached copy available
   until it is properly stored to the target filesystem.

6.6.  Attribute Caching

   The attributes discussed in this section do not include named
   attributes.  Individual named attributes are analogous to files and
   caching of recall, any modified the data for the file these needs to be flushed handled just as data
   caching is for ordinary files.  Similarly, LOOKUP results from an
   OPENATTR directory are to be cached on the server.

   o  With same basis as any other
   pathnames and similarly for directory contents.

   Clients may cache file attributes obtained from the server and use
   them to avoid subsequent GETATTR requests.  Such caching is write open delegation
   through in place, it is possible that the modification to file was truncated during the duration attributes is always done by
   means of requests to the delegation.  For
      example, the truncation could have occurred as a result of an OPEN
      UNCHECKED server and should not be done locally and
   cached.  The exception to this are modifications to attributes that
   are intimately connected with a size attribute value of zero. data caching.  Therefore, if extending a
      truncation of the
   file has occurred and this operation has not
      been propagated by writing data to the server, the truncation must occur before
      any modified local data cache is written to reflected immediately
   in the server.

   In size as seen on the case of write open delegation, file locking imposes some
   additional requirements.  To precisely maintain client without this change being
   immediately reflected on the associated
   invariant, it is required server.  Normally such changes are not
   propagated directly to flush any modified data in any region
   for which a write lock was released while the write delegation was in
   effect.  However, because server but when the write open delegation implies no other
   locking by other clients, a simpler implementation is to flush all modified data for is
   flushed to the file (as described just above) if any write
   lock has been released while server, analogous attribute changes are made on the write
   server.  When open delegation was is in effect.

   An implementation need not wait until delegation recall (or deciding
   to voluntarily return a delegation) to perform any of the above
   actions, if implementation considerations (e.g. resource availability
   constraints) make that desirable.  Generally, however, the fact that
   the actual open state of effect, the file modified attributes
   may continue to change makes it not
   worthwhile to send information about opens and closes be returned to the server,
   except as part of delegation return.  Only server in the case response to a CB_RECALL call.

   The result of closing the
   open local caching of attributes is that resulted in obtaining the delegation would attribute
   caches maintained on individual clients will not be
   likely to do this early, since, coherent.
   Changes made in that case, the close once done
   will not be undone.  Regardless of the client's choices one order on scheduling
   these actions, all must be performed before the delegation is
   returned, including (when applicable) the close that corresponds to the open that resulted in the delegation.  These actions can server may be
   performed either in previous requests or in previous operations seen in
   the same COMPOUND request.

7.4.5.  Clients that Fail to Honor Delegation Recalls

   A a different
   order on one client may fail to respond to and in a recall for various reasons, such as third order on a failure of the callback path from server different client.

   The typical filesystem application programming interfaces do not
   provide means to atomically modify or interrogate attributes for
   multiple files at the client. same time.  The client
   may following rules provide an
   environment where the potential incoherences mentioned above can be unaware of a failure in
   reasonably managed.  These rules are derived from the callback path.  This lack practice of
   awareness could result in the client finding out long after the
   failure that its delegation has been revoked, and another client has
   modified the data
   previous NFS protocols.

   o  All attributes for which the client had a delegation.  This is
   especially given file (per-fsid attributes excepted) are
      cached as a problem for unit at the client so that held no non-serializability can
      arise within the context of a write delegation.

   The server also has single file.

   o  An upper time boundary is maintained on how long a dilemma in that the client that fails to
   respond to the recall might also cache
      entry can be sending other NFS requests,
   including those that renew kept without being refreshed from the lease before server.

   o  When operations are performed that change attributes at the lease expires.
   Without returning an error for those lease renewing operations,
      server, the
   server leads updated attribute set is requested as part of the client to believe
      containing RPC.  This includes directory operations that the delegation it has is in
   force. update
      attributes indirectly.  This difficulty is solved accomplished by the following rules:

   o  When the callback path is down, the server MUST NOT revoke the
      delegation if one of the following occurs:

      *  The client has issued
      modifying operation with a RENEW GETATTR operation and then using the server has
         returned an NFS4ERR_CB_PATH_DOWN error.  The server MUST renew
         the lease for any record locks and share reservations the
         client has that
      results of the server has known about (as opposed GETATTR to those
         locks and share reservations update the client has established but not
         yet sent to client's cached attributes.

   Note that if the server, due full set of attributes to be cached is requested by
   READDIR, the delegation).  The server
         SHOULD give results can be cached by the client a reasonable time to return its
         delegations to the server before revoking on the client's
         delegations.

      *  The same basis as
   attributes obtained via GETATTR.

   A client has not issued a RENEW operation for some period may validate its cached version of
         time after attributes for a file by
   fetching just both the server attempted to recall change and time_access attributes and assuming
   that if the delegation.  This
         period of time MUST NOT be less than change attribute has the same value of the
         lease_time attribute.

   o  When as it did when the client holds a delegation, it can not rely on operations,
      except for RENEW,
   attributes were cached, then no attributes other than time_access
   have changed.  The reason why time_access is also fetched is because
   many servers operate in environments where the operation that take updates
   change does not update time_access.  For example, POSIX file
   semantics do not update access time when a stateid, to renew delegation leases
      across callback path failures.  The file is modified by the
   write system call.  Therefore, the client that wants to keep
      delegations in force across callback path failures must use RENEW
      to do so.

7.4.6.  Delegation Revocation

   At a current
   time_access value should fetch it with change during the point attribute
   cache validation processing and update its cached time_access.

   The client may maintain a delegation is revoked, if there cache of modified attributes for those
   attributes intimately connected with data of modified regular files
   (size, time_modify, and change).  Other than those three attributes,
   the client MUST NOT maintain a cache of modified attributes.
   Instead, attribute changes are associated opens
   on immediately sent to the client, server.

   In some operating environments, the applications holding these opens need equivalent to time_access is
   expected to be
   notified.  This notification usually occurs implicitly updated by returning errors for
   READ/WRITE operations or when a close is attempted for each read of the open file.

   If no opens exist for content of the
   file at the point the delegation object.  If an NFS client is
   revoked, then notification of caching the revocation is unnecessary.
   However, if there content of a file
   object, whether it is modified data present at a regular file, directory, or symbolic link,
   the client for the
   file, SHOULD NOT update the user of time_access attribute (via SETATTR
   or a small READ or READDIR request) on the application should be notified.  Unfortunately,
   it may not be possible to notify server with each read that
   is satisfied from cache.  The reason is that this can defeat the user
   performance benefits of caching content, especially since active applications an explicit
   SETATTR of time_access may not be present at alter the client.  See change attribute on the section "Revocation
   Recovery for Write Open Delegation" for additional details.

7.5.  Data Caching and Revocation

   When locks and delegations are revoked, server.
   If the assumptions upon which
   successful caching depend are no longer guaranteed.  For any locks or
   share reservations change attribute changes, clients that have been revoked, are caching the corresponding owner
   needs to be notified.  This notification includes applications with a
   file open that has a corresponding delegation which content
   will think the content has been revoked.
   Cached changed, and will re-read unmodified data associated with the revocation must be removed
   from the
   client.  In server.  Nor is the case of client encouraged to maintain a modified data existing
   version of time_access in the client's its cache, since this would mean that data must be removed from the
   client without it being written will either eventually have to write the server.  As mentioned, the assumptions made by access time to the client are no
   longer valid at
   server with bad performance effects, or it would never update the point when
   server's time_access, thereby resulting in a lock or delegation has been revoked.

   For example, another client may have been granted situation where an
   application that caches access time between a conflicting lock
   after the revocation close and open of the lock at
   same file observes the first client.  Therefore, access time oscillating between the
   data within past and
   present.  The time_access attribute always means the lock range may have been modified time of last
   access to a file by a read that was satisfied by the other
   client.  Obviously, the first client is unable to guarantee server.  This
   way clients will tend to see only time_access changes that go forward
   in time.

6.7.  Data and Metadata Caching and Memory Mapped Files

   Some operating environments include the capability for an application what has occurred
   to map a file's content into the file in application's address space.  Each
   time the case of revocation.

   Notification application accesses a memory location that corresponds to a lock owner will
   block that has not been loaded into the address space, a page fault
   occurs and the file is read (or if the block does not exist in many cases consist of simply
   returning an error on the next
   file, the block is allocated and all subsequent READs/WRITEs then instantiated in the
   application's address space).

   As long as each memory mapped access to the
   open file or on requires a page
   fault, the close.  Where relevant attributes of the methods available file that are used to a client
   make such notification impossible because errors for certain
   operations may detect
   access and modification (time_access, time_metadata, time_modify, and
   change) will be updated.  However, in many operating environments,
   when page faults are not required these attributes will not be returned, more drastic action such as signals
   updated on reads or updates to the file via memory access (regardless
   whether the file is local file or process termination may be appropriate.  The justification for
   this is being access remotely).  A
   client or server MAY fail to update attributes of a file that an invariant for which is
   being accessed via memory mapped I/O. This has several implications:

   o  If there is an application depends on may be
   violated.  Depending on how errors are typically treated for the server that has memory mapped a
      file that a client is also accessing, the client operating environment, further levels of notification
   including logging, console messages, and GUI pop-ups may not be
   appropriate.

7.5.1.  Revocation Recovery for Write Open Delegation

   Revocation recovery for able
      to get a write open delegation poses the special
   issue consistent value of modified data in the client change attribute to determine
      whether its cache while the file is not
   open.  In this situation, any client which does not flush modified
   data to the stale or not.  A server on each close must ensure that knows that the user receives
   appropriate notification of the failure
      file is memory mapped could always pessimistically return updated
      values for change so as a result of to force the
   revocation.  Since such situations may require human action application to
   correct problems, notification schemes in which always get the appropriate user
   or administrator is notified may be necessary.  Logging and console
   messages are typical examples.

   If there is modified
      most up to date data on and metadata for the client, it must not be flushed
   normally file.  However, due to
      the server.  A client may attempt to provide a copy negative performance implications of this, such behavior is
      OPTIONAL.

   o  If the memory mapped file data as is not being modified during on the delegation under a different
   name in server, and
      instead is just being read by an application via the filesystem name space memory mapped
      interface, the client will not see an updated time_access
      attribute.  However, in many operating environments, neither will
      any process running on the server.  Thus NFS clients are at no
      disadvantage with respect to ease recovery.  Note local processes.

   o  If there is another client that is memory mapping the file, and if
      that client is holding a write delegation, the same set of issues
      as discussed in the previous two bullet items apply.  So, when a
      server does a CB_GETATTR to a file that the client can determine has modified in
      its cache, the response from CB_GETATTR will not necessarily be
      accurate.  As discussed earlier, the client's obligation is to
      report that the file has been modified since the delegation was
      granted, not whether it has been modified by again between successive
      CB_GETATTR calls, and the server MUST assume that any
   other client, or when file the
      client has a complete cached copy of file modified in question, such a saved copy of cache has been modified again between
      successive CB_GETATTR calls.  Depending on the client's view nature of the file
      client's memory management system, this weak obligation may not be of particular value for recovery.  In other case, recovery using a
   copy of
      possible.  A client MAY return stale information in CB_GETATTR
      whenever the file based partially on the client's cached data is memory mapped.

   o  The mixture of memory mapping and
   partially file locking on the server copy as modified by other clients, will be
   anything but straightforward, so clients may avoid saving same file
   contents in these situations or mark is
      problematic.  Consider the results specially to warn
   users following scenario, where a page size
      on each client is 8192 bytes.

      *  Client A memory maps first page (8192 bytes) of possible problems.

   Saving file X

      *  Client B memory maps first page (8192 bytes) of such modified data in delegation revocation situations may
   be limited file X

      *  Client A write locks first 4096 bytes

      *  Client B write locks second 4096 bytes

      *  Client A, via a STORE instruction modifies part of its locked
         region.

      *  Simultaneous to files client A, client B issues a STORE on part of
         its locked region.

   Here the challenge is for each client to resynchronize to get a certain size or might be used
   correct view of the first page.  In many operating environments, the
   virtual memory management systems on each client only when
   sufficient disk space know a page is available within
   modified, not that a subset of the target filesystem.
   Such saving may also be restricted page corresponding to situations when the client
   respective lock regions has
   sufficient buffering resources to keep the cached copy available
   until been modified.  So it is properly stored to the target filesystem.

7.6.  Attribute Caching

   The attributes discussed in this section do not include named
   attributes.  Individual named attributes are analogous to files and
   caching of the data possible for these needs
   each client to be handled just as data
   caching do the right thing, which is for ordinary files.  Similarly, LOOKUP results from an
   OPENATTR directory are to be cached on the same basis as any other
   pathnames and similarly for directory contents.

   Clients may cache file attributes obtained from only write to the
   server and use
   them to avoid subsequent GETATTR requests.  Such caching is write
   through in that modification to file attributes is always done by
   means portion of requests to the server and should not be done locally and
   cached.  The exception to this are modifications to attributes page that
   are intimately connected with data caching.  Therefore, extending a
   file by writing data to the local data cache is reflected immediately
   in the size as seen on the locked.  For example, if
   client without this change being
   immediately reflected on the server.  Normally such changes are not
   propagated directly to A simply writes out the server but when page, and then client B writes out the modified
   page, client A's data is
   flushed to the server, analogous attribute changes are made lost.

   Moreover, if mandatory locking is enabled on the
   server. file, then we have a
   different problem.  When open delegation is in effect, clients A and B issue the modified attributes
   may be returned STORE
   instructions, the resulting page faults require a record lock on the
   entire page.  Each client then tries to extend their locked range to
   the server entire page, which results in a deadlock.  Communicating the response
   NFS4ERR_DEADLOCK error to a CB_RECALL call.

   The result of local caching of attributes STORE instruction is that difficult at best.

   If a client is locking the attribute
   caches maintained on individual clients will not be coherent.
   Changes made in one order on entire memory mapped file, there is no
   problem with advisory or mandatory record locking, at least until the server may be seen
   client unlocks a region in the middle of the file.

   Given the above issues the following are permitted:

   o  Clients and servers MAY deny memory mapping a different
   order on one client file they know there
      are record locks for.

   o  Clients and in servers MAY deny a third order record lock on a different client.

   The typical filesystem application programming interfaces do not
   provide means to atomically modify or interrogate attributes file they know is
      memory mapped.

   o  A client MAY deny memory mapping a file that it knows requires
      mandatory locking for
   multiple files at I/O. If mandatory locking is enabled after
      the same time.  The following rules provide an
   environment where file is opened and mapped, the potential incoherences mentioned above can be
   reasonably managed.  These rules are derived from client MAY deny the practice application
      further access to its mapped file.

6.8.  Name Caching

   The results of
   previous NFS protocols.

   o  All attributes for a given file (per-fsid attributes excepted) are LOOKUP and READDIR operations may be cached to avoid
   the cost of subsequent LOOKUP operations.  Just as a unit at in the client so that no non-serializability can case of
   attribute caching, inconsistencies may arise within among the various client
   caches.  To mitigate the effects of these inconsistencies and given
   the context of a single file.

   o  An typical filesystem APIs, an upper time boundary is
   maintained on how long a client name cache entry can be kept without being refreshed from the server.

   o  When operations are performed
   verifying that change attributes at the
      server, the updated attribute set is requested as part of the
      containing RPC.  This includes directory operations that update
      attributes indirectly.  This is accomplished entry has not been made invalid by following the
      modifying operation with a GETATTR directory
   change operation and then using the
      results of the GETATTR to update the client's cached attributes.

   Note that if performed by another client. .LP When a client is
   not making changes to a directory for which there exist name cache
   entries, the full set of client needs to periodically fetch attributes for that
   directory to be cached ensure that it is requested by
   READDIR, not being modified.  After determining
   that no modification has occurred, the results can expiration time for the
   associated name cache entries may be updated to be cached by the client on current time
   plus the same basis as
   attributes obtained via GETATTR.

   A name cache staleness bound.

   When a client may validate its cached version of attributes for is making changes to a file given directory, it needs to
   determine whether there have been changes made to the directory by
   fetching just both
   other clients.  It does this by using the change attribute as
   reported before and time_access attributes and assuming
   that if after the change attribute has directory operation in the same associated
   change_info4 value as it did when returned for the
   attributes were cached, then no attributes other than time_access
   have changed. operation.  The reason why time_access is also fetched server is because
   many servers operate in environments where able to
   communicate to the operation that updates
   change does not update time_access.  For example, POSIX file
   semantics do not update access time when a file client whether the change_info4 data is modified by provided
   atomically with respect to the
   write system call.  Therefore, directory operation.  If the change
   values are provided atomically, the client that wants a current
   time_access is then able to compare
   the pre-operation change value should fetch it with the change during value in the attribute
   cache validation processing and update its cached time_access.

   The client may maintain a client's
   name cache.  If the comparison indicates that the directory was
   updated by another client, the name cache of modified attributes for those
   attributes intimately connected associated with data of the
   modified regular files
   (size, time_modify, and change).  Other than those three attributes, directory is purged from the client MUST NOT maintain a client.  If the comparison
   indicates no modification, the name cache of modified attributes.
   Instead, attribute changes are immediately sent can be updated on the
   client to reflect the server.

   In some operating environments, directory operation and the equivalent to time_access is
   expected associated timeout
   extended.  The post-operation change value needs to be implicitly updated by each read of saved as the content of
   basis for future change_info4 comparisons.

   As demonstrated by the
   file object.  If an NFS client is scenario above, name caching the content of a file
   object, whether it is a regular file, directory, or symbolic link, requires that the
   client SHOULD NOT update revalidate name cache data by inspecting the time_access change attribute (via SETATTR
   or
   of a small READ or READDIR request) on the server with each read that
   is satisfied from cache.  The reason is that this can defeat directory at the
   performance benefits of caching content, especially since an explicit
   SETATTR of time_access may alter point when the change attribute on name cache item was cached.

   This requires that the server.
   If server update the change attribute changes, clients that are caching the content
   will think for
   directories when the content has changed, and will re-read unmodified data
   from contents of the server.  Nor corresponding directory is the
   modified.  For a client encouraged to maintain a modified
   version of time_access in its cache, since this would mean that the
   client will either eventually have to write the access time to the
   server with bad performance effects, or it would never update use the
   server's time_access, thereby resulting in a situation where an
   application that caches access time between a close change_info4 information
   appropriately and open of the
   same file observes correctly, the access time oscillating between server must report the past pre and
   present.  The time_access post
   operation change attribute always means values atomically.  When the time of last
   access server is
   unable to a file by a read that was satisfied by report the server.  This
   way clients will tend to see only time_access changes that go forward
   in time.

7.7.  Data and Metadata Caching before and Memory Mapped Files

   Some operating environments include the capability for an application after values atomically with respect
   to map a file's content into the application's address space.  Each
   time directory operation, the application accesses a memory location that corresponds to a
   block server must indicate that has not been loaded into fact in the address space, a page fault
   occurs and
   change_info4 return value.  When the file information is read (or if not atomically
   reported, the block does client should not exist in assume that other clients have not
   changed the
   file, directory.

6.9.  Directory Caching

   The results of READDIR operations may be used to avoid subsequent
   READDIR operations.  Just as in the block is allocated cases of attribute and then instantiated in name
   caching, inconsistencies may arise among the
   application's address space).

   As long as each memory mapped access to various client caches.
   To mitigate the file requires a page
   fault, effects of these inconsistencies, and given the relevant attributes
   context of typical filesystem APIs, the file that are used to detect
   access and modification (time_access, time_metadata, time_modify, and
   change) will following rules should be updated.  However, in many operating environments,
   when page faults are not required these attributes will
   followed:

   o  Cached READDIR information for a directory which is not obtained
      in a single READDIR operation must always be
   updated on reads or updates to a consistent snapshot
      of directory contents.  This is determined by using a GETATTR
      before the file via memory access (regardless
   whether first READDIR and after the file is local file or last of READDIR that
      contributes to the cache.

   o  An upper time boundary is being access remotely).  A
   client or server MAY fail maintained to update attributes indicate the length of
      time a file directory cache entry is considered valid before the client
      must revalidate the cached information.

   The revalidation technique parallels that discussed in the case of
   name caching.  When the client is
   being accessed via memory mapped I/O. This has several implications:

   o  If there not changing the directory in
   question, checking the change attribute of the directory with GETATTR
   is an application on adequate.  The lifetime of the server that has memory mapped a
      file that cache entry can be extended at
   these checkpoints.  When a client is also accessing, modifying the directory, the
   client may not be able needs to get a consistent value of use the change attribute change_info4 data to determine whether its cache there
   are other clients modifying the directory.  If it is stale or not.  A server that knows determined that
   no other client modifications are occurring, the
      file is memory mapped could always pessimistically return updated
      values for change so as to force the application client may update
   its directory cache to always get reflect its own changes.

   As demonstrated previously, directory caching requires that the
      most up to date
   client revalidate directory cache data and metadata for by inspecting the file.  However, due to change
   attribute of a directory at the negative performance implications point when the directory was cached.
   This requires that the server update the change attribute for
   directories when the contents of this, such behavior is
      OPTIONAL.

   o  If the memory mapped file corresponding directory is not being modified on
   modified.  For a client to use the server, change_info4 information
   appropriately and
      instead correctly, the server must report the pre and post
   operation change attribute values atomically.  When the server is just being read by an application via
   unable to report the memory mapped
      interface, before and after values atomically with respect
   to the client will not see an updated time_access
      attribute.  However, directory operation, the server must indicate that fact in many operating environments, neither will
      any process running on the server.  Thus NFS
   change_info4 return value.  When the information is not atomically
   reported, the client should not assume that other clients are at no
      disadvantage have not
   changed the directory.

7.  Security Negotiation

   The NFSv4.0 specification contains three oversights and ambiguities
   with respect to local processes.

   o  If there the SECINFO operation.

   First, it is another impossible for the client that to use the SECINFO operation
   to determine the correct security triple for accessing a parent
   directory.  This is memory mapping because SECINFO takes as arguments the file, current
   file handle and if
      that client is holding a write delegation, component name.  However, NFSv4.0 uses the same set LOOKUPP
   operation to get the parent directory of issues
      as discussed in the previous two bullet items apply.  So, current file handle.  If
   the client uses the wrong security when a
      server does a CB_GETATTR issuing the LOOKUPP, and gets
   back an NFS4ERR_WRONGSEC error, SECINFO is useless to a file that the client.
   The client has modified in
      its cache, is left with guessing which security the response from CB_GETATTR server will not necessarily be
      accurate.  As discussed earlier,
   accept.  This defeats the client's obligation purpose of SECINFO, which was to provide an
   efficient method of negotiating security.

   Second, there is ambiguity as to
      report what the server should do when it is
   passed a LOOKUP operation such that the server restricts access to
   the current file has been modified since handle with one security triple, and access to the delegation was
      granted, not whether it has been modified again between successive
      CB_GETATTR calls,
   component with a different triple, and remote procedure call uses one
   of the two security triples.  Should the server MUST assume that any file allow the LOOKUP?

   Third, there is a problem as to what the client has modified must do (or can do),
   whenever the server returns NFS4ERR_WRONGSEC in cache has been modified again between
      successive CB_GETATTR calls.  Depending on response to a PUTFH
   operation.  The NFSv4.0 specification says that client should issue a
   SECINFO using the nature parent filehandle and the component name of the
      client's memory management system, this weak obligation
   filehandle that PUTFH was issued with.  This may not be
      possible.  A client MAY return stale information in CB_GETATTR
      whenever convenient
   for the file is memory mapped.

   o  The mixture of memory mapping and file locking on client.

   This document resolves the same file is
      problematic.  Consider above three issues in the following scenario, where a page size
      on each client is 8192 bytes.

      *  Client A memory maps first page (8192 bytes) of file X

      *  Client B memory maps first page (8192 bytes) context of file X

      *  Client A write locks first 4096 bytes

      *  Client B write locks second 4096 bytes

      *  Client A, via a STORE instruction modifies part
   NFSv4.1.

8.  Clarification of its locked
         region.

      *  Simultaneous Security Negotiation in NFSv4.1

   This section attempts to client A, client B issues a STORE on part clarify NFSv4.1 security negotiation issues.
   Unless noted otherwise, for any mention of
         its locked region.

   Here PUTFH in this section, the challenge is for each client
   reader should interpret it as applying to resynchronize PUTROOTFH and PUTPUBFH in
   addition to get a
   correct view PUTFH.

8.1.  PUTFH + LOOKUP

   The server implementation may decide whether to impose any
   restrictions on export security administration.  There are at least
   three approaches (Sc is the flavor set of the first page.  In many operating environments, child export, Sp that
   of the
   virtual memory management systems on each parent),

     a)  Sc <= Sp (<= for subset)

     b)  Sc ^ Sp != {} (^ for intersection, {} for the empty set)

     c)  free form

   To support b (when client only know chooses a page flavor that is
   modified, not that a subset member of
   Sp) and c, PUTFH must NOT return NFS4ERR_WRONGSEC in case of security
   mismatch.  Instead, it should be returned from the page corresponding to LOOKUP that
   follows.

   Since the
   respective lock regions has been modified.  So it is above guideline does not possible for
   each client to do the right thing, which is to contradict a, it should be
   followed in general.

8.2.  PUTFH + LOOKUPP

   Since SECINFO only write to works its way down, there is no way LOOKUPP can
   return NFS4ERR_WRONGSEC without the server that portion of implementing
   SECINFO_NO_NAME.  SECINFO_NO_NAME solves this issue because via style
   "parent", it works in the page that opposite direction as SECINFO (component
   name is locked.  For example, if
   client implicit in this case).

8.3.  PUTFH + SECINFO

   This case should be treated specially.

   A simply writes out the page, and then client B writes out the
   page, security sensitive client A's data is lost.

   Moreover, if mandatory locking is enabled on the file, then we have should be allowed to choose a
   different problem.  When clients A and B issue the STORE
   instructions, the resulting page faults require strong
   flavor when querying a record lock on server to determine a file object's permitted
   security flavors.  The security flavor chosen by the
   entire page.  Each client then tries to extend their locked range does not
   have to
   the entire page, which results be included in a deadlock.  Communicating the
   NFS4ERR_DEADLOCK error flavor list of the export.  Of course the
   server has to a STORE instruction is difficult at best.

   If a be configured for whatever flavor the client is locking selects,
   otherwise the entire memory mapped file, request will fail at RPC authentication.

   In theory, there is no
   problem with advisory or mandatory record locking, at least until connection between the
   client unlocks a region in the middle of the file.

   Given the above issues the following are permitted:

   o  Clients and servers MAY deny memory mapping a file they know there
      are record locks for.

   o  Clients security flavor used by
   SECINFO and servers MAY deny a record lock on a file they know is
      memory mapped.

   o  A client MAY deny memory mapping a file that it knows requires
      mandatory locking for I/O. If mandatory locking is enabled after those supported by the file is opened and mapped, export.  But in practice, the
   client MAY deny the application
      further access to its mapped file.

7.8.  Name Caching

   The results of LOOKUP and READDIR operations may be cached to avoid start looking for strong flavors from those supported by
   the cost of subsequent LOOKUP operations.  Just as export, followed by those in the mandatory set.

8.4.  PUTFH + Anything Else

   PUTFH must return NFS4ERR_WRONGSEC in case of
   attribute caching, inconsistencies may arise among the various client
   caches.  To mitigate the effects of these inconsistencies and given
   the context of typical filesystem APIs, an upper time boundary is
   maintained on how long a client name cache entry can be kept without
   verifying that the entry has not been made invalid by a directory
   change operation performed by another client. .LP When a client security mismatch.
   This is
   not making changes to a directory for which there exist name cache
   entries, the client needs most straightforward approach without having to periodically fetch attributes for that
   directory add
   NFS4ERR_WRONGSEC to ensure that it every other operations.

   PUTFH + SECINFO_NO_NAME (style "current_fh") is not being modified.  After determining
   that no modification has occurred, the expiration time needed for the
   associated name cache entries may be updated to be the current time
   plus the name cache staleness bound.

   When a client is making changes
   to a given directory, it needs recover from NFS4ERR_WRONGSEC.

9.  NFSv4.1 Sessions

9.1.  Sessions Background

9.1.1.  Introduction to
   determine whether there have been changes made Sessions

   This draft proposes extensions to the directory by
   other clients.  It does this by using the change attribute as
   reported before NFS version 4 [RFC3530] enabling it
   to support sessions and after the directory endpoint management, and to support operation in the associated
   change_info4 value returned
   atop RDMA-capable RPC over transports such as iWARP.  [RDMAP, DDP]
   These extensions enable support for the operation. exactly-once semantics by NFSv4
   servers, multipathing and trunking of transport connections, and
   enhanced security.  The server is able to
   communicate ability to the client whether the change_info4 data operate over RDMA enables greatly
   enhanced performance.  Operation over existing TCP is provided
   atomically enhanced as
   well.

   While discussed here with respect to IETF-chartered transports, the directory operation.  If the change
   values are provided atomically, the client
   proposed protocol is then able intended to compare
   the pre-operation change value with the change value in the client's
   name cache.  If function over other standards, such
   as Infiniband.  [IB]

   The following are the comparison indicates that major aspects of this proposal:

   o  Changes are proposed within the directory was
   updated by another client, framework of NFSv4 minor
      versioning.  RPC, XDR, and the name cache associated NFSv4 procedures and operations are
      preserved.  The proposed extension functions equally well over
      existing transports and RDMA, and interoperates transparently with
      existing implementations, both at the
   modified directory local programmatic interface
      and over the wire.

   o  An explicit session is purged from introduced to NFSv4, and new operations are
      added to support it.  The session allows for enhanced trunking,
      failover and recovery, and authentication efficiency, along with
      necessary support for RDMA.  The session is implemented as
      operations within NFSv4 COMPOUND and does not impact layering or
      interoperability with existing NFSv4 implementations.  The NFSv4
      callback channel is dynamically associated and is connected by the client.  If
      client and not the comparison
   indicates no modification, server, enhancing security and operation
      through firewalls.  In fact, the name cache can callback channel will be updated on the
   client enabled
      to reflect share the directory operation and same connection as the associated timeout
   extended. operations channel.

   o  An enhanced RPC layer enables NFSv4 operation atop RDMA.  The post-operation change value needs
      session assists RDMA-mode connection, and additional facilities
      are provided for managing RDMA resources at both NFSv4 server and
      client.  Existing NFSv4 operations continue to be saved function as the
   basis before,
      though certain size limits are negotiated.  A companion draft to
      this document, "RDMA Transport for future change_info4 comparisons.

   As demonstrated ONC RPC" [RPCRDMA] is to be
      referenced for details of RPC RDMA support.

   o  Support for exactly-once semantics ("EOS") is enabled by the scenario above, name caching requires that the
   client revalidate name cache data new
      session facilities, by inspecting providing to the change attribute
   of server a directory at way to bound the point when
      size of the name duplicate request cache item for a single client, and to
      manage its persistent storage.

                                   Block Diagram

             +-----------------+-------------------------------------+
             |     NFSv4       |     NFSv4 + session extensions      |
             +-----------------+------+----------------+-------------+
             |      Operations        |   Session      |             |
             +------------------------+----------------+             |
             |                RPC/XDR                  |             |
             +-------------------------------+---------+             |
             |       Stream Transport        |    RDMA Transport     |
             +-------------------------------+-----------------------+

9.1.2.  Motivation

   NFS version 4 [RFC3530] has been granted "Proposed Standard" status.
   The NFSv4 protocol was cached.
   This requires that developed along several design points,
   important among them: effective operation over wide-area networks,
   including the server update Internet itself; strong security integrated into the change attribute
   protocol; extensive cross-platform interoperability including
   integrated locking semantics compatible with multiple operating
   systems; and protocol extensibility.

   The NFS version 4 protocol, however, does not provide support for
   directories when the contents of
   certain important transport aspects.  For example, the corresponding directory protocol does
   not address response caching, which is
   modified.  For a required to provide
   correctness for retried client requests across a network partition,
   nor does it provide an interoperable way to use the change_info4 information
   appropriately support trunking and correctly, the server must report the pre
   multipathing of connections.  This leads to inefficiencies,
   especially where trunking and post
   operation change attribute values atomically.  When the server is
   unable multipathing are concerned, and
   presents additional difficulties in supporting RDMA fabrics, in which
   endpoints may require dedicated or specialized resources.  Sessions
   can be employed to report unify NFS-level constructs such as the before and after values atomically clientid,
   with respect transport-level constructs such as transport endpoints.  Each
   transport endpoint draws on resources via its membership in a
   session.  Resource management can be more strictly maintained,
   leading to the directory operation, the greater server must indicate that fact efficiency in implementing the
   change_info4 return value.  When protocol.
   The enhanced operation over a session affords an opportunity to the information is not atomically
   reported, the client should not assume that other clients have not
   changed the directory.

7.9.  Directory Caching

   The results of READDIR operations may be used
   server to avoid subsequent
   READDIR operations.  Just as in the cases of attribute implement a highly reliable duplicate request cache, and name
   caching, inconsistencies may arise among the various client caches.
   To mitigate
   thereby export exactly-once semantics.

   NFSv4 advances the effects state of these inconsistencies, high-performance local sharing, by virtue
   of its integrated security, locking, and given the
   context delegation, and its
   excellent coverage of typical filesystem APIs, the following rules should be
   followed:

   o  Cached READDIR information for a directory which sharing semantics of multiple operating
   systems.  It is not obtained
      in precisely this environment where exactly-once
   semantics become a single READDIR operation must always be fundamental requirement.

   Additionally, efforts to standardize a consistent snapshot set of directory contents.  This protocols for Remote
   Direct Memory Access, RDMA, over the Internet Protocol Suite have
   made significant progress.  RDMA is determined by using a GETATTR
      before the first READDIR and after general solution to the last problem
   of READDIR that
      contributes CPU overhead incurred due to data copies, primarily at the cache.

   o  An upper time boundary is maintained to indicate
   receiver.  Substantial research has addressed this and has borne out
   the length efficacy of
      time a directory cache entry is considered valid before the client
      must revalidate the cached information.

   The revalidation technique parallels that discussed in the case approach.  An overview of
   name caching.  When the client this is not changing the directory in
   question, checking RDDP
   Problem Statement document, [RDDPPS].

   Numerous upper layer protocols achieve extremely high bandwidth and
   low overhead through the change attribute use of RDMA.  Products from a wide variety
   of vendors employ RDMA to advantage, and prototypes have demonstrated
   the directory effectiveness of many more.  Here, we are concerned specifically
   with GETATTR
   is adequate.  The lifetime NFS and NFS-style upper layer protocols; examples from Network
   Appliance [DAFS, DCK+03], Fujitsu Prime Software Technologies [FJNFS,
   FJDAFS] and Harvard University [KM02] are all relevant.

   By layering a session binding for NFS version 4 directly atop a
   standard RDMA transport, a greatly enhanced level of the cache entry performance and
   transparency can be extended at
   these checkpoints.  When supported on a client is modifying the directory, the
   client needs to use wide variety of operating system
   platforms.  These combined capabilities alter the change_info4 data landscape between
   local filesystems and network attached storage, enable a new level of
   performance, and lead new classes of application to determine whether there
   are other clients modifying take advantage of
   NFS.

9.1.3.  Problem Statement

   Two issues drive the directory.  If it is determined that
   no other client modifications current proposal: correctness, and performance.
   Both are occurring, the client may update
   its directory cache to reflect its own changes.

   As demonstrated previously, directory caching requires that the
   client revalidate directory cache data by inspecting the change
   attribute instances of a directory at the point when the directory was cached.
   This requires that the server update "raising the change attribute bar" for
   directories when the contents of NFS, whereby the corresponding directory is
   modified.  For a client desire
   to use NFS in new classes applications can be accommodated by
   providing the change_info4 information
   appropriately and correctly, the server must report the pre and post
   operation change attribute values atomically.  When the server is
   unable basic features to report the before make such use feasible.  Such
   applications include tightly coupled sharing environments such as
   cluster computing, high performance computing (HPC) and after values atomically with respect
   to the directory operation, the server must indicate that fact information
   processing such as databases.  These trends are explored in depth in
   [NFSPS].

   The first issue, correctness, exemplified among the
   change_info4 return value.  When the information attributes of
   local filesystems, is not atomically
   reported, the client should not assume that other clients support for exactly-once semantics.  Such
   semantics have not
   changed the directory.

8.  Security Negotiation

   The NFSv4.0 specification contains three oversights and ambiguities been reliably available with respect to NFS.  Server-based
   duplicate request caches [CJ89] help, but do not reliably provide
   strict correctness.  For the SECINFO operation.

   First, it type of application which is impossible for the client expected to
   make extensive use of the SECINFO operation
   to determine high-performance RDMA-enabled environment,
   the correct security triple for accessing a parent
   directory.  This reliable provision of such semantics is because SECINFO takes as arguments the current
   file handle and a component name.  However, NFSv4.0 uses the LOOKUPP
   operation fundamental
   requirement.

   Introduction of a session to get NFSv4 will address these issues.  With
   higher performance and enhanced semantics comes the parent directory problem of
   enabling advanced endpoint management, for example high-speed
   trunking, multipathing and failover.  These characteristics enable
   availability and performance.  RFC3530 presents some issues in
   permitting a single clientid to access a server over multiple
   connections.

   A second issue encountered in common by NFS implementations is the current file handle.  If
   the client uses
   CPU overhead required to implement the wrong security when issuing protocol.  Primary among the LOOKUPP, and gets
   back an NFS4ERR_WRONGSEC error, SECINFO
   sources of this overhead is useless to the client. movement of data from NFS protocol
   messages to its eventual destination in user buffers or aligned
   kernel buffers.  The client is left data copies consume system bus bandwidth and CPU
   time, reducing the available system capacity for applications.
   [RDDPPS] Achieving zero-copy with guessing which security NFS has to date required
   sophisticated, "header cracking" hardware and/or extensive platform-
   specific virtual memory mapping tricks.

   Combined in this way, NFSv4, RDMA and the server emerging high-speed network
   fabrics will
   accept.  This defeats the purpose enable delivery of SECINFO, performance which was to provide an
   efficient method of negotiating security.

   Second, there is ambiguity as to what the server should do when it is
   passed a LOOKUP operation such matches that of the server restricts access to
   fastest local filesystems, preserving the current file handle with one security triple, key existing local
   filesystem semantics, while enhancing them by providing network
   filesystem sharing semantics.

   RDMA implementations generally have other interesting properties,
   such as hardware assisted protocol access, and support for user space
   access to the
   component with a different triple, and remote procedure call uses one I/O. RDMA is compelling here for another reason; hardware
   offloaded networking support in itself does not avoid data copies,
   without resorting to implementing part of the two security triples.  Should NFS protocol in the server allow
   NIC.  Support of RDMA by NFS enables the LOOKUP?

   Third, there is a problem as to what highest performance at the client must do (or can do),
   whenever the server returns NFS4ERR_WRONGSEC in response
   architecture level rather than by implementation; this enables
   ubiquitous and interoperable solutions.

   By providing file access performance equivalent to a PUTFH
   operation.  The NFSv4.0 specification says that of local file
   systems, NFSv4 over RDMA will enable applications running on a set of
   client should issue machines to interact through an NFSv4 file system, just as
   applications running on a
   SECINFO using the parent filehandle and single machine might interact through a
   local file system.

   This raises the component name issue of the
   filehandle that PUTFH was issued with. whether additional protocol enhancements to
   enable such interaction would be desirable and what such enhancements
   would be.  This may is a complicated issue which the working group needs
   to address and will not be convenient
   for the client. further discussed in this document.

9.1.4.  NFSv4 Session Extension Characteristics

   This document resolves the above three issues draft will present a solution based upon minor versioning of
   NFSv4.  It will introduce a session to collect transport endpoints
   and resources such as reply caching, which in turn enables
   enhancements such as trunking, failover and recovery.  It will
   describe use of RDMA by employing support within an underlying RPC
   layer [RPCRDMA].  Most importantly, it will focus on making the context best
   possible use of
   NFSv4.1.

9.  Clarification an RDMA transport.

   These extensions are proposed as elements of Security Negotiation in NFSv4.1

   This section attempts to clarify NFSv4.1 security negotiation issues.
   Unless noted otherwise, for any mention a new minor revision of PUTFH in
   NFS version 4.  In this section, the
   reader should interpret it draft, NFS version 4 will be referred to
   generically as applying "NFSv4", when describing properties common to PUTROOTFH and PUTPUBFH in
   addition all
   minor versions.  When referring specifically to PUTFH.

9.1.  PUTFH + LOOKUP

   The server implementation may decide whether properties of the
   original, minor version 0 protocol, "NFSv4.0" will be used, and
   changes proposed here for minor version 1 will be referred to impose any
   restrictions on export security administration.  There as
   "NFSv4.1".

   This draft proposes only changes which are at least
   three approaches (Sc is the flavor set strictly upward-
   compatible with existing RPC and NFS Application Programming
   Interfaces (APIs).

9.2.  Transport Issues

   The Transport Issues section of the child export, Sp that document explores the details of
   utilizing the parent),

     a)  Sc <= Sp (<= for subset)

     b)  Sc ^ Sp != {} (^ various supported transports.

9.2.1.  Session Model

   The first and most evident issue in supporting diverse transports is
   how to provide for intersection, {} their differences.  This draft proposes
   introducing an explicit session.

   A session introduces minimal protocol requirements, and provides for the empty set)

     c)  free form

   To support b (when client chooses
   a flavor that highly useful and convenient way to manage numerous endpoint-
   related issues.  The session is not a member of
   Sp) and c, PUTFH must NOT return NFS4ERR_WRONGSEC in case of security
   mismatch.  Instead, local construct; it should be returned represents a
   named, higher-layer object to which connections can refer, and
   encapsulates properties important to each associated client.

   A session is a dynamically created, long-lived server object created
   by a client, used over time from one or more transport connections.
   Its function is to maintain the LOOKUP that
   follows.

   Since the above guideline does not contradict a, it should be
   followed in general.

9.2.  PUTFH + LOOKUPP

   Since SECINFO only works its way down, there server's state relative to the
   connection(s) belonging to a client instance.  This state is no way LOOKUPP can
   return NFS4ERR_WRONGSEC without entirely
   independent of the server implementing
   SECINFO_NO_NAME.  SECINFO_NO_NAME solves this issue because via style
   "parent", it works connection itself.  The session in effect becomes
   the opposite direction as SECINFO (component
   name is implicit in this case).

9.3.  PUTFH + SECINFO

   This case should be treated specially.

   A security sensitive object representing an active client should be allowed to choose on a strong
   flavor when querying connection or set of
   connections.

   Clients may create multiple sessions for a server single clientid, and may
   wish to determine a file object's permitted
   security flavors.  The security flavor chosen do so for optimization of transport resources, buffers, or
   server behavior.  A session could be created by the client does not
   have to be included in the flavor list
   represent a single mount point, for separate read and write
   "channels", or for any number of other client-selected parameters.

   The session enables several things immediately.  Clients may
   disconnect and reconnect (voluntarily or not) without loss of context
   at the export.  Of course server.  (Of course, locks, delegations and related
   associations require special handling, and generally expire in the
   server has
   extended absence of an open connection.)  Clients may connect
   multiple transport endpoints to be configured for whatever flavor this common state.  The endpoints may
   have all the client selects,
   otherwise same attributes, for instance when trunked on multiple
   physical network links for bandwidth aggregation or path failover.
   Or, the request will fail at RPC authentication.

   In theory, there is no connection between endpoints can have specific, special purpose attributes such
   as callback channels.

   The NFSv4 specification does not provide for any form of flow
   control; instead it relies on the security flavor used windowing provided by
   SECINFO TCP to
   throttle requests.  This unfortunately does not work with RDMA, which
   in general provides no operation flow control and those supported by the export.  But will terminate a
   connection in practice, the
   client error when limits are exceeded.  Limits are therefore
   exchanged when a session is created; These limits then provide maxima
   within which each session's connections must operate, they are
   managed within these limits as described in [RPCRDMA].  The limits
   may start looking for strong flavors from those supported by also be modified dynamically at the export, followed server's choosing by those in the mandatory set.

9.4.  PUTFH + Anything Else

   PUTFH must return NFS4ERR_WRONGSEC
   manipulating certain parameters present in case each NFSv4.1 request.

   The presence of security mismatch.
   This is a maximum request limit on the most straightforward approach without having to add
   NFS4ERR_WRONGSEC to every other operations.

   PUTFH + SECINFO_NO_NAME (style "current_fh") is needed for session bounds the client
   to recover from NFS4ERR_WRONGSEC.

10.  NFSv4.1 Sessions

10.1.  Sessions Background

10.1.1.  Introduction to Sessions
   requirements of the duplicate request cache.  This draft proposes extensions can be used to NFS version 4 [RFC3530] enabling
   advantage by a server, which can accurately determine any storage
   needs and enable it to support sessions and endpoint management, maintain duplicate request cache persistence
   and to support operation
   atop RDMA-capable RPC over transports such as iWARP.  [RDMAP, DDP]
   These extensions enable support for provide reliable exactly-once semantics by NFSv4
   servers, multipathing semantics.

   Finally, given adequate connection-oriented transport security
   semantics, authentication and trunking authorization may be cached on a per-
   session basis, enabling greater efficiency in the issuing and
   processing of transport connections, requests on both client and
   enhanced security. server.  A proposal for
   transparent, server-driven implementation of this in NFSv4 has been
   made.  [CCM] The ability to operate over RDMA enables existence of the session greatly
   enhanced performance.  Operation over existing TCP is enhanced as
   well.

   While discussed here with respect to IETF-chartered transports, facilitates the
   proposed protocol
   implementation of this approach.  This is intended to function over other standards, such
   as Infiniband.  [IB]

   The following are discussed in detail in the major aspects of
   Authentication Efficiencies section later in this proposal:

   o  Changes are proposed within draft.

9.2.2.  Connection State

   In RFC3530, the framework combination of NFSv4 minor
      versioning.  RPC, XDR, a connected transport endpoint and a
   clientid forms the NFSv4 procedures and operations basis of connection state.  While has been made to
   be workable with certain limitations, there are
      preserved.  The proposed extension functions equally well over
      existing transports difficulties in
   correct and RDMA, robust implementation.  The NFSv4.0 protocol must provide
   a server-initiated connection for the callback channel, and interoperates transparently with
      existing implementations, both must
   carefully specify the persistence of client state at the local programmatic interface
      and over server in
   the wire.

   o  An explicit session is introduced face of transport interruptions.  The server has only the
   client's transport address binding (the IP 4-tuple) to NFSv4, identify the
   client RPC transaction stream and new operations are
      added to support it.  The session allows for enhanced trunking,
      failover and recovery, and authentication efficiency, along with
      necessary support for RDMA.  The session is implemented use as
      operations within NFSv4 COMPOUND and does not impact layering or
      interoperability with existing NFSv4 implementations.  The NFSv4
      callback channel is dynamically associated and a lookup tag on the
   duplicate request cache.  (A useful overview of this is connected by in [RW96].)
   If the
      client server listens on multiple adddresses, and not the server, enhancing security client connects
   to more than one, it must employ different clientid's on each,
   negating its ability to aggregate bandwidth and operation
      through firewalls. redundancy.  In fact, the callback channel will be enabled
      to share the same
   effect, each transport connection is used as the operations channel.

   o  An enhanced RPC layer enables NFSv4 operation atop RDMA.  The
      session assists RDMA-mode connection, and additional facilities server's
   representation of client state.  But, transport connections are provided for managing RDMA resources at both NFSv4 server
   potentially fragile and
      client.  Existing NFSv4 operations continue to function as before,
      though certain size limits are negotiated.  A companion draft to transitory.

   In this document, "RDMA Transport for ONC RPC" [RPCRDMA] is to be
      referenced for details of RPC RDMA support.

   o  Support for exactly-once semantics ("EOS") proposal, a session identifier is enabled assigned by the new server upon
   initial session facilities, by providing negotiation on each connection.  This identifier is
   used to the server associate additional connections, to renegotiate after a way
   reconnect, to bound provide an abstraction for the
      size of various session
   properties, and to address the duplicate request cache.  No
   transport-specific information is used in the duplicate request cache for a single client, and to
      manage its persistent storage.

                                   Block Diagram

             +-----------------+-------------------------------------+
             |     NFSv4       |     NFSv4 + session extensions      |
             +-----------------+------+----------------+-------------+
             |      Operations        |   Session      |             |
             +------------------------+----------------+             |
             |                RPC/XDR                  |             |
             +-------------------------------+---------+             |
             |       Stream Transport        |    RDMA Transport     |
             +-------------------------------+-----------------------+

10.1.2.  Motivation

   NFS version 4 [RFC3530] has been granted "Proposed Standard" status.
   The NFSv4 protocol was developed along several design points,
   important among them: effective operation over wide-area networks,
   including the Internet itself; strong security integrated into
   implementation of an NFSv4.1 server, nor in fact the
   protocol; extensive cross-platform interoperability including
   integrated locking semantics compatible with multiple operating
   systems; and protocol extensibility. RPC XID itself.
   The NFS version 4 protocol, however, does not provide support for
   certain important transport aspects.  For example, the protocol does
   not address response caching, which session identifier is required to provide
   correctness for retried client requests across a network partition,
   nor does it provide an interoperable way to support trunking and
   multipathing of connections.  This leads to inefficiencies,
   especially where trunking and multipathing are concerned, unique within the server's scope and
   presents additional difficulties in supporting RDMA fabrics, in which
   endpoints may require dedicated or specialized resources.  Sessions
   can be employed
   subject to unify NFS-level constructs certain server policies such as being bounded in time.

   It is envisioned that the clientid, primary transport model will be connection
   oriented.  Connection orientation brings with transport-level constructs it certain potential
   optimizations, such as transport endpoints.  Each
   transport endpoint draws on resources via its membership in a caching of per-connection properties, which
   are easily leveraged through the generality of the session.  Resource management can be more strictly maintained,
   leading to greater server efficiency  However,
   it is possible that in implementing future, other transport models could be
   accommodated below the protocol.
   The enhanced operation over a session affords an opportunity abstraction.

9.2.3.  NFSv4 Channels, Sessions and Connections

   There are at least two types of NFSv4 channels: the "operations"
   channel used for ordinary requests from client to server, and the
   "back" channel, used for callback requests from server to implement a highly reliable duplicate request cache, and
   thereby export exactly-once semantics. client.

   As mentioned above, different NFSv4 advances the state of high-performance local sharing, by virtue
   of its integrated security, locking, operations on these channels can
   lead to different resource needs.  For example, server callback
   operations (CB_RECALL) are specific, small messages which flow from
   server to client at arbitrary times, while data transfers such as
   read and delegation, write have very different sizes and its
   excellent coverage of the sharing semantics of multiple operating
   systems. asymmetric behaviors.
   It is precisely this environment where exactly-once
   semantics become a fundamental requirement.

   Additionally, efforts to standardize a set of protocols sometimes impractical for Remote
   Direct Memory Access, RDMA, over the Internet Protocol Suite have
   made significant progress. RDMA is a general solution peers (NFSv4 client and
   NFSv4 server) to the problem post buffers for these various operations on a
   single connection.  Commingling of CPU overhead incurred requests with responses at the
   client receive queue is particularly troublesome, due both to data copies, primarily at the
   receiver.  Substantial research has addressed this
   need to manage both solicited and has borne out unsolicited completions, and to
   provision buffers for both purposes.  Due to the efficacy lack of the approach.  An overview any ordering
   of this is the RDDP
   Problem Statement document, [RDDPPS].

   Numerous upper layer protocols achieve extremely high bandwidth and
   low overhead through callback requests versus response arrivals, without any other
   mechanisms, the use of RDMA.  Products from a wide variety
   of vendors employ RDMA client would be forced to advantage, and prototypes have demonstrated
   the effectiveness of many more.  Here, we are concerned specifically
   with NFS and NFS-style upper layer protocols; examples from Network
   Appliance [DAFS, DCK+03], Fujitsu Prime Software Technologies [FJNFS,
   FJDAFS] and Harvard University [KM02] are allocate all relevant.

   By layering a session binding for NFS version 4 directly atop a
   standard RDMA transport, a greatly enhanced level of performance and
   transparency can be supported on a wide variety of operating system
   platforms.  These combined capabilities alter the landscape between
   local filesystems and network attached storage, enable a new level of
   performance, and lead new classes of application buffers sized
   to take advantage of
   NFS.

10.1.3.  Problem Statement

   Two issues drive the current proposal: correctness, and performance.
   Both worst case.

   The callback requests are instances of "raising the bar" for NFS, whereby the desire likely to use NFS in new classes applications can be accommodated handled by
   providing a different task
   context from that handling the basic features to make such use feasible.  Such
   applications include tightly coupled sharing environments such as
   cluster computing, high performance computing (HPC) responses.  Significant demultiplexing
   and information
   processing such as databases.  These trends thread management may be required if both are explored in depth in
   [NFSPS].

   The first issue, correctness, exemplified among the attributes of
   local filesystems, is support for exactly-once semantics.  Such
   semantics have not been reliably available with NFS.  Server-based
   duplicate request caches [CJ89] help, but do not reliably provide
   strict correctness.  For received on the type of application which is expected
   same queue.  However, if callbacks are relatively rare (perhaps due
   to
   make extensive use of the high-performance RDMA-enabled environment,
   the reliable provision of such semantics is a fundamental
   requirement.

   Introduction client access patterns), many of a session to NFSv4 will address these issues.  With
   higher performance and enhanced semantics comes difficulties can be
   minimized.

   Also, the problem client may wish to perform trunking of
   enabling advanced endpoint management, operations channel
   requests for example high-speed
   trunking, performance reasons, or multipathing for availability.
   This proposal permits both, as well as many other session and failover.  These characteristics enable
   availability and performance.  RFC3530 presents some issues in
   connection possibilities, by permitting a single clientid each operation to access a server over multiple
   connections.

   A second issue encountered carry
   session membership information and to share session (and clientid)
   state in common by NFS implementations is the
   CPU overhead required order to implement the protocol.  Primary among the
   sources of this overhead is draw upon the movement of data from NFS protocol
   messages appropriate resources.  For example,
   reads and writes may be assigned to its eventual destination in user buffers specific, optimized connections,
   or aligned
   kernel buffers.  The data copies consume system bus bandwidth sorted and CPU
   time, reducing separated by any or all of size, idempotency, etc.

   To address the available system capacity problems described above, this proposal allows
   multiple sessions to share a clientid, as well as for applications.
   [RDDPPS] Achieving zero-copy with NFS has multiple
   connections to date required
   sophisticated, "header cracking" hardware and/or extensive platform-
   specific virtual memory mapping tricks.

   Combined in share a session.

   Single Connection model:

                            NFSv4.1 Session
                               /      \
                Operations_Channel   [Back_Channel]
                                \    /
                             Connection
                                  |

        Multi-connection trunked model (2 operations channels shown):

                            NFSv4.1 Session
                               /      \
                Operations_Channels  [Back_Channel]
                    |          |               |
                Connection Connection     [Connection]
                    |          |               |

        Multi-connection split-use model (2 mounts shown):

                                     NFSv4.1 Session
                                   /                 \
                            (/home)        (/usr/local - readonly)
                            /      \                    |
             Operations_Channel  [Back_Channel]         |
                     |                 |          Operations_Channel
                 Connection       [Connection]          |
                     |                 |            Connection
                                                        |

   In this way, NFSv4, RDMA implementation as well as resource management may be
   optimized.  Each session will have its own response caching and the emerging high-speed network
   fabrics
   buffering, and each connection or channel will enable delivery of performance which matches that of the
   fastest local filesystems, preserving the key existing local
   filesystem semantics, while enhancing them by providing network
   filesystem sharing semantics.

   RDMA implementations generally have other interesting properties,
   such its own transport
   resources, as hardware assisted protocol access, appropriate.  Clients which do not require certain
   behaviors may optimize such resources away completely, by using
   specific sessions and support for user space
   access to I/O. RDMA is compelling here for another reason; hardware
   offloaded networking support in itself does not avoid data copies,
   without resorting to implementing part of the NFS protocol in even creating the
   NIC.  Support of RDMA by NFS enables additional channels and
   connections.

9.2.4.  Reconnection, Trunking and Failover

   Reconnection after failure references stored state on the highest performance at server
   associated with lease recovery during the
   architecture level rather than by implementation; this enables
   ubiquitous grace period.  The session
   provides a convenient handle for storing and interoperable solutions.

   By providing file access performance equivalent to that of local file
   systems, NFSv4 over RDMA will enable applications running managing information
   regarding the client's previous state on a set of
   client machines per- connection basis,
   e.g. to be used upon reconnection.  Reconnection to interact through an NFSv4 file system, just as
   applications running on a single machine might interact through a
   local file system.

   This raises previously
   existing session, and its stored resources, are covered in the issue
   "Connection Models" section below.

   One important aspect of whether additional protocol enhancements to
   enable such interaction would be desirable and what such enhancements
   would be.  This reconnection is a complicated issue which the working group needs that of RPC library support.
   Traditionally, an Upper Layer RPC-based Protocol such as NFS leaves
   all transport knowledge to address and will not be further discussed in this document.

10.1.4.  NFSv4 Session Extension Characteristics the RPC layer implementation below it.
   This draft will present allows NFS to operate over a solution based upon minor versioning wide variety of
   NFSv4.  It will introduce a session to collect transport endpoints transports and resources such as reply caching, has
   proven to be a highly successful approach.  The session, however,
   introduces an abstraction which is, in turn enables
   enhancements such as trunking, failover a way, "between" RPC and recovery.
   NFSv4.1.  It will
   describe use of RDMA by employing support is important that the session abstraction not have
   ramifications within an underlying the RPC
   layer [RPCRDMA].  Most importantly, it will focus on making layer.

   One such issue arises within the best
   possible use reconnection logic of RPC.
   Previously, an RDMA transport.

   These extensions are proposed as elements of a explicit session binding operation, which established
   session context for each new minor revision connection, was explored.  This however
   required that the session binding also be performed during reconnect,
   which in turn required an RPC request.  This additional request
   requires new RPC semantics, both in implementation and the fact that
   a new request is inserted into the RPC stream.  Also, the binding of
   a connection to a session required the upper layer to become "aware"
   of connections, something the RPC layer abstraction architecturally
   abstracts away.  Therefore the session binding is not handled in
   connection scope but instead explicitly carried in each request.

   For Reliability Availability and Serviceability (RAS) issues such as
   bandwidth aggregation and multipathing, clients frequently seek to
   make multiple connections through multiple logical or physical
   channels.  The session is a convenient point to aggregate and manage
   these resources.

9.2.5.  Server Duplicate Request Cache

   Server duplicate request caches, while not a part of an NFS version 4.  In this draft, protocol,
   have become a standard, even required, part of any NFS version 4 will be referred
   implementation.  First described in [CJ89], the duplicate request
   cache was initially found to
   generically reduce work at the server by avoiding
   duplicate processing for retransmitted requests.  A second, and in
   the long run more important benefit, was improved correctness, as "NFSv4", when describing properties common to all
   minor versions.  When referring specifically the
   cache avoided certain destructive non-idempotent requests from being
   reinvoked.

   However, such caches do not provide correctness guarantees; they
   cannot be managed in a reliable, persistent fashion.  The reason is
   understandable - their storage requirement is unbounded due to properties the
   lack of any such bound in the
   original, minor version 0 NFS protocol, "NFSv4.0" will be used, and
   changes proposed here they are dependent on
   transport addresses for minor version 1 will be referred request matching.

   As proposed in this draft, the presence of maximum request count
   limits and negotiated maximum sizes allows the size and duration of
   the cache to as
   "NFSv4.1". be bounded, and coupled with a long-lived session
   identifier, enables its persistent storage on a per-session basis.

   This draft proposes provides a single unified mechanism which provides the following
   guarantees required in the NFSv4 specification, while extending them
   to all requests, rather than limiting them only changes to a subset of state-
   related requests:

   "It is critical the server maintain the last response sent to the
   client to provide a more reliable cache of duplicate non- idempotent
   requests than that of the traditional cache described in [CJ89]..."
   [RFC3530]

   The maximum request count limit is the count of active operations,
   which are strictly upward-
   compatible with existing RPC bounds the number of entries in the cache.  Constraining the
   size of operations additionally serves to limit the required storage
   to the product of the current maximum request count and NFS Application Programming
   Interfaces (APIs).

10.2.  Transport Issues the maximum
   response size.  This storage requirement enables server- side
   efficiencies.

   Session negotiation allows the server to maintain other state.  An
   NFSv4.1 client invoking the session destroy operation will cause the
   server to denegotiate (close) the session, allowing the server to
   deallocate cache entries.  Clients can potentially specify that such
   caches not be kept for appropriate types of sessions (for example,
   read-only sessions).  This can enable more efficient server operation
   resulting in improved response times, and more efficient sizing of
   buffers and response caches.

   Similarly, it is important for the client to explicitly learn whether
   the server is able to implement reliable semantics.  Knowledge of
   whether these semantics are in force is critical for a highly
   reliable client, one which must provide transactional integrity
   guarantees.  When clients request that the semantics be enabled for a
   given session, the session reply must inform the client if the mode
   is in fact enabled.  In this way the client can confidently proceed
   with operations without having to implement consistency facilities of
   its own.

9.3.  Session Initialization and Transfer Models

   Session initialization issues, and data transfer models relevant to
   both TCP and RDMA are discussed in this section.

9.3.1.  Session Negotiation

   The following parameters are exchanged between client and server at
   session creation time.  Their values allow the server to properly
   size resources allocated in order to service the client's requests,
   and to provide the server with a way to communicate limits to the
   client for proper and optimal operation.  They are exchanged prior to
   all session-related activity, over any transport type.  Discussion of
   their use is found in their descriptions as well as throughout this
   section.

   Maximum Requests

      The client's desired maximum number of concurrent requests is
      passed, in order to allow the server to size its reply cache
      storage.  The server may modify the client's requested limit
      downward (or upward) to match its local policy and/or resources.
      Over RDMA-capable RPC transports, the per-request management of
      low-level transport message credits is handled within the RPC
      layer.  [RPCRDMA]

   Maximum Request/Response Sizes

      The maximum request and response sizes are exchanged in order to
      permit allocation of appropriately sized buffers and request cache
      entries.  The size must allow for certain protocol minima,
      allowing the receipt of maximally sized operations (e.g.  RENAME
      requests which contains two name strings).  Note the maximum
      request/response sizes cover the entire request/response message
      and not simply the data payload as traditional NFS maximum read or
      write size.  Also note the server implementation may not, in fact
      probably does not, require the reply cache entries to be sized as
      large as the maximum response.  The server may reduce the client's
      requested sizes.

   Inline Padding/Alignment

      The server can inform the client of any padding which can be used
      to deliver NFSv4 inline WRITE payloads into aligned buffers.  Such
      alignment can be used to avoid data copy operations at the server
      for both TCP and inline RDMA transfers.  For RDMA, the client
      informs the server in each operation when padding has been
      applied.  [RPCRDMA]

   Transport Attributes

      A placeholder for transport-specific attributes is provided, with
      a format to be determined.  Possible examples of information to be
      passed in this parameter include transport security attributes to
      be used on the connection, RDMA- specific attributes, legacy
      "private data" as used on existing RDMA fabrics, transport Quality
      of Service attributes, etc.  This information is to be passed to
      the peer's transport layer by local means which is currently
      outside the scope of this draft, however one attribute is provided
      in the RDMA case:

   RDMA Read Resources

      RDMA implementations must explicitly provision resources to
      support RDMA Read requests from connected peers.  These values
      must be explicitly specified, to provide adequate resources for
      matching the peer's expected needs and the connection's delay-
      bandwidth parameters.  The client provides its chosen value to the
      server in the initial session creation, the value must be provided
      in each client RDMA endpoint.  The values are asymmetric and
      should be set to zero at the server in order to conserve RDMA
      resources, since clients do not issue RDMA Read operations in this
      proposal.  The result is communicated in the session response, to
      permit matching of values across the connection.  The value may
      not be changed in the duration of the session, although a new
      value may be requested as part of a new session.

9.3.2.  RDMA Requirements

   A complete discussion of the operation of RPC-based protocols atop
   RDMA transports is in [RPCRDMA].  Where RDMA is considered, this
   proposal assumes the use of such a layering; it addresses only the
   upper layer issues relevant to making best use of RPC/RDMA.

   A connection oriented (reliable sequenced) RDMA transport will be
   required.  There are several reasons for this.  First, this model
   most closely reflects the general NFSv4 requirement of long-lived and
   congestion-controlled transports.  Second, to operate correctly over
   either an unreliable or unsequenced RDMA transport, or both, would
   require significant complexity in the implementation and protocol not
   appropriate for a strict minor version.  For example, retransmission
   on connected endpoints is explicitly disallowed in the current NFSv4
   draft; it would again be required with these alternate transport
   characteristics.  Third, the proposal assumes a specific RDMA
   ordering semantic, which presents the same set of ordering and
   reliability issues to the RDMA layer over such transports.

   The RDMA implementation provides for making connections to other
   RDMA-capable peers.  In the case of the current proposals before the
   RDDP working group, these RDMA connections are preceded by a
   "streaming" phase, where ordinary TCP (or NFS) traffic might flow.
   However, this is not assumed here and sizes and other parameters are
   explicitly exchanged upon a session entering RDMA mode.

9.3.3.  RDMA Connection Resources

   On transport endpoints which support automatic RDMA mode, that is,
   endpoints which are created in the RDMA-enabled state, a single,
   preposted buffer must initially be provided by both peers, and the
   client session negotiation must be the first exchange.

   On transport endpoints supporting dynamic negotiation, a more
   sophisticated negotiation is possible, but is not discussed in the
   current draft.

   RDMA imposes several requirements on upper layer consumers.
   Registration of memory and the need to post buffers of a specific
   size and number for receive operations are a primary consideration.

   Registration of memory can be a relatively high-overhead operation,
   since it requires pinning of buffers, assignment of attributes (e.g.
   readable/writable), and initialization of hardware translation.
   Preregistration is desirable to reduce overhead.  These registrations
   are specific to hardware interfaces and even to RDMA connection
   endpoints, therefore negotiation of their limits is desirable to
   manage resources effectively.

   Following the basic registration, these buffers must be posted by the
   RPC layer to handle receives.  These buffers remain in use by the
   RPC/NFSv4 implementation; the size and number of them must be known
   to the remote peer in order to avoid RDMA errors which would cause a
   fatal error on the RDMA connection.

   The session provides a natural way for the server to manage resource
   allocation to each client rather than to each transport connection
   itself.  This enables considerable flexibility in the administration
   of transport endpoints.

9.3.4.  TCP and RDMA Inline Transfer Model

   The basic transfer model for both TCP and RDMA is referred to as
   "inline".  For TCP, this is the only transfer model supported, since
   TCP carries both the RPC header and data together in the data stream.

   For RDMA, the RDMA Send transfer model is used for all NFS requests
   and replies, but data is optionally carried by RDMA Writes or RDMA
   Reads.  Use of Sends is required to ensure consistency of data and to
   deliver completion notifications.  The pure-Send method is typically
   used where the data payload is small, or where for whatever reason
   target memory for RDMA is not available.

        Inline message exchange

               Client                                Server
                  :                Request              :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Response              :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

               Client                                Server
                  :            Read request             :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :       Read response with data       :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

               Client                                Server
                  :       Write request with data       :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :            Write response           :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

   Responses must be sent to the client on the same connection that the
   request was sent.  It is important that the server does not assume
   any specific client implementation, in particular whether connections
   within a session share any state at the client.  This is also
   important to preserve ordering of RDMA operations, and especially
   RMDA consistency.  Additionally, it ensures that the RPC RDMA layer
   makes no requirement of the RDMA provider to open its memory
   registration handles (Steering Tags) beyond the scope of a single
   RDMA connection.  This is an important security consideration.

   Two values must be known to each peer prior to issuing Sends: the
   maximum number of sends which may be posted, and their maximum size.
   These values are referred to, respectively, as the message credits
   and the maximum message size.  While the message credits might vary
   dynamically over the duration of the session, the maximum message
   size does not.  The server must commit to preserving this number of
   duplicate request cache entires, and preparing a number of receive
   buffers equal to or greater than its currently advertised credit
   value, each of the advertised size.  These ensure that transport
   resources are allocated sufficient to receive the full advertised
   limits.

   Note that the server must post the maximum number of session requests
   to each client operations channel.  The client is not required to
   spread its requests in any particular fashion across connections
   within a session.  If the client wishes, it may create multiple
   sessions, each with a single or small number of operations channels
   to provide the server with this resource advantage.  Or, over RDMA
   the server may employ a "shared receive queue".  The server can in
   any case protect its resources by restricting the client's request
   credits.

   While tempting to consider, it is not possible to use the TCP window
   as an RDMA operation flow control mechanism.  First, to do so would
   violate layering, requiring both senders to be aware of the existing
   TCP outbound window at all times.  Second, since requests are of
   variable size, the TCP window can hold a widely variable number of
   them, and since it cannot be reduced without actually receiving data,
   the receiver cannot limit the sender.  Third, any middlebox
   interposing on the connection would wreck any possible scheme.
   [MIDTAX] In this proposal, maximum request count limits are exchanged
   at the session level to allow correct provisioning of receive buffers
   by transports.

   When operating over TCP or other similar transport, request limits
   and sizes are still employed in NFSv4.1, but instead of being
   required for correctness, they provide the basis for efficient server
   implementation of the duplicate request cache.  The limits are chosen
   based upon the expected needs and capabilities of the client and
   server, and are in fact arbitrary.  Sizes may be specified by the
   client as zero (requesting the server's preferred or optimal value),
   and request limits may be chosen in proportion to the client's
   capabilities.  For example, a limit of 1000 allows 1000 requests to
   be in progress, which may generally be far more than adequate to keep
   local networks and servers fully utilized.

   Both client and server have independent sizes and buffering, but over
   RDMA fabrics client credits are easily managed by posting a receive
   buffer prior to sending each request.  Each such buffer may not be
   completed with the corresponding reply, since responses from NFSv4
   servers arrive in arbitrary order.  When an operations channel is
   also used for callbacks, the client must account for callback
   requests by posting additional buffers.  Note that implementation-
   specific facilities such as a shared receive queue may also allow
   optimization of these allocations.

   When a session is created, the client requests a preferred buffer
   size, and the server provides its answer.  The server posts all
   buffers of at least this size.  The client must comply by not sending
   requests greater than this size.  It is recommended that server
   implementations do all they can to accommodate a useful range of
   possible client requests.  There is a provision in [RPCRDMA] to allow
   the sending of client requests which exceed the server's receive
   buffer size, but it requires the server to "pull" the client's
   request as a "read chunk" via RDMA Read.  This introduces at least
   one additional network roundtrip, plus other overhead such as
   registering memory for RDMA Read at the client and additional RDMA
   operations at the server, and is to be avoided.

   An issue therefore arises when considering the NFSv4 COMPOUND
   procedures.  Since an arbitrary number (total size) of operations can
   be specified in a single COMPOUND procedure, its size is effectively
   unbounded.  This cannot be supported by RDMA Sends, and therefore
   this size negotiation places a restriction on the construction and
   maximum size of both COMPOUND requests and responses.  If a COMPOUND
   results in a reply at the server that is larger than can be sent in
   an RDMA Send to the client, then the COMPOUND must terminate and the
   operation which causes the overflow will provide a TOOSMALL error
   status result.

9.3.5.  RDMA Direct Transfer Model

   Placement of data by explicitly tagged RDMA operations is referred to
   as "direct" transfer.  This method is typically used where the data
   payload is relatively large, that is, when RDMA setup has been
   performed prior to the operation, or when any overhead for setting up
   and performing the transfer is regained by avoiding the overhead of
   processing an ordinary receive.

   The client advertises RDMA buffers in this proposed model, and not
   the server.  This means the "XDR Decoding with Read Chunks" described
   in [RPCRDMA] is not employed by NFSv4.1 replies, and instead all
   results transferred via RDMA to the client employ "XDR Decoding with
   Write Chunks".  There are several reasons for this.

   First, it allows for a correct and secure mode of transfer.  The
   client may advertise specific memory buffers only during specific
   times, and may revoke access when it pleases.  The server is not
   required to expose copies of local file buffers for individual
   clients, or to lock or copy them for each client access.

   Second, client credits based on fixed-size request buffers are easily
   managed on the server, but for the server additional management of
   buffers for client RDMA Reads is not well-bounded.  For example, the
   client may not perform these RDMA Read operations in a timely
   fashion, therefore the server would have to protect itself against
   denial-of-service on these resources.

   Third, it reduces network traffic, since buffer exposure outside the
   scope and duration of a single request/response exchange necessitates
   additional memory management exchanges.

   There are costs associated with this decision.  Primary among them is
   the need for the server to employ RDMA Read for operations such as
   large WRITE.  The RDMA Read operation is a two-way exchange at the
   RDMA layer, which incurs additional overhead relative to RDMA Write.
   Additionally, RDMA Read requires resources at the data source (the
   client in this proposal) to maintain state and to generate replies.
   These costs are overcome through use of pipelining with credits, with
   sufficient RDMA Read resources negotiated at session initiation, and
   appropriate use of RDMA for writes by the client - for example only
   for transfers above a certain size.

   A description of which NFSv4 operation results are eligible for data
   transfer via RDMA Write is in [NFSDDP].  There are only two such
   operations: READ and READLINK.  When XDR encoding these requests on
   an RDMA transport, the NFSv4.1 client must insert the appropriate
   xdr_write_list entries to indicate to the server whether the results
   should be transferred via RDMA or inline with a Send.  As described
   in [NFSDDP], a zero-length write chunk is used to indicate an inline
   result.  In this way, it is unnecessary to create new operations for
   RDMA-mode versions of READ and READLINK.

   Another tool to avoid creation of new, RDMA-mode operations is the
   Reply Chunk [RPCRDMA], which is used by RPC in RDMA mode to return
   large replies via RDMA as if they were inline.  Reply chunks are used
   for operations such as READDIR, which returns large amounts of
   information, but in many small XDR segments.  Reply chunks are
   offered by the client and the server can use them in preference to
   inline.  Reply chunks are transparent to upper layers such as NFSv4.

   In any very rare cases where another NFSv4.1 operation requires
   larger buffers than were negotiated when the session was created (for
   example extraordinarily large RENAMEs), the underlying RPC layer may
   support the use of "Message as an RDMA Read Chunk" and "RDMA Write of
   Long Replies" as described in [RPCRDMA].  No additional support is
   required in the NFSv4.1 client for this.  The client should be
   certain that its requested buffer sizes are not so small as to make
   this a frequent occurrence, however.

   All operations are initiated by a Send, and are completed with a
   Send.  This is exactly as in conventional NFSv4, but under RDMA has a
   significant purpose: RDMA operations are not complete, that is,
   guaranteed consistent, at the data sink until followed by a
   successful Send completion (i.e. a receive).  These events provide a
   natural opportunity for the initiator (client) to enable and later
   disable RDMA access to the memory which is the target of each
   operation, in order to provide for consistent and secure operation.
   The RDMAP Send with Invalidate operation may be worth employing in
   this respect, as it relieves the client of certain overhead in this
   case.

   A "onetime" boolean advisory to each RDMA region might become a hint
   to the server that the client will use the three-tuple for only one
   NFSv4 operation.  For a transport such as iWARP, the server can
   assist the client in invalidating the three-tuple by performing a
   Send with Solicited Event and Invalidate.  The server may ignore this
   hint, in which case the client must perform a local invalidate after
   receiving the indication from the server that the NFSv4 operation is
   complete.  This may be considered in a future version of this draft
   and [NFSDDP].

   In a trusted environment, it may be desirable for the client to
   persistently enable RDMA access by the server.  Such a model is
   desirable for the highest level of efficiency and lowest overhead.

        RDMA message exchanges

               Client                                Server
                  :         Direct Read Request         :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Segment               :
          tagged  :   <------------------------------   :  RDMA Write
          buffer  :                  :                  :
                  :              [Segment]              :
          tagged  :   <------------------------------   : [RDMA Write]
          buffer  :                                     :
                  :         Direct Read Response        :
         untagged :   <------------------------------   :  Send (w/Inv.)
          buffer  :                                     :

               Client                                Server
                  :        Direct Write Request         :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Segment               :
          tagged  :   v------------------------------   :  RDMA Read
          buffer  :   +----------------------------->   :
                  :                  :                  :
                  :              [Segment]              :
          tagged  :   v------------------------------   : [RDMA Read]
          buffer  :   +----------------------------->   :
                  :                                     :
                  :        Direct Write Response        :
         untagged :   <------------------------------   :  Send (w/Inv.)
          buffer  :                                     :

9.4.  Connection Models

   There are three scenarios in which to discuss the connection model.
   Each will be discussed individually, after describing the common case
   encountered at initial connection establishment.

   After a successful connection, the first request proceeds, in the
   case of a new client association, to initial session creation, and
   then optionally to session callback channel binding, prior to regular
   operation.

   Commonly, each new client "mount" will be the action which drives
   creation of a new session.  However there are any number of other
   approaches.  Clients may choose to share a single connection and
   session among all their mount points.  Or, clients may support
   trunking, where additional connections are created but all within a
   single session.  Alternatively, the client may choose to create
   multiple sessions, each tuned to the buffering and reliability needs
   of the mount point.  For example, a readonly mount can sharply reduce
   its write buffering and also makes no requirement for the server to
   support reliable duplicate request caching.

   Similarly, the client can choose among several strategies for
   clientid usage.  Sessions can share a single clientid, or create new
   clientids as the client deems appropriate.  For kernel-based clients
   which service multiple authenticated users, a single clientid shared
   across all mount points is generally the most appropriate and
   flexible approach.  For example, all the client's file operations may
   wish to share locking state and the local client kernel takes the
   responsibility for arbitrating access locally.  For clients choosing
   to support other authentication models, perhaps example userspace
   implementations, a new clientid is indicated.  Through use of session
   create options, both models are supported at the client's choice.

   Since the session is explicitly created and destroyed by the client,
   and each client is uniquely identified, the server may be
   specifically instructed to discard unneeded presistent state.  For
   this reason, it is possible that a server will retain any previous
   state indefinitely, and place its destruction under administrative
   control.  Or, a server may choose to retain state for some
   configurable period, provided that the period meets other NFSv4
   requirements such as lease reclamation time, etc.  However, since
   discarding this state at the server may affect the correctness of the
   server as seen by the client across network partitioning, such
   discarding of state should be done only in a conservative manner.

   Each client request to the server carries a new SEQUENCE operation
   within each COMPOUND, which provides the session context.  This
   session context then governs the request control, duplicate request
   caching, and other persistent parameters managed by the server for a
   session.

9.4.1.  TCP Connection Model

   The following is a schematic diagram of the NFSv4.1 protocol
   exchanges leading up to normal operation on a TCP stream.

               Client                                Server
          TCPmode :   Create Clientid(nfs_client_id4)   : TCPmode
                  :   ------------------------------>   :
                  :                                     :
                  :     Clientid reply(clientid, ...)   :
                  :   <------------------------------   :
                  :                                     :
                  :   Create Session(clientid, size S,  :
                  :      maxreq N, STREAM, ...)         :
                  :   ------------------------------>   :
                  :                                     :
                  :   Session reply(sessionid, size S', :
                  :      maxreq N')                     :
                  :   <------------------------------   :
                  :                                     :
                  :          <normal operation>         :
                  :   ------------------------------>   :
                  :   <------------------------------   :
                  :                  :                  :

   No net additional exchange is added to the initial negotiation by
   this proposal.  In the NFSv4.1 exchange, the CREATECLIENTID replaces
   SETCLIENTID (eliding the callback "clientaddr4" addressing) and
   CREATESESSION subsumes the function of SETCLIENTID_CONFIRM, as
   described elsewhere in this document.  Callback channel binding is
   optional, as in NFSv4.0.  Note that the STREAM transport type is
   shown above, but since the transport mode remains unchanged and
   transport attributes are not necessarily exchanged, DEFAULT could
   also be passed.

9.4.2.  Negotiated RDMA Connection Model

   One possible design which has been considered is to have a
   "negotiated" RDMA connection model, supported via use of a session
   bind operation as a required first step.  However due to issues
   mentioned earlier, this proved problematic.  This section remains as
   a reminder of that fact, and it is possible such a mode can be
   supported.

   It is not considered critical that this be supported for two reasons.
   One, the session persistence provides a way for the server to
   remember important session parameters, such as sizes and maximum
   request counts.  These values can be used to restore the endpoint
   prior to making the first reply.  Two, there are currently no
   critical RDMA parameters to set in the endpoint at the server side of
   the connection.  RDMA Read resources, which are in general not
   settable after entering RDMA mode, are set only at the client - the
   originator of the connection.  Therefore as long as the RDMA provider
   supports an automatic RDMA connection mode, no further support is
   required from the NFSv4.1 protocol for reconnection.

   Note, the client must provide at least as many RDMA Read resources to
   its local queue for the benefit of the server when reconnecting, as
   it used when negotiating the session.  If this value is no longer
   appropriate, the client should resynchronize its session state,
   destroy the existing session, and start over with the more
   appropriate values.

9.4.3.  Automatic RDMA Connection Model

   The following is a schematic diagram of the NFSv4.1 protocol
   exchanges performed on an RDMA connection.

             Client                                Server
       RDMAmode :                  :                  : RDMAmode
                :                  :                  :
       Prepost  :                  :                  : Prepost
       receive  :                  :                  : receive
                :                                     :
                :   Create Clientid(nfs_client_id4)   :
                :   ------------------------------>   :
                :                                     : Prepost
                :     Clientid reply(clientid, ...)   : receive
                :   <------------------------------   :
       Prepost  :                                     :
       receive  :   Create Session(clientid, size S,  :
                :      maxreq N, RDMA ...)            :
                :   ------------------------------>   :
                :                                     : Prepost <=N'
                :   Session reply(sessionid, size S', :     receives of
                :      maxreq N')                     :     size S'
                :   <------------------------------   :
                :                                     :
                :          <normal operation>         :
                :   ------------------------------>   :
                :   <------------------------------   :
                :                  :                  :

9.5.  Buffer Management, Transfer, Flow Control

   Inline operations in NFSv4.1 behave effectively the same as TCP
   sends.  Procedure results are passed in a single message, and its
   completion at the client signal the receiving process to inspect the
   message.

   RDMA operations are performed solely by the server in this proposal,
   as described in the previous "RDMA Direct Model" section.  Since
   server RDMA operations do not result in a completion at the client,
   and due to ordering rules in RDMA transports, after all required RDMA
   operations are complete, a Send (Send with Solicited Event for iWARP)
   containing the procedure results is performed from server to client.
   This Send operation will result in a completion which will signal the
   client to inspect the message.

   In the case of client read-type NFSv4 operations, the server will
   have issued RDMA Writes to transfer the resulting data into client-
   advertised buffers.  The subsequent Send operation performs two
   necessary functions: finalizing any active or pending DMA at the
   client, and signaling the client to inspect the message.

   In the case of client write-type NFSv4 operations, the server will
   have issued RDMA Reads to fetch the data from the client-advertised
   buffers.  No data consistency issues arise at the client, but the
   completion of the transfer must be acknowledged, again by a Send from
   server to client.

   In either case, the client advertises buffers for direct (RDMA style)
   operations.  The client may desire certain advertisement limits, and
   may wish the server to perform remote invalidation on its behalf when
   the server has completed its RDMA.  This may be considered in a
   future version of this draft.

   In the absence of remote invalidation, the client may perform its
   own, local invalidation after the operation completes.  This
   invalidation should occur prior to any RPCSEC GSS integrity checking,
   since a validly remotely accessible buffer can possibly be modified
   by the peer.  However, after invalidation and the contents integrity
   checked, the contents are locally secure.

   Credit updates over RDMA transports are supported at the RPC layer as
   described in [RPCRDMA].  In each request, the client requests a
   desired number of credits to be made available to the connection on
   which it sends the request.  The client must not send more requests
   than the number which the server has previously advertised, or in the
   case of the first request, only one.  If the client exceeds its
   credit limit, the connection may close with a fatal RDMA error.

   The server then executes the request, and replies with an updated
   credit count accompanying its results.  Since replies are sequenced
   by their RDMA Send order, the most recent results always reflect the
   server's limit.  In this way the client will always know the maximum
   number of requests it may safely post.

   Because the client requests an arbitrary credit count in each
   request, it is relatively easy for the client to request more, or
   fewer, credits to match its expected need.  A client that discovered
   itself frequently queuing outgoing requests due to lack of server
   credits might increase its requested credits proportionately in
   response.  Or, a client might have a simple, configurable number.
   The protocol also provides a per-operation "maxslot" exchange to
   assist in dynamic adjustment at the session level, described in a
   later section.

   Occasionally, a server may wish to reduce the total number of credits
   it offers a certain client on a connection.  This could be
   encountered if a client were found to be consuming its credits
   slowly, or not at all.  A client might notice this itself, and reduce
   its requested credits in advance, for instance requesting only the
   count of operations it currently has queued, plus a few as a base for
   starting up again.  Such mechanisms can, however, be potentially
   complicated and are implementation-defined.  The protocol does not
   require them.

   Because of the way in which RDMA fabrics function, it is not possible
   for the server (or client back channel) to cancel outstanding receive
   operations.  Therefore, effectively only one credit can be withdrawn
   per receive completion.  The server (or client back channel) would
   simply not replenish a receive operation when replying.  The server
   can still reduce the available credit advertisement in its replies to
   the target value it desires, as a hint to the client that its credit
   target is lower and it should expect it to be reduced accordingly.
   Of course, even if the server could cancel outstanding receives, it
   cannot do so, since the client may have already sent requests in
   expectation of the previous limit.

   This brings out an interesting scenario similar to the client
   reconnect discussed earlier in "Connection Models".  How does the
   server reduce the credits of an inactive client?

   One approach is for the server to simply close such a connection and
   require the client to reconnect at a new credit limit.  This is
   acceptable, if inefficient, when the connection setup time is short
   and where the server supports persistent session semantics.

   A better approach is to provide a back channel request to return the
   operations channel credits.  The server may request the client to
   return some number of credits, the client must comply by performing
   operations on the operations channel, provided of course that the
   request does not drop the client's credit count to zero (in which
   case the connection would deadlock).  If the client finds that it has
   no requests with which to consume the credits it was previously
   granted, it must send zero-length Send RDMA operations, or NULL NFSv4
   operations in order to return the resources to the server.  If the
   client fails to comply in a timely fashion, the server can recover
   the resources by breaking the connection.

   While in principle, the back channel credits could be subject to a
   similar resource adjustment, in practice this is not an issue, since
   the back channel is used purely for control and is expected to be
   statically provisioned.

   It is important to note that in addition to maximum request counts,
   the sizes of buffers are negotiated per-session.  This permits the
   most efficient allocation of resources on both peers.  There is an
   important requirement on reconnection: the sizes posted by the server
   at reconnect must be at least as large as previously used, to allow
   recovery.  Any replies that are replayed from the server's duplicate
   request cache must be able to be received into client buffers.  In
   the case where a client has received replies to all its retried
   requests (and therefore received all its expected responses), then
   the client may disconnect and reconnect with different buffers at
   will, since no cache replay will be required.

9.6.  Retry and Replay

   NFSv4.0 forbids retransmission on active connections over reliable
   transports; this includes connected-mode RDMA.  This restriction must
   be maintained in NFSv4.1.

   If one peer were to retransmit a request (or reply), it would consume
   an additional credit on the other.  If the server retransmitted a
   reply, it would certainly result in an RDMA connection loss, since
   the client would typically only post a single receive buffer for each
   request.  If the client retransmitted a request, the additional
   credit consumed on the server might lead to RDMA connection failure
   unless the client accounted for it and decreased its available
   credit, leading to wasted resources.

   RDMA credits present a new issue to the duplicate request cache in
   NFSv4.1.  The request cache may be used when a connection within a
   session is lost, such as after the client reconnects.  Credit
   information is a dynamic property of the connection, and stale values
   must not be replayed from the cache.  This implies that the request
   cache contents must not be blindly used when replies are issued from
   it, and credit information appropriate to the channel must be
   refreshed by the RPC layer.

   Finally, RDMA fabrics do not guarantee that the memory handles
   (Steering Tags) within each rdma three-tuple are valid on a scope
   outside that of a single connection.  Therefore, handles used by the
   direct operations become invalid after connection loss.  The server
   must ensure that any RDMA operations which must be replayed from the
   request cache use the newly provided handle(s) from the most recent
   request.

9.7.  The Back Channel

   The NFSv4 callback operations present a significant resource problem
   for the RDMA enabled client.  Clearly, callbacks must be negotiated
   in the way credits are for the ordinary operations channel for
   requests flowing from client to server.  But, for callbacks to arrive
   on the same RDMA endpoint as operation replies would require
   dedicating additional resources, and specialized demultiplexing and
   event handling.  Or, callbacks may not require RDMA sevice at all
   (they do not normally carry substantial data payloads).  It is highly
   desirable to streamline this critical path via a second
   communications channel.

   The session callback channel binding facility is designed for exactly
   such a situation, by dynamically associating a new connected endpoint
   with the session, and separately negotiating sizes and counts for
   active callback channel operations.  The binding operation is
   firewall-friendly since it does not require the server to initiate
   the connection.

   This same method serves as well for ordinary TCP connection mode.  It
   is expected that all NFSv4.1 clients may make use of the session
   facility to streamline their design.

   The back channel functions exactly the same as the operations channel
   except that no RDMA operations are required to perform transfers,
   instead the sizes are required to be sufficiently large to carry all
   data inline, and of course the client and server reverse their roles
   with respect to which is in control of credit management.  The same
   rules apply for all transfers, with the server being required to flow
   control its callback requests.

   The back channel is optional.  If not bound on a given session, the
   server must not issue callback operations to the client.  This in
   turn implies that such a client must never put itself in the
   situation where the server will need to do so, lest the client lose
   its connection by force, or its operation be incorrect.  For the same
   reason, if a back channel is bound, the client is subject to
   revocation of its delegations if the back channel is lost.  Any
   connection loss should be corrected by the client as soon as
   possible.

   This can be convenient for the NFSv4.1 client; if the client expects
   to make no use of back channel facilities such as delegations, then
   there is no need to create it.  This may save significant resources
   and complexity at the client.

   For these reasons, if the client wishes to use the back channel, that
   channel must be bound first, before using the operations channel.  In
   this way, the server will not find itself in a position where it will
   send callbacks on the operations channel when the client is not
   prepared for them.

   There is one special case, that where the back channel is bound in
   fact to the operations channel's connection.  This configuration
   would be used normally over a TCP stream connection to exactly
   implement the NFSv4.0 behavior, but over RDMA would require complex
   resource and event management at both sides of the connection.  The
   server is not required to accept such a bind request on an RDMA
   connection for this reason, though it is recommended.

9.8.  COMPOUND Sizing Issues

   Very large responses may pose duplicate request cache issues.  Since
   servers will want to bound the storage required for such a cache, the
   unlimited size of response data in COMPOUND may be troublesome.  If
   COMPOUND is used in all its generality, then the inclusion of certain
   non-idempotent operations within a single COMPOUND request may render
   the entire request non-idempotent.  (For example, a single COMPOUND
   request which read a file or symbolic link, then removed it, would be
   obliged to cache the data in order to allow identical replay).
   Therefore, many requests might include operations that return any
   amount of data.

   It is not satisfactory for the server to reject COMPOUNDs at will
   with NFS4ERR_RESOURCE when they pose such difficulties for the
   server, as this results in serious interoperability problems.
   Instead, any such limits must be explicitly exposed as attributes of
   the session, ensuring that the server can explicitly support any
   duplicate request cache needs at all times.

9.9.  Data Alignment

   A negotiated data alignment enables certain scatter/gather
   optimizations.  A facility for this is supported by [RPCRDMA].  Where
   NFS file data is the payload, specific optimizations become highly
   attractive.

   Header padding is requested by each peer at session initiation, and
   may be zero (no padding).  Padding leverages the useful property that
   RDMA receives preserve alignment of data, even when they are placed
   into anonymous (untagged) buffers.  If requested, client inline
   writes will insert appropriate pad bytes within the request header to
   align the data payload on the specified boundary.  The client is
   encouraged to be optimistic and simply pad all WRITEs within the RPC
   layer to the negotiated size, in the expectation that the server can
   use them efficiently.

   It is highly recommended that clients offer to pad headers to an
   appropriate size.  Most servers can make good use of such padding,
   which allows them to chain receive buffers in such a way that any
   data carried by client requests will be placed into appropriate
   buffers at the server, ready for filesystem processing.  The
   receiver's RPC layer encounters no overhead from skipping over pad
   bytes, and the RDMA layer's high performance makes the insertion and
   transmission of padding on the sender a significant optimization.  In
   this way, the need for servers to perform RDMA Read to satisfy all
   but the largest client writes is obviated.  An added benefit is the
   reduction of message roundtrips on the network - a potentially good
   trade, where latency is present.

   The value to choose for padding is subject to a number of criteria.
   A primary source of variable-length data in the RPC header is the
   authentication information, the form of which is client-determined,
   possibly in response to server specification.  The contents of
   COMPOUNDs, sizes of strings such as those passed to RENAME, etc. all
   go into the determination of a maximal NFSv4 request size and
   therefore minimal buffer size.  The client must select its offered
   value carefully, so as not to overburden the server, and vice- versa.
   The payoff of an appropriate padding value is higher performance.

                    Sender gather:
        |RPC Request|Pad bytes|Length| -> |User data...|
        \------+---------------------/       \
                \                             \
                 \    Receiver scatter:        \-----------+- ...
            /-----+----------------\            \           \
            |RPC Request|Pad|Length|   ->  |FS buffer|->|FS buffer|->...

   In the above case, the server may recycle unused buffers to the next
   posted receive if unused by the actual received request, or may pass
   the now-complete buffers by reference for normal write processing.
   For a server which can make use of it, this removes any need for data
   copies of incoming data, without resorting to complicated end-to-end
   buffer advertisement and management.  This includes most kernel-based
   and integrated server designs, among many others.  The client may
   perform similar optimizations, if desired.

   Padding is negotiated by the session creation operation, and
   subsequently used by the RPC RDMA layer, as described in [RPCRDMA].

9.10.  NFSv4 Integration

   The following section discusses the integration of the proposed RDMA
   extensions with NFSv4.0.

9.10.1.  Minor Versioning

   Minor versioning is the existing facility to extend the NFSv4
   protocol, and this proposal takes that approach.

   Minor versioning of NFSv4 is relatively restrictive, and allows for
   tightly limited changes only.  In particular, it does not permit
   adding new "procedures" (it permits adding only new "operations").
   Interoperability concerns make it impossible to consider additional
   layering to be a minor revision.  This somewhat limits the changes
   that can be proposed when considering extensions.

   To support the duplicate request cache integrated with sessions and
   request control, it is desirable to tag each request with an
   identifier to be called a Slotid.  This identifier must be passed by
   NFSv4 when running atop any transport, including traditional TCP.
   Therefore it is not desirable to add the Slotid to a new RPC
   transport, even though such a transport is indicated for support of
   RDMA.  This draft and [RPCRDMA] do not propose such an approach.

   Instead, this proposal conforms to the requirements of NFSv4 minor
   versioning, through the use of a new operation within NFSv4 COMPOUND
   procedures as detailed below.

   If sessions are in use for a given clientid, this same clientid
   cannot be used for non-session NFSv4 operation, including NFSv4.0.
   Because the server will have allocated session-specific state to the
   active clientid, it would be an unnecessary burden on the server
   implementor to support and account for additional, non- session
   traffic, in addition to being of no benefit.  Therefore this proposal
   prohibits a single clientid from doing this.  Nevertheless, employing
   a new clientid for such traffic is supported.

9.10.2.  Slot Identifiers and Server Duplicate Request Cache

   The presence of deterministic maximum request limits on a session
   enables in-progress requests to be assigned unique values with useful
   properties.

   The RPC layer provides a transaction ID (xid), which, while required
   to be unique, is not especially convenient for tracking requests.

   The transaction ID is only meaningful to the issuer (client), it
   cannot be interpreted at the server except to test for equality with
   previously issued requests.  Because RPC operations may be completed
   by the server in any order, many transaction IDs may be outstanding
   at any time.  The client may therefore perform a computationally
   expensive lookup operation in the process of demultiplexing each
   reply.

   In the proposal, there is a limit to the number of active requests.
   This immediately enables a convenient, computationally efficient
   index for each request which is designated as a Slot Identifier, or
   slotid.

   When the client issues a new request, it selects a slotid in the
   range 0..N-1, where N is the server's current "totalrequests" limit
   granted the client on the session over which the request is to be
   issued.  The slotid must be unused by any of the requests which the
   client has already active on the session.  "Unused" here means the
   client has no outstanding request for that slotid.  Because the slot
   id is always an integer in the range 0..N-1, client implementations
   can use the slotid from a server response to efficiently match
   responses with outstanding requests, such as, for example, by using
   the slotid to index into a outstanding request array.  This can be
   used to avoid expensive hashing and lookup functions in the
   performace-critical receive path.

   The sequenceid, which accompanies the slotid in each request, is
   important for a second, important check at the server: it must be
   able to be determined efficiently whether a request using a certain
   slotid is a retransmit or a new, never-before-seen request.  It is
   not feasible for the client to assert that it is retransmitting to
   implement this, because for any given request the client cannot know
   the server has seen it unless the server actually replies.  Of
   course, if the client has seen the server's reply, the client would
   not retransmit!

   The sequenceid must increase monotonically for each new transmit of a
   given slotid, and must remain unchanged for any retransmission.  The
   server must in turn compare each newly received request's sequenceid
   with the last one previously received for that slotid, to see if the
   new request is:

   o  A new request, in which the sequenceid is greater than that
      previously seen in the slot (accounting for sequence wraparound).
      The server proceeds to execute the new request.

   o  A retransmitted request, in which the sequenceid is equal to that
      last seen in the slot.  Note that this request may be either
      complete, or in progress.  The server performs replay processing
      in these cases.

   o  A misordered duplicate, in which the sequenceid is less than that
      previously seen in the slot.  The server must drop the incoming
      request, which may imply dropping the connection if the transport
      is reliable, as dictated by section 3.1.1 of [RFC3530].

   This last condition is possible on any connection, not just
   unreliable, unordered transports.  Delayed behavior on abandoned TCP
   connections which are not yet closed at the server, or pathological
   client implementations can cause it, among other causes.  Therefore,
   the server may wish to harden itself against certain repeated
   occurrences of this, as it would for retransmissions in [RFC3530].

   It is recommended, though not necessary for protocol correctness,
   that the client simply increment the sequenceid by one for each new
   request on each slotid.  This reduces the wraparound window to a
   minimum, and is useful for tracing and avoidance of possible
   implementation errors.

   The client may however, for implementation-specific reasons, choose a
   different algorithm.  For example it might maintain a single sequence
   space for all slots in the session - e.g. employing the RPC XID
   itself.  The sequenceid, in any case, is never interpreted by the
   server for anything but to test by comparison with previously seen
   values.

   The server may thereby use the slotid, in conjunction with the
   sessionid and sequenceid, within the SEQUENCE portion of the request
   to maintain its duplicate request cache (DRC) for the session, as
   opposed to the traditional approach of ONC RPC applications that use
   the XID along with certain transport information [RW96].

   Unlike the XID, the slotid is always within a specific range; this
   has two implications.  The first implication is that for a given
   session, the server need only cache the results of a limited number
   of COMPOUND requests.  The second implication derives from the first,
   which is unlike XID-indexed DRCs, the slotid DRC by its nature cannot
   be overflowed.  Through use of the sequenceid to identify
   retransmitted requests, it is notable that the server does not need
   to actually cache the request itself, reducing the storage
   requirements of the DRC further.  These new facilities makes it
   practical to maintain all the required entries for an effective DRC.

   The slotid and sequenceid therefore take over the traditional role of
   the port number in the server DRC implementation, and the session
   replaces the IP address.  This approach is considerably more portable
   and completely robust - it is not subject to the frequent
   reassignment of ports as clients reconnect over IP networks.  In
   addition, the RPC XID is not used in the reply cache, enhancing
   robustness of the cache in the face of any rapid reuse of XIDs by the
   client.

   It is required to encode the slotid information into each request in
   a way that does not violate the minor versioning rules of the NFSv4.0
   specification.  This is accomplished here by encoding it in a control
   operation within each NFSv4.1 COMPOUND and CB_COMPOUND procedure.
   The operation easily piggybacks within existing messages.  The
   implementation section of this document describes the specific
   proposal.

   In general, the receipt of a new sequenced request arriving on any
   valid slot is an indication that the previous DRC contents of that
   slot may be discarded.  In order to further assist the server in slot
   management, the client is required to use the lowest available slot
   when issuing a new request.  In this way, the server may be able to
   retire additional entries.

   However, in the case where the server is actively adjusting its
   granted maximum request count to the client, it may not be able to
   use receipt of the slotid to retire cache entries.  The slotid used
   in an incoming request may not reflect the server's current idea of
   the client's session limit, because the request may have been sent
   from the client before the update was received.  Therefore, in the
   downward adjustment case, the server may have to retain a number of
   duplicate request cache entries at least as large as the old value,
   until operation sequencing rules allow it to infer that the client
   has seen its reply.

   The SEQUENCE (and CB_SEQUENCE) operation also carries a "maxslot"
   value which carries additional client slot usage information.  The
   client must always provide its highest-numbered outstanding slot
   value in the maxslot argument, and the server may reply with a new
   recognized value.  The client should in all cases provide the most
   conservative value possible, although it can be increased somewhat
   above the actual instantaneous usage to maintain some minimum or
   optimal level.  This provides a way for the client to yield unused
   request slots back to the server, which in turn can use the
   information to reallocate resources.  Obviously, maxslot can never be
   zero, or the session would deadlock.

   The server also provides a target maxslot value to the client, which
   is an indication to the client of the maxslot the server wishes the
   client to be using.  This permits the server to withdraw (or add)
   resources from a client that has been found to not be using them, in
   order to more fairly share resources among a varying level of demand
   from other clients.  The client must always comply with the server's
   value updates, since they indicate newly established hard limits on
   the client's access to session resources.  However, because of
   request pipelining, the client may have active requests in flight
   reflecting prior values, therefore the server must not immediately
   require the client to comply.

   It is worthwhile to note that Sprite RPC [BW87] defined a "channel"
   which in some ways is similar to the slotid proposed here.  Sprite
   RPC used channels to implement parallel request processing and
   request/response cache retirement.

9.10.3.  Resolving server callback races with sessions

   It is possible for server callbacks to arrive at the client before
   the reply from related forward channel operations.  For example, a
   client may have been granted a delegation to a file it has opened,
   but the reply to the OPEN (informing the client of the granting of
   the delegation) may be delayed in the network.  If a conflicting
   operation arrives at the server, it will recall the delegation using
   the callback channel, which may be on a different TCP connection,
   perhaps even a different network.  If the callback request arrives
   before the related reply, the client may reply to the server with an
   error.

   The presence of a session between client and server can be used to
   alleviate this issue.  When a session is in place, each client
   request is uniquely identified by its { slotid, sequenceid } pair.
   By the rules under which slot entries (duplicate request cache
   entries) are retired, the server has knowledge whether the client has
   "seen" each of the server's replies.  The server can therefore
   provide sufficient information to the client to allow it to
   disambiguate between an erroneous or conflicting callback and a race
   condition.

   To implement this, the CB_SEQUENCE operation which begins each server
   callback may optionally carry a related { slotid, sequenceid }
   identifier.  If the client finds this identifier to be currently
   outstanding (the server's reply has not been seen by the client), it
   can determine that the callback has raced the reply, and act
   accordingly.

   The client must not simply wait forever for the expected server reply
   to arrive any of the session's operations channels, because it is
   possible that they will be delayed indefinitely.  However, it should
   endeavor to wait for a period of time, and if the time expires it can
   provide a more meaningful error such as NFS4ERR_DELAY.

   [[Comment.4: We need to consider the clients' options here, and
   describe them...  NFS4ERR_DELAY has been discussed as a legal reply
   to CB_RECALL?]]

   There are other scenarios under which callbacks may race replies,
   among them pnfs layout recalls, described in Section 14.5.3
   [[Comment.5: fill in the blanks w/others, etc...]]

   Therefore, for each client operation which might result in some sort
   of server callback, the server should "remember" the { slotid,
   sequenceid } pair of the client request until the slotid retirement
   rules allow the server to determine that the client has, in fact,
   seen the server's reply.  During this time, any recalls of the
   associated object should carry these identifiers, for the benefit of
   the client.  After this time, it is not necessary for the server to
   provide this information in related callbacks, since it is certain
   that a race condition can no longer occur.

9.10.4.  COMPOUND and CB_COMPOUND

   Support for per-operation control can be piggybacked onto NFSv4
   COMPOUNDs with full transparency, by placing such facilities into
   their own, new operation, and placing this operation first in each
   COMPOUND under the new NFSv4 minor protocol revision.  The contents
   of the operation would then apply to the entire COMPOUND.

   Recall that the NFSv4 minor revision is contained within the COMPOUND
   header, encoded prior to the COMPOUNDed operations.  By simply
   requiring that the new operation always be contained in NFSv4 minor
   COMPOUNDs, the control protocol can piggyback perfectly with each
   request and response.

   In this way, the NFSv4 RDMA Extensions may stay in compliance with
   the minor versioning requirements specified in section 10 of
   [RFC3530].

   Referring to section 13.1 of the same document, the proposed session-
   enabled COMPOUND and CB_COMPOUND have the form:

      +-----+--------------+-----------+------------+-----------+----
      | tag | minorversion | numops    | control op | op + args | ...
      |     |   (== 1)     | (limited) |  + args    |           |
      +-----+--------------+-----------+------------+-----------+----

      and the reply's structure is:

      +------------+-----+--------+-------------------------------+--//
      |last status | tag | numres | status + control op + results |  //
      +------------+-----+--------+-------------------------------+--//
              //-----------------------+----
              // status + op + results | ...
              //-----------------------+----

   The single control operation within each NFSv4.1 COMPOUND defines the
   context and operational session parameters which govern that COMPOUND
   request and reply.  Placing it first in the COMPOUND encoding is
   required in order to allow its processing before other operations in
   the COMPOUND.

9.10.5.  eXternal Data Representation Efficiency

   RDMA is a copy avoidance technology, and it is important to maintain
   this efficiency when decoding received messages.  Traditional XDR
   implementations frequently use generated unmarshaling code to convert
   objects to local form, incurring a data copy in the process (in
   addition to subjecting the caller to recursive calls, etc).  Often,
   such conversions are carried out even when no size or byte order
   conversion is necessary.

   It is recommended that implementations pay close attention to the
   details of memory referencing in such code.  It is far more efficient
   to inspect data in place, using native facilities to deal with word
   size and byte order conversion into registers or local variables,
   rather than formally (and blindly) performing the operation via
   fetch, reallocate and store.

   Of particular concern is the result of the READDIR operation, in
   which such encoding abounds.

9.10.6.  Effect of Sessions on Existing Operations

   The Transport Issues section use of a session replaces the document explores use of the details SETCLIENTID and
   SETCLIENTID_CONFIRM operations, and allows certain simplification of
   utilizing
   the various supported transports.

10.2.1.  Session Model RENEW and callback addressing mechanisms in the base protocol.

   The first cb_program and most evident issue cb_location which are obtained by the server in supporting diverse transports is
   how to provide for their differences.  This draft proposes
   introducing an explicit session.

   A session introduces minimal protocol requirements,
   SETCLIENTID_CONFIRM must not be used by the server, because the
   NFSv4.1 client performs callback channel designation with
   BIND_BACKCHANNEL.  Therefore the SETCLIENTID and provides for
   a highly useful SETCLIENTID_CONFIRM
   operations becomes obsolete when sessions are in use, and convenient way to manage numerous endpoint-
   related issues.  The session is a local construct; it represents a
   named, higher-layer object server
   should return an error to NFSv4.1 clients which connections can refer, and
   encapsulates properties important to each associated client.

   A might issue either
   operation.

   Another favorable result of the session is a dynamically created, long-lived that the server object created
   by a client, used over time from one or more transport connections.
   Its function is able to maintain the server's state relative to
   avoid requiring the
   connection(s) belonging to a client instance.  This state is entirely
   independent of the connection itself. to perform OPEN_CONFIRM operations.  The session in effect becomes
   the object representing an active client on a connection or set
   existence of
   connections.

   Clients may create multiple sessions for a single clientid, reliable and may
   wish to do so for optimization of transport resources, buffers, or effective DRC means that the server behavior.  A session could will
   be created by the client able to
   represent determine whether an OPEN request carrying a single mount point, for separate read and write
   "channels", or for any number of other client-selected parameters.

   The session enables several things immediately.  Clients may
   disconnect and reconnect (voluntarily previously
   known open_owner from a client is or not) without loss is not a retransmission.
   Because of context
   at this, the server.  (Of course, locks, delegations and related
   associations require special handling, and generally expire in server no longer requires OPEN_CONFIRM to verify
   whether the
   extended absence of client is retransmitting an open connection.)  Clients may connect
   multiple transport endpoints to this common state.  The endpoints may
   have all request.  This in turn
   eliminates the same attributes, for instance when trunked on multiple
   physical network links server's reason for bandwidth aggregation or path failover.
   Or, requesting OPEN_CONFIRM - the endpoints
   server can have specific, special purpose attributes such
   as callback channels.

   The NFSv4 specification does not provide for simply replace any form of flow
   control; instead it relies previous information on the windowing provided by TCP to
   throttle requests.  This unfortunately does not work with RDMA, which
   in general provides no operation flow control and will terminate a
   connection in error when limits are exceeded.  Limits this
   open_owner.  Client OPEN operations are therefore
   exchanged when a streamlined,
   reducing overhead and latency through avoiding the additional
   OPEN_CONFIRM exchange.

   Since the session is created; These limits then provide maxima
   within which each session's connections must operate, they are
   managed within these limits as described in [RPCRDMA].  The limits
   may also be modified dynamically at carries the server's choosing by
   manipulating certain parameters present in each NFSv4.1 request.

   The presence of a maximum client liveness indication with it
   implicitly, any request limit on the a session bounds the
   requirements of associated with a given client
   will renew that client's leases.  Therefore the duplicate request cache.  This can be used to
   advantage by RENEW operation is
   made unnecessary when a server, which can accurately determine session is present, as any storage
   needs and enable it to maintain duplicate request cache persistence
   and to provide reliable exactly-once semantics.

   Finally, given adequate connection-oriented transport security
   semantics, authentication and authorization may be cached on (including
   a per-
   session basis, enabling greater efficiency in SEQUENCE operation with or without additional NFSv4 operations)
   performs its function.  It is possible (though this proposal does not
   make any recommendation) that the issuing and
   processing of requests RENEW operation could be made
   obsolete.

   An interesting issue arises however if an error occurs on both client and server.  A proposal for
   transparent, server-driven implementation of this in NFSv4 has been
   made.  [CCM] The existence of such a
   SEQUENCE operation.  If the session greatly facilitates SEQUENCE operation fails, perhaps due to
   an invalid slotid or other non-renewal-based issue, the
   implementation of this approach.  This is discussed in detail in server may or
   may not have performed the
   Authentication Efficiencies section later in this draft.

10.2.2.  Connection State RENEW.  In RFC3530, this case, the combination state of a connected transport endpoint any
   renewal is undefined, and a
   clientid forms the basis of connection state.  While client should make no assumption that
   it has been made to
   be workable with certain limitations, there are difficulties performed.  In practice, this should not occur but even
   if it did, it is expected the client would perform some sort of
   recovery which would result in
   correct and robust implementation.  The NFSv4.0 protocol must provide a server-initiated connection for the callback channel, new, successful, SEQUENCE operation
   being run and must
   carefully specify the persistence of client state at assured that the server in renewal took place.

9.10.7.  Authentication Efficiencies

   NFSv4 requires the face use of transport interruptions. the RPCSEC_GSS ONC RPC security flavor
   [RFC2203] to provide authentication, integrity, and privacy via
   cryptography.  The server has only the
   client's transport address binding (the IP 4-tuple) dictates to identify the client RPC transaction stream and to the use of
   RPCSEC_GSS, the service (authentication, integrity, or privacy), and
   the specific GSS-API security mechanism that each remote procedure
   call and result will use.

   If the connection's integrity is protected by an additional means
   than RPCSEC_GSS, such as a lookup tag on via IPsec, then the
   duplicate request cache.  (A useful overview use of this RPCSEC_GSS's
   integrity service is in [RW96].)
   If the server listens on multiple adddresses, and nearly redundant (See the client connects
   to Security
   Considerations section for more than one, explanation of why it must employ different clientid's on each,
   negating its ability to aggregate bandwidth is "nearly" and redundancy.  In
   effect, each transport connection
   not completely redundant).  Likewise, if the connection's privacy is used
   protected by additional means, then the use of both RPCSEC_GSS's
   integrity and privacy services is nearly redundant.

   Connection protection schemes, such as IPsec, are more likely to be
   implemented in hardware than upper layer protocols like RPCSEC_GSS.
   Hardware-based cryptography at the IPsec layer will be more efficient
   than software-based cryptography at the server's
   representation of client state.  But, RPCSEC_GSS layer.

   When transport connections are
   potentially fragile and transitory.

   In this proposal, a session identifier integrity can be obtained, it is assigned by the possible for server upon
   initial session negotiation on each connection.  This identifier is
   used to associate additional connections,
   and client to renegotiate downgrade their per-operation authentication, after a
   reconnect, to provide an abstraction for the various session
   properties, and
   appropriate exchange.  This downgrade can in fact be as complete as
   to address establish security mechanisms that have zero cryptographic
   overhead, effectively using the duplicate request cache.  No
   transport-specific information is used in underlying integrity and privacy
   services provided by transport.

   Based on the duplicate request cache
   implementation of an NFSv4.1 server, nor in fact above observations, a new GSS-API mechanism, called the RPC XID itself.
   The session identifier
   Channel Conjunction Mechanism [CCM], is unique within the server's scope and may be
   subject to certain server policies such as being bounded in time.

   It is envisioned defined.  The CCM works
   by creating a GSS-API security context using as input a cookie that
   the primary transport model will initiator and target have previously agreed to be connection
   oriented.  Connection orientation brings with it certain potential
   optimizations, such a handle for
   GSS-API context created previously over another GSS-API mechanism.

   NFSv4.1 clients and servers should support CCM and they must use as caching of per-connection properties, which
   are easily leveraged through
   the generality cookie the handle from a successful RPCSEC_GSS context creation
   over a non-CCM mechanism (such as Kerberos V5).  The value of the session.  However,
   it is possible that in future, other transport models could
   cookie will be
   accommodated below equal to the session abstraction.

10.2.3.  NFSv4 Channels, Sessions and Connections

   There are at least two types handle field of NFSv4 channels: the "operations"
   channel used for ordinary requests rpc_gss_init_res
   structure from client to server, and the
   "back" channel, used for callback requests from server to client.

   As mentioned above, different RPCSEC_GSS specification.

   The [CCM] Draft provides further discussion and examples.

9.11.  Sessions Security Considerations

   The NFSv4 operations on these channels can
   lead minor version 1 retains all of existing NFSv4 security; all
   security considerations present in NFSv4.0 apply to different resource needs.  For example, server callback
   operations (CB_RECALL) it equally.

   Security considerations of any underlying RDMA transport are specific, small messages which flow from
   server
   additionally important, all the more so due to client at arbitrary times, while data transfers the emerging nature of
   such as
   read and write have very different sizes and asymmetric behaviors.
   It transports.  Examining these issues is sometimes impractical for outside the RDMA peers (NFSv4 client scope of this
   draft.

   When protecting a connection with RPCSEC_GSS, all data in each
   request and
   NFSv4 server) response (whether transferred inline or via RDMA)
   continues to post buffers for these various operations on a
   single connection.  Commingling receive this protection over RDMA fabrics [RPCRDMA].
   However when performing data transfers via RDMA, RPCSEC_GSS
   protection of requests with responses at the
   client receive queue data transfer portion works against the efficiency
   which RDMA is particularly troublesome, due both typically employed to achieve.  This is because such
   data is normally managed solely by the
   need to manage both solicited RDMA fabric, and unsolicited completions, intentionally
   is not touched by software.  Therefore when employing RPCSEC_GSS
   under CCM, and to
   provision buffers for both purposes.  Due to where integrity protection has been "downgraded", the lack of any ordering
   cooperation of callback requests versus response arrivals, without any other
   mechanisms, the client would be forced to allocate all buffers sized RDMA transport provider is critical to maintain
   any integrity and privacy otherwise in place for the worst case. session.  The callback requests are likely to be handled
   means by a different task
   context from that handling which the responses.  Significant demultiplexing
   and thread management may be required if both are received on local RPCSEC_GSS implementation is integrated with
   the
   same queue.  However, if callbacks RDMA data protection facilities are relatively rare (perhaps due
   to client access patterns), many of these difficulties can be
   minimized.

   Also, outside the client may wish to perform trunking scope of operations this
   draft.

   It is logical to use the same GSS context on a session's callback
   channel
   requests for performance reasons, or multipathing for availability.
   This proposal permits both, as well as many other session and that used on its operations channel(s), particularly when
   the connection possibilities, is shared by permitting each operation both.  The client must indicate to carry
   session membership information and the
   server:

   - what security flavor(s) to share session (and clientid)
   state use in order to draw upon the appropriate resources.  For example,
   reads and writes may call back.  A special
   callback flavor might be assigned to specific, optimized connections,
   or sorted and separated by any or all of size, idempotency, etc.

   To address the problems described above, this proposal allows
   multiple sessions to share a clientid, as well as defined for multiple
   connections to share a session.

   Single Connection model:

                            NFSv4.1 Session
                               /      \
                Operations_Channel   [Back_Channel]
                                \    /
                             Connection
                                  |

        Multi-connection trunked model (2 operations channels shown):

                            NFSv4.1 Session
                               /      \
                Operations_Channels  [Back_Channel]
                    |          |               |
                Connection Connection     [Connection]
                    |          |               |

        Multi-connection split-use model (2 mounts shown):

                                     NFSv4.1 Session
                                   /                 \
                            (/home)        (/usr/local this.

   - readonly)
                            /      \                    |
             Operations_Channel  [Back_Channel]         |
                     |                 |          Operations_Channel
                 Connection       [Connection]          |
                     |                 |            Connection
                                                        |

   In this way, implementation as well as resource management may be
   optimized.  Each session will have its own response caching and
   buffering, and each connection or channel will have its own transport
   resources, as appropriate.  Clients which do not require certain
   behaviors may optimize such resources away completely, by using
   specific sessions and not even creating if the additional channels and
   connections.

10.2.4.  Reconnection, Trunking and Failover

   Reconnection after failure references stored state on flavor is RPCSEC_GSS, then the server
   associated client must have previously
   created an RPCSEC_GSS session with lease recovery during the grace period. server.  The session
   provides a convenient handle for storing and managing information
   regarding the client's previous state on a per- connection basis,
   e.g. to be used upon reconnection.  Reconnection client offers to a previously
   existing session, and its stored resources, are covered in
   the
   "Connection Models" section below.

   One important aspect of reconnection is that server the the opaque handle<> value from the rpc_gss_init_res
   structure, the window size of RPC library support.
   Traditionally, RPCSEC_GSS sequence numbers, and an Upper Layer RPC-based Protocol such
   opaque gss_cb_handle.

   This exchange can be performed as NFS leaves
   all transport knowledge to part of session and clientid
   creation, and the issue warrants careful analysis before being
   specified.

   If the RPC layer implementation below it.
   This allows NFS client wishes to operate maintain full control over a wide variety RPCSEC_GSS
   protection, it may still perform its transfer operations using either
   the inline or RDMA transfer model, or of transports and has
   proven to be a highly successful approach.  The session, however,
   introduces an abstraction which is, in a way, "between" RPC and
   NFSv4.1.  It course employ traditional
   TCP stream operation.  In the RDMA inline case, header padding is important that
   recommended to optimize behavior at the session abstraction not have
   ramifications within server.  At the RPC layer.

   One such issue arises within client, close
   attention should be paid to the reconnection logic implementation of RPC.
   Previously, an explicit RPCSEC_GSS
   processing to minimize memory referencing and especially copying.
   These are well-advised in any case!

   The proposed session callback channel binding operation, which established
   session context for each new connection, was explored.  This however
   required improves security over
   that provided by NFSv4 for the session binding also be performed during reconnect,
   which in turn required an RPC request.  This additional request
   requires new RPC semantics, both in implementation and the fact that
   a new request callback channel.  The connection is inserted into
   client-initiated, and subject to the RPC stream.  Also, same firewall and routing checks
   as the binding of
   a operations channel.  The connection cannot be hijacked by an
   attacker who connects to a session required the upper layer client port prior to become "aware"
   of connections, something the RPC layer abstraction architecturally
   abstracts away.  Therefore the session binding is not handled in intended
   server.  The connection scope but instead explicitly carried in each request.

   For Reliability Availability and Serviceability (RAS) issues is set up by the client with its desired
   attributes, such as
   bandwidth aggregation and multipathing, clients frequently seek to
   make multiple connections through multiple logical optionally securing with IPsec or physical
   channels. similar.  The session
   binding is a convenient point to aggregate and manage
   these resources.

10.2.5.  Server Duplicate Request Cache

   Server duplicate request caches, while not a part of an NFS protocol,
   have become a standard, even required, part fully authenticated before being activated.

9.11.1.  Authentication

   Proper authentication of any NFS
   implementation.  First described in [CJ89], the duplicate request
   cache was initially found to reduce work at the server by avoiding
   duplicate processing for retransmitted requests.  A second, principal which issues any session and
   clientid in the long run more important benefit, was improved correctness, as proposed NFSv4.1 operations exactly follows the
   cache avoided certain destructive non-idempotent requests from being
   reinvoked.

   However, such caches do
   similar requirement on client identifiers in NFSv4.0.  It must not provide correctness guarantees; they
   cannot be managed in
   possible for a reliable, persistent fashion.  The reason is
   understandable - their storage requirement is unbounded due client to the
   lack impersonate another by guessing its session
   identifiers for NFSv4.1 operations, nor to bind a callback channel to
   an existing session.  To protect against this, NFSv4.0 requires
   appropriate authentication and matching of any such bound in the NFS protocol, and they are dependent on
   transport addresses for request matching.

   As proposed principal used.  This
   is discussed in this draft, Section 16, Security Considerations of [RFC3530].
   The same requirement when using a session identifier applies to
   NFSv4.1 here.

   Going beyond NFSv4.0, the presence of maximum request count
   limits and negotiated maximum sizes allows the size and duration of
   the cache to be bounded, and coupled with a long-lived session
   identifier, enables its persistent storage on a per-session basis.

   This provides a single unified mechanism which provides the following
   guarantees required in the NFSv4 specification, while extending them associated with any
   clientid may also be used to all requests, rather than limiting them only enhance NFSv4.1 security with respect to
   client impersonation.  In NFSv4.0, there are many operations which
   carry no clientid, including in particular those which employ a subset of state-
   related requests:

   "It is critical the server maintain the last response sent to the
   stateid argument.  A rogue client which wished to provide carry out a more reliable cache denial
   of duplicate non- idempotent
   requests than service attack on another client could perform CLOSE, DELEGRETURN,
   etc operations with that client's current filehandle, sequenceid and
   stateid, after having obtained them from eavesdropping or other
   approach.  Locking and open downgrade operations could be similarly
   attacked.

   When an NFSv4.1 session is in place for any clientid, countermeasures
   are easily applied through use of authentication by the traditional cache described server.
   Because the sessionid is present in [CJ89]..."
   [RFC3530]

   The maximum each request count limit is within a session,
   the count of active operations,
   which bounds server may verify that the number of entries clientid is in fact originating from a
   principal with the cache.  Constraining the
   size of operations additionally serves to limit appropriate authenticated credentials, that the required storage
   sessionid belongs to the product of the current maximum request count clientid, and that the maximum
   response size. stateid is valid in
   these contexts.  This storage requirement enables server- side
   efficiencies.

   Session negotiation allows the server to maintain other state.  An
   NFSv4.1 client invoking the session destroy operation will cause is in general not possible with the
   server affected
   operations in NFSv4.0 due to denegotiate (close) the session, allowing the server to
   deallocate cache entries.  Clients can potentially specify fact that such
   caches the clientid is not be kept for appropriate types of sessions (for example,
   read-only sessions).  This can enable more efficient server operation
   resulting
   present in improved response times, and more efficient sizing of
   buffers and response caches.

   Similarly, it is important for the client to explicitly learn whether requests.

   In the server event that authentication information is able to implement reliable semantics.  Knowledge of
   whether these semantics are not available in force is critical for a highly
   reliable client, one which must provide transactional integrity
   guarantees.  When clients request that the semantics be enabled
   incoming request, for example after a
   given session, reconnection when the session reply security
   was previously downgraded using CCM, the server must inform require the
   client if re-establish the mode
   is authentication in fact enabled.  In this way order that the client can confidently proceed
   with operations without having to implement consistency facilities of
   its own.

10.3.  Session Initialization and Transfer Models

   Session initialization issues, and data transfer models relevant to
   both TCP and RDMA are discussed in this section.

10.3.1.  Session Negotiation

   The following parameters are exchanged between client and server at
   session creation time.  Their values allow may
   validate the server other client-provided context, prior to properly
   size resources allocated executing any
   operation.  The sessionid, present in order to service the client's requests, newly retransmitted
   request, combined with the retransmission detection enabled by the
   NFSv4.1 duplicate request cache, are a convenient and to provide reliable
   context for the server with a way to communicate limits to the
   client for proper and optimal operation.  They are exchanged prior to
   all session-related activity, over any transport type.  Discussion of
   their use is found in their descriptions as well as throughout for this
   section.

   Maximum Requests contingency.

   The client's desired maximum number server should take care to protect itself against denial of concurrent requests is
      passed,
   service attacks in order to allow the server creation of sessions and clientids.  Clients
   who connect and create sessions, only to size its reply cache
      storage.  The server disconnect and never use
   them may modify the client's requested limit
      downward (or upward) leave significant state behind.  (The same issue applies to match its local policy and/or resources.
      Over RDMA-capable RPC transports, the per-request management of
      low-level transport message credits
   NFSv4.0 with clients who may perform SETCLIENTID, then never perform
   SETCLIENTID_CONFIRM.)  Careful authentication coupled with resource
   checks is handled within the RPC
      layer.  [RPCRDMA]

   Maximum Request/Response Sizes

      The maximum request and response sizes are exchanged in order highly recommended.

10.  Multi-server Name Space

   NFSv4.1 supports attributes that allow a namespace to
      permit allocation extend beyond
   the boundaries of appropriately sized buffers a single server.  Use of such multi-server
   namespaces is optional, and request cache
      entries.  The size must allow for certain protocol minima,
      allowing the receipt many purposes, single-server
   namespace are perfectly acceptable.  Use of maximally sized operations (e.g.  RENAME
      requests which contains two multi-server namespaces
   can provide many advantages, however, by separating a file system's
   logical position in a name strings).  Note the maximum
      request/response sizes cover space from the entire request/response message (possibly changing)
   logistical and not simply the data payload as traditional NFS maximum read or
      write size.  Also note the server implementation may not, administrative considerations that result in fact
      probably does not, require the reply cache entries
   particular file systems being located on particular servers.

10.1.  Location attributes

   NFSv4 contains recommended attributes that allow file systems on one
   server to be sized as
      large as the maximum response.  The associated with one or more instances of that file
   system on other servers.  These attributes specify such file systems
   by specifying a server may reduce name (either a DNS name or an IP address)
   together with the client's
      requested sizes.

   Inline Padding/Alignment path of that filesystem within that server's
   single-server name space.

   The server can inform the client fs_locations_info recommended attribute allows specification of any padding which can be used
   one more file systems locations where the data corresponding to deliver NFSv4 inline WRITE payloads into aligned buffers.  Such
      alignment can a
   given file system may be used found.  This attributes provides to avoid data copy operations at the server
   client, in addition to information about file system locations,
   extensive information about the various file system choices (e.g.
   priority for both TCP and inline RDMA transfers.  For RDMA, use, writability, currency, etc.) as well as information
   to help the client
      informs the server in each operation efficiently effect as seamless a transition as
   possible among multiple file system instances, when padding has been
      applied.  [RPCRDMA]

   Transport Attributes

      A placeholder for transport-specific attributes and if that
   should be necessary.

   The fs_locations recommended attribute is provided, with
      a format inherited from NFSv4.0 and
   only allows specification of the file system locations where the data
   corresponding to a given file system may be determined.  Possible examples found.  Servers should
   make this attribute available whenever fs_locations_info is
   supported, but client use of information fs_locations_info is to be
      passed preferred.

10.2.  File System Presence or Absence

   A given location in this parameter include transport security attributes to an NFSv4 namespace (typically but not necessarily
   a multi-server namespace) can have a number of file system locations
   associated with it (via the fs_locations or fs_locations_info
   attribute).  There may also be used on an actual current file system at that
   location, accessible via normal namespace operations (e.g.  LOOKUP).

   In this case there, the connection, RDMA- specific attributes, legacy
      "private data" as used on existing RDMA fabrics, transport Quality
      of Service attributes, etc.  This information file system is said to be passed to "present" at that
   position in the peer's transport layer by local means namespace and clients will typically use it,
   reserving use of additional locations specified via the location-
   related attributes to situations in which is currently
      outside the scope of this draft, however one attribute principal location is provided
   no longer available.

   When there is no actual filesystem at the namespace location in
   question, the RDMA case:

   RDMA Read Resources

      RDMA implementations must explicitly provision resources file system is said to
      support RDMA Read requests from connected peers.  These values
      must be explicitly specified, to provide adequate resources for
      matching "absent".  An absent file
   system contains no files or directories other than the peer's expected needs root and the connection's delay-
      bandwidth parameters.  The client provides its chosen value any
   reference to it, except to access a small set of attributes useful in
   determining alternate locations, will result in an error,
   NFS4ERR_MOVED.  Note that if the server in ever returns NFS4ERR_MOVED
   (i.e. file systems may be absent), it MUST support the initial session creation, fs_locations
   attribute and SHOULD support the value must be provided
      in each client RDMA endpoint.  The values are asymmetric fs_locations_info and
      should be set to zero at fs_absent
   attributes.

   While the server in order to conserve RDMA
      resources, since clients do not issue RDMA Read operations in error name suggests that we have a case of a file system
   which once was present, and has only become absent later, this
      proposal.  The result is communicated
   only one possibility.  A position in the session response, to
      permit matching of values across the connection.  The value namespace may
      not be changed in permanently
   absent with the duration of file system(s) designated by the session, although a new
      value may be requested as part of a new session.

10.3.2.  RDMA Requirements

   A complete discussion of location attributes
   the operation only realization.  The name NFS4ERR_MOVED reflects an earlier,
   more limited conception of RPC-based protocols atop
   RDMA transports is in [RPCRDMA].  Where RDMA is considered, its function, but this
   proposal assumes error will be
   returned whenever the use of such a layering; referenced file system is absent, whether it addresses only
   has moved or not.

   Except in the
   upper layer issues relevant to making best use case of RPC/RDMA.

   A connection oriented (reliable sequenced) RDMA transport will GETATTR-type operations (to be
   required.  There are several reasons for this.  First, this model
   most closely reflects discussed
   later), when the general NFSv4 requirement current filehandle at the start of long-lived an operation is
   within an absent file system, that operation is not performed and
   congestion-controlled transports.  Second, the
   error NFS4ERR_MOVED returned, to operate correctly over
   either an unreliable or unsequenced RDMA transport, or both, would
   require significant complexity in indicate that the filesystem is
   absent on the implementation and protocol not
   appropriate for current server.

   Because a strict minor version.  For example, retransmission
   on connected endpoints is explicitly disallowed in GETFH cannot succeed, if the current NFSv4
   draft; it would again filehandle is within
   an absent file system, filehandles within an absent filesystem cannot
   be required with these alternate transport
   characteristics.  Third, transferred to the proposal assumes client.  When a specific RDMA
   ordering semantic, which presents client does have filehandles
   within an absent file system, it is the same set result of ordering obtaining them when
   the file system was present, and
   reliability issues to having the RDMA layer over such transports.

   The RDMA implementation provides file system become absent
   subsequently.

   It should be noted that because the check for making connections to other
   RDMA-capable peers.  In the case current filehandle
   being within an absent filesystem happens at the start of every
   operation, operations which change the current proposals before the
   RDDP working group, these RDMA connections are preceded by a
   "streaming" phase, where ordinary TCP (or NFS) traffic might flow.
   However, this filehandle so that it
   is within an absent filesystem will not assumed here and sizes and other parameters are
   explicitly exchanged upon a session entering RDMA mode.

10.3.3.  RDMA Connection Resources

   On transport endpoints which support automatic RDMA mode, that is,
   endpoints which are created result in the RDMA-enabled state, a single,
   preposted buffer must initially be provided by both peers, an error.  This
   allows such combinations as PUTFH-GETATTR and the
   client session negotiation must LOOKUP-GETATTR to be
   used to get attribute information, particularly location attribute
   information, as discussed below.

   The recommended file system attribute fs_absent can used to
   interrogate the first exchange.

   On transport endpoints supporting dynamic negotiation, present/absent status of a more
   sophisticated negotiation given file system.

10.3.  Getting Attributes for an Absent File System

   When a file system is possible, absent, most attributes are not available, but
   it is not discussed in necessary to allow the
   current draft.

   RDMA imposes several requirements on upper layer consumers.
   Registration client access to the small set of memory
   attributes that are available, and most particularly those that give
   information about the need to post buffers of a specific
   size correct current locations for this file system,
   fs_locations and number fs_locations_info.

10.3.1.  GETATTR Within an Absent File System

   As mentioned above, an exception is made for receive operations are a primary consideration.

   Registration of memory can GETATTR in that
   attributes may be obtained for a relatively high-overhead operation,
   since it requires pinning of buffers, assignment filehandle within an absent file
   system.  This exception only applies if the attribute mask contains
   at least one attribute bit that indicates the client is interested in
   a result regarding an absent file system: fs_locations,
   fs_locations_info, or fs_absent.  If none of these attributes (e.g.
   readable/writable), and initialization is
   requested, GETATTR will result in an NFS4ERR_MOVED error.

   When a GETATTR is done on an absent file system, the set of hardware translation.
   Preregistration supported
   attributes is desirable to reduce overhead.  These registrations very limited.  Many attributes, including those that
   are specific to hardware interfaces and even normally mandatory will not be available on an absent file
   system.  In addition to RDMA connection
   endpoints, therefore negotiation the attributes mentioned above (fs_locations,
   fs_locations_info, fs_absent), the following attributes SHOULD be
   available on absent file systems, in the case of their limits recommended
   attributes at least to the same degree that they are available on
   present file systems.

   change:  This attribute is desirable useful for absent file systems and can be
      helpful in summarizing to
   manage resources effectively.

   Following the basic registration, these buffers must client when any of the location-
      related attributes changes.

   fsid:  This attribute should be posted by provided so that the
   RPC layer to handle receives.  These buffers remain client can
      determine file system boundaries, including, in use by the
   RPC/NFSv4 implementation; particular, the size
      boundary between present and number absent file systems.

   mounted_on_fileid:  For objects at the top of them must be known an absent file system
      this attribute needs to be available.  Since the remote peer in order to avoid RDMA errors fileid is one
      which would cause a
   fatal error on the RDMA connection.

   The session provides a natural way for is within the server to manage resource
   allocation to each client rather than present parent file system, there should be no
      need to each transport connection
   itself.  This enables considerable flexibility in reference the administration
   of transport endpoints.

10.3.4.  TCP and RDMA Inline Transfer Model

   The basic transfer model absent file system to provide this
      information.

   Other attributes SHOULD NOT be made available for both TCP and RDMA absent file
   systems, even when it is referred possible to as
   "inline".  For TCP, this provide them.  The server should
   not assume that more information is always better and should avoid
   gratuitously providing additional information.

   When a GETATTR operation includes a bit mask for one of the only transfer model
   attributes fs_locations, fs_locations_info, or absent, but where the
   bit mask includes attributes which are not supported, since
   TCP carries both GETATTR will
   not return an error, but will return the RPC header and data together in mask of the data stream.

   For RDMA, actual
   attributes supported with the RDMA Send transfer model is used for all NFS requests
   and replies, but data is optionally carried by RDMA Writes or RDMA
   Reads.  Use results.

   Handling of Sends VERIFY/NVERIFY is required similar to ensure consistency GETATTR in that if the
   attribute mask does not include fs_locations, fs_locations_info, or
   absent, the error NFS4ERR_MOVED will result.  It differs in that any
   appearance in the attribute mask of data an attribute not supported for an
   absent file system (and note that this will include some normally
   mandatory attributes), will also cause an NFS4ERR_MOVED result.

10.3.2.  READDIR and to
   deliver completion notifications.  The pure-Send method Absent File Systems

   A READDIR performed when the current filehandle is typically
   used where within an absent
   file system will result in an NFS4ERR_MOVED error, since, unlike the data payload
   case of GETATTR, no such exception is small, or where made for whatever reason
   target memory READDIR.

   Attributes for RDMA is not available.

        Inline message exchange

               Client                                Server
                  :                Request              :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Response              :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

               Client                                Server
                  :            Read request             :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :       Read response with data       :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

               Client                                Server
                  :       Write request with data       :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :            Write response           :
         untagged :   <------------------------------   : Send
          buffer  :                                     :

   Responses must an absent file system may be sent to fetched via a READDIR for
   a directory in a present file system, when that directory contains
   the root directories of one or more absent filesystems.  In this
   case, the handling is as follows:

   o  If the attribute set requested includes one of the client on attributes
      fs_locations, fs_locations_info, or absent, then fetching of
      attributes proceeds normally and no NFS4ERR_MOVED indication is
      returned, even when the same connection that rdattr_error attribute is requested.

   o  If the
   request was sent.  It attribute set requested does not include one of the
      attributes fs_locations, fs_locations_info, or fs_absent, then if
      the rdattr_error attribute is important that requested, each directory entry for
      the server root of an absent file system, will report NFS4ERR_MOVED as
      the value of the rdattr_error attribute.

   o  If the attribute set requested does not assume include any specific client implementation, in particular whether connections of the
      attributes fs_locations, fs_locations_info, fs_absent, or
      rdattr_error then the occurrence of the root of an absent file
      system within the directory will result in the READDIR failing
      with an NFSER_MOVED error.

   o  The unavailability of an attribute because of a session share file system's
      absence, even one that is ordinarily mandatory, does not result in
      any state at error indication.  The set of attributes returned for the client.  This root
      directory of the absent filesystem in that case is also
   important simply
      restricted to preserve ordering those actually available.

10.4.  Uses of RDMA operations, Location Information

   The location-bearing attributes (fs_locations and especially
   RMDA consistency.  Additionally, it ensures that fs_locations_info),
   provide, together with the RPC RDMA layer
   makes no requirement possibility of the RDMA provider to open its memory
   registration handles (Steering Tags) beyond the scope absent filesystems, a
   number of important facilities in providing reliable, manageable, and
   scalable data access.

   When a single
   RDMA connection.  This file system is an important security consideration.

   Two values must present, these attribute can provide
   alternative locations, to be known used to each peer prior access the same data, in the
   event that server failures, communications problems, or other
   difficulties, make continued access to issuing Sends: the
   maximum number current file system
   impossible or otherwise impractical.  Provision of sends such alternate
   locations is referred to as "replication" although there are cases in
   which may be posted, replicated sets of data are not in fact present, and their maximum size.
   These values the
   replicas are referred to, respectively, as instead different paths to the message credits same data.

   When a file system is present and becomes absent, clients can be
   given the maximum message size.  While opportunity to have continued access to their data, at an
   alternate location.  In this case, a continued attempt to use the message credits might vary
   dynamically over
   data in the duration now-absent file system will result in an NFSERR_MOVED
   error and at that point the successor locations (typically only one
   but multiple choices are possible) can be fetched and used to
   continue access.  Transfer of the session, file system contents to the maximum message
   size does not.  The server must commit new
   location is referred to preserving as "migration", but it should be kept in mind
   that there are cases in which this number term can be used, like
   "replication" when there is no actual data migration per se.

   Where a file system was not previously present, specification of
   duplicate request cache entires, file
   system location provides a means by which file systems located on one
   server can be associated with a name space defined by another server,
   thus allowing a general multi-server namespace facility.  Designation
   of such a location, in place of an absent filesystem, is called
   "referral".

10.4.1.  File System Replication

   The fs_locations and preparing fs_locations_info attributes provide alternative
   locations, to be used to access data in place of the current file
   system.  On first access to a number filesystem, the client should obtain
   the value of receive
   buffers equal to the set alternate locations by interrogating the
   fs_locations or greater than its currently advertised credit
   value, each of fs_locations_info attribute, with the advertised size.  These ensure latter being
   preferred.

   In the event that transport
   resources are allocated sufficient server failures, communications problems, or other
   difficulties, make continued access to receive the full advertised
   limits.

   Note that current file system
   impossible or otherwise impractical, the server must post client can use the maximum number of session requests alternate
   locations as a way to each client operations channel.  The client is not required get continued access to
   spread its requests in any particular fashion across connections
   within a session.  If the client wishes, it his data.

   The alternate locations may create multiple
   sessions, each with a single or small number be physical replicas of operations channels the (typically
   read-only) file system data, or they may reflect alternate paths to provide
   the same server with this resource advantage.  Or, over RDMA or provide for the use of various form of server may employ
   clustering in which multiple servers provide alternate ways of
   accessing the same physical file system.  How these different modes
   of file system transition are represented within the fs_locations and
   fs_locations_info attributes and how the client deals with file
   system transition issues will be discussed in detail below.

10.4.2.  File System Migration

   When a "shared receive queue".  The server file system is present and becomes absent, clients can in
   any case protect its resources by restricting be
   given the client's request
   credits.

   While tempting opportunity to consider, it is not possible have continued access to use the TCP window their data, at an
   alternate location, as specified by the fs_locations or
   fs_locations_info attribute.  Typically, a client will be accessing
   the file system in question, get a an RDMA operation flow control mechanism.  First, to do so would
   violate layering, requiring both senders NFS4ERR_MOVED error, and then
   use the fs_locations or fs_locations_info attribute to determine the
   new location of the data.  When fs_locations_info is used, additional
   information will be aware available which will define the nature of the existing
   TCP outbound window at all times.  Second, since requests are
   client's handling of
   variable size, the TCP window transition to a new server.

   Such migration can hold be helpful in providing load balancing or general
   resource reallocation.  The protocol does not specify how the
   filesystem will be moved between servers.  It is anticipated that a widely variable
   number of
   them, and since it cannot different server-to-server transfer mechanisms might be reduced without actually receiving data,
   the receiver cannot limit
   used with the sender.  Third, any middlebox
   interposing on choice left to the connection would wreck any possible scheme.
   [MIDTAX] In this proposal, maximum request count limits are exchanged
   at server implementor.  The NFSv4.1
   protocol specifies the session level method used to allow correct provisioning of receive buffers
   by transports.

   When operating over TCP or other similar transport, request limits communicate the migration event
   between client and sizes are still employed server.

   The new location may be an alternate communication path to the same
   server, or, in NFSv4.1, but instead of being
   required for correctness, they provide the basis for efficient server
   implementation case of various forms of server clustering,
   another server providing access to the duplicate request cache. same physical file system.
   The limits are chosen
   based upon the expected needs and capabilities client's responsibilities in dealing with this transition depend
   on the specific nature of the client new access path and
   server, how and are whether
   data was in fact arbitrary.  Sizes may be specified by the
   client as zero (requesting the server's preferred or optimal value),
   and request limits may migrated.  These issues will be chosen discussed in proportion to the client's
   capabilities.  For example, detail
   below.

   Although a limit of 1000 single successor location is typical, multiple locations
   may be provided, together with information that allows 1000 requests priority among
   the choices to be indicated, via information in progress, which may generally be far more than adequate the fs_locations_info
   attribute.  Where suitable clustering mechanisms make it possible to keep
   local networks and servers fully utilized.

   Both client and server have independent sizes and buffering, but over
   RDMA fabrics client credits are easily managed by posting a receive
   buffer prior
   provide multiple identical file systems or paths to sending each request.  Each such buffer may not be
   completed with the corresponding reply, since responses from NFSv4
   servers arrive in arbitrary order.  When an operations channel is
   also used for callbacks, them, this allows
   the client must account for callback
   requests by posting additional buffers.  Note the opportunity to deal with any resource or
   communications issues that implementation-
   specific facilities such as might limit data availability.

10.4.3.  Referrals

   Referrals provide a shared receive queue may also allow
   optimization way of these allocations.

   When placing a session is created, the client requests file system in a preferred buffer
   size, and the server provides location
   essentially without respect to its answer.  The physical location on a given
   server.  This allows a single server posts all
   buffers of at least this size.  The client must comply by not sending
   requests greater than this size.  It is recommended that server
   implementations do all they can a set of servers to accommodate present a useful range
   multi-server namespace that encompasses filesystems located on
   multiple servers.  Some likely uses of
   possible this include establishment of
   site-wide or organization-wide namespaces, or even knitting such
   together into a truly global namespace.

   Referrals occur when a client requests.  There is determines, upon first referencing a provision
   position in [RPCRDMA] to allow the sending current namespace, that it is part of client requests which exceed a new file
   system and that that file system is absent.  When this occurs,
   typically by receiving the server's receive
   buffer size, error NFS4ERR_MOVED, the actual location
   or locations of the file system can be determined by fetching the
   fs_locations or fs_locations_info attribute.

   Use of multi-server namespaces is enabled by NFSv4 but it requires is not
   required.  The use of multi-server namespaces and their scope will
   depend on the application used, and system administration
   preferences.

   Multi-server namespaces can be established by a single server
   providing a large set of referrals to "pull" all of the client's
   request as included
   filesystems.  Alternatively, a "read chunk" via RDMA Read.  This introduces at least
   one additional network roundtrip, plus other overhead such as
   registering memory single multi-server namespace may be
   administratively segmented with separate referral file systems (on
   separate servers) for RDMA Read at each separately-administered section of the client and additional RDMA
   operations at
   name space.  Any segment or the server, top-level referral file system may
   use replicated referral file systems for higher availability.

10.5.  Additional Client-side Considerations

   When clients make use of servers that implement referrals and is to
   migration, care should be avoided.

   An issue therefore arises when considering taken so that a user who mounts a given
   filesystem that includes a referral or a relocated filesystem
   continue to see a coherent picture of that user-side filesystem
   despite the NFSv4 COMPOUND
   procedures.  Since an arbitrary fact that it contains a number (total size) of operations can
   be specified in a single COMPOUND procedure, its size is effectively
   unbounded.  This cannot server-side filesystems
   which may be supported by RDMA Sends, and therefore
   this size negotiation places a restriction on different servers.

   One important issue is upward navigation from the construction and
   maximum size root of both COMPOUND requests and responses.  If a COMPOUND
   results server-
   side filesystem to its parent (specified as ".." in a reply UNIX).  The
   client needs to determine when it hits an fsid root going up the
   filetree.  When at such a point, and needs to ascend to the server that is larger than can be sent in
   an RDMA Send parent,
   it must do so locally instead of sending a LOOKUPP call to the client, then
   server.  The LOOKUPP would normally return the COMPOUND must terminate and ancestor of the
   operation target
   filesystem on the target server, which causes may not be part of the overflow will provide a TOOSMALL error
   status result.

10.3.5.  RDMA Direct Transfer Model

   Placement space
   that the client mounted.

   Another issue concerns refresh of data by explicitly tagged RDMA operations referral locations.  When referrals
   are used extensively, they may change as server configurations
   change.  It is referred expected that clients will cache information related
   to
   as "direct" transfer. traversing referrals so that future client side requests are
   resolved locally without server communication.  This method is typically used where the usually
   rooted in client-side name lookup caching.  Clients should
   periodically purge this data
   payload is relatively large, that is, when RDMA setup has been
   performed prior for referral points in order to detect
   changes in location information.  When the operation, change attribute changes
   for directories that hold referral entries or when any overhead for setting up
   and performing the transfer is regained by avoiding the overhead referral
   entries themselves, clients should consider any associated cached
   referral information to be out of
   processing an ordinary receive.

   The client advertises RDMA buffers date.

10.6.  Effecting File System Transitions

   Transitions between file system instances, whether due to switching
   between replicas upon server unavailability, or in this proposed model, response to a
   server-initiated migration event are best dealt with together.  Even
   though the prototypical use cases of replication and not migration
   contain distinctive sets of features, when all possibilities for
   these operations are considered, the server.  This means underlying unity of these
   operations, from the "XDR Decoding with Read Chunks" described
   in [RPCRDMA] client's point of view is not employed by NFSv4.1 replies, clear, even though for
   the server pragmatic considerations will normally force different
   implementation strategies for planned and instead all
   results transferred via RDMA unplanned transitions.

   A number of methods are possible for servers to the replicate data and to
   track client employ "XDR Decoding state in order to allow clients to transition between
   file system instances with
   Write Chunks".  There a minimum of disruption.  Such methods
   vary between those that use inter-server clustering techniques to
   limit the changes seen by the client, to those that are several reasons for this.

   First, it allows for less
   aggressive, use more standard methods of replicating data, and impose
   a correct greater burden on the client to adapt to the transition.

   The NFSv4.1 protocol does not impose choices on clients and secure mode servers
   with regard to that spectrum of transfer. transition methods.  In fact, there
   are many valid choices, depending on client and application
   requirements and their interaction with server implementation
   choices.  The NFSv4.1 protocol does define the specific choices that
   can be made, how these choices are communicated to the client may advertise specific memory buffers only during specific
   times, and how
   the client is to deal with any discontinuities.

   In the sections below references will be made to various possible
   server implementation choices as a way of illustrating the transition
   scenarios that clients may revoke access when it pleases. deal with.  The server intent here is not
   required to expose copies
   define or limit server implementations but rather to illustrate the
   range of local issues that clients may face.

   In the discussion below, references will be made to a file buffers for individual
   clients, system
   having a particular property or of two file systems (typically the
   source and destination) belonging to a common class of any of several
   types.  Two file systems that belong to such a class share some
   important aspect of file system behavior that clients may depend upon
   when present, to lock or copy them for each client access.

   Second, client credits based on fixed-size request buffers are easily
   managed on the server, but for effect a seamless transition between file
   system instances.  Conversely, where the server additional management of
   buffers for client RDMA Reads is file systems do not well-bounded.  For example, belong
   to such a common class, the client has to deal with various sorts of
   implementation discontinuities which may not perform these RDMA Read operations cause performance or other
   issues in effecting a timely
   fashion, therefore transition.

   Where the server would have fs_locations_info attribute is available, such file system
   classification data will be made directly available to protect itself against
   denial-of-service on these resources.

   Third, it reduces network traffic, since buffer exposure outside the
   scope and duration of a single request/response exchange necessitates
   additional memory management exchanges.

   There are costs associated with this decision.  Primary among them client.
   See Section 10.10 for details.  When only fs_locations is
   the need available,
   default assumptions with regard to such classifications have to be
   inferred.  See Section 10.9 for the details.

   In cases in which one server is expected to employ RDMA Read for operations such as
   large WRITE.  The RDMA Read operation accept opaque values from
   the client that originated from another server, it is a two-way exchange at wise
   implementation practice for the
   RDMA layer, which incurs additional overhead relative servers to RDMA Write.
   Additionally, RDMA Read requires resources at encode the data source (the
   client "opaque" values
   in network byte order.  If this proposal) is done, servers acting as replicas
   or immigrating filesystems will be able to maintain state parse values like
   stateids, directory cookies, filehandles, etc. even if their native
   byte order is different from that of other servers cooperating in the
   replication and migration of the filesystem.

10.6.1.  Transparent File System Transitions

   Discussion of transition possibilities will start at the most
   transparent end of the spectrum of possibilities.  When there are
   multiple paths to generate replies.
   These costs a single server, and there are overcome through use network problems
   that force another path to be used, or when a path is to be put out
   of pipelining with credits, with
   sufficient RDMA Read resources negotiated at service, a replication or migration event may occur without any
   real replication or migration.  Nevertheless, such events fit within
   the same general framework in that there is a transition between file
   system locations, communicated just as other, less transparent
   transitions are communicated.

   There are cases of transparent transitions that may happen
   independent of location information, in that a specific host name,
   may map to several IP addresses, allowing session initiation, and
   appropriate use of RDMA for writes by the client - trunking to provide
   alternate paths.  In other cases, however multiple addresses may have
   separate location entries for example only specific file systems to preferentially
   direct traffic for transfers above a those specific file systems to certain size.

   A description server
   addresses, subject to planned or unplanned, corresponding to a
   nominal replication or migrations event.

   The specific details of which NFSv4 operation results are eligible for data
   transfer via RDMA Write is in [NFSDDP].  There are only two such
   operations: READ and READLINK.  When XDR encoding these requests the transition depend on
   an RDMA transport, file system
   equivalence class information (as provided by the NFSv4.1 client must insert fs_locations_info
   and fs_locations attributes).

   o  Where the appropriate
   xdr_write_list entries old and new filesystems belong to indicate the same _endpoint_
      class, the transition consists of creating a new connection which
      is associated with the existing session to the old server whether the results
   should
      endpoint.  Where a connection cannot be transferred via RDMA or inline associated with the
      existing session, the target server must be able to recognize the
      sessionid as invalid and force creation on a Send.  As described
   in [NFSDDP], new session or a zero-length write chunk is used to indicate an inline
   result.  In this way, it is unnecessary to create new operations for
   RDMA-mode versions of READ
      client id.

   o  Where the old and READLINK.

   Another tool new filesystems do not belong to avoid creation of new, RDMA-mode operations is the
   Reply Chunk [RPCRDMA], which is used by RPC in RDMA mode same
      _endpoint_ classes, but to return
   large replies via RDMA as if they were inline.  Reply chunks are used
   for operations such as READDIR, which returns large amounts the same _server_ class, the transition
      consists of
   information, but in many small XDR segments.  Reply chunks are
   offered by creating a new session, associated with the client and existing
      clientid.  Where the server can use them in preference to
   inline.  Reply chunks are transparent to upper layers such as NFSv4.

   In any very rare cases where another NFSv4.1 operation requires
   larger buffers than were negotiated when clientid is stale, the session was created (for
   example extraordinarily large RENAMEs), stale, the underlying RPC layer may
   support target
      server must be able to recognize the use of "Message clientid as an RDMA Read Chunk" no longer valid
      and "RDMA Write force creation of a new clientid.

   In either of
   Long Replies" as described in [RPCRDMA].  No additional support is
   required in the NFSv4.1 client for this.  The client should above cases, the file system may be
   certain that its requested buffer sizes are not so small shown as
   belonging to make
   this a frequent occurrence, however.

   All operations are initiated by a Send, and are completed with a
   Send.  This is exactly as in conventional NFSv4, but under RDMA has a
   significant purpose: RDMA operations are not complete, that is,
   guaranteed consistent, at the data sink until followed by a
   successful Send completion (i.e. a receive).  These events provide a
   natural opportunity for same _sharing_ class, class allowing the initiator (client) alternate
   session or connection to enable be established in advance and later
   disable RDMA access used either to
   accelerate the file system transition when necessary (avoiding
   connection latency), or to provide higher performance by actively
   using multiple paths simultaneously.

   When two file systems belong to the memory which same _endpoint_ class, or
   _sharing_ class, many transition issues are eliminated, and any
   information indicating otherwise is ignored as erroneous.

   In all such transparent transition cases, the target of each
   operation, in order to provide for consistent following apply:

   o  File handles stay the same if persistent and secure operation.
   The RDMAP Send with Invalidate operation may if volatile are only
      subject to expiration, if they would be worth employing in
   this respect, as it relieves the client absence of certain overhead in this
   case.

   A "onetime" boolean advisory to each RDMA region might become a hint
   to the server that file
      system transition.

   o  Fileid values do not change across the client transition.

   o  The file system will use have the three-tuple for only one
   NFSv4 operation.  For a transport such as iWARP, same fsid in both the server can
   assist old and new
      the client in invalidating old and new locations.

   o  Change attribute values are consistent across the three-tuple by performing transition and
      do not have to be refetched.  When change attributes indicate that
      a
   Send with Solicited Event cached object is still valid, it can remain cached.

   o  Session, client, and Invalidate.  The server may ignore this
   hint, in which case state identifier retain their validity across
      the client must perform a local invalidate after
   receiving transition, except where their staleness is recognized and
      reported by the indication from new server.  Except where such staleness requires
      it, no lock reclamation is needed.

   o  Write verifiers are presumed to retain their validity and can be
      presented to COMMIT, with the expectation that if COMMIT on the
      new server accept them as valid, then that server has all of the NFSv4 operation is
   complete.  This may be considered in
      data unstably written to the original server and has committed it
      to stable storage as requested.

10.6.2.  Filehandles and File System Transitions

   There are a future version number of this draft
   and [NFSDDP].

   In ways in which filehandles can be handled across
   a trusted environment, it may file system transition.  These can be desirable for divided into two broad
   classes depending upon whether the client to
   persistently enable RDMA access by two file systems across which the server.  Such a model
   transition happens share sufficient state to effect some sort of
   continuity of filesystem handling.

   When there is
   desirable for no such co-operation in filehandle assignment, the highest level two
   file systems are reported as being in different _handle_ classes.  In
   this case, all filehandles are assumed to expire as part of efficiency and lowest overhead.

        RDMA message exchanges

               Client                                Server
                  :         Direct Read Request         :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Segment               :
          tagged  :   <------------------------------   :  RDMA Write
          buffer  :                  :                  :
                  :              [Segment]              :
          tagged  :   <------------------------------   : [RDMA Write]
          buffer  :                                     :
                  :         Direct Read Response        :
         untagged :   <------------------------------   :  Send (w/Inv.)
          buffer  :                                     :

               Client                                Server
                  :        Direct Write Request         :
             Send :   ------------------------------>   : untagged
                  :                                     :  buffer
                  :               Segment               :
          tagged  :   v------------------------------   :  RDMA Read
          buffer  :   +----------------------------->   :
                  :                  :                  :
                  :              [Segment]              :
          tagged  :   v------------------------------   : [RDMA Read]
          buffer  :   +----------------------------->   :
                  :                                     :
                  :        Direct Write Response        :
         untagged :   <------------------------------   :  Send (w/Inv.)
          buffer  :                                     :

10.4.  Connection Models

   There the file
   system transition.  Note that this behavior does not depend on
   fh_expire_type attribute and supersedes the specification of
   FH4_VOL_MIGRATION bit, which only affects behavior when
   fs_locations_info is not available.

   When there is co-operation in filehandle assignment, the two file
   systems are three scenarios reported as being in which to discuss the connection model.
   Each will be discussed individually, same _handle_ classes.  In this
   case, persistent filehandle remain valid after describing the common case
   encountered at initial connection establishment.

   After a successful connection, file system
   transition, while volatile filehandles (excluding those while are
   only volatile due to the first request proceeds, FH4_VOL_MIGRATION bit) are subject to
   expiration on the target server.

10.6.3.  Fileid's and File System Transitions

   In NFSv4.0, the issue of continuity of fileid's in the
   case event of a new client association, to initial session creation, and
   then optionally to session callback channel binding, prior to regular
   operation.

   Commonly, each new client "mount"
   file system transition was not addressed.  The general expectation
   had been that in situations in which the two filesystem instances are
   created by a single vendor using some sort of filesystem image copy,
   fileid's will be consistent across the action which drives
   creation transition while in the
   analogous multi-vendor transitions they will not.  This poses
   difficulties, especially for the client without special knowledge of a new session.  However there are any number
   the of other
   approaches.  Clients may choose the transition mechanisms adopted by the server.

   It is important to share note that while clients themselves may have no
   trouble with a single connection fileid changing as a result of a file system
   transition event, applications do typically have access to the fileid
   (e.g. via stat), and
   session among all their mount points.  Or, clients the result of this is that an application may support
   trunking, where additional connections are
   work perfectly well if there is no filesystem instance transition or
   if any such transition is among instances created but all within by a single session.  Alternatively, vendor,
   yet be unable to deal with the client may choose situation in which a multi-vendor
   transition occurs, at the wrong time.

   Providing the same fileid's in a multi-vendor (multiple server
   vendors) environment has generally been held to create
   multiple sessions, each tuned be quite difficult.
   While there is work to the buffering and reliability be done, it needs
   of the mount point.  For example, to be pointed out that this
   difficulty is partly self-imposed.  Servers have typically identified
   fileid with inode number, i.e. with a readonly mount can sharply reduce
   its write buffering and also makes no requirement quantity used to find the file
   in question.  This identification poses special difficulties for
   migration of an fs between vendors where assigning the server same index to
   support reliable duplicate request caching.

   Similarly,
   a given file may not be possible.  Note here that a fileid does not
   require that it be useful to find the client can choose among several strategies for
   clientid usage.  Sessions can share file in question, only that it
   is unique within the given fs.  Servers prepared to accept a single clientid, or create new
   clientids fileid
   as the client deems appropriate.  For kernel-based clients
   which service multiple authenticated users, a single clientid shared
   across all mount points is generally the most appropriate piece of metadata and
   flexible approach.  For example, all store it apart from the client's file operations may
   wish value used
   to share locking state index the file information can relatively easily maintain a fileid
   value across a migration event, allowing a truly transparent
   migration event.

   In any case, where servers can provide continuity of fileids, they
   should and the local client kernel takes the
   responsibility for arbitrating access locally.  For clients choosing should be able to support other authentication models, perhaps example userspace
   implementations, a new clientid find out that such continuity
   is indicated.  Through use of session
   create options, both models are supported at the client's choice.

   Since available, and take appropriate action.  Information about the session
   continuity (or lack thereof) of fileid's across a file system is explicitly created and destroyed
   represented by specifying whether the client,
   and each client is uniquely identified, file systems in question are of
   the server may be
   specifically instructed to discard unneeded presistent state.  For
   this reason, same _fileid_ class.

10.6.4.  Fsid's and File System Transitions

   Since fsid's are only unique within a per-server basis, it is possible to be
   expected that a server they will retain any previous
   state indefinitely, and place its destruction under administrative
   control.  Or, change during a server may choose to retain state for some
   configurable period, provided that file system transition.
   Clients should not make the period meets other NFSv4
   requirements such as lease reclamation time, etc.  However, since
   discarding this state at fsid's received from the server visible
   to application since they may affect the correctness of the
   server as seen by the client across network partitioning, such
   discarding of state should not be done only in globally unique, and because
   they may change during a conservative manner.

   Each client request file system transition event.  Applications
   are best served if they are isolated from such transitions to the server carries a new SEQUENCE operation
   within each COMPOUND, which provides the session context.  This
   session context then governs the request control, duplicate request
   caching,
   extent possible.

10.6.5.  The Change Attribute and other persistent parameters managed by File System Transitions

   Since the change attribute is defined as a server-specific one,
   change attributes fetched from one server for are normally presumed to be
   invalid on another server.  Such a
   session.

10.4.1.  TCP Connection Model

   The following presumption is a schematic diagram troublesome since
   it would invalidate all cached change attributes, requiring
   refetching.  Even more disruptive, the absence of any assured
   continuity for the NFSv4.1 protocol
   exchanges leading up to normal operation change attribute means that even if the same value
   is gotten on refetch no conclusions can drawn as to whether the
   object in question has changed.  The identical change attribute could
   be merely an artifact, of a TCP stream.

               Client                                Server
          TCPmode :   Create Clientid(nfs_client_id4)   : TCPmode
                  :   ------------------------------>   :
                  :                                     :
                  :     Clientid reply(clientid, ...)   :
                  :   <------------------------------   :
                  :                                     :
                  :   Create Session(clientid, size S,  :
                  :      maxreq N, STREAM, ...)         :
                  :   ------------------------------>   :
                  :                                     :
                  :   Session reply(sessionid, size S', :
                  :      maxreq N')                     :
                  :   <------------------------------   :
                  :                                     :
                  :          <normal operation>         :
                  :   ------------------------------>   :
                  :   <------------------------------   :
                  :                  :                  :

   No net additional exchange is added modified file with a different change
   attribute construction algorithm, with that new algorithm just
   happening to result in an identical change value.

   When the initial negotiation by two file systems have consistent change attribute formats,
   and this proposal.  In fact is communicated to the NFSv4.1 exchange, client by reporting as in the CREATECLIENTID replaces
   SETCLIENTID (eliding
   same _change_ class, the callback "clientaddr4" addressing) client may assume a continuity of change
   attribute construction and
   CREATESESSION subsumes handle this situation just as it would be
   handled without any filesystem transition.

10.6.6.  Lock State and File System Transitions

   In a file system transition, the function of SETCLIENTID_CONFIRM, as
   described elsewhere two file systems may have co-
   operated in state management.  When this document.  Callback channel binding is
   optional, as in NFSv4.0.  Note that the STREAM transport type is
   shown above, but since the transport mode remains unchanged case, and
   transport attributes are not necessarily exchanged, DEFAULT could
   also be passed.

10.4.2.  Negotiated RDMA Connection Model

   One possible design which has been considered is the two
   file systems belong to the same _state_ class, the two file systems
   will have a
   "negotiated" RDMA connection model, supported via use compatible state environments.  In the case of migration,
   the servers involved in the migration of a session
   bind operation as a required first step.  However due filesystem SHOULD transfer
   all server state from the original to issues
   mentioned earlier, the new server.  When this proved problematic.  This section remains as
   done, it must be done in a reminder of way that fact, and it is possible transparent to the client.
   With replication, such a mode can be
   supported.

   It degree of common state is typically not considered critical that this be supported for two reasons.
   One, the session persistence provides a way for
   case.  Clients, however should use the server information provided by the
   fs_locations_info attribute to
   remember important session parameters, determine whether such as sizes sharing is in
   effect when this is available, and maximum
   request counts.  These values can be used to restore the endpoint
   prior to making the first reply.  Two, there are currently no
   critical RDMA parameters only if that attribute is not
   available depend on these defaults.

   This state transfer will reduce disruption to set in the endpoint at the server side of client when a file
   system transition If the connection.  RDMA Read resources, which servers are successful in general not
   settable after entering RDMA mode, are set only at transferring all
   state, the client - the
   originator of will continue to use stateids assigned by the connection.
   original server.  Therefore as long as the RDMA provider
   supports an automatic RDMA connection mode, no further support is
   required from the NFSv4.1 protocol for reconnection.

   Note, the client new server must provide at least recognize these
   stateids as many RDMA Read resources to
   its local queue valid.  This holds true for the benefit of the server when reconnecting, clientid as
   it used when negotiating the session.  If this value well.  Since
   responsibility for an entire filesystem is no longer
   appropriate, the client should resynchronize its session state,
   destroy the existing session, and start over with the more
   appropriate values.

10.4.3.  Automatic RDMA Connection Model

   The following transferred is a schematic diagram of the NFSv4.1 protocol
   exchanges performed on with such
   an RDMA connection.

             Client                                Server
       RDMAmode :                  :                  : RDMAmode
                :                  :                  :
       Prepost  :                  :                  : Prepost
       receive  :                  :                  : receive
                :                                     :
                :   Create Clientid(nfs_client_id4)   :
                :   ------------------------------>   :
                :                                     : Prepost
                :     Clientid reply(clientid, ...)   : receive
                :   <------------------------------   :
       Prepost  :                                     :
       receive  :   Create Session(clientid, size S,  :
                :      maxreq N, RDMA ...)            :
                :   ------------------------------>   :
                :                                     : Prepost <=N'
                :   Session reply(sessionid, size S', :     receives of
                :      maxreq N')                     :     size S'
                :   <------------------------------   :
                :                                     :
                :          <normal operation>         :
                :   ------------------------------>   :
                :   <------------------------------   :
                :                  :                  :

10.5.  Buffer Management, Transfer, Flow Control

   Inline operations in NFSv4.1 behave effectively event, there is no possibility that conflicts will arise on the same
   new server as TCP
   sends.  Procedure results are passed in a single message, and its
   completion at the client signal the receiving process to inspect result of the
   message.

   RDMA operations are performed solely by transfer of locks.

   As part of the server in this proposal, transfer of information between servers, leases would
   be transferred as described in well.  The leases being transferred to the previous "RDMA Direct Model" section.  Since new
   server RDMA operations do not result in will typically have a completion at different expiration time from those for
   the same client,
   and due to ordering rules in RDMA transports, after previously on the old server.  To maintain the
   property that all required RDMA
   operations are complete, leases on a Send (Send with Solicited Event given server for iWARP)
   containing a given client expire
   at the same time, the procedure results is performed from server should advance the expiration time to client.
   the later of the leases being transferred or the leases already
   present.  This Send operation will result in a completion which will signal allows the client to inspect maintain lease renewal of both
   classes without special effort.

   When the message.

   In two servers belong to the case of client read-type NFSv4 operations, same _state_ class, it does not
   necessarily mean that when dealing with the server transition, the client
   will not have issued RDMA Writes to transfer reclaim state.  However it does mean that the resulting data into client-
   advertised buffers.  The subsequent Send operation performs two
   necessary functions: finalizing any active client
   may proceed using his current clientid and stateid's just as if there
   had been no file system transition event and only reclaim state when
   an NFS4ERR_STALE_CLIENTID or pending DMA at NFS4ERR_STALE_STATEID error is received.

   File systems co-operating in state management may actually share
   state or simply divide the
   client, id space so as to recognize (and reject as
   stale) each others state and signaling clients id's.  Servers which do share
   state may not do under all conditions or all times.  The requirement
   for the server is that if it cannot be sure in accepting an id that
   it reflects the locks the client was given, it must treat all
   associated state as stale and report it as such to inspect the message.

   In client.

   When two file systems belong to different _state_ classes, the case of client write-type NFSv4 operations,
   must establish a new state on the destination, and reclaim if
   possible.  In this case, old stateids and clientid's should not be
   presented to the new server since there is no assurance that they
   will
   have issued RDMA Reads not conflict with id's valid on that server.

   In either case, when actual locks are not known to fetch the data from be maintained, the client-advertised
   buffers.  No data consistency issues arise at
   destination server may establish a grace period specific to the client, but given
   file system, with non-reclaim locks being rejected for that file
   system, even though normal locks are being granted for other file
   systems.  Clients should not infer the
   completion absence of the transfer must be acknowledged, again by a Send from grace period for
   file systems being transitioned to a server from responses to client.

   In either case, the client advertises buffers
   requests for direct (RDMA style)
   operations.  The client may desire certain advertisement limits, and
   may wish other file systems.

   In the server case of lock reclamation for a given file system after a file
   system transition, edge conditions can arise similar to perform remote invalidation on its behalf when
   the those for
   reclaim after server has completed its RDMA.  This may be considered reboot (although in a
   future version of this draft.

   In the absence case of remote invalidation, the client may perform its
   own, local invalidation after the operation completes.  This
   invalidation should occur prior to any RPCSEC GSS integrity checking,
   since a validly remotely accessible buffer planned
   state transfer associated with migration, these can possibly be modified avoided by
   securely recording lock state as part of state migration.  Where the peer.  However, after invalidation and the contents integrity
   checked, the contents are locally secure.

   Credit updates over RDMA transports are supported at
   destination server cannot guarantee that locks will not be
   incorrectly granted, the RPC layer as
   described in [RPCRDMA]. destination server should not establish a
   file-system-specific grace period.

   In each request, the client requests place of a
   desired number file-system-specific version of credits RECLAIM_COMPLETE,
   servers may assume that an attempt to obtain a new lock, other than
   be made available to reclaim, indicate the connection on
   which it sends end of the request. client's attempt to reclaim locks
   for that file system.  [NOTE: The alternative would be to adapt
   RECLAIM_COMPLETE to this task].

   Information about client must not send more requests
   than the number which the server has previously advertised, or identity that may be propagated between
   servers in the
   case form of nfs_client_id4 and associated verifiers, under
   the first request, only one.  If assumption that the client exceeds its
   credit limit, presents the connection may close with a fatal RDMA error.

   The server then executes same values to all the request,
   servers with which it deals.  [NOTE: This contradicts what is
   currently said about SETCLIENTID, and replies interacts with an updated
   credit count accompanying its results.  Since replies are sequenced
   by their RDMA Send order, the most recent results always reflect the
   server's limit.  In this way issue of
   what sessions should do about this.]

   Servers are encouraged to provide facilities to allow locks to be
   reclaimed on the client will always know new server after a file system transition.  Often,
   however, in cases in which the maximum
   number two file systems are not of requests it may safely post.

   Because the same
   _state _ class, such facilities may not be available and client requests an arbitrary credit count in each
   request,
   should be prepared to re-obtain locks, even though it is relatively easy for possible
   that the client to request more, may have his LOCK or
   fewer, credits to match its expected need.  A client that discovered
   itself frequently queuing outgoing requests OPEN request denied due to lack of server
   credits might increase its requested credits proportionately in
   response.  Or, a client might have a simple, configurable number.
   The protocol also provides a per-operation "maxslot" exchange to
   assist in dynamic adjustment at
   conflicting lock.  In some environments, such as the session level, described transition
   between read-only file systems, such denial of locks should not pose
   large difficulties in practice.  When an attempt to re-establish a
   later section.

   Occasionally,
   lock on a new server may wish to reduce is denied, the total number of credits
   it offers a certain client on a connection.  This should treat the situation
   as if his original lock had been revoked.  In all cases in which the
   lock is granted, the client cannot assume that no conflicting could be
   encountered if a
   have been granted in the interim.  Where change attribute continuity
   is present, the client were found may check the change attribute to be consuming its credits
   slowly, or not at all.  A client might notice check for
   unwanted file modifications.  Where even this itself, is not available, and reduce
   its requested credits in advance, for instance requesting only
   the
   count of operations it currently has queued, plus file system is not read-only a few client may reasonably treat all
   pending locks as a base for
   starting up again.  Such mechanisms can, however, be potentially
   complicated having been revoked.

10.6.6.1.  Leases and are implementation-defined.  The protocol does not
   require them.

   Because File System Transitions

   In the case of lease renewal, the way in which RDMA fabrics function, it is client may not possible be submitting
   requests for the server (or client back channel) a filesystem that has been transferred to cancel outstanding receive
   operations.  Therefore, effectively only one credit another
   server.  This can be withdrawn
   per receive completion. occur because of the lease renewal mechanism.  The server (or
   client back channel) would
   simply not replenish a receive operation renews leases for all filesystems when replying.  The server
   can still reduce the available credit advertisement in its replies to
   the target value it desires, as submitting a hint request to
   any one filesystem at the server.

   In order for the client to schedule renewal of leases that its credit
   target is lower and it should expect it may have
   been relocated to be reduced accordingly.
   Of course, even if the server could cancel outstanding receives, it
   cannot do so, since new server, the client may have already sent requests in
   expectation must find out about
   lease relocation before those leases expire.  To accomplish this, all
   operations which renew leases for a client (i.e.  OPEN, CLOSE, READ,
   WRITE, RENEW, LOCK, LOCKT, LOCKU), will return the error
   NFS4ERR_LEASE_MOVED if responsibility for any of the previous limit.

   This brings out an interesting scenario similar leases to be
   renewed has been transferred to a new server.  This condition will
   continue until the client
   reconnect discussed earlier in "Connection Models".  How does receives an NFS4ERR_MOVED error and the
   server reduce receives the credits of an inactive client?

   One approach is subsequent GETATTR for the server fs_locations or
   fs_locations_info attribute for an access to simply close such each filesystem for
   which a connection and
   require the client lease has been moved to reconnect at a new credit limit.  This is
   acceptable, if inefficient, when the connection setup time server.

   [ISSUE: There is short a conflict between this and where the server supports persistent idea in the sessions
   text that we can have every op in the session semantics.

   A better approach is implicitly renew the
   lease.  This needs to provide be dealt with.  D. Noveck will create an issue
   in the issue tracker.]

   When a back channel request to return client receives an NFS4ERR_LEASE_MOVED error, it should
   perform an operation on each filesystem associated with the
   operations channel credits.  The server may request in
   question.  When the client to
   return some number of credits, receives an NFS4ERR_MOVED error, the
   client must comply by performing
   operations on can follow the operations channel, provided of course that normal process to obtain the
   request does not drop new server
   information (through the client's credit count to zero (in which
   case fs_locations and fs_locations_info
   attributes) and perform renewal of those leases on the connection would deadlock). new server,
   unless information in fs_locations_info attribute shows that no state
   could have been transferred.  If the client finds that it server has
   no requests with which not had state
   transferred to consume the credits it was previously
   granted, it must send zero-length Send RDMA operations, transparently, the client will receive either
   NFS4ERR_STALE_CLIENTID or NULL NFSv4
   operations NFS4ERR_STALE_STATEID from the new server,
   as described above, and the client can then recover state information
   as it does in order to return the resources to event of server failure.

10.6.6.2.  Transitions and the server.  If Lease_time Attribute

   In order that the client fails to comply may appropriately manage its leases in the
   case of a timely fashion, file system transition, the destination server can recover must
   establish proper values for the resources by breaking lease_time attribute.

   When state is transferred transparently, that state should include
   the connection.

   While in principle, correct value of the back channel credits could lease_time attribute.  The lease_time
   attribute on the destination server must never be subject to a
   similar resource adjustment, in practice this is not an issue, less than that on
   the source since this would result in premature expiration of leases
   granted by the back channel is used purely for control and source server.  Upon transitions in which state is expected to be
   statically provisioned.

   It
   transferred transparently, the client is important under no obligation to note that in addition re-
   fetch the lease_time attribute and may continue to maximum request counts, use the sizes of buffers value
   previously fetched (on the source server).

   If state has not been transferred transparently, either because the
   file systems are negotiated per-session.  This permits show as being in different state classes or because
   the
   most efficient allocation client sees a real or simulated server reboot), the client should
   fetch the value of resources on both peers.  There is an
   important requirement lease_time on reconnection: the sizes posted by new (i.e. destination) server,
   and use it for subsequent locking requests.  However the server
   at reconnect must be
   respect a grace period at least as large long as previously used, the lease_time on the
   source server, in order to allow
   recovery.  Any replies ensure that clients have ample time to
   reclaim their lock before potentially conflicting non-reclaimed locks
   are replayed from granted.

10.6.7.  Write Verifiers and File System Transitions

   In a file system transition, the server's duplicate
   request cache must two file systems may be able clustered in
   the handling of unstably written data.  When this is the case, and
   the two file systems belong to the same _verifier_ class, valid
   verifiers from one system may be recognized by the other and
   superfluous writes avoided.  There is no requirement that all valid
   verifiers be recognized, but it cannot be received into client buffers.  In the case where that a client has received replies verifier is
   recognized as valid when it is not.  [NOTE: We need to all its retried
   requests (and therefore received all its expected responses), then resolve the client may disconnect and reconnect with
   issue of proper verifier scope].

   When two file systems belong to different buffers _verifier_ classes, the
   client must assume that all unstable writes in existence at
   will, the time
   file system transition, have been lost since there is no cache replay way the old
   verifier can recognized as valid (or not) on the target server.

10.7.  Effecting File System Referrals

   Referrals are effected when an absent file system is encountered, and
   one or more alternate locations are made available by the
   fs_locations or fs_locations_info attributes.  The client will be required.

10.6.  Retry
   typically get an NFS4ERR_MOVED error, fetch the appropriate location
   information and Replay

   NFSv4.0 forbids retransmission on active connections over reliable
   transports; this includes connected-mode RDMA.  This restriction must
   be maintained in NFSv4.1.

   If one peer were proceed to retransmit a request (or reply), it would consume
   an additional credit access the file system on different
   server, even though it retains its logical position within the other.  If
   original namespace.

   The examples given in the server retransmitted a
   reply, it would certainly result sections below are somewhat artificial in
   that an RDMA connection loss, since
   the actual client would will not typically only post a single receive buffer for each
   request.  If the client retransmitted do a request, multi-component lookup,
   but will have cached information regarding the additional
   credit consumed on upper levels of the server might lead
   name hierarchy.  However, these example are chosen to RDMA connection failure
   unless make the client accounted for it
   required behavior clear and decreased its available
   credit, leading easy to wasted resources.

   RDMA credits present put within the scope of a new issue small
   number of requests, without getting unduly into details of how
   specific clients might choose to the duplicate request cache things.

10.7.1.  Referral Example (LOOKUP)

   Let us suppose that the following COMPOUND is issued in
   NFSv4.1.  The request cache may be used when a connection within a
   session an
   environment in which /src/linux/2.7/latest is lost, such as after absent from the client reconnects.  Credit
   information is target
   server.  This may be for a dynamic property number of the connection, and stale values
   must not reasons.  It may be replayed from the cache.  This implies case
   that the request
   cache contents must not be blindly used when replies are issued from
   it, and credit information appropriate to the channel must file system has moved, or, it may be
   refreshed by the RPC layer.

   Finally, RDMA fabrics do not guarantee that the memory handles
   (Steering Tags) within each rdma three-tuple are valid on a scope
   outside case that of a single connection.  Therefore, handles used by the
   direct operations become invalid after connection loss.  The
   target server
   must ensure that any RDMA operations which must be replayed from the
   request cache use is functioning mainly, or solely, to refer clients to
   the newly provided handle(s) from servers on which various file systems are located.

   o  PUTROOTFH

   o  LOOKUP "src"

   o  LOOKUP "linux"

   o  LOOKUP "2.7"

   o  LOOKUP "latest"

   o  GETFH

   o  GETATTR fsid,fileid,size,ctime

   Under the most recent
   request.

10.7.  The Back Channel

   The NFSv4 callback operations present a significant resource problem
   for given circumstances, the RDMA enabled client.  Clearly, callbacks must following will be negotiated
   in the way credits are for result.

   o  PUTROOTFH --> NFS_OK.  The current fh is now the ordinary operations channel for
   requests flowing from client to server.  But, for callbacks to arrive
   on root of the same RDMA endpoint as operation replies would require
   dedicating additional resources, and specialized demultiplexing and
   event handling.  Or, callbacks may not require RDMA sevice at all
   (they do not normally carry substantial data payloads).  It is highly
   desirable to streamline this critical path via a second
   communications channel.
      pseudo-fs.

   o  LOOKUP "src" --> NFS_OK.  The session callback channel binding facility current fh is designed for exactly
   such a situation, by dynamically associating a new connected endpoint
   with the session, and separately negotiating sizes /src and counts for
   active callback channel operations. is within
      the pseudo-fs.

   o  LOOKUP "linux" --> NFS_OK.  The binding operation current fh is
   firewall-friendly since it does not require the server to initiate for /src/linux and
      is within the connection.

   This same method serves as well pseudo-fs.

   o  LOOKUP "2.7" --> NFS_OK.  The current fh is for ordinary TCP connection mode.  It /src/linux/2.7 and
      is expected that all NFSv4.1 clients may make use of within the session
   facility to streamline their design. pseudo-fs.

   o  LOOKUP "latest" --> NFS_OK.  The back channel functions exactly current fh is for /src/linux/2.7/
      latest and is within a new, absent fs, but ... the same as client will
      never see the operations channel
   except value of that no RDMA operations are required to perform transfers,
   instead fh.

   o  GETFH --> NFS4ERR_MOVED.  Fails because current fh is in an absent
      fs at the sizes are required to be sufficiently large to carry all
   data inline, start of the operation and the spec makes no exception
      for GETFH.

   o  GETATTR fsid,fileid,size,ctime.  Not executed because the failure
      of course the GETFH stops processing of the COMPOUND.

   Given the failure of the GETFH, the client has the job of determining
   the root of the absent file system and where to find that file
   system, i.e. the server reverse their roles
   with respect and path relative to which is that server's root fh.
   Note here that in control of credit management.  The same
   rules apply this example, the client did not obtain filehandles
   and attribute information (e.g. fsid) for all transfers, with the server being required to flow
   control its callback requests.

   The back channel intermediate
   directories, so that he would not be sure where the absent file
   system starts.  It could be the case, for example, that
   /src/linux/2.7 is optional.  If the root of the moved filesystem and that the
   reason that the lookup of "latest" succeeded is that the filesystem
   was not bound absent on a given session, that op but was moved between the
   server must last LOOKUP and
   the GETFH (since COMPOUND is not issue callback operations to atomic).  Even if we had the client.  This in
   turn implies fsid's
   for all of the intermediate directories, we could have no way of
   knowing that such /src/linux/2.7/latest was the root of a client must never put itself in new fs, since we
   don't yet have its fsid.

   In order to get the
   situation where necessary information, let us re-issue the server will need chain
   of lookup's with GETFH's and GETATTR's to do so, lest at least get the client lose
   its connection by force, or its operation fsid's so
   we can be incorrect.  For sure where the appropriate fs boundaries are.  The client
   could choose to get fs_locations_info at the same
   reason, if a back channel is bound, time but in most
   cases the client is subject will have a good guess as to
   revocation where fs boundaries are
   (because of its delegations if the back channel where NFS4ERR_MOVED was gotten and where not) making
   fetching of fs_locations_info unnecessary.

   OP01:  PUTROOTFH --> NFS_OK

   -  Current fh is lost.  Any
   connection loss should be corrected by root of pseudo-fs.

   OP02:  GETATTR(fsid) --> NFS_OK

   -  Just for completeness.  Normally, clients will know the client fsid of
      the pseudo-fs as soon as
   possible.

   This can they establish communication with a
      server.

   OP03:  LOOKUP "src" --> NFS_OK
   OP04:  GETATTR(fsid) --> NFS_OK

   -  Get current fsid to see where fs boundaries are.  The fsid will be
      that for the pseudo-fs in this example, so no boundary.

   OP05:  GETFH --> NFS_OK

   -  Current fh is for /src and is within pseudo-fs.

   OP06:  LOOKUP "linux" --> NFS_OK

   -  Current fh is for /src/linux and is within pseudo-fs.

   OP07:  GETATTR(fsid) --> NFS_OK

   -  Get current fsid to see where fs boundaries are.  The fsid will be
      that for the pseudo-fs in this example, so no boundary.

   OP08:  GETFH --> NFS_OK

   -  Current fh is for /src/linux and is within pseudo-fs.

   OP09:  LOOKUP "2.7" --> NFS_OK

   -  Current fh is for /src/linux/2.7 and is within pseudo-fs.

   OP10:  GETATTR(fsid) --> NFS_OK

   -  Get current fsid to see where fs boundaries are.  The fsid will be convenient
      that for the NFSv4.1 client; if the client expects
   to make pseudo-fs in this example, so no use of back channel facilities such as delegations, then
   there boundary.

   OP11:  GETFH --> NFS_OK

   -  Current fh is no need to create it.  This may save significant resources for /src/linux/2.7 and complexity at is within pseudo-fs.

   OP12:  LOOKUP "latest" --> NFS_OK

   -  Current fh is for /src/linux/2.7/latest and is within a new,
      absent fs, but ...

   -  The client will never see the client.

   For these reasons, if value of that fh

   OP13:  GETATTR(fsid, fs_locations_info) --> NFS_OK

   -  We are getting the client wishes fsid to use know where the back channel, fs boundaries are.  Note
      that
   channel must be bound first, before using the operations channel.  In
   this way, the server fsid we are given will not find itself necessarily be preserved at
      the new location.  That fsid might be different and in fact the
      fsid we have for this fs might a position where it will
   send callbacks valid fsid of a different fs on
      that new server.

   -  In this particular case, we are pretty sure anyway that what has
      moved is /src/linux/2.7/latest rather than /src/linux/2.7 since we
      have the operations channel when fsid of the client is not
   prepared for them.

   There latter and it is one special case, that where of the back channel is bound pseudo-fs, which
      presumably cannot move.  However, in
   fact other examples, we might not
      have this kind of information to the operations channel's connection.  This configuration
   would rely on (e.g. /src/linux/2.7
      might be used normally over a TCP stream connection non-pseudo filesystem separate from /src/linux/2.7/
      latest), so we need to exactly
   implement have another reliable source information on
      the NFSv4.0 behavior, but over RDMA would require complex
   resource and event management at both sides boundary of the connection.  The
   server fs which is not required to accept such a bind request on an RDMA
   connection moved.  If, for this reason, though it is recommended.

10.8.  COMPOUND Sizing Issues

   Very large responses may pose duplicate request cache issues.  Since
   servers will want to bound example, the storage required for such
      filesystem "/src/linux" had moved we would have a cache, the
   unlimited size case of response data in COMPOUND may be troublesome.  If
   COMPOUND is used in all its generality, then
      migration rather than referral and once the inclusion boundaries of certain
   non-idempotent operations within a single COMPOUND request may render the entire request non-idempotent.  (For example, a single COMPOUND
   request which read a file or symbolic link, then removed it, would be
   obliged to cache
      migrated filesystem was clear we could fetch fs_locations_info.

   -  We are fetching fs_locations_info because the data in order to allow identical replay).
   Therefore, many requests might include operations fact that return any
   amount of data.

   It is not satisfactory for the server to reject COMPOUNDs we got an
      NFS4ERR_MOVED at will
   with NFS4ERR_RESOURCE when they pose such difficulties for the
   server, as this results in serious interoperability problems.
   Instead, any such limits must be explicitly exposed as attributes of
   the session, ensuring point means that it most likely that the server can explicitly support any
   duplicate request cache needs at all times.

10.9.  Data Alignment

   A negotiated data alignment enables certain scatter/gather
   optimizations.  A facility for this is supported by [RPCRDMA].  Where
   NFS file data
      a referral and we need the destination.  Even if it is the payload, specific optimizations become highly
   attractive.

   Header padding case
      that "/src/linux/2.7" is a filesystem which has migrated, we will
      still need the location information for that file system.

   OP14:  GETFH --> NFS4ERR_MOVED

   -  Fails because current fh is requested by each peer in an absent fs at session initiation, the start of the
      operation and
   may be zero (no padding).  Padding leverages the useful property spec makes no exception for GETFH.  Note that
   RDMA receives preserve alignment
      this has the happy consequence that we don't have to worry about
      the volatility or lack thereof of data, even when they are placed
   into anonymous (untagged) buffers. the fh.  If requested, client inline
   writes will insert appropriate pad bytes within the request header to
   align root of the data payload fs
      on the specified boundary.  The client new location is
   encouraged to be optimistic and simply pad all WRITEs within a persistent fh, then we can assume that
      this fh, which we never saw is a persistent fh, which, if we could
      see it, would exactly match the RPC
   layer new fh.  At least, there is no
      evidence to disprove that.  On the negotiated size, in other hand, if we find a
      volatile root at the expectation that new location, then the server can
   use them efficiently.

   It is highly recommended that clients offer to pad headers to an
   appropriate size.  Most servers filehandle which we
      never saw must have been volatile or at least nobody can make good use prove
      otherwise.

   Given the above, the client knows where the root of such padding,
   which allows them to chain receive buffers in such a way that any
   data carried the absent file
   system is, by client requests will be placed into appropriate
   buffers at noting where the server, ready for filesystem processing. change of fsid occurred.  The
   receiver's RPC layer encounters no overhead from skipping over pad
   bytes, and
   fs_locations_info attribute also gives the RDMA layer's high performance makes client the insertion and
   transmission actual location
   of padding on the sender a significant optimization.  In
   this way, absent file system, so that the need for servers to perform RDMA Read to satisfy all
   but referral can proceed.  The
   server gives the largest client writes is obviated.  An added benefit is the
   reduction bare minimum of message roundtrips on information about the network - a potentially good
   trade, where latency is present.

   The value to choose
   absent file system so that there will be very little scope for padding is subject to a number
   problems of criteria.
   A primary source conflict between information sent by the referring server
   and information of variable-length data in the RPC header is file system's home.  No filehandles and very
   few attributes are present on the
   authentication information, referring server and the form client can
   treat those it receives as basically transient information with the
   function of enabling the referral.

10.7.2.  Referral Example (READDIR)

   Another context in which a client may encounter referrals is client-determined,
   possibly when it
   does a READDIR on directory in response to server specification.  The contents of
   COMPOUNDs, sizes which some of strings such as those passed to RENAME, etc. all
   go into the determination sub-directories are
   the roots of absent file systems.

   Suppose such a maximal NFSv4 request size directory is read as follows:

   o  PUTROOTFH

   o  LOOKUP "src"

   o  LOOKUP "linux"

   o  LOOKUP "2.7"

   o  READDIR (fsid, size, ctime, mounted_on_fileid)

   In this case, because rdattr_error is not requested,
   fs_locations_info is not requested, and
   therefore minimal buffer size.  The client must select its offered
   value carefully, so some of attributes cannot be
   provided the result will be an NFS4ERR_MOVED error on the READDIR,
   with the detailed results as not to overburden follows:

   o  PUTROOTFH --> NFS_OK.  The current fh is at the server, root of the
      pseudo-fs.

   o  LOOKUP "src" --> NFS_OK.  The current fh is for /src and vice- versa. is within
      the pseudo-fs.

   o  LOOKUP "linux" --> NFS_OK.  The payoff of an appropriate padding value current fh is higher performance.

                    Sender gather:
        |RPC Request|Pad bytes|Length| -> |User data...|
        \------+---------------------/       \
                \                             \
                 \    Receiver scatter:        \-----------+- ...
            /-----+----------------\            \           \
            |RPC Request|Pad|Length|   ->  |FS buffer|->|FS buffer|->...

   In for /src/linux and
      is within the above case, pseudo-fs.

   o  LOOKUP "2.7" --> NFS_OK.  The current fh is for /src/linux/2.7 and
      is within the server may recycle unused buffers to pseudo-fs.

   o  READDIR (fsid, size, ctime, mounted_on_fileid) --> NFS4ERR_MOVED.
      Note that the next
   posted receive same error would have been returned if unused by
      /src/linux/2.7 had migrated, when in fact it is because the actual received request, or may pass
      directory contains the now-complete buffers by reference for normal write processing.
   For a server which can make use root of it, this removes any need for data
   copies an absent fs.

   So now suppose that we reissue with rdattr_error:

   o  PUTROOTFH

   o  LOOKUP "src"

   o  LOOKUP "linux"
   o  LOOKUP "2.7"

   o  READDIR (rdattr_error, fsid, size, ctime, mounted_on_fileid)

   The results will be:

   o  PUTROOTFH --> NFS_OK.  The current fh is at the root of incoming data, without resorting to complicated end-to-end
   buffer advertisement the
      pseudo-fs.

   o  LOOKUP "src" --> NFS_OK.  The current fh is for /src and management.  This includes most kernel-based is within
      the pseudo-fs.

   o  LOOKUP "linux" --> NFS_OK.  The current fh is for /src/linux and integrated server designs, among many others.
      is within the pseudo-fs.

   o  LOOKUP "2.7" --> NFS_OK.  The client may
   perform similar optimizations, if desired.

   Padding current fh is negotiated by for /src/linux/2.7 and
      is within the session creation operation, pseudo-fs.

   o  READDIR (rdattr_error, fsid, size, ctime, mounted_on_fileid) -->
      NFS_OK.  The attributes for "latest" will only contain
      rdattr_error with the value will be NFS4ERR_MOVED, together with
      an fsid value and
   subsequently an a value for mounted_on_fileid.

   So suppose we do another READDIR to get fs_locations_info, although
   we could have used by the RPC RDMA layer, a GETATTR directly, as described in [RPCRDMA].

10.10.  NFSv4 Integration the previous section.

   o  PUTROOTFH

   o  LOOKUP "src"

   o  LOOKUP "linux"

   o  LOOKUP "2.7"

   o  READDIR (rdattr_error, fs_locations_info, mounted_on_fileid, fsid,
      size, ctime)

   The following section discusses results would be:

   o  PUTROOTFH --> NFS_OK.  The current fh is at the integration root of the proposed RDMA
   extensions with NFSv4.0.

10.10.1.  Minor Versioning

   Minor versioning
      pseudo-fs.

   o  LOOKUP "src" --> NFS_OK.  The current fh is for /src and is within
      the existing facility to extend the NFSv4
   protocol, pseudo-fs.

   o  LOOKUP "linux" --> NFS_OK.  The current fh is for /src/linux and this proposal takes that approach.

   Minor versioning of NFSv4
      is relatively restrictive, within the pseudo-fs.

   o  LOOKUP "2.7" --> NFS_OK.  The current fh is for /src/linux/2.7 and allows
      is within the pseudo-fs.

   o  READDIR (rdattr_error, fs_locations_info, mounted_on_fileid, fsid,
      size, ctime) --> NFS_OK.  The attributes will be as shown below.

   The attributes for
   tightly limited changes only.  In particular, it does not permit
   adding new "procedures" (it permits adding "latest" will only new "operations").
   Interoperability concerns make it impossible to consider additional
   layering contain

   o  rdattr_error (value: NFS4ERR_MOVED)

   o  fs_locations_info )

   o  mounted_on_fileid (value: unique fileid within referring fs)

   o  fsid (value: unique value within referring server)

   The attribute entry for "latest" will not contain size or ctime.

10.8.  The Attribute fs_absent

   In order to be a minor revision.  This somewhat limits provide the changes
   that can be proposed when considering extensions.

   To support client information about whether the duplicate request cache integrated with sessions and
   request control, it current
   file system is desirable to tag each request with an
   identifier present or absent, the fs_absent attribute may be
   interrogated.

   As noted above, this attribute, when supported, may be requested of
   absent filesystems without causing NFS4ERR_MOVED to be called a Slotid.  This identifier must returned and
   it should always be passed by
   NFSv4 when running atop any transport, including traditional TCP.
   Therefore available.  Servers are strongly urged to support
   this attribute on all filesystems if they support it on any
   filesystem.

10.9.  The Attribute fs_locations

   The fs_locations attribute is not desirable to add structured in the Slotid following way:

           struct fs_location {
               utf8str_cis     server<>;
               pathname4       rootpath;
           };

           struct fs_locations {
               pathname4       fs_root;
               fs_location     locations<>;
           };

   The fs_location struct is used to represent the location of a new RPC
   transport, even though such
   filesystem by providing a transport is indicated for support of
   RDMA.  This draft server name and [RPCRDMA] do not propose such an approach.

   Instead, this proposal conforms the path to the requirements root of NFSv4 minor
   versioning, through the use of a new operation
   file system within NFSv4 COMPOUND
   procedures as detailed below.

   If sessions are in use for that server's namespace.  When a given clientid, this same clientid
   cannot be used for non-session NFSv4 operation, including NFSv4.0.
   Because the server will set of servers
   have allocated session-specific state to corresponding file systems at the
   active clientid, it would be same path within their
   namespaces, an unnecessary burden on the array of server
   implementor to support and account for additional, non- session
   traffic, names may be provided.  An entry in addition to being of no benefit.  Therefore this proposal
   prohibits a single clientid from doing this.  Nevertheless, employing
   a new clientid for such traffic
   the server array is supported.

10.10.2.  Slot Identifiers an UTF8 string and Server Duplicate Request Cache

   The presence represents one of deterministic maximum request limits on a session
   enables in-progress requests to be assigned unique values with useful
   properties.

   The RPC layer provides a transaction ID (xid), which, while required
   to be unique,
   traditional DNS host name, IPv4 address, or IPv6 address.  It is not especially convenient for tracking requests.

   The transaction ID is only meaningful to
   a requirement that all servers that share the issuer (client), it
   cannot same rootpath be interpreted at the listed
   in one fs_location struct.  The array of server except to test names is provided for equality with
   previously issued requests.  Because RPC operations
   convenience.  Servers that share the same rootpath may also be completed
   by listed
   in separate fs_location entries in the fs_locations attribute.

   The fs_locations struct and attribute contains an array of such
   locations.  Since the name space of each server in any order, many transaction IDs may be outstanding
   at any time. constructed
   differently, the "fs_root" field is provided.  The client may therefore perform a computationally
   expensive lookup operation in path represented
   by fs_root represents the process location of demultiplexing each
   reply.

   In the proposal, there is a limit to filesystem in the number current
   server's name space, i.e. that of active requests.
   This immediately enables a convenient, computationally efficient
   index for each request the server from which the
   fs_locations attribute was obtained.  The fs_root path is designated as a Slot Identifier, or
   slotid.

   When meant to
   aid the client issues a new request, it selects a slotid in by clearly referencing the
   range 0..N-1, where N is root of the server's current "totalrequests" limit
   granted file system
   whose locations are being reported, no matter what object within the client on
   current file system, the session over which current filehandle designates.

   As an example, suppose there is a replicated filesystem located at
   two servers (servA and servB).  At servA, the request filesystem is to be
   issued.  The slotid must be unused by any of located
   at path "/a/b/c".  At, servB the requests which filesystem is located at path
   "/x/y/z".  If the client has already active on the session.  "Unused" here means were to obtain the
   client has no outstanding request fs_locations value for
   the directory at "/a/b/c/d", it might not necessarily know that slotid.  Because the slot
   id
   filesystem's root is always an integer located in servA's name space at "/a/b/c".  When
   the range 0..N-1, client implementations
   can use the slotid from a server response switches to efficiently match
   responses with outstanding requests, such as, for example, servB, it will need to determine that the
   directory it first referenced at servA is now represented by using the slotid to index into path
   "/x/y/z/d" on servB.  To facilitate this, the fs_locations attribute
   provided by servA would have a outstanding request array.  This can be
   used to avoid expensive hashing fs_root value of "/a/b/c" and lookup functions two
   entries in the
   performace-critical receive path.

   The sequenceid, which accompanies the slotid fs_locations.  One entry in each request, is
   important fs_locations will be for a second, important check at
   itself (servA) and the server: it must be
   able to other will be determined efficiently whether a request using a certain
   slotid is a retransmit or a new, never-before-seen request.  It is
   not feasible for servB with a path of
   "/x/y/z".  With this information, the client to assert that it is retransmitting able to
   implement this, because substitute
   "/x/y/z" for any given request the client cannot know
   the server has seen it unless the server actually replies.  Of
   course, if the client has seen the server's reply, "/a/b/c" at the client would
   not retransmit!

   The sequenceid must increase monotonically for each new transmit beginning of a
   given slotid, its access path and must remain unchanged for any retransmission.  The
   server must in turn compare each newly received request's sequenceid
   with the last one previously received for that slotid,
   construct "/x/y/z/d" to see if use for the new request is:

   o  A new request, in which server.

   Since fs_locations attribute lacks information defining various
   attributes of the sequenceid various file system choices presented, it should
   only be interrogated and used when fs_locations_info is greater than that
      previously seen in not
   available.  When fs_locations is used, information about the slot (accounting for sequence wraparound). specific
   locations should be assumed based on the following rules.

   The server proceeds to execute following rules are general and apply irrespective of the new request.
   context.

   o  A retransmitted request, in which the sequenceid is equal  When a DNS server name maps to that
      last seen in the slot.  Note that this request may multiple IP addresses, they should
      be either
      complete, or in progress.  The server performs replay processing
      in these cases.

   o  A misordered duplicate, in which considered identical, i.e. of the sequenceid is less than that
      previously seen same _endpoint_ class.

   o  Except in the slot.  The server must drop the incoming
      request, which may imply dropping the connection if the transport
      is reliable, case of servers sharing an _endpoint_ class, all
      listed servers should be considered as dictated by section 3.1.1 of [RFC3530].

   This last condition is possible on any connection, not just
   unreliable, unordered transports.  Delayed behavior on abandoned TCP
   connections which are the same _handle_ class,
      if and only if, the current fh_expire_type attribute does not yet closed at
      include the server, or pathological
   client implementations can cause it, among other causes.  Therefore, FH4_VOL_MIGRATION bit.  Note that in the server may wish to harden itself against certain repeated
   occurrences case of this, as it would for retransmissions in [RFC3530].

   It is recommended, though
      referral, filehandle issues do not necessary for protocol correctness,
   that apply since there can be no
      filehandles known within the client simply increment current file system nor is there any
      access to the sequenceid by one for each new
   request fh_expire_type attribute on each slotid.  This reduces the wraparound window to a
   minimum, and is useful for tracing and avoidance referring (absent)
      file system.

   o  Except in the case of possible
   implementation errors.

   The client may however, for implementation-specific reasons, choose a
   different algorithm.  For example it might maintain a single sequence
   space for servers sharing an _endpoint_ class, all slots in
      listed servers should be considered as of the session - e.g. employing same _fileid_ class,
      if and only if, the RPC XID
   itself.  The sequenceid, fh_expire_type attribute indicates persistent
      filehandles and does not include the FH4_VOL_MIGRATION bit.  Note
      that in any case, is never interpreted by the
   server for anything but case of referral, fileid issues do not apply since
      there can be no fileids known within the referring (absent) file
      system nor is there any access to test by comparison with previously seen
   values.

   The server may thereby use the slotid, fh_expire_type attribute.

   o  Except in conjunction with the
   sessionid and sequenceid, within the SEQUENCE portion case of servers sharing an _endpoint_ class, all
      listed servers should be considered as of different _change_
      classes.

   For other class assignments, handling depends of file system
   transitions depends on the request
   to maintain its duplicate request cache (DRC) reasons for the session, as
   opposed transition:

   o  When the transition is due to migration, the traditional approach target should be
      treated as being of ONC RPC applications that use the XID along with certain transport information [RW96].

   Unlike same _state_ and _verifier_ class as the XID,
      source.

   o  When the slotid transition is always within due to failover to another replica, the
      target should be treated as being of a different _state_ and
      _verifier_ class from the source.

   The specific range; choices reflect typical implementation patterns for
   failover and controlled migration respectively.  Since other choices
   are possible and useful, this
   has two implications.  The first implication information is that better obtained by using
   fs_locations_info.

   See the section "Security Considerations" for a given
   session, discussion on the server need only cache
   recommendations for the results of a limited number
   of COMPOUND requests.  The second implication derives from security flavor to be used by any GETATTR
   operation that requests the first,
   which "fs_locations" attribute.

10.10.  The Attribute fs_locations_info

   The fs_locations_info attribute is unlike XID-indexed DRCs, the slotid DRC by its nature cannot intended as a more functional
   replacement for fs_locations which will continue to exist and be overflowed.  Through
   supported.  Clients can use of the sequenceid to identify
   retransmitted requests, it is notable that get a more complete set of information
   about alternative file system locations.  When the server does not need
   support fs_locations_info, fs_locations can be used to actually cache the request itself, reducing the storage
   requirements get a subset
   of the DRC further.  These new facilities makes it
   practical to maintain all the required entries for an effective DRC.

   The slotid and sequenceid therefore take over the traditional role information.  A server which supports fs_locations_info MUST
   support fs_locations as well.

   There are several sorts of
   the port number additional information present in
   fs_locations_info, that aren't available in fs_locations:

   o  Attribute continuity information to allow a client to select a
      location which meets the server DRC implementation, and transparency requirements of the session
   replaces
      applications accessing the IP address.  This approach is considerably more portable data and completely robust - it is not subject to the frequent
   reassignment take advantage of ports
      optimizations that server guarantees as to attribute continuity
      may provide (e.g. change attribute).

   o  Filesystem identity information which indicates when multiple
      replicas, from the clients reconnect over IP networks.  In
   addition, point of view, correspond to the RPC XID is not same
      target filesystem, allowing them to be used in the reply cache, enhancing
   robustness of interchangeably,
      without disruption, as multiple paths to the cache in same thing.

   o  Information which will bear on the face of any rapid reuse suitability of XIDs by various
      replicas, depending on the
   client.

   It is required use that the client intends.  For
      example, many applications need an absolutely up-to-date copy
      (e.g. those that write), while others may only need access to encode the slotid
      most up-to-date copy reasonably available.

   o  Server-derived preference information into each request in
   a way that does not violate for replicas, which can be
      used to implement load-balancing while giving the minor versioning rules of client the