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