From owner-dev-commits-src-main@freebsd.org Sat Jan 23 20:10:44 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 552334DCA61; Sat, 23 Jan 2021 20:10:44 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from maybe.home.utahime.org (gate.home.utahime.org [183.180.29.210]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4DNS1J0gLcz4t6n; Sat, 23 Jan 2021 20:10:43 +0000 (UTC) (envelope-from yasu@utahime.org) Received: from eastasia.home.utahime.org (eastasia.home.utahime.org [192.168.174.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by maybe.home.utahime.org (Postfix) with ESMTPS id 8FBC74D252; Sun, 24 Jan 2021 05:10:39 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=utahime.org; s=maybe2019112701; t=1611432639; bh=30OC5dJutuAt8cxX7VdszdGTZofxBgRK1LimXFdNU0s=; h=Date:To:Cc:Subject:From:In-Reply-To:References; b=RLpcYTGtJqt2ebbBbzHybYZ5RJ5tkBx53OzJJEJF7YjEdpEtw7g6gaoDbyQNJ6OVJ R051J1zEZE4ykC09Iq4NcVftEW5bRPOoCs5/U37uXHIA/22NTjn5jZ5dVexRqFeEs0 THEnzXEDS7ro1OSJuEIRSkyXv53CmFpdTOpwM8Gvit7PJW5tgQM/0KxUG7P8JlliIG PXb1Z8Qh5hbreGwavA6L7QXcMRr7D+OzBMKmXl6G9YuE/IsTAhQkbXRU4dgCL6l1wf rFFEbCtcIYh7nMRKyeTa3wpIxh5ooiMzPxkl4aeqThDHi2TNmSzGrd1PqX/yTNudGu Xz9lo77TdgRIg== Received: from localhost (rolling.home.utahime.org [192.168.174.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by eastasia.home.utahime.org (Postfix) with ESMTPSA id B12544BD19; Sun, 24 Jan 2021 05:10:38 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.0 at eastasia.home.utahime.org Date: Sun, 24 Jan 2021 05:08:52 +0900 (JST) Message-Id: <20210124.050852.1053381322070533315.yasu@utahime.org> To: kib@FreeBSD.org Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: aa8c1f8d84d2 - main - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write From: Yasuhiro Kimura In-Reply-To: <202101231525.10NFPa3V002367@gitrepo.freebsd.org> References: <202101231525.10NFPa3V002367@gitrepo.freebsd.org> X-Mailer: Mew version 6.8 on Emacs 27.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4DNS1J0gLcz4t6n X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2021 20:10:44 -0000 From: Konstantin Belousov Subject: git: aa8c1f8d84d2 - main - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write Date: Sat, 23 Jan 2021 15:25:36 GMT > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=aa8c1f8d84d2638a354e71f9593e978d00878243 > > commit aa8c1f8d84d2638a354e71f9593e978d00878243 > Author: Konstantin Belousov > AuthorDate: 2021-01-22 21:47:06 +0000 > Commit: Konstantin Belousov > CommitDate: 2021-01-23 15:24:32 +0000 > > nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write > > Otherwise writing thread might wait on sbusy state of the pages which were > busied by itself, similarly to nfs_read(). But also we need to clear > NVNSETSZKSIP flag possibly set by ncl_pager_setsize(), to not undo > extension done by write. > > Reported by: bdrewery > Reviewed by: rmacklem > Tested by: pho > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D28306 On my 14-CURRENT amd64 environment this commit causes the problem that garbage date are written to file mounted with NFS. I use NFSv4 and autofs to mount home directory on my 12.2-RELEASE amd64 server. And I use zsh as login shell and configure it so command history is written to history file each time any command is executed. After update to 519b64e27fddf10c0b7f6a615edbad730b8c6c45, I see following error message if I try to execute any command. ---------------------------------------------------------------------- yasu@rolling-vm-freebsd1[1009]% ls zsh: corrupt history file /home/yasu/.zhistory yasu@rolling-vm-freebsd1[1010]% ---------------------------------------------------------------------- I logged in the server and check the content of history file. Then some garbase data are written to history file. I confirmed the problem disappears by reverting this commit. --- Yasuhiro Kimura