| 1 |
============================= |
| 2 |
NFSv4.1 Server Implementation |
| 3 |
============================= |
| 4 |
|
| 5 |
Server support for minorversion 1 can be controlled using the |
| 6 |
/proc/fs/nfsd/versions control file. The string output returned |
| 7 |
by reading this file will contain either "+4.1" or "-4.1" |
| 8 |
correspondingly. |
| 9 |
|
| 10 |
Currently, server support for minorversion 1 is enabled by default. |
| 11 |
It can be disabled at run time by writing the string "-4.1" to |
| 12 |
the /proc/fs/nfsd/versions control file. Note that to write this |
| 13 |
control file, the nfsd service must be taken down. You can use rpc.nfsd |
| 14 |
for this; see rpc.nfsd(8). |
| 15 |
|
| 16 |
(Warning: older servers will interpret "+4.1" and "-4.1" as "+4" and |
| 17 |
"-4", respectively. Therefore, code meant to work on both new and old |
| 18 |
kernels must turn 4.1 on or off *before* turning support for version 4 |
| 19 |
on or off; rpc.nfsd does this correctly.) |
| 20 |
|
| 21 |
The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based |
| 22 |
on RFC 5661. |
| 23 |
|
| 24 |
From the many new features in NFSv4.1 the current implementation |
| 25 |
focuses on the mandatory-to-implement NFSv4.1 Sessions, providing |
| 26 |
"exactly once" semantics and better control and throttling of the |
| 27 |
resources allocated for each client. |
| 28 |
|
| 29 |
The table below, taken from the NFSv4.1 document, lists |
| 30 |
the operations that are mandatory to implement (REQ), optional |
| 31 |
(OPT), and NFSv4.0 operations that are required not to implement (MNI) |
| 32 |
in minor version 1. The first column indicates the operations that |
| 33 |
are not supported yet by the linux server implementation. |
| 34 |
|
| 35 |
The OPTIONAL features identified and their abbreviations are as follows: |
| 36 |
|
| 37 |
- **pNFS** Parallel NFS |
| 38 |
- **FDELG** File Delegations |
| 39 |
- **DDELG** Directory Delegations |
| 40 |
|
| 41 |
The following abbreviations indicate the linux server implementation status. |
| 42 |
|
| 43 |
- **I** Implemented NFSv4.1 operations. |
| 44 |
- **NS** Not Supported. |
| 45 |
- **NS\*** Unimplemented optional feature. |
| 46 |
|
| 47 |
Operations |
| 48 |
========== |
| 49 |
|
| 50 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 51 |
| Implementation status | Operation | REQ,REC, OPT or NMI | Feature (REQ, REC or OPT) | Definition | |
| 52 |
+=======================+======================+=====================+===========================+================+ |
| 53 |
| | ACCESS | REQ | | Section 18.1 | |
| 54 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 55 |
| I | BACKCHANNEL_CTL | REQ | | Section 18.33 | |
| 56 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 57 |
| I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 | |
| 58 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 59 |
| | CLOSE | REQ | | Section 18.2 | |
| 60 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 61 |
| | COMMIT | REQ | | Section 18.3 | |
| 62 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 63 |
| | CREATE | REQ | | Section 18.4 | |
| 64 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 65 |
| I | CREATE_SESSION | REQ | | Section 18.36 | |
| 66 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 67 |
| NS* | DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 | |
| 68 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 69 |
| | DELEGRETURN | OPT | FDELG, | Section 18.6 | |
| 70 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 71 |
| | | | DDELG, pNFS | | |
| 72 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 73 |
| | | | (REQ) | | |
| 74 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 75 |
| I | DESTROY_CLIENTID | REQ | | Section 18.50 | |
| 76 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 77 |
| I | DESTROY_SESSION | REQ | | Section 18.37 | |
| 78 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 79 |
| I | EXCHANGE_ID | REQ | | Section 18.35 | |
| 80 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 81 |
| I | FREE_STATEID | REQ | | Section 18.38 | |
| 82 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 83 |
| | GETATTR | REQ | | Section 18.7 | |
| 84 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 85 |
| I | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 | |
| 86 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 87 |
| NS* | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 | |
| 88 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 89 |
| | GETFH | REQ | | Section 18.8 | |
| 90 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 91 |
| NS* | GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 | |
| 92 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 93 |
| I | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 | |
| 94 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 95 |
| I | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 | |
| 96 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 97 |
| I | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 | |
| 98 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 99 |
| | LINK | OPT | | Section 18.9 | |
| 100 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 101 |
| | LOCK | REQ | | Section 18.10 | |
| 102 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 103 |
| | LOCKT | REQ | | Section 18.11 | |
| 104 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 105 |
| | LOCKU | REQ | | Section 18.12 | |
| 106 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 107 |
| | LOOKUP | REQ | | Section 18.13 | |
| 108 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 109 |
| | LOOKUPP | REQ | | Section 18.14 | |
| 110 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 111 |
| | NVERIFY | REQ | | Section 18.15 | |
| 112 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 113 |
| | OPEN | REQ | | Section 18.16 | |
| 114 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 115 |
| NS* | OPENATTR | OPT | | Section 18.17 | |
| 116 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 117 |
| | OPEN_CONFIRM | MNI | | N/A | |
| 118 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 119 |
| | OPEN_DOWNGRADE | REQ | | Section 18.18 | |
| 120 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 121 |
| | PUTFH | REQ | | Section 18.19 | |
| 122 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 123 |
| | PUTPUBFH | REQ | | Section 18.20 | |
| 124 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 125 |
| | PUTROOTFH | REQ | | Section 18.21 | |
| 126 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 127 |
| | READ | REQ | | Section 18.22 | |
| 128 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 129 |
| | READDIR | REQ | | Section 18.23 | |
| 130 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 131 |
| | READLINK | OPT | | Section 18.24 | |
| 132 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 133 |
| | RECLAIM_COMPLETE | REQ | | Section 18.51 | |
| 134 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 135 |
| | RELEASE_LOCKOWNER | MNI | | N/A | |
| 136 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 137 |
| | REMOVE | REQ | | Section 18.25 | |
| 138 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 139 |
| | RENAME | REQ | | Section 18.26 | |
| 140 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 141 |
| | RENEW | MNI | | N/A | |
| 142 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 143 |
| | RESTOREFH | REQ | | Section 18.27 | |
| 144 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 145 |
| | SAVEFH | REQ | | Section 18.28 | |
| 146 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 147 |
| | SECINFO | REQ | | Section 18.29 | |
| 148 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 149 |
| I | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, | |
| 150 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 151 |
| | | | layout (REQ) | Section 13.12 | |
| 152 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 153 |
| I | SEQUENCE | REQ | | Section 18.46 | |
| 154 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 155 |
| | SETATTR | REQ | | Section 18.30 | |
| 156 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 157 |
| | SETCLIENTID | MNI | | N/A | |
| 158 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 159 |
| | SETCLIENTID_CONFIRM | MNI | | N/A | |
| 160 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 161 |
| NS | SET_SSV | REQ | | Section 18.47 | |
| 162 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 163 |
| I | TEST_STATEID | REQ | | Section 18.48 | |
| 164 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 165 |
| | VERIFY | REQ | | Section 18.31 | |
| 166 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 167 |
| NS* | WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 | |
| 168 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 169 |
| | WRITE | REQ | | Section 18.32 | |
| 170 |
+-----------------------+----------------------+---------------------+---------------------------+----------------+ |
| 171 |
|
| 172 |
|
| 173 |
Callback Operations |
| 174 |
=================== |
| 175 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 176 |
| Implementation status | Operation | REQ,REC, OPT or NMI | Feature (REQ, REC or OPT) | Definition | |
| 177 |
+=======================+=========================+=====================+===========================+===============+ |
| 178 |
| | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 | |
| 179 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 180 |
| I | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 | |
| 181 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 182 |
| NS* | CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 | |
| 183 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 184 |
| NS* | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 | |
| 185 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 186 |
| NS* | CB_NOTIFY_LOCK | OPT | | Section 20.11 | |
| 187 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 188 |
| NS* | CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 | |
| 189 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 190 |
| | CB_RECALL | OPT | FDELG, | Section 20.2 | |
| 191 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 192 |
| | | | DDELG, pNFS | | |
| 193 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 194 |
| | | | (REQ) | | |
| 195 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 196 |
| NS* | CB_RECALL_ANY | OPT | FDELG, | Section 20.6 | |
| 197 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 198 |
| | | | DDELG, pNFS | | |
| 199 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 200 |
| | | | (REQ) | | |
| 201 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 202 |
| NS | CB_RECALL_SLOT | REQ | | Section 20.8 | |
| 203 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 204 |
| NS* | CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 | |
| 205 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 206 |
| | | | (REQ) | | |
| 207 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 208 |
| I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 | |
| 209 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 210 |
| | | | DDELG, pNFS | | |
| 211 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 212 |
| | | | (REQ) | | |
| 213 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 214 |
| NS* | CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 | |
| 215 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 216 |
| | | | DDELG, pNFS | | |
| 217 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 218 |
| | | | (REQ) | | |
| 219 |
+-----------------------+-------------------------+---------------------+---------------------------+---------------+ |
| 220 |
|
| 221 |
|
| 222 |
Implementation notes: |
| 223 |
===================== |
| 224 |
|
| 225 |
SSV: |
| 226 |
The spec claims this is mandatory, but we don't actually know of any |
| 227 |
implementations, so we're ignoring it for now. The server returns |
| 228 |
NFS4ERR_ENCR_ALG_UNSUPP on EXCHANGE_ID, which should be future-proof. |
| 229 |
|
| 230 |
GSS on the backchannel: |
| 231 |
Again, theoretically required but not widely implemented (in |
| 232 |
particular, the current Linux client doesn't request it). We return |
| 233 |
NFS4ERR_ENCR_ALG_UNSUPP on CREATE_SESSION. |
| 234 |
|
| 235 |
DELEGPURGE: |
| 236 |
mandatory only for servers that support CLAIM_DELEGATE_PREV and/or |
| 237 |
CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that |
| 238 |
persist across client reboots). Thus we need not implement this for |
| 239 |
now. |
| 240 |
|
| 241 |
EXCHANGE_ID: |
| 242 |
implementation ids are ignored |
| 243 |
|
| 244 |
CREATE_SESSION: |
| 245 |
backchannel attributes are ignored |
| 246 |
|
| 247 |
SEQUENCE: |
| 248 |
no support for dynamic slot table renegotiation (optional) |
| 249 |
|
| 250 |
Nonstandard compound limitations: |
| 251 |
No support for a sessions fore channel RPC compound that requires both a |
| 252 |
ca_maxrequestsize request and a ca_maxresponsesize reply, so we may |
| 253 |
fail to live up to the promise we made in CREATE_SESSION fore channel |
| 254 |
negotiation. |
| 255 |
|
| 256 |
See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. |