Subject: [nfsv4] draft-ietf-nfsv4-xattrs-06.txt

From: Thomas Haynes <[email-masked]>
Date: Tue, 22 Aug 2017 21:31:12 +0000

Hi Manoj and Marc,

In your draft, to get the XDR to compile, please change this:

1)
8.3.  New Error Definitions

   <CODE BEGINS>

   /// /* Following lines are to be added to enum nfsstat4 */
   /// /*
   ///  NFS4ERR_NOXATTR        = 10095 /* xattr does not exist    */
   ///  NFS4ERR_XATTR2BIG      = 10096 /* xattr value is too big  */
   /// */

To

8.3.  New Error Definitions

   <CODE BEGINS>

   /// /* Following lines are to be added to enum nfsstat4 */
   /// /*
   ///  NFS4ERR_NOXATTR        = 10095, /* xattr does not exist    */
   ///  NFS4ERR_XATTR2BIG      = 10096 /* xattr value is too big  */
   /// */

2) And this

   /// enum setxattr_option4 {
   ///         SETXATTR4_EITHER      = 0,
   ///         SETXATTR4_CREATE      = 1,
   ///         SETXATTR4_REPLACE     = 2,
   /// };

to this:

   /// enum setxattr_option4 {
   ///         SETXATTR4_EITHER      = 0,
   ///         SETXATTR4_CREATE      = 1,
   ///         SETXATTR4_REPLACE     = 2
   /// };

3) And this:

8.4.2.2.  RESULTS

   <CODE BEGINS>

   /// struct SETXATTR4res switch (nfsstat4 sxr_status) {
   ///  case NFS4_OK:
   ///         change_info4      sxr_info;
   ///  default:
   ///         void;
   /// };

   <CODE ENDS>

to this:

8.4.2.2.  RESULTS

   <CODE BEGINS>

   /// union SETXATTR4res switch (nfsstat4 sxr_status) {
   ///  case NFS4_OK:
   ///         change_info4      sxr_info;
   ///  default:
   ///         void;
   /// };

   <CODE ENDS>

4) And this:

8.4.4.2.  RESULTS

   <CODE BEGINS>

   /// struct REMOVEXATTR4res switch (nfsstat4 rxr_status) {
   ///  case NFS4_OK:
   ///         change_info4      rxr_info;
   ///  default:
   ///         void;
   /// };

to this

8.4.4.2.  RESULTS

   <CODE BEGINS>

   /// union REMOVEXATTR4res switch (nfsstat4 rxr_status) {
   ///  case NFS4_OK:
   ///         change_info4      rxr_info;
   ///  default:
   ///         void;
   /// };

5) You are also missing the following:

/* Please add to nfs_argop4 */

 /* Operations for xattr */
 case OP_GETXATTR:      GETXATTR4args opgetxattr;
 case OP_SETXATTR:      SETXATTR4args opsetxattr;
 case OP_LISTXATTRS:    LISTXATTRS4args oplistxattrs;
 case OP_REMOVEXATTR:   REMOVEXATTR4args opremovexattr;

and
/* Please add to nfs_resop4 */
 /* Operations for xattr */
 case OP_GETXATTR:      GETXATTR4res opgetxattr;
 case OP_SETXATTR:      SETXATTR4res opsetxattr;
 case OP_LISTXATTRS:    LISTXATTRS4res oplistxattrs;
 case OP_REMOVEXATTR:   REMOVEXATTR4res opremovexattr;

Thanks,
Tom

PS: I’ve applied these fixes and the XDR for umask to this git repo: https://github.com/loghyr/nfsv42_xdr/blob/master/nfs42_xdr.x
It will compile with rpcgen and gcc.

---

From: Thomas Haynes <[email-masked]>
Date: Tue, 22 Aug 2017 22:29:46 +0000

Hi Manoj and Marc,

According to table in Section 8.4.5, neither NFS4ERR_NOXATTR nor NFS4ERR_XATTR2BIG
can be returned for any of the new operations. In short, they are not allowed error values for
any operator.

I think NFS4ERR_NOXATTR applies to each of OP_GETXATTR, OP_SETXATTR,
OP_LISTXATTRS, and OP_REMOVEXATTR.

And also, NFS4ERR_XATTR2BIG only applies to OP_SETXATTR.

Please clarify these in your draft.

Thanks,
Tom

---

From: Manoj Naik <[email-masked]>
Date: Wed, 23 Aug 2017 06:59:08 +0000

Hi Tom,

Thanks for catching this. Applied in https://www.ietf.org/id/draft-ietf-nfsv4-xattrs-07.txt

Manoj.

On 8/22/17, 3:29 PM, "Thomas Haynes" <[email-masked]> wrote:

    Hi Manoj and Marc,

    

    Thanks,
    Tom