blob: 092fad92a3f0e9bcc164b40595c19055e398d9ba [file] [log] [blame]
Benny Halevy3ef17282009-04-03 08:29:20 +03001NFSv4.1 Server Implementation
2
3Server support for minorversion 1 can be controlled using the
4/proc/fs/nfsd/versions control file. The string output returned
5by reading this file will contain either "+4.1" or "-4.1"
6correspondingly.
7
8Currently, server support for minorversion 1 is disabled by default.
9It can be enabled at run time by writing the string "+4.1" to
10the /proc/fs/nfsd/versions control file. Note that to write this
11control file, the nfsd service must be taken down. Use your user-mode
12nfs-utils to set this up; see rpc.nfsd(8)
13
J. Bruce Fields285a0f02009-09-20 17:01:33 -040014(Warning: older servers will interpret "+4.1" and "-4.1" as "+4" and
15"-4", respectively. Therefore, code meant to work on both new and old
16kernels must turn 4.1 on or off *before* turning support for version 4
17on or off; rpc.nfsd does this correctly.)
18
Benny Halevy3ef17282009-04-03 08:29:20 +030019The NFSv4 minorversion 1 (NFSv4.1) implementation in nfsd is based
J. Bruce Fields73834d62010-01-20 17:17:04 -050020on RFC 5661.
Benny Halevy3ef17282009-04-03 08:29:20 +030021
22From the many new features in NFSv4.1 the current implementation
23focuses on the mandatory-to-implement NFSv4.1 Sessions, providing
24"exactly once" semantics and better control and throttling of the
25resources allocated for each client.
26
27Other NFSv4.1 features, Parallel NFS operations in particular,
28are still under development out of tree.
29See http://wiki.linux-nfs.org/wiki/index.php/PNFS_prototype_design
30for more information.
31
J. Bruce Fields285a0f02009-09-20 17:01:33 -040032The current implementation is intended for developers only: while it
33does support ordinary file operations on clients we have tested against
34(including the linux client), it is incomplete in ways which may limit
35features unexpectedly, cause known bugs in rare cases, or cause
36interoperability problems with future clients. Known issues:
37
38 - gss support is questionable: currently mounts with kerberos
39 from a linux client are possible, but we aren't really
40 conformant with the spec (for example, we don't use kerberos
41 on the backchannel correctly).
J. Bruce Fields285a0f02009-09-20 17:01:33 -040042 - Incomplete backchannel support: incomplete backchannel gss
43 support and no support for BACKCHANNEL_CTL mean that
44 callbacks (hence delegations and layouts) may not be
45 available and clients confused by the incomplete
46 implementation may fail.
J. Bruce Fields285a0f02009-09-20 17:01:33 -040047 - We do not support SSV, which provides security for shared
48 client-server state (thus preventing unauthorized tampering
49 with locks and opens, for example). It is mandatory for
50 servers to support this, though no clients use it yet.
51 - Mandatory operations which we do not support, such as
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -040052 DESTROY_CLIENTID, are not currently used by clients, but will be
J. Bruce Fields285a0f02009-09-20 17:01:33 -040053 (and the spec recommends their uses in common cases), and
54 clients should not be expected to know how to recover from the
55 case where they are not supported. This will eventually cause
56 interoperability failures.
57
58In addition, some limitations are inherited from the current NFSv4
59implementation:
60
61 - Incomplete delegation enforcement: if a file is renamed or
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -040062 unlinked by a local process, a client holding a delegation may
63 continue to indefinitely allow opens of the file under the old
64 name.
J. Bruce Fields285a0f02009-09-20 17:01:33 -040065
Benny Halevy3ef17282009-04-03 08:29:20 +030066The table below, taken from the NFSv4.1 document, lists
67the operations that are mandatory to implement (REQ), optional
68(OPT), and NFSv4.0 operations that are required not to implement (MNI)
69in minor version 1. The first column indicates the operations that
70are not supported yet by the linux server implementation.
71
72The OPTIONAL features identified and their abbreviations are as follows:
73 pNFS Parallel NFS
74 FDELG File Delegations
75 DDELG Directory Delegations
76
77The following abbreviations indicate the linux server implementation status.
78 I Implemented NFSv4.1 operations.
79 NS Not Supported.
80 NS* unimplemented optional feature.
81 P pNFS features implemented out of tree.
82 PNS pNFS features that are not supported yet (out of tree).
83
84Operations
85
86 +----------------------+------------+--------------+----------------+
87 | Operation | REQ, REC, | Feature | Definition |
88 | | OPT, or | (REQ, REC, | |
89 | | MNI | or OPT) | |
90 +----------------------+------------+--------------+----------------+
91 | ACCESS | REQ | | Section 18.1 |
92NS | BACKCHANNEL_CTL | REQ | | Section 18.33 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -040093I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
Benny Halevy3ef17282009-04-03 08:29:20 +030094 | CLOSE | REQ | | Section 18.2 |
95 | COMMIT | REQ | | Section 18.3 |
96 | CREATE | REQ | | Section 18.4 |
97I | CREATE_SESSION | REQ | | Section 18.36 |
98NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
99 | DELEGRETURN | OPT | FDELG, | Section 18.6 |
100 | | | DDELG, pNFS | |
101 | | | (REQ) | |
102NS | DESTROY_CLIENTID | REQ | | Section 18.50 |
103I | DESTROY_SESSION | REQ | | Section 18.37 |
104I | EXCHANGE_ID | REQ | | Section 18.35 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400105I | FREE_STATEID | REQ | | Section 18.38 |
Benny Halevy3ef17282009-04-03 08:29:20 +0300106 | GETATTR | REQ | | Section 18.7 |
107P | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
108P | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
109 | GETFH | REQ | | Section 18.8 |
110NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
111P | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
112P | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
113P | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
114 | LINK | OPT | | Section 18.9 |
115 | LOCK | REQ | | Section 18.10 |
116 | LOCKT | REQ | | Section 18.11 |
117 | LOCKU | REQ | | Section 18.12 |
118 | LOOKUP | REQ | | Section 18.13 |
119 | LOOKUPP | REQ | | Section 18.14 |
120 | NVERIFY | REQ | | Section 18.15 |
121 | OPEN | REQ | | Section 18.16 |
122NS*| OPENATTR | OPT | | Section 18.17 |
123 | OPEN_CONFIRM | MNI | | N/A |
124 | OPEN_DOWNGRADE | REQ | | Section 18.18 |
125 | PUTFH | REQ | | Section 18.19 |
126 | PUTPUBFH | REQ | | Section 18.20 |
127 | PUTROOTFH | REQ | | Section 18.21 |
128 | READ | REQ | | Section 18.22 |
129 | READDIR | REQ | | Section 18.23 |
130 | READLINK | OPT | | Section 18.24 |
J. Bruce Fields4dc6ec02010-04-19 15:11:28 -0400131 | RECLAIM_COMPLETE | REQ | | Section 18.51 |
Benny Halevy3ef17282009-04-03 08:29:20 +0300132 | RELEASE_LOCKOWNER | MNI | | N/A |
133 | REMOVE | REQ | | Section 18.25 |
134 | RENAME | REQ | | Section 18.26 |
135 | RENEW | MNI | | N/A |
136 | RESTOREFH | REQ | | Section 18.27 |
137 | SAVEFH | REQ | | Section 18.28 |
138 | SECINFO | REQ | | Section 18.29 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400139I | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
Benny Halevy3ef17282009-04-03 08:29:20 +0300140 | | | layout (REQ) | Section 13.12 |
141I | SEQUENCE | REQ | | Section 18.46 |
142 | SETATTR | REQ | | Section 18.30 |
143 | SETCLIENTID | MNI | | N/A |
144 | SETCLIENTID_CONFIRM | MNI | | N/A |
145NS | SET_SSV | REQ | | Section 18.47 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400146I | TEST_STATEID | REQ | | Section 18.48 |
Benny Halevy3ef17282009-04-03 08:29:20 +0300147 | VERIFY | REQ | | Section 18.31 |
148NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
149 | WRITE | REQ | | Section 18.32 |
150
151Callback Operations
152
153 +-------------------------+-----------+-------------+---------------+
154 | Operation | REQ, REC, | Feature | Definition |
155 | | OPT, or | (REQ, REC, | |
156 | | MNI | or OPT) | |
157 +-------------------------+-----------+-------------+---------------+
158 | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
159P | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
160NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
161P | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
162NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
163NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
164 | CB_RECALL | OPT | FDELG, | Section 20.2 |
165 | | | DDELG, pNFS | |
166 | | | (REQ) | |
167NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
168 | | | DDELG, pNFS | |
169 | | | (REQ) | |
170NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
171NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
172 | | | (REQ) | |
173I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
174 | | | DDELG, pNFS | |
175 | | | (REQ) | |
176NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
177 | | | DDELG, pNFS | |
178 | | | (REQ) | |
179 +-------------------------+-----------+-------------+---------------+
180
181Implementation notes:
182
J. Bruce Fields285a0f02009-09-20 17:01:33 -0400183DELEGPURGE:
184* mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
185 CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
186 persist across client reboots). Thus we need not implement this for
187 now.
188
Benny Halevy3ef17282009-04-03 08:29:20 +0300189EXCHANGE_ID:
190* only SP4_NONE state protection supported
191* implementation ids are ignored
192
193CREATE_SESSION:
194* backchannel attributes are ignored
195* backchannel security parameters are ignored
196
197SEQUENCE:
198* no support for dynamic slot table renegotiation (optional)
199
Andy Adamsonddc04fd2009-09-23 21:32:21 -0400200Nonstandard compound limitations:
201* No support for a sessions fore channel RPC compound that requires both a
202 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
203 fail to live up to the promise we made in CREATE_SESSION fore channel
204 negotiation.
205* No more than one IO operation (read, write, readdir) allowed per
206 compound.
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400207
208See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.