Subject: [nfsv4] [PATCH, NFSv4.2] move GETDEVICELIST to MUST NOT implement

From: Christoph Hellwig <[email-masked]>
Date: Mon, 8 Sep 2014 01:56:17 +0200

---
 Makefile                               |  1 +
 nfsv42_middle_errors.xml               | 19 +---------------
 nfsv42_middle_mod_op_getdevicelist.xml | 41 ++++++++++++++++++++++++++++++++++
 nfsv42_middle_op_mandlist.xml          |  2 +-
 4 files changed, 44 insertions(+), 19 deletions(-)
 create mode 100644 nfsv42_middle_mod_op_getdevicelist.xml

diff --git a/Makefile b/Makefile
index 6d68529..ab6760b 100755
--- a/Makefile
+++ b/Makefile
@@ -446,6 +446,7 @@ IDXMLSRC_BASE = \
 	${DOC_PREFIX}_middle_op_mandlist.xml \
 	${DOC_PREFIX}_middle_mod_op_start.xml \
 	${DOC_PREFIX}_middle_mod_op_exchange_id.xml \
+	${DOC_PREFIX}_middle_mod_op_getdevicelist.xml \
 	${DOC_PREFIX}_middle_mod_op_end.xml \
 	${DOC_PREFIX}_middle_op_start.xml \
 	${DOC_PREFIX}_middle_op_allocate.xml \
diff --git a/nfsv42_middle_errors.xml b/nfsv42_middle_errors.xml
index ef7a5f9..72893d4 100644
--- a/nfsv42_middle_errors.xml
+++ b/nfsv42_middle_errors.xml
@@ -1813,24 +1813,7 @@
 
       <c>GETDEVICELIST</c>
       <c>
-        NFS4ERR_BADXDR,
-        NFS4ERR_BAD_COOKIE,
-        NFS4ERR_DEADSESSION,
-        NFS4ERR_DELAY,
-        NFS4ERR_FHEXPIRED,
-        NFS4ERR_INVAL,
-        NFS4ERR_IO,
-        NFS4ERR_NOFILEHANDLE,
-        NFS4ERR_NOTSUPP,
-        NFS4ERR_NOT_SAME,
-        NFS4ERR_OP_NOT_IN_SESSION,
-        NFS4ERR_REP_TOO_BIG,
-        NFS4ERR_REP_TOO_BIG_TO_CACHE,
-        NFS4ERR_REQ_TOO_BIG,
-        NFS4ERR_RETRY_UNCACHED_REP,
-        NFS4ERR_SERVERFAULT,
-        NFS4ERR_TOO_MANY_OPS,
-        NFS4ERR_UNKNOWN_LAYOUTTYPE
+        NFS4ERR_NOTSUPP
       </c>
 
       <c>GETFH</c>
diff --git a/nfsv42_middle_mod_op_getdevicelist.xml b/nfsv42_middle_mod_op_getdevicelist.xml
new file mode 100644
index 0000000..39b7cc7
--- /dev/null
+++ b/nfsv42_middle_mod_op_getdevicelist.xml
@@ -0,0 +1,41 @@
+<!-- Copyright (C) The IETF Trust (2011) -->
+<!-- Copyright (C) The Internet Society (2011) -->
+
+<section title='Operation 48: GETDEVICELIST - Get All Device Mappings for a File System'>
+  <section toc='exclude' title="ARGUMENT">
+    <figure>
+      <artwork>
+   Unchanged
+      </artwork>
+    </figure>
+  </section>
+
+  <section toc='exclude' title="RESULT">
+    <figure>
+      <artwork>
+   Unchanged
+      </artwork>
+    </figure>
+  </section>
+
+  <section toc='exclude' title='MOTIVATION'>
+    <t>
+       The GETDEVICELIST operation was introduced in <xref target='RFC5661' />
+       specificly to request a list of devices at filesystem mount time from
+       block layout type servers.  However use of the GETDEVICELIST operation
+       introduces a race condition vs notification about changes to pNFS
+       device IDs as provided by CB_NOTIFY_DEVICEID.
+       Furthermore there is no actual need for GETDEVICELIST to implement
+       a fully working block layout server, and clients have to be able
+       to request new devices ues GETDEVICEINFO at any time in response
+       to a new deviceid in LAYOUTGET results, or in response to the
+       CB_NOTIFY_DEVICEID callback operation anyway.
+    </t>
+  </section>
+
+  <section toc='exclude' title='DESCRIPTION'>
+    <t>
+      Clients and servers MUST NOT implement the GETDEVICELIST operation.
+    </t>
+  </section>
+</section>
diff --git a/nfsv42_middle_op_mandlist.xml b/nfsv42_middle_op_mandlist.xml
index 8664f06..0786545 100644
--- a/nfsv42_middle_op_mandlist.xml
+++ b/nfsv42_middle_op_mandlist.xml
@@ -135,7 +135,7 @@
       <c>FREE_STATEID         </c> <c> REQ </c> <c>              </c>
       <c>GETATTR              </c> <c> REQ </c> <c>              </c>
       <c>GETDEVICEINFO        </c> <c> OPT </c> <c> pNFS (REQ)   </c>
-      <c>GETDEVICELIST        </c> <c> OPT </c> <c> pNFS (OPT)   </c>
+      <c>GETDEVICELIST        </c> <c> MNI </c> <c> pNFS (MNI)   </c>
       <c>GETFH                </c> <c> REQ </c> <c>              </c>
       <c>GET_DIR_DELEGATION   </c> <c> OPT </c> <c> DDELG (REQ)  </c>
       <c>LAYOUTCOMMIT         </c> <c> OPT </c> <c> pNFS (REQ)   </c>
-- 
1.9.1