Date: Wed, 19 Mar 2014 19:32:53 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263375 - stable/9/sys/kern Message-ID: <201403191932.s2JJWrh6000317@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Wed Mar 19 19:32:53 2014 New Revision: 263375 URL: http://svnweb.freebsd.org/changeset/base/263375 Log: Make it possible to call VOP_PUTPAGES with shared vnode lock instead of insisting an exclusive lock. When VFS_LOCK_DEBUG is enabled and when the underlying file system is capable of MNT_SHARED_WRITES, a failed assertion may lead to a panic because when calling fsync(2), a.k.a. sys_fsync() over a vnode with mmap'ed page, it will grab a shared lock when underlying file system is capable, then call vm_object_page_clean that eventually proceeded to vnode_pager_putpages() that tries to do VOP_PUTPAGES, where VOP_PUTPAGES_APV generated from the declaration asserts the vnode is always exclusively locked by caller. This is a direct commit to stable/9 because a majority portion of the original changeset 257899 (kib), which main goal was an optimization, was omitted. We saw the panic independently in a FreeNAS bug ticket (#4578). Modified: stable/9/sys/kern/vnode_if.src Modified: stable/9/sys/kern/vnode_if.src ============================================================================== --- stable/9/sys/kern/vnode_if.src Wed Mar 19 19:31:21 2014 (r263374) +++ stable/9/sys/kern/vnode_if.src Wed Mar 19 19:32:53 2014 (r263375) @@ -477,7 +477,7 @@ vop_getpages { }; -%% putpages vp E E E +%% putpages vp L L L vop_putpages { IN struct vnode *vp;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403191932.s2JJWrh6000317>