Re: [nfsv4] handling GETATTR vs. fh with outstanding write delegation

David Noveck <davenoveck@gmail.com> Fri, 26 May 2023 10:14 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 29DB2C151547 for <nfsv4@ietfa.amsl.com>; Fri, 26 May 2023 03:14:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=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 ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rcxKBdgz0SHI for <nfsv4@ietfa.amsl.com>; Fri, 26 May 2023 03:14:53 -0700 (PDT)
Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 67933C151545 for <nfsv4@ietf.org>; Fri, 26 May 2023 03:14:53 -0700 (PDT)
Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-6239ab2b8e0so8233536d6.0 for <nfsv4@ietf.org>; Fri, 26 May 2023 03:14:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685096092; x=1687688092; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WrVyc9j8rT0uemRd+bsdvt7ToYo8eBCo5tdFAvwvYHM=; b=Zn6w1DSQyEjKdYXKQInqF/KQGk0I4vfPAj2sVhJ8v0EJIrwAQ/mhmQIV0m5qLF36M/ 5Vi9qh0Q2ZCy1siC2llT86/5eEbcInOzOUFeA6CQeB6xu3baF0zqA9BMfg1qwUjTpkvv 4hlLwb6ynjGv8quxF250TOnbuamjfL3gvEpBzeC0pHJop6k2CbcawImMtT/WGoolv5xw MbaDEHrgGNlYohOLDBf6ZVe7ShabE49SaV8/ac6SgtUYLV1IMayyeF5urtTybrcHZeh+ t7QbEgj7jjPvYBk3+3fXbBqjNlm+wMy3hi6iDOXGiH8UzSC5TB/Dgx0r9kPWoSB8cndF ygEQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685096092; x=1687688092; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WrVyc9j8rT0uemRd+bsdvt7ToYo8eBCo5tdFAvwvYHM=; b=haYxcicm+/SjbBKW7ePMD+fy1deahMeyvXkPv5Yx9hDWMMTQX0kEgoI6p5oKI93hjI ZqLJTew7Hone+xgMzvKtpYiKisX2wHr6sNbzyY/WsVtFSBpWR/gu3Dm2hI0cGujT+ztT UtQHwgfgmoLG2aHY1EB/7ZZ9yeN1MdbqrqmjrAk8QjPrefmNa6lpbikZypa9qc/pT6Yn oOzerQTySwYso0Cn8QhqP3w5vRQnpDpeau01eRwkE0FiqgltKNTTh+74kTp/wd629W/t 7L9oFQMVbEBwrRCm4cYOeXBVRJtYfSJWc8mbnB+r7urkRSL7Syz35JCKLHr5bqwWmMA5 0jWw==
X-Gm-Message-State: AC+VfDxGfokHblYcXX1Rqhi7m7n3/o8U+2WVxLHcwhGgvc+IuXpd4ffB 4C8PkH4UMSa81DaBvaxQmZkqZf2hfKLcPqRU/6M=
X-Google-Smtp-Source: ACHHUZ7URPnUSkHMxtfQDn9C1MwgVCZTzGnO4t43tcqUXrk5x7uRj1VtNZEXYu7lUYA0X1W9OrdEFSSCz3CtYUjKc4Q=
X-Received: by 2002:ad4:5d49:0:b0:625:ba46:27e6 with SMTP id jk9-20020ad45d49000000b00625ba4627e6mr1627227qvb.2.1685096092306; Fri, 26 May 2023 03:14:52 -0700 (PDT)
MIME-Version: 1.0
References: <c69e80e002d12dbcda9491ad29275022f205cd3e.camel@kernel.org> <D5BD1191-C395-4ACF-BFC8-32A2A1862459@oracle.com> <fd2f216a67e9ca7bde5ff0f063457fac2b434e1c.camel@kernel.org>
In-Reply-To: <fd2f216a67e9ca7bde5ff0f063457fac2b434e1c.camel@kernel.org>
From: David Noveck <davenoveck@gmail.com>
Date: Fri, 26 May 2023 06:14:41 -0400
Message-ID: <CADaq8jcmpOfUndjaRHY_Xmf6qpXaHD_Xr4fR-6Wz6i4v-qjHTw@mail.gmail.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Chuck Lever III <chuck.lever@oracle.com>, Olga Kornievskaia <kolga@netapp.com>, Trond Myklebust <trondmy@hammerspace.com>, NFSv4 <nfsv4@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000fe92f005fc96016a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/9WAxM6684Mgjk7vzX-p8QnHaEYM>
Subject: Re: [nfsv4] handling GETATTR vs. fh with outstanding write delegation
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.39
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, 26 May 2023 10:14:54 -0000

On Thu, May 25, 2023, 6:38 PM Jeff Layton <jlayton@kernel.org> wrote:

> On Thu, 2023-05-25 at 13:45 +0000, Chuck Lever III wrote:
> >
> > > On May 25, 2023, at 7:46 AM, Jeff Layton <jlayton@kernel.org> wrote:
> > >
> > > Dai has started (finally) implementing write delegations in the Linux
> > > kernel NFS server, and we've been looking to the spec for guidance.
> > > This section of RFC8881 has a long treatment on the use of CB_GETATTR:
> > >
> > >    https://datatracker.ietf.org/doc/html/rfc8881#section-10.4.3
> > >
> > > At the bottom, in particular, it says:
> > >
> > >    It should be noted that the server is under no obligation to use
> > >    CB_GETATTR, and therefore the server MAY simply recall the
> > >    delegation to avoid its use.
> > >
> > > However, at least one server implementor (Netapp) seems to ignore this.
>

As Chuck pointed out,  the filer is not ignoring this statement, although
it is
Not following a related part of the spec.

>
> > "Ignore" is a strong word. IMHO other implementers interpret this
> > compliance statement perhaps differently than you did.
> >
> >
>
> Maybe. It sounds to me however like the RFC is saying you have 2 choices
> when satisfying a GETATTR for size/change_attr:
>

I  think that is what the spec does say.

>
>    1/ CB_GETATTR
>
> ...or...
>
>    2/ recall the delegation
>
> If that wasn't intended and there is a 3rd way, then it would be nice to
> clarify that.
>

I think that it *was* intended.  If you think there is a third way, you
should submit an errata report, we can discuss the issue and address this
in rfc5661bis.

>
> > > The filer simply reports the info it has in response to a GETATTR
> > > without using CB_GETATTR and without recalling a delegation.
> >
> > As a data point, the Solaris server implementation also does not
> > implement CB_GETATTR, nor does it send a CB_RECALL in this case.
> >
>
> Good to know, thanks.
>

So we have two servers that behave this way.  From the tone of your
previous message, we may have a third under development.  Also, it would be
nice to know of any servers that do follow rfc8881 in this regard.

>
> >
> > > Given that the client can buffer up writes even when it doesn't have a
> > > write delegation, what's the rationale for requiring a tighter level of
> > > cache coherency just because there is a delegation outstanding?
> > >


I think the rationale behind this is the nature of the delegation, which
transfers the server's normal rights to change the file to the client
holding the delegation.  As  a result, lots of things that are doable by
other clients in the absence of a delegation cause a recall in its
presence.  If the working group decides that is too stringent, it could
make this a "SHOULD" but I'm still not sure we want to take this step.

>
> > > Note that we have not yet implemented timestamp/attr delegations:
> > >
> > >    https://datatracker.ietf.org/doc/draft-ietf-nfsv4-delstid/02/
> > >
> > > Will we be any worse off if we were to also ignore this bit of the spec
> > > and allow GETATTRs without CB_GETATTR or CB_RECALL?
>

Given that neither Solaris or Ontap has had any difficulties from their
non-compliance, you probably would be OK unless something new turns up.


> --
> Jeff Layton <jlayton@kernel.org>
>
> _______________________________________________
> nfsv4 mailing list
> nfsv4@ietf.org
> https://www.ietf.org/mailman/listinfo/nfsv4
>