git: aa8c1f8d84d2 - main - nfs client: block vnode_pager_setsize() calls from nfscl_loadattrcache in nfs_write

Yasuhiro Kimura yasu at utahime.org
Sat Jan 23 20:10:44 UTC 2021


From: Konstantin Belousov <kib at 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 at FreeBSD.org>
> AuthorDate: 2021-01-22 21:47:06 +0000
> Commit:     Konstantin Belousov <kib at 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 at rolling-vm-freebsd1[1009]% ls
zsh: corrupt history file /home/yasu/.zhistory
yasu at 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


More information about the dev-commits-src-all mailing list