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

Jeff Layton <jlayton@kernel.org> Thu, 25 May 2023 11:46 UTC

Return-Path: <jlayton@kernel.org>
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 B82BBC15106A for <nfsv4@ietfa.amsl.com>; Thu, 25 May 2023 04:46:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.097
X-Spam-Level:
X-Spam-Status: No, score=-7.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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=kernel.org
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 g1hbwDOORvFA for <nfsv4@ietfa.amsl.com>; Thu, 25 May 2023 04:46:39 -0700 (PDT)
Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 65984C14CEFA for <nfsv4@ietf.org>; Thu, 25 May 2023 04:46:39 -0700 (PDT)
Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C610264508; Thu, 25 May 2023 11:46:38 +0000 (UTC)
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 710FBC433EF; Thu, 25 May 2023 11:46:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685015198; bh=dv7uH4k/42CbqnnInJSnxvvuX6Qp/c4Ww+MhvIIc2rc=; h=Subject:From:To:Cc:Date:From; b=vK9JGV+JsYVEMvDBFQ69tMec+qOoFmGVgj+DxyGcxBwVdK7Kd0O7q9yJzCI1FDJKl Tf5Suwvf3YTPxeSaImcVqjRgbMAi0UH+/jzZpeajCfpTRqt/97iFghWIIYlXvjRqZb o0MLlHzYcTUZc1jNVfiNEmCXXv2D0qiIHgrQgXCRzHRXVC4QBA3ywSMkVaj49ryGpK QcvJ0+NTEq8hqp7/EqLUiMqPeMEGGDqAx2Y8ejNEopliprk8k/djBUz8+CgUssUbAT J9iffb4MAvNqyBgMw4wTEnereBkyI4h1glsE5nicXwbsYVUAJh6JsA2ZC8pfcGXrnv lM965njwWT4mA==
Message-ID: <c69e80e002d12dbcda9491ad29275022f205cd3e.camel@kernel.org>
From: Jeff Layton <jlayton@kernel.org>
To: NFSv4 <nfsv4@ietf.org>
Cc: Dai Ngo <dai.ngo@oracle.com>, Chuck Lever <chuck.lever@oracle.com>, Olga Kornieskaia <kolga@netapp.com>, Trond Myklebust <trondmy@hammerspace.com>
Date: Thu, 25 May 2023 07:46:36 -0400
Content-Type: text/plain; charset="ISO-8859-15"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.48.1 (3.48.1-1.fc38)
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/QgFGc5gtlCz_oikCmx-j2k09BJ0>
X-Mailman-Approved-At: Thu, 25 May 2023 15:38:41 -0700
Subject: [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: Thu, 25 May 2023 11:46:43 -0000

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.
The filer simply reports the info it has in response to a GETATTR
without using CB_GETATTR and without recalling a delegation.

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?

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?
-- 
Jeff Layton <jlayton@kernel.org>