nfs41-server.rst 22 KB

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