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

Rick Macklem <rmacklem@uoguelph.ca> Wed, 23 October 2019 23:25 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 DE3B9120096 for <nfsv4@ietfa.amsl.com>; Wed, 23 Oct 2019 16:25:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-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 5nseNee2bgTw for <nfsv4@ietfa.amsl.com>; Wed, 23 Oct 2019 16:25:12 -0700 (PDT)
Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660075.outbound.protection.outlook.com [40.107.66.75]) (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 08F4512001A for <nfsv4@ietf.org>; Wed, 23 Oct 2019 16:25:12 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a4IvbLbPNj4B58Uh7LZuawZ4C1p4KeBL+kcFT0bFeiWElzfnLr8Fj8xJAveuMc43nMHRINJqMS0DQKmnEmHOB8KM/0t8Hsg3J7Dh938i0XeXI/MFZzcdl8Od8icNe8bEsLEMtWgClfQ5i16vAoy/gEQMqOIQjz8NwcdJpsZ6cerVi/L3uZMtmlz5bOY0ScUDoaF4/V/R8QwwulvmAMcnZ323xXZkgPFJujVbtDJwbPMeEfQmJrsyL+JF7fScFeVHtnrU1WzpF6Jym98lEGQsvIREcrOOckuMLOHFUXz52yfPd2pnar92C1eqTg6kZe7pVCZOy/2xEFDNyWwaEbj8gg==
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=HG0JmeUs72uliyxERKBNLucc/6Yx0IAyAPl/QjD8QNM=; b=URy0merFAI7i94liLfOm2EYJQlD5Il/JbdZKFLqHYEj7eMVAZG1OUDshMvalrcOFbsQWNK98BnjGX9c0AocsyFS0pCFIqTz1ofeJBMdjozZvp9XrBBe92ujrTU8BqZ43gr4ATa9tj5GIUfQusJApOaMqDT0sDLJp/j2Wx/FP/3y0X49eZtg9KIthJNCL9ks/F8C9aiL3VB4HiPhc1cNyUHOgwoFZSaqG9z73t+77hmwles0MVM8e0pFrI6JvnyOqDE6docqNJJqpLW2BzcmSqFFZElweTYanJW1BEzLlpMoJFAGMGigxLvYDwWvmiJeBi+VLKeOFF0HorXZh4L0a3w==
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 YTBPR01MB3822.CANPRD01.PROD.OUTLOOK.COM (10.255.46.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2387.22; Wed, 23 Oct 2019 23:25:10 +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.2347.030; Wed, 23 Oct 2019 23:25:10 +0000
From: Rick Macklem <rmacklem@uoguelph.ca>
To: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: proposed change to RFC-7862 to align Seek semantics with the extant client implementation
Thread-Index: AQHVifLBojvU2Ysw7UC25ixhDIXAE6do3MQZ
Date: Wed, 23 Oct 2019 23:25:10 +0000
Message-ID: <YTBPR01MB2845939A854D0C41816AB11CDD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>
References: <YTBPR01MB2845F50A6915F026651447C4DD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YTBPR01MB2845F50A6915F026651447C4DD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.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: 16dc0ed7-f712-43fd-f4bc-08d758103f5d
x-ms-traffictypediagnostic: YTBPR01MB3822:
x-microsoft-antispam-prvs: <YTBPR01MB38229FE922AD91562DC67960DD6B0@YTBPR01MB3822.CANPRD01.PROD.OUTLOOK.COM>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 019919A9E4
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(39860400002)(396003)(136003)(189003)(199004)(2351001)(25786009)(33656002)(6246003)(86362001)(486006)(55016002)(8936002)(74316002)(81156014)(305945005)(9686003)(46003)(316002)(6916009)(14454004)(2940100002)(478600001)(14444005)(256004)(2906002)(2501003)(786003)(229853002)(186003)(6436002)(5640700003)(76176011)(52536014)(66476007)(91956017)(76116006)(66946007)(476003)(66446008)(64756008)(66556008)(5660300002)(81166006)(11346002)(7696005)(446003)(99286004)(71190400001)(102836004)(6506007)(8676002)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:YTBPR01MB3822; H:YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: HNjU2cQF6b+vjwNEMErWRXBH/2rQ88vLty+LOx5d5yO5FMAM9J/HvDL4cUXWjtKaQJ+EoQM+jn/3lTKS4sflkvr9yAsmHE1/khzra0X0xpMv/oUVbpcwGarPs5xb1+90jN5Zb1QSpZXFm4lOc1EvRD7E6AzqOEwITysSjUtSDCL38Ba/9Oqn3d0Q9ZSfYtD37Hx5cAM5BWkJO2Ynf5TBSdhm2mNqnfrJ7BJ8mP7ylqKvf4C7a1KjLwBIRb9MXxOhP9e0kSmCGdy1itfDfF86s4Ck3hhY2qr7lUPWGwKldNSwTd5tzArKW2b558lTXltqV4cVxJCftvXyxGnowa6yHgUICJTMZkSCAacAib6J7epoJt2HAoukGFv+9RiC6dHoA3hvfhQCR8iDQlTn1taTkVuzBnQ+NzC6cLL0RumENEoiTBWMqFvvl01S0DngEDAs
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: 16dc0ed7-f712-43fd-f4bc-08d758103f5d
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2019 23:25:10.1388 (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: dHRR1UjLJ5p5nSt9r+eZxtyt7z0hagyzOGdHTiREdUcVwfIZp649K9zAGnBC3E8az1Q/pTjs7CUDm3aFjGzksg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: YTBPR01MB3822
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/bPLFnywt1wZ4kolMkzeSYca0qIM>
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: Wed, 23 Oct 2019 23:25:14 -0000

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.

However, RFC-7862 does not seem to clearly state that this is the correct
reply to a Seek with the above arguments.
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.
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. 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.

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.

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.

   All files MUST 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