Subject: [nfsv4] more COPY fixes

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2015 09:37:13 +0100

A lot of fallout from others reviewing the text in COPY by proxy of
copying it into my CLONE proposal.

---

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2015 09:37:26 +0100

Signed-off-by: Christoph Hellwig <[email-masked]>
---
 nfsv42_middle_op_copy.xml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/nfsv42_middle_op_copy.xml b/nfsv42_middle_op_copy.xml
index 057201a..bcaf752 100644
--- a/nfsv42_middle_op_copy.xml
+++ b/nfsv42_middle_op_copy.xml
@@ -37,9 +37,9 @@
     </t>
 
     <t>
-      Both SAVED_FH and CURRENT_FH must be regular files. If neither SAVED_FH nor
-      CURRENT_FH are regular files, the operation MUST fail and
-      return NFS4ERR_WRONG_TYPE.
+      Both SAVED_FH and CURRENT_FH must be regular files. If either
+      SAVED_FH or CURRENT_FH are not regular files, the operation
+      MUST fail and return NFS4ERR_WRONG_TYPE.
     </t>
 
     <t>
-- 
1.9.1

---

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2015 09:37:53 +0100

Signed-off-by: Christoph Hellwig <[email-masked]>
---
 nfsv42_middle_op_copy.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/nfsv42_middle_op_copy.xml b/nfsv42_middle_op_copy.xml
index e81bef5..ef7d4a9 100644
--- a/nfsv42_middle_op_copy.xml
+++ b/nfsv42_middle_op_copy.xml
@@ -43,6 +43,12 @@
     </t>
 
     <t>
+      SAVED_FH and CURRENT_FH must be differet files.  If SAVED_FH and
+      CURRENT_FH point to the same file, the operation will fail with
+      with NFS4ERR_INVAL.
+    </t>
+
+    <t>
       In order to set SAVED_FH to the source file handle, the
       compound procedure requesting the COPY will include a
       sub-sequence of operations such as
-- 
1.9.1

---

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2015 09:38:05 +0100

Signed-off-by: Christoph Hellwig <[email-masked]>
---
 nfsv42_middle_op_copy.xml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/nfsv42_middle_op_copy.xml b/nfsv42_middle_op_copy.xml
index ef7d4a9..fffa21a 100644
--- a/nfsv42_middle_op_copy.xml
+++ b/nfsv42_middle_op_copy.xml
@@ -82,15 +82,15 @@
     </t>
 
     <t>
-      The ca_dst_stateid MUST refer to either delegation, locking,
-      or open states provided earlier by the server (see
-      <xref target="ss:copy:lock" />). The order of selection is
-      explained in Section 8.2.5 of <xref target='RFC5661' />.
+      The ca_dst_stateid MUST refer to a stateid that is valid for
+      a WRITE operation and follows the rules for stateids in
+      Sections 8.2.5 and 18.32.3 of <xref target='RFC5661' />.
       For an inter-server copy, the ca_src_stateid MUST be the
       cnr_stateid returned from the earlier COPY_NOTIFY operation,
-      while for an intra-server copy ca_src_stateid MUST also
-      refer to either delegation, locking, or open states provided
-      earlier by the server. If either stateid is invalid, then the
+      while for an intra-server copy ca_src_stateid MUST refer to a
+      stateid that is valid for a READ operations and follows the rules
+      for stateids in Sections 8.2.5 and 18.22.3 of
+      <xref target='RFC5661' />. If either stateid is invalid, then the
       operation MUST fail.
     </t>
 
-- 
1.9.1

---

From: Benny Halevy <[email-masked]>
Date: Thu, 26 Mar 2015 11:17:33 +0200

> +++ b/nfsv42_middle_op_copy.xml

"refer" would be a better choice than "point" in my opinion.

Benny

---

From: Christoph Hellwig <[email-masked]>
Date: Thu, 26 Mar 2015 10:40:50 +0100

> "refer" would be a better choice than "point" in my opinion.

Fine with me.