]> xenbits.xensource.com Git - freebsd.git/commit
Further refine r352393, only call vnode_pager_setsize() outside the
authorkib <kib@FreeBSD.org>
Tue, 17 Sep 2019 18:41:39 +0000 (18:41 +0000)
committerkib <kib@FreeBSD.org>
Tue, 17 Sep 2019 18:41:39 +0000 (18:41 +0000)
commit82f8cfda991661b29b2cb28ece91e0fa6e80afdc
tree5c2b8b554e80bc5770f840053bd31994e1fc955b
parent53e898f9eb4c1ca7edef749932277ccc2917f665
Further refine r352393, only call vnode_pager_setsize() outside the
node lock when shrinking.

This is similar to r252528, applied to the above commit.

Apparently there is a race which makes necessary at least to keep the
n_size and pager size consistent when extending.  Current suspect is
that iod threads perform vnode_pager_setsize() without taking the
vnode lock, which corrupts the file content.

Reported and tested by: Masachika ISHIZUKA <ish@amail.plala.or.jp>
Discussed with: rmacklem (related issues)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/fs/nfsclient/nfs_clport.c