blob: b930ad08778000e43fd27c605fb50bd0f9d03d41 [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
J. Bruce Fields4bd8eab2013-11-19 09:50:48 -05008Currently, server support for minorversion 1 is enabled by default.
9It can be disabled at run time by writing the string "-4.1" to
Benny Halevy3ef17282009-04-03 08:29:20 +030010the /proc/fs/nfsd/versions control file. Note that to write this
J. Bruce Fields4bd8eab2013-11-19 09:50:48 -050011control file, the nfsd service must be taken down. You can use rpc.nfsd
12for this; see rpc.nfsd(8).
Benny Halevy3ef17282009-04-03 08:29:20 +030013
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
32The table below, taken from the NFSv4.1 document, lists
33the operations that are mandatory to implement (REQ), optional
34(OPT), and NFSv4.0 operations that are required not to implement (MNI)
35in minor version 1. The first column indicates the operations that
36are not supported yet by the linux server implementation.
37
38The OPTIONAL features identified and their abbreviations are as follows:
39 pNFS Parallel NFS
40 FDELG File Delegations
41 DDELG Directory Delegations
42
43The following abbreviations indicate the linux server implementation status.
44 I Implemented NFSv4.1 operations.
45 NS Not Supported.
46 NS* unimplemented optional feature.
47 P pNFS features implemented out of tree.
48 PNS pNFS features that are not supported yet (out of tree).
49
50Operations
51
52 +----------------------+------------+--------------+----------------+
53 | Operation | REQ, REC, | Feature | Definition |
54 | | OPT, or | (REQ, REC, | |
55 | | MNI | or OPT) | |
56 +----------------------+------------+--------------+----------------+
57 | ACCESS | REQ | | Section 18.1 |
J. Bruce Fieldscb73a9f2012-11-01 18:09:48 -040058I | BACKCHANNEL_CTL | REQ | | Section 18.33 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -040059I | BIND_CONN_TO_SESSION | REQ | | Section 18.34 |
Benny Halevy3ef17282009-04-03 08:29:20 +030060 | CLOSE | REQ | | Section 18.2 |
61 | COMMIT | REQ | | Section 18.3 |
62 | CREATE | REQ | | Section 18.4 |
63I | CREATE_SESSION | REQ | | Section 18.36 |
64NS*| DELEGPURGE | OPT | FDELG (REQ) | Section 18.5 |
65 | DELEGRETURN | OPT | FDELG, | Section 18.6 |
66 | | | DDELG, pNFS | |
67 | | | (REQ) | |
J. Bruce Fields292a4172012-11-07 19:41:51 -050068I | DESTROY_CLIENTID | REQ | | Section 18.50 |
Benny Halevy3ef17282009-04-03 08:29:20 +030069I | DESTROY_SESSION | REQ | | Section 18.37 |
70I | EXCHANGE_ID | REQ | | Section 18.35 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -040071I | FREE_STATEID | REQ | | Section 18.38 |
Benny Halevy3ef17282009-04-03 08:29:20 +030072 | GETATTR | REQ | | Section 18.7 |
73P | GETDEVICEINFO | OPT | pNFS (REQ) | Section 18.40 |
74P | GETDEVICELIST | OPT | pNFS (OPT) | Section 18.41 |
75 | GETFH | REQ | | Section 18.8 |
76NS*| GET_DIR_DELEGATION | OPT | DDELG (REQ) | Section 18.39 |
77P | LAYOUTCOMMIT | OPT | pNFS (REQ) | Section 18.42 |
78P | LAYOUTGET | OPT | pNFS (REQ) | Section 18.43 |
79P | LAYOUTRETURN | OPT | pNFS (REQ) | Section 18.44 |
80 | LINK | OPT | | Section 18.9 |
81 | LOCK | REQ | | Section 18.10 |
82 | LOCKT | REQ | | Section 18.11 |
83 | LOCKU | REQ | | Section 18.12 |
84 | LOOKUP | REQ | | Section 18.13 |
85 | LOOKUPP | REQ | | Section 18.14 |
86 | NVERIFY | REQ | | Section 18.15 |
87 | OPEN | REQ | | Section 18.16 |
88NS*| OPENATTR | OPT | | Section 18.17 |
89 | OPEN_CONFIRM | MNI | | N/A |
90 | OPEN_DOWNGRADE | REQ | | Section 18.18 |
91 | PUTFH | REQ | | Section 18.19 |
92 | PUTPUBFH | REQ | | Section 18.20 |
93 | PUTROOTFH | REQ | | Section 18.21 |
94 | READ | REQ | | Section 18.22 |
95 | READDIR | REQ | | Section 18.23 |
96 | READLINK | OPT | | Section 18.24 |
J. Bruce Fields4dc6ec02010-04-19 15:11:28 -040097 | RECLAIM_COMPLETE | REQ | | Section 18.51 |
Benny Halevy3ef17282009-04-03 08:29:20 +030098 | RELEASE_LOCKOWNER | MNI | | N/A |
99 | REMOVE | REQ | | Section 18.25 |
100 | RENAME | REQ | | Section 18.26 |
101 | RENEW | MNI | | N/A |
102 | RESTOREFH | REQ | | Section 18.27 |
103 | SAVEFH | REQ | | Section 18.28 |
104 | SECINFO | REQ | | Section 18.29 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400105I | SECINFO_NO_NAME | REC | pNFS files | Section 18.45, |
Benny Halevy3ef17282009-04-03 08:29:20 +0300106 | | | layout (REQ) | Section 13.12 |
107I | SEQUENCE | REQ | | Section 18.46 |
108 | SETATTR | REQ | | Section 18.30 |
109 | SETCLIENTID | MNI | | N/A |
110 | SETCLIENTID_CONFIRM | MNI | | N/A |
111NS | SET_SSV | REQ | | Section 18.47 |
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400112I | TEST_STATEID | REQ | | Section 18.48 |
Benny Halevy3ef17282009-04-03 08:29:20 +0300113 | VERIFY | REQ | | Section 18.31 |
114NS*| WANT_DELEGATION | OPT | FDELG (OPT) | Section 18.49 |
115 | WRITE | REQ | | Section 18.32 |
116
117Callback Operations
118
119 +-------------------------+-----------+-------------+---------------+
120 | Operation | REQ, REC, | Feature | Definition |
121 | | OPT, or | (REQ, REC, | |
122 | | MNI | or OPT) | |
123 +-------------------------+-----------+-------------+---------------+
124 | CB_GETATTR | OPT | FDELG (REQ) | Section 20.1 |
125P | CB_LAYOUTRECALL | OPT | pNFS (REQ) | Section 20.3 |
126NS*| CB_NOTIFY | OPT | DDELG (REQ) | Section 20.4 |
127P | CB_NOTIFY_DEVICEID | OPT | pNFS (OPT) | Section 20.12 |
128NS*| CB_NOTIFY_LOCK | OPT | | Section 20.11 |
129NS*| CB_PUSH_DELEG | OPT | FDELG (OPT) | Section 20.5 |
130 | CB_RECALL | OPT | FDELG, | Section 20.2 |
131 | | | DDELG, pNFS | |
132 | | | (REQ) | |
133NS*| CB_RECALL_ANY | OPT | FDELG, | Section 20.6 |
134 | | | DDELG, pNFS | |
135 | | | (REQ) | |
136NS | CB_RECALL_SLOT | REQ | | Section 20.8 |
137NS*| CB_RECALLABLE_OBJ_AVAIL | OPT | DDELG, pNFS | Section 20.7 |
138 | | | (REQ) | |
139I | CB_SEQUENCE | OPT | FDELG, | Section 20.9 |
140 | | | DDELG, pNFS | |
141 | | | (REQ) | |
142NS*| CB_WANTS_CANCELLED | OPT | FDELG, | Section 20.10 |
143 | | | DDELG, pNFS | |
144 | | | (REQ) | |
145 +-------------------------+-----------+-------------+---------------+
146
147Implementation notes:
148
J. Bruce Fields4bd8eab2013-11-19 09:50:48 -0500149SSV:
150* The spec claims this is mandatory, but we don't actually know of any
151 implementations, so we're ignoring it for now. The server returns
152 NFS4ERR_ENCR_ALG_UNSUPP on EXCHANGE_ID, which should be future-proof.
153
154GSS on the backchannel:
155* Again, theoretically required but not widely implemented (in
156 particular, the current Linux client doesn't request it). We return
157 NFS4ERR_ENCR_ALG_UNSUPP on CREATE_SESSION.
158
J. Bruce Fields285a0f02009-09-20 17:01:33 -0400159DELEGPURGE:
160* mandatory only for servers that support CLAIM_DELEGATE_PREV and/or
161 CLAIM_DELEG_PREV_FH (which allows clients to keep delegations that
162 persist across client reboots). Thus we need not implement this for
163 now.
164
Benny Halevy3ef17282009-04-03 08:29:20 +0300165EXCHANGE_ID:
Benny Halevy3ef17282009-04-03 08:29:20 +0300166* implementation ids are ignored
167
168CREATE_SESSION:
169* backchannel attributes are ignored
Benny Halevy3ef17282009-04-03 08:29:20 +0300170
171SEQUENCE:
172* no support for dynamic slot table renegotiation (optional)
173
Andy Adamsonddc04fd2009-09-23 21:32:21 -0400174Nonstandard compound limitations:
175* No support for a sessions fore channel RPC compound that requires both a
176 ca_maxrequestsize request and a ca_maxresponsesize reply, so we may
177 fail to live up to the promise we made in CREATE_SESSION fore channel
178 negotiation.
J. Bruce Fieldsffe11372012-11-15 14:52:19 -0500179* No more than one read-like operation allowed per compound; encoding
180 replies that cross page boundaries (except for read data) not handled.
J. Bruce Fieldsc46556c2011-07-18 18:40:21 -0400181
182See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues.