Re: [nfsv4] proposed change to RFC-7862 to align Seek semantics with the extant client implementation

Rick Macklem <rmacklem@uoguelph.ca> Fri, 25 October 2019 01:05 UTC

Return-Path: <rmacklem@uoguelph.ca>
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 C50141200CE for <nfsv4@ietfa.amsl.com>; Thu, 24 Oct 2019 18:05:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 l-27EZWQbgIJ for <nfsv4@ietfa.amsl.com>; Thu, 24 Oct 2019 18:05:29 -0700 (PDT)
Received: from CAN01-TO1-obe.outbound.protection.outlook.com (mail-eopbgr670077.outbound.protection.outlook.com [40.107.67.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F217F120019 for <nfsv4@ietf.org>; Thu, 24 Oct 2019 18:05:28 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Yu+klUhTGdPIPDXqYI25Y1yXOIk/AgIERLomfDQJpAN6AblFaREBUyobK9fbWp0B0hoxCocs3USwfrZdUyvGeOTKrQ3J7N/8q1oiyNiz8zcH9rj5lMSkAXGbjcVFjxqtzv4J+hf/PYw8S9KRdFTG3e/jIv9/uKNXQW5eX7ZS+hndaikJv2fGU07X+YMsnctiJslsxiqFbNiFswXPxUQKk0E+xFkZTIzGx5328B2xlt/YN4imfOi/qYpZzsOHXoUhPV33mBKmdcEZcuzcXQmlmLjLZZnVkYB4xgvtdv15YYJ/2h+bHGkGB3QwUBX/zMYQszJ7DX8U8hVJUGI1pX999A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kiZmC3gTk72YS2EHzgx5YgNtyPALSRz6cNm4s1RqMFA=; b=mP5jMKwlkKPVG4FFq/9n9p2F6o8Gk3gTl0b6xtFny9f7dcQ8Ib2SirgekF0p7NxL8jl6fix02xtKuTD8CVURsH2U/jPyBUNqd0xSXfoBCkRLWM2hzCHeqYjzpHBLC0lah35EvMmBApJb/vF/np03Ymq7LRJG92fiUvyKwestpnlXiSsCW4xKdZL5oSHj10juf7E7Y00K705ewLI5Dn4kcexjIzgdBV7McoI9wKBI7VBcXt2t83FGdhatq7Bpl+JRZDY9ks0LZ1ZHikEb8e0FhZuOtKh/jMuQj9tDpdXD26Mdm6avrAb9dGz2bLa2jj+VCLMxVycZodeVOYNK/LAW4w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=uoguelph.ca; dmarc=pass action=none header.from=uoguelph.ca; dkim=pass header.d=uoguelph.ca; arc=none
Received: from YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM (10.255.13.156) by YTBPR01MB3871.CANPRD01.PROD.OUTLOOK.COM (10.255.47.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Fri, 25 Oct 2019 01:05:26 +0000
Received: from YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM ([fe80::45c3:a411:3ee8:a12e]) by YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM ([fe80::45c3:a411:3ee8:a12e%5]) with mapi id 15.20.2387.023; Fri, 25 Oct 2019 01:05:26 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: David Noveck <davenoveck@gmail.com>
CC: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] proposed change to RFC-7862 to align Seek semantics with the extant client implementation
Thread-Index: AQHVifLBojvU2Ysw7UC25ixhDIXAE6do3MQZgAE5hwCAAHLcpw==
Date: Fri, 25 Oct 2019 01:05:26 +0000
Message-ID: <YTBPR01MB2845136E10B963654EAFB24BDD650@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>
References: <YTBPR01MB2845F50A6915F026651447C4DD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM> <YTBPR01MB2845939A854D0C41816AB11CDD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>, <CADaq8jcvr2N=UH7wg-5CfFsbZipfNHi+vrERnyUq=JjHHe5Ngg@mail.gmail.com>
In-Reply-To: <CADaq8jcvr2N=UH7wg-5CfFsbZipfNHi+vrERnyUq=JjHHe5Ngg@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=rmacklem@uoguelph.ca;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: bd62953e-2f93-4e02-e59d-08d758e76be2
x-ms-traffictypediagnostic: YTBPR01MB3871:
x-ms-exchange-purlcount: 1
x-microsoft-antispam-prvs: <YTBPR01MB38716AFBE6B722FC0D7AB8C1DD650@YTBPR01MB3871.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 02015246A9
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(136003)(366004)(346002)(39860400002)(376002)(199004)(189003)(53546011)(478600001)(6506007)(186003)(76176011)(46003)(52536014)(6246003)(55016002)(6306002)(6436002)(9686003)(6916009)(71190400001)(316002)(1411001)(966005)(2906002)(4326008)(25786009)(786003)(102836004)(33656002)(81156014)(8936002)(486006)(8676002)(81166006)(256004)(14454004)(76116006)(446003)(99286004)(7696005)(476003)(5660300002)(86362001)(229853002)(66476007)(305945005)(11346002)(66556008)(64756008)(74316002)(66946007)(14444005)(66446008)(91956017)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTBPR01MB3871; H:YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: SIFSLemFGF5Skyi2gO2F2BEt0A7PHytDv6EqiCOSdzp1uGyVjzY/PwKzieUnTKy4L7L7sJPd7x5aeIIAONBE+2KtVRJCv/EacpHWGTpk6D80pzYU5DjBMyIIo2HxqpvupTC7hYdRQ+K3eKCNrcfCNsUjZcJK4UqVQzEtwPnC0p36MjWxXgnul26DNlZdgLPK9R9fWNXP1UofY4psZWS1cgz60W10XTGjwZxedaI2fZE5H2QY8lQjyWvIdWj1GUix81cbXJG0asGMvpDGgoswFrZLdlxqQ85Bve+X8FAn+bXmVB69yEdECQuHRQyMZCRONldW4xd9Wan/mKf8fYPMdVGMqF+YfWSyiccXgL9a2eNWG6Er3v+MBc5ZfzuCD3ZAoXnGmjLLHR545KaMk5P73PBTFnVVTti0qIeibbEhq1G7zapPUGUwlJfafTuRhKnH4OxtAGhuKxPowoAQKVMLgEqWbiV89ybMbXp6FMj+h1E=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: uoguelph.ca
X-MS-Exchange-CrossTenant-Network-Message-Id: bd62953e-2f93-4e02-e59d-08d758e76be2
X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2019 01:05:26.5946 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: VDcywwNtAMDBwJkduAOKz7vqX7rK++C1c88wzWQFSNnyrmK8VbbyLaSbualJmQuWRzSCVuJ+Ga51//4MwVOPzg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB3871
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/RR_V-Fy0svHiomzj6kOgxU-JdYc>
Subject: Re: [nfsv4] proposed change to RFC-7862 to align Seek semantics with the extant client implementation
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 25 Oct 2019 01:05:32 -0000

Ok, so how about this (using some of your words)?

Rationale:
At this time, the main and possibly only NFSv4.2 client that has shipped to
users expects a reply to Seek for the case of:
sa_offset: file_size
sa_what: NFS4_CONTENT_DATA

to be NFS4ERR_NXIO.

I propose that the following modification be made to RFC-7862 in order to
to change the defined server reply for the above case, so that future NFSv4.2
server implementations can interoperate with the extant Linux client implementation that is shipping to users.
This can be done without disruption since there
are no clients that expect the behaviour described in RFC-7862 at this time.

I suggest that the following lines (on page #91 in RFC-7862):
   From the given sa_offset, find the next data_content4 of type sa_what
   in the file.  If the server cannot find a corresponding sa_what, then
   the status will still be NFS4_OK, but sr_eof would be TRUE.  If the
   server can find the sa_what, then the sr_offset is the start of that
   content.  If the sa_offset is beyond the end of the file, then SEEK
   MUST return NFS4ERR_NXIO.

   All files MUST have a virtual hole at the end of the file.  That is,

be replaced with:
   From the given sa_offset, find the next data_content4 of type sa_what
   in the file.
   If the server can find the sa_what, then the sr_offset is the start of that
   content.  If the sa_offset is beyond the end of the file, or for
   NFS4_CONTENT_DATA at the end of file, then SEEK
   MUST return NFS4ERR_NXIO.

   For the purposes of dealing with SEEK, all files are considered to have a
    virtual hole at the end of the file.

   Therefore, for NFS4_CONTENT_HOLE, if the sa_offset is at the end of the
   file, this virtual hole will be found and a status of NFS4_OK with
   sr_eof set to TRUE will be returned.

rick

________________________________________
From: David Noveck <davenoveck@gmail.com>
Sent: Thursday, October 24, 2019 2:01 PM
To: Rick Macklem
Cc: nfsv4@ietf.org
Subject: Re: [nfsv4] proposed change to RFC-7862 to align Seek semantics with the extant client implementation



On Wed, Oct 23, 2019 at 7:25 PM Rick Macklem <rmacklem@uoguelph.ca<mailto:rmacklem@uoguelph.ca>> wrote:
A slight update of the Rationale...

Rationale:
At this time, the main and possibly only NFSv4.2 client that has shipped to
users expects a reply to Seek for the case of:
sa_offset: file_size
sa_what: NFS4_CONTENT_DATA

to be NFS4ERR_NXIO.

I understand that that is so.


However, RFC-7862 does not seem to clearly state that this is the correct
reply to a Seek with the above arguments..

In fact, it states that a different response is the correct one,.   I don't think there
is much point discussing the clarity (or not) of that text but there is no uncertainty
about what is is correct according to RFC7862.  As a result, the working group is
being asked to change the spec.   This can be done without disruption since there
are no clients that expect different behavior.
.
I believe the confusion stems from the fact that there is a virtual hole at
the end of the file, but not a virtual data area at the end of file.

I'm not sure what confusion you are referring to.

This sentence from page #91
   If the server cannot find a corresponding sa_what, then
   the status will still be NFS4_OK, but sr_eof would be TRUE.
makes sense for the case of NFS4_CONTENT_HOLE, since a virtual hole
exists at the end of the file.

It doesn't apply in that case.   Since there is a virtual hole at the end of the fiile,
one would always be able to find a corresponding sa_what.

However, it makes less sense to return
the above for the case of NFS4_CONTENT_DATA, since there is no virtual data
area at the end of file.

In which case there is no corresponding sa_what and the above statement " the status
will still be NFS4_OK, but sr_eof would be TRUE" applies.   That  make sense as written
although you (and probably the author of the Linux client support for this) might have
chosen something dIfferent.

I propose that the following change be made to RFC-7862 in order to
to clarify the use of the virtual hole and the correct server reply for the
above case, so that future NFSv4.2 server implementations can interoperate
with the extant Linux client implementation that is shipping to users.

This would provide better interoperation but don't think there is any clarification
provided by this.

I suggest that the following lines (on page #91 in RFC-7862):
   From the given sa_offset, find the next data_content4 of type sa_what
   in the file.  If the server cannot find a corresponding sa_what, then
   the status will still be NFS4_OK, but sr_eof would be TRUE.  If the
   server can find the sa_what, then the sr_offset is the start of that
   content.  If the sa_offset is beyond the end of the file, then SEEK
   MUST return NFS4ERR_NXIO.

   All files MUST have a virtual hole at the end of the file.  That is,

be replaced with:

   From the given sa_offset, find the next data_content4 of type sa_what
   in the file.
   If the server can find the sa_what, then the sr_offset is the start of that
   content.  If the sa_offset is beyond the end of the file, or for
   NFS4_CONTENT_DATA at the end of file, then SEEK
   MUST return NFS4ERR_NXIO.

This is a change rather than a clarification.


   All files MUST have a virtual hole at the end of the file.

The way this is stated  impies more than is probably intended.  For example, if you
do a read beyond EOF, you do not get zeroes from the virtual hole.

Would prefer something like:

    For the purposes of dealing with SEEK, all files are considred to have a virttual hole at
    the end of the file.

   Therefore, for NFS4_CONTENT_HOLE, if the sa_offset is at the end of the
   file, this virtual hole will be found and a status of NFS4_OK with
   sr_eof set to TRUE will be returned.
_______________________________________________
nfsv4 mailing list
nfsv4@ietf.org<mailto:nfsv4@ietf.org>
https://www.ietf.org/mailman/listinfo/nfsv4