From nobody Sun Aug 13 09:31:58 2023 X-Original-To: bugs@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 4RNsk638n1z4qHp4 for ; Sun, 13 Aug 2023 09:31:58 +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 4RNsk61qQPz4Zgg for ; Sun, 13 Aug 2023 09:31:58 +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=1691919118; 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=LlWv1UrfSDNpZQt6FfFEMPeVNP/a+g18DNGySZk+Ro8=; b=DmqB5Z1C3uTUXt+vSH2NEtWA55b8UUyzPaxyT1X0V9DszWrMnLpv9zc8wVQgL1m3fSUYQQ bo74hXx63OS+vrML77P07mi+zohXbzqZp1Nt+VQleoAPBaRrGUPtGOPT1CFh1AdxkBbCkk 8dHreLxilsW0k51G5w5a6Pi6Bais2HROFQvnWqE3tPlVD3J5hAY2x9HzNGbHcL/TnzJt2h gXhGROL/XiJx0kGX3L9655SOOfDUAic+vnGVue84cnY4EEh58rimE+K0HemxS0uxVK+9RX ETATFyHREuU7l554u7j5oj0T/+K2vb+hrW4XsIn4XzVAelH7jZRaqttQ3PwmQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691919118; a=rsa-sha256; cv=none; b=sDyrfSxEXUeRBSNfm6QrIQqKDynomYpaQijWjb3OME/UVCkphbWIzPK0nQ69Wz5OITe1Qc tFlG8P9s4ocrjpiCvUtZSUy3YrfkOtVq4/N9OOZ5D5rbj2f8zHG1EimIOuQ0pTEUSgBy0t 5UfQ0/ei3PlUZ/INmjjo1/eylf/q+rQMr3Tjns9RXFt1gHYmUJCeElq9d1+Y1Hw9oqc23t i0L4BZs8OPT7u7J3paalK4YTPWLgM1NMSWGd/PKmiyOWZdYysjC622VKPxyq7KRFSVSnHX du4ZNA0pcwuDwqidgfzFA5yWwjy5fBWcIvggXj0s50SyGwqLXH+CtCdtWtWbWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RNsk60tmpzxJX for ; Sun, 13 Aug 2023 09:31:58 +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 37D9VwP1090294 for ; Sun, 13 Aug 2023 09:31:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 37D9VwoV090293 for bugs@FreeBSD.org; Sun, 13 Aug 2023 09:31:58 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: bugs@FreeBSD.org Subject: [Bug 273094] getfsstat can return unexpectedly stale statfs data. Date: Sun, 13 Aug 2023 09:31:58 +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: peterj@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@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: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D273094 --- Comment #1 from Peter Jeremy --- Actually, having more carefully read the sources, statfs(2) doesn't update = the cached values, only calling getfsstat(2) with MNT_WAIT works. I think that= 's even more of a POLA violation because it means that data returned by getfstatfs() can be older than data returned by statfs(). IMO, the logic in kern/vfs_mount.c:__vfs_statfs() should be inverted so tha= t it always calls mp->mnt_op->vfs_statfs(mp, &mp->mnt_stat) and then copies the result to sbp if required, though I'm not sure of the subtleties that may be involved. --=20 You are receiving this mail because: You are the assignee for the bug.=