Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2021 05:08:52 +0900 (JST)
From:      Yasuhiro Kimura <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
Message-ID:  <20210124.050852.1053381322070533315.yasu@utahime.org>
In-Reply-To: <202101231525.10NFPa3V002367@gitrepo.freebsd.org>
References:  <202101231525.10NFPa3V002367@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
From: Konstantin Belousov <kib@FreeBSD.org>
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 <kib@FreeBSD.org>
> AuthorDate: 2021-01-22 21:47:06 +0000
> Commit:     Konstantin Belousov <kib@FreeBSD.org>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210124.050852.1053381322070533315.yasu>