From nobody Sat Apr 15 20:17:47 2023 X-Original-To: fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PzPkh293Vz450fX for ; Sat, 15 Apr 2023 20:17:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PzPkg73VJz3hZ2 for ; Sat, 15 Apr 2023 20:17:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681589868; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YXWZGdGoinSIjvPYVlVYAo1cCgVUkHTjGJLno8w8yK0=; b=G25B2A0d/l+czI0IsrYBqFlHw3GwXyHJl339uGObo8WtKntqJzk1yxe5CU6i7niT7qhzMu UkNHOrlED7q9U5at//EWG88S40FQO7KFVTUTXaPKDAMDe9+DPXM0EklsjFDpT/2cuiZ112 3xvgjDR1wksNMEO5uhAI2t2OC1u7lievwHRz0dbj/ticKMk8K0RPbtJnTbd4lRnkJnXtkq fcMVHiyu+THEKc1Jbqd2+c4iTOT3MhWW7ez3z+hgpmMYmbKQDktxk2tCbPhj2bwAiCfBu3 9hTRivVUv+Hi4SnYAkjKZ5AJIiqp/gZZNhb2GSsu4gRev8JfgnKBhsvtGFrXQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681589868; a=rsa-sha256; cv=none; b=D2XcaFDIsRbiDt5Vd7NJgHMLMzq8eHgGfAE3cIjbAvhw2g8e1wVhG48tqOIQgLx6UMMt88 bXsjngDMlKIZbISyrqEdxmWyEeytLavMr/uFlRz4lXHI0IgNRuEwuiSExYwMLlyyp3LFOD pXYKWeAqdPWj0NuzXFFqf/08aksB4EXdVFDFdwPIDDWkRx0zGo05J/Yf6NFp832p10oOka JbqvFzfzQxlJm48+ai/7koia3zag+pM0vyFa/m3zxiORPCW2GgQ9/Fe3YO8rVzG7LX3AVc C8QGpZiRqEInBAPGnKAQ17CQNMxInCiYbHwG2BFJ4JrCKRTZDBOAOpI/EqMHgg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PzPkg5z0nzKSd for ; Sat, 15 Apr 2023 20:17:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 33FKHlnf073252 for ; Sat, 15 Apr 2023 20:17:47 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 33FKHlrU073251 for fs@FreeBSD.org; Sat, 15 Apr 2023 20:17:47 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 270842] nfsclient sees out-of-date metadata until stat(1) Date: Sat, 15 Apr 2023 20:17:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270842 --- Comment #6 from Rick Macklem --- Well, the default value for acregmax is 60sec. (You can see what they are for any mount by doing "nfsstat -m" on the NFS client.) Then note that stat(2) and fstat(2) are two very different stories. For stat(2): - There is a lookup. If there is a miss on the name cache, then this will result in a Lookup RPC, which has up-to-date attributes in the reply. --> So, I suppose you could consider the fact that it might do a Lookup RPC magical, then that might be the magic. For fstat(2), there is no lookup, so it is going to return cached (possibly stale) attributes until the attribute cache times out (which could take up to acregmax seconds). The NFS client does implement close->open consistency, which means "once a file is close(2)'s on one client and then open(2)'d on another client after the close(2) (in a temporal sense), the client that does the open(2) should see all changes done by the first client before it close(2)'d the file". (This is actually approximately done, based on the NFS server's time resolution for mtime for the file.) I have no idea what "git" or "cargo" do, but if it happens to be fstat(2) and not stat(2), you can see from the above why the semantics would be different. --=20 You are receiving this mail because: You are the assignee for the bug.=