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

David Noveck <davenoveck@gmail.com> Thu, 24 October 2019 18:02 UTC

Return-Path: <davenoveck@gmail.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 1A4F11200B3 for <nfsv4@ietfa.amsl.com>; Thu, 24 Oct 2019 11:02:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 8rcpIr2fqbg0 for <nfsv4@ietfa.amsl.com>; Thu, 24 Oct 2019 11:01:56 -0700 (PDT)
Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BBC6C1200B2 for <nfsv4@ietf.org>; Thu, 24 Oct 2019 11:01:56 -0700 (PDT)
Received: by mail-oi1-x22f.google.com with SMTP id v186so8623066oie.5 for <nfsv4@ietf.org>; Thu, 24 Oct 2019 11:01:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RJkKubVFsdYRcJAO+AMtzuROCW/6xlWSbQy9sY8B8qo=; b=lEg3ji3KhFKkwxAE9zS8HDXM2yMeen+8IT3o3GW/e/970U6/TUjQIV+wktsOuVSJFs FWpUo0AXxj/YiR99dgFvghz4IvMUTPJzJ2y404Q6sGvBqCRmxXPshUwqmI55h+t8VxjZ bSAhsAj4/50r2G15eIcV+Pk6hMGhiOd9E45E7B6/zjc34sKRXiorW32snJOuY8Lax5ix SQs8X9MYEDxx8Yd008K2gPJ0lDvxCI3Dpfu0YEGFWupr1B9w3Z9ZWnpXY6vvhBX+nvPy flasXl0Q6LIt89yjCdY/GEvAtEFXibGFbbpeFje7SlJISAE+/5K+peQO+rVnZeJL5so2 xYQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RJkKubVFsdYRcJAO+AMtzuROCW/6xlWSbQy9sY8B8qo=; b=kSdx3GBtUKgAVhg9hIZyjxA2/iTzawMzO3qIW4l2nc0W0zRqLLWfEEsCWCUS2eXt3C wJ5A9LBLXF1hROlswRBzWORQNul6qzwVqWDOlkniQJUcDo5jpn11Cgvh4iZ0UJi4ED0e vvpER/AvCZylTVMTc8vSUy30kcsjHwly0FPNOgWlNTb4tIH/fkdSAMJ2oHKwirF8RCR0 G2g204/p0C3k1NVPN8XyLM2rQ0teoSBAucbCcEWKdOTg4FSU9g5IjGC7UJerC9tkxcnX cUBsJ1snjY2RnILIEqipmh0EZMI1YFvjwUsONgkw+HFPjtqDrUAw1Cmenpp1A8mFGiXg 6jXg==
X-Gm-Message-State: APjAAAUaZftdiYLn/d42U5UlFbtwAqq9w6jD6rEvv7c7CE43/dwM3SsY 8kx12VY3EqW6R8V5rz8d0TmSrPhwT3IAJtGzmCU=
X-Google-Smtp-Source: APXvYqwsYwXNUWpjzkQDuQvR0GtLgE8AoZwmFESAHEfuZZJNBe25sJ/4eA4wnq+JWTl6ViRg7BxAQ4rKz/5Xiw0TEzQ=
X-Received: by 2002:a05:6808:87:: with SMTP id s7mr5976199oic.47.1571940115841; Thu, 24 Oct 2019 11:01:55 -0700 (PDT)
MIME-Version: 1.0
References: <YTBPR01MB2845F50A6915F026651447C4DD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM> <YTBPR01MB2845939A854D0C41816AB11CDD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <YTBPR01MB2845939A854D0C41816AB11CDD6B0@YTBPR01MB2845.CANPRD01.PROD.OUTLOOK.COM>
From: David Noveck <davenoveck@gmail.com>
Date: Thu, 24 Oct 2019 14:01:44 -0400
Message-ID: <CADaq8jcvr2N=UH7wg-5CfFsbZipfNHi+vrERnyUq=JjHHe5Ngg@mail.gmail.com>
To: Rick Macklem <rmacklem@uoguelph.ca>
Cc: "nfsv4@ietf.org" <nfsv4@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000003688c20595abd4e0"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/EU5ogfb_qjB3pH98dQEe50lxico>
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: Thu, 24 Oct 2019 18:02:00 -0000

On Wed, Oct 23, 2019 at 7:25 PM Rick Macklem <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
> https://www.ietf.org/mailman/listinfo/nfsv4
>