From nobody Fri Jan 05 05:00:46 2024 X-Original-To: dev-commits-src-main@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 4T5rrG46fJz56HZb; Fri, 5 Jan 2024 05:00:46 +0000 (UTC) (envelope-from git@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 4T5rrG3h23z4Wmb; Fri, 5 Jan 2024 05:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704430846; 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; bh=1Y6KYxc68JhrTB99XEYYO/UjsMe3j1vBNKKdupAB5Lg=; b=PIYu9c2R26NDHe5as/t7nDX6OjoM1lDcObIVvVzNgKNDhzjPUKZEWW0WLsLupwXUnuhHIs IzmYtNe2U9KM5KnOVkGcr5WMZw33yF606qlfx1MPX6tGzbBVu7xxtHpzyDraH9whCpsVR8 FHn4Kh2U0H4BQEUW7u+yKxgNBfCGxDxUtDxj0Yl9xOuD0DJNfKcUcGJAecROQejHIKKiDp XtxFYN3CQUNRatvXNYA1HFSrXGjZBGdH6LPqDgVBb73nqS3we4PhYvBqngDez92iVBnItA D07cP9PPVv/4PK+0Jezw6vJH9gC4AWU+QHD/TAjXPBe5rqEI1lf7e56DFVUaYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704430846; 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; bh=1Y6KYxc68JhrTB99XEYYO/UjsMe3j1vBNKKdupAB5Lg=; b=jHoigBIvXzuS2sRxCBCiyfTLfeu5QRqnMY1aag0JE5LPST0fJ6QKIn+vidDR1dBXGI+M2j ErJiYTAeHIQte1sptzF5fOOOPpmLqdx+eydTshW2PQTYZLtQZwbmrGpVNZZQ3R70Bi6P0G hc8af9WtkZ91f8fiRW4ttak9NPOq0yvQzg9jGX9a1hfVcILYaSEPMiDEn4MBlo9FWtDkX0 iLmL9Ock3YxcIZJcnm+Bb2nemsNfURlmd14/bkNxnQPTeo3IzoU/AbceeDqAOtKc2qSdE3 otuePiySXRtuXz2+jNDxHHco+sAb+/hANrlej0LS5QaY32i5ngdAfKTKv8D1VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704430846; a=rsa-sha256; cv=none; b=lyYvxm064/liq0nBRlfAXw3lRSRBGxLNnQlIdbN4pmvDTnTbW65xNhEcqjnmj/6xDK7eiy KGfnQEuxZmHInqeODBtGmsgc8S+RAff5kwwD7D7RlTk7HE+/KT0og39LV0uKh3/p9htmrw 27JdnLXbDJn/9kiEOdYcN5Anlz8RRydncRYYzDl2ye+krIx/kLNmQNJfSAMWogrSsuYJYY lRp8rIAiXwZJJGnuudGF9IP/FxkMm01jko8dFXQeV3YlxiT60JDr9ZthO1mOpQHxY/74e2 lgzo4+GpDu14saheJtjeimr1ZLpvm7ySX6ctil9yUsiS9Qbjb28VV6V6rivurg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4T5rrG2lPWzkZc; Fri, 5 Jan 2024 05:00:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40550kQE090145; Fri, 5 Jan 2024 05:00:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40550kDO090142; Fri, 5 Jan 2024 05:00:46 GMT (envelope-from git) Date: Fri, 5 Jan 2024 05:00:46 GMT Message-Id: <202401050500.40550kDO090142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 7dae1467d72a - main - nfsclient copy_file_range(): flush dst vnode data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7dae1467d72ae1f5c8f7be0f7444da23a457d98b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7dae1467d72ae1f5c8f7be0f7444da23a457d98b commit 7dae1467d72ae1f5c8f7be0f7444da23a457d98b Author: Konstantin Belousov AuthorDate: 2023-12-29 23:22:40 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-05 04:56:17 +0000 nfsclient copy_file_range(): flush dst vnode data Otherwise server-side copy makes the client cache inconsistent with the server data. Reported by: asomers PR: 276002 Reviewed by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43250 --- sys/fs/nfsclient/nfs_clvnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index a690e988b4b3..f86ecd53ad4e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -3956,7 +3956,7 @@ generic_copy: if (error == 0) error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0); if (error == 0) - error = ncl_flush(outvp, MNT_WAIT, curthread, 1, 0); + error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0); /* Do the actual NFSv4.2 RPC. */ ret = ret2 = 0;