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

Thomas Haynes <loghyr@primarydata.com> Tue, 22 August 2017 21:31 UTC

Return-Path: <loghyr@primarydata.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 30CCC132A75 for <nfsv4@ietfa.amsl.com>; Tue, 22 Aug 2017 14:31:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=primarydata.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GYBPj7J7xBzP for <nfsv4@ietfa.amsl.com>; Tue, 22 Aug 2017 14:31:20 -0700 (PDT)
Received: from us-smtp-delivery-194.mimecast.com (us-smtp-delivery-194.mimecast.com [216.205.24.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A6542132A6E for <nfsv4@ietf.org>; Tue, 22 Aug 2017 14:31:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=primarydata.com; s=mimecast20170802; t=1503437479; h=from:subject:date:message-id:to:cc:mime-version:content-type; bh=koC0jy8OHduqHhQKZlPO6JuCSId0mhPppXNhHqhxmok=; b=C9w9+EVGKlUSuAyEzIkxkFHjLhu996asB0jpoSfuG1tXlcm6e8yoaapFY2C/yKakNwYMlbVHdUIa3wVRMwJcyzzOx1ZfKgqGex9NhA7wEhoyhXonFmCcJshfAiMqEnuxdAIoF8G0L0b/CSl0OEOWRzvDGfZhLTgrg/pEGX+4iUg=
Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01lp0183.outbound.protection.outlook.com [216.32.181.183]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-185-NP3gnG1ONWGG81RXPCmlyw-1; Tue, 22 Aug 2017 17:31:15 -0400
Received: from BY2PR1101MB1093.namprd11.prod.outlook.com (10.164.166.21) by BY2PR1101MB1205.namprd11.prod.outlook.com (10.164.167.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1362.18; Tue, 22 Aug 2017 21:31:13 +0000
Received: from BY2PR1101MB1093.namprd11.prod.outlook.com ([10.164.166.21]) by BY2PR1101MB1093.namprd11.prod.outlook.com ([10.164.166.21]) with mapi id 15.01.1362.019; Tue, 22 Aug 2017 21:31:13 +0000
From: Thomas Haynes <loghyr@primarydata.com>
To: "manoj.naik@nutanix.com" <manoj.naik@nutanix.com>, Marc Eshel <eshel@us.ibm.com>
CC: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: draft-ietf-nfsv4-xattrs-06.txt
Thread-Index: AQHTG436ZXLJjbkg3kWfKYFo3kGJFg==
Date: Tue, 22 Aug 2017 21:31:12 +0000
Message-ID: <95760CCA-5DF3-4D24-8D82-3AB95242250F@primarydata.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [63.157.6.18]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BY2PR1101MB1205; 20:v+a6eFe8m0kpNgZYFbGZGrSQ2sRCGBOb+JmUvLAWlPkwA47ozpN+4J2jYBs2oOSKGAPQDVmvY2QFj6D7NyYXFZ2CymLiffxapFBfE0al4OWldLa8bgbiCw92CHK7L/DPp3ugYo06Z3VbTFRSo33nQsyIM8MTMKLPV+MYtXxxRJ0=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;
x-ms-office365-filtering-correlation-id: a3cebf63-ed4b-4c7b-6c42-08d4e9a51cef
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(2017082002075)(300000503095)(300135400095)(2017052603174)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR1101MB1205;
x-ms-traffictypediagnostic: BY2PR1101MB1205:
x-exchange-antispam-report-test: UriScan:(166708455590820);
x-microsoft-antispam-prvs: <BY2PR1101MB120528B89B5E50382C58B979CE840@BY2PR1101MB1205.namprd11.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6041248)(20161123558100)(20161123564025)(2016111802025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6043046)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR1101MB1205; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR1101MB1205;
x-forefront-prvs: 04073E895A
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39830400002)(189002)(199003)(6486002)(2906002)(4326008)(77096006)(53936002)(6116002)(102836003)(236005)(2501003)(6306002)(99286003)(54896002)(7736002)(606006)(230783001)(3660700001)(6512007)(3846002)(83716003)(97736004)(3280700002)(68736007)(4743002)(8936002)(54356999)(189998001)(25786009)(50986999)(33656002)(101416001)(81156014)(81166006)(966005)(478600001)(14454004)(86362001)(6436002)(8676002)(105586002)(106356001)(82746002)(2900100001)(8656003)(66066001)(6506006)(5660300001)(114624004)(36756003)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR1101MB1205; H:BY2PR1101MB1093.namprd11.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
MIME-Version: 1.0
X-OriginatorOrg: primarydata.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Aug 2017 21:31:12.8535 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 03193ed6-8726-4bb3-a832-18ab0d28adb7
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR1101MB1205
X-MC-Unique: NP3gnG1ONWGG81RXPCmlyw-1
Content-Type: multipart/alternative; boundary="_000_95760CCA5DF34D248D823AB95242250Fprimarydatacom_"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/j6SdIEReB1JFdPWxLdZIZKFucdQ>
Subject: [nfsv4] draft-ietf-nfsv4-xattrs-06.txt
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 22 Aug 2017 21:31:23 -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.