blob: 5920fe26e6ff5cb006372571b1f1da5a80cd526e [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
20on the latest NFSv4.1 Internet Draft:
21http://tools.ietf.org/html/draft-ietf-nfsv4-minorversion1-29
22
23From the many new features in NFSv4.1 the current implementation
24focuses on the mandatory-to-implement NFSv4.1 Sessions, providing
25"exactly once" semantics and better control and throttling of the
26resources allocated for each client.
27
28Other NFSv4.1 features, Parallel NFS operations in particular,
29are still under development out of tree.
30See http://wiki.linux-nfs.org/wiki/index.php/PNFS_prototype_design
31for more information.
32
J. Bruce Fields285a0f02009-09-20 17:01:33 -040033The current implementation is intended for developers only: while it
34does support ordinary file operations on clients we have tested against
35(including the linux client), it is incomplete in ways which may limit
36features unexpectedly, cause known bugs in rare cases, or cause
37interoperability problems with future clients. Known issues:
38
39 - gss support is questionable: currently mounts with kerberos
40 from a linux client are possible, but we aren't really
41 conformant with the spec (for example, we don't use kerberos
42 on the backchannel correctly).
43 - no trunking support: no clients currently take advantage of
44 trunking, but this is a mandatory failure, and its use is
45 recommended to clients in a number of places. (E.g. to ensure
46 timely renewal in case an existing connection's retry timeouts
47 have gotten too long; see section 8.3 of the draft.)
48 Therefore, lack of this feature may cause future clients to
49 fail.
50 - Incomplete backchannel support: incomplete backchannel gss
51 support and no support for BACKCHANNEL_CTL mean that
52 callbacks (hence delegations and layouts) may not be
53 available and clients confused by the incomplete
54 implementation may fail.
55 - Server reboot recovery is unsupported; if the server reboots,
56 clients may fail.
57 - We do not support SSV, which provides security for shared
58 client-server state (thus preventing unauthorized tampering
59 with locks and opens, for example). It is mandatory for
60 servers to support this, though no clients use it yet.
61 - Mandatory operations which we do not support, such as
62 DESTROY_CLIENTID, FREE_STATEID, SECINFO_NO_NAME, and
63 TEST_STATEID, are not currently used by clients, but will be
64 (and the spec recommends their uses in common cases), and
65 clients should not be expected to know how to recover from the
66 case where they are not supported. This will eventually cause
67 interoperability failures.
68
69In addition, some limitations are inherited from the current NFSv4
70implementation:
71
72 - Incomplete delegation enforcement: if a file is renamed or
73 unlinked, a client holding a delegation may continue to
74 indefinitely allow opens of the file under the old name.
75
Benny Halevy3ef17282009-04-03 08:29:20 +030076The table below, taken from the NFSv4.1 document, lists
77the operations that are mandatory to implement (REQ), optional
78(OPT), and NFSv4.0 operations that are required not to implement (MNI)
79in minor version 1. The first column indicates the operations that
80are not supported yet by the linux server implementation.
81
82The OPTIONAL features identified and their abbreviations are as follows:
83 pNFS Parallel NFS
84 FDELG File Delegations
85 DDELG Directory Delegations
86
87The following abbreviations indicate the linux server implementation status.
88 I Implemented NFSv4.1 operations.
89 NS Not Supported.
90 NS* unimplemented optional feature.
91 P pNFS features implemented out of tree.
92 PNS pNFS features that are not supported yet (out of tree).
93
94Operations
95
96 +----------------------+------------+--------------+----------------+
97 | Operation | REQ, REC, | Feature | Definition |
98 | | OPT, or | (REQ, REC, | |
99 | | MNI | or OPT) | |
100 +----------------------+------------+--------------+----------------+
101 | ACCESS | REQ | | Section 18.1 |
102NS | BACKCHANNEL_CTL | REQ | | Section 18.33 |
103NS | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
104 | CLOSE | REQ | | Section 18.2 |
105 | COMMIT | REQ | | Section 18.3 |
106 | CREATE | REQ | | Section 18.4 |
107I | CREATE_SESSION | REQ | | Section 18.36 |
108NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
109 | DELEGRETURN | OPT | FDELG, | Section 18.6 |
110 | | | DDELG, pNFS | |
111 | | | (REQ) | |
112NS | DESTROY_CLIENTID | REQ | | Section 18.50 |
113I | DESTROY_SESSION | REQ | | Section 18.37 |
114I | EXCHANGE_ID | REQ | | Section 18.35 |
115NS | FREE_STATEID | REQ | | Section 18.38 |
116 | GETATTR | REQ | | Section 18.7 |
117P | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
118P | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
119 | GETFH | REQ | | Section 18.8 |
120NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
121P | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
122P | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
123P | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
124 | LINK | OPT | | Section 18.9 |
125 | LOCK | REQ | | Section 18.10 |
126 | LOCKT | REQ | | Section 18.11 |
127 | LOCKU | REQ | | Section 18.12 |
128 | LOOKUP | REQ | | Section 18.13 |
129 | LOOKUPP | REQ | | Section 18.14 |
130 | NVERIFY | REQ | | Section 18.15 |
131 | OPEN | REQ | | Section 18.16 |
132NS*| OPENATTR | OPT | | Section 18.17 |
133 | OPEN_CONFIRM | MNI | | N/A |
134 | OPEN_DOWNGRADE | REQ | | Section 18.18 |
135 | PUTFH | REQ | | Section 18.19 |
136 | PUTPUBFH | REQ | | Section 18.20 |
137 | PUTROOTFH | REQ | | Section 18.21 |
138 | READ | REQ | | Section 18.22 |
139 | READDIR | REQ | | Section 18.23 |
140 | READLINK | OPT | | Section 18.24 |
141NS | RECLAIM_COMPLETE | REQ | | Section 18.51 |
142 | RELEASE_LOCKOWNER | MNI | | N/A |
143 | REMOVE | REQ | | Section 18.25 |
144 | RENAME | REQ | | Section 18.26 |
145 | RENEW | MNI | | N/A |
146 | RESTOREFH | REQ | | Section 18.27 |
147 | SAVEFH | REQ | | Section 18.28 |
148 | SECINFO | REQ | | Section 18.29 |
149NS | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
150 | | | layout (REQ) | Section 13.12 |
151I | SEQUENCE | REQ | | Section 18.46 |
152 | SETATTR | REQ | | Section 18.30 |
153 | SETCLIENTID | MNI | | N/A |
154 | SETCLIENTID_CONFIRM | MNI | | N/A |
155NS | SET_SSV | REQ | | Section 18.47 |
156NS | TEST_STATEID | REQ | | Section 18.48 |
157 | VERIFY | REQ | | Section 18.31 |
158NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
159 | WRITE | REQ | | Section 18.32 |
160
161Callback Operations
162
163 +-------------------------+-----------+-------------+---------------+
164 | Operation | REQ, REC, | Feature | Definition |
165 | | OPT, or | (REQ, REC, | |
166 | | MNI | or OPT) | |
167 +-------------------------+-----------+-------------+---------------+
168 | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
169P | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
170NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
171P | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
172NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
173NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
174 | CB_RECALL | OPT | FDELG, | Section 20.2 |
175 | | | DDELG, pNFS | |
176 | | | (REQ) | |
177NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
178 | | | DDELG, pNFS | |
179 | | | (REQ) | |
180NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
181NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
182 | | | (REQ) | |
183I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
184 | | | DDELG, pNFS | |
185 | | | (REQ) | |
186NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
187 | | | DDELG, pNFS | |
188 | | | (REQ) | |
189 +-------------------------+-----------+-------------+---------------+
190
191Implementation notes:
192
J. Bruce Fields285a0f02009-09-20 17:01:33 -0400193DELEGPURGE:
194* mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
195 CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
196 persist across client reboots). Thus we need not implement this for
197 now.
198
Benny Halevy3ef17282009-04-03 08:29:20 +0300199EXCHANGE_ID:
200* only SP4_NONE state protection supported
201* implementation ids are ignored
202
203CREATE_SESSION:
204* backchannel attributes are ignored
205* backchannel security parameters are ignored
206
207SEQUENCE:
208* no support for dynamic slot table renegotiation (optional)
209
210nfsv4.1 COMPOUND rules:
211The following cases aren't supported yet:
212* Enforcing of NFS4ERR_NOT_ONLY_OP for: BIND_CONN_TO_SESSION, CREATE_SESSION,
213 DESTROY_CLIENTID, DESTROY_SESSION, EXCHANGE_ID.
214* DESTROY_SESSION MUST be the final operation in the COMPOUND request.
215