svn commit: r292772 - head/sys/vm

Gleb Smirnoff glebius at FreeBSD.org
Tue Dec 29 20:59:57 UTC 2015


On Sun, Dec 27, 2015 at 02:42:39PM +0000, Konstantin Belousov wrote:
K> Author: kib
K> Date: Sun Dec 27 14:42:39 2015
K> New Revision: 292772
K> URL: https://svnweb.freebsd.org/changeset/base/292772
K> 
K> Log:
K>   Add missed relpbuf() for a smallfs page-in.
K>   
K>   Reported by:	Shawn Webb
K>   Tested by:	pho
K>   Sponsored by:	The FreeBSD Foundation
K> 
K> Modified:
K>   head/sys/vm/vnode_pager.c
K> 
K> Modified: head/sys/vm/vnode_pager.c
K> ==============================================================================
K> --- head/sys/vm/vnode_pager.c	Sun Dec 27 14:39:47 2015	(r292771)
K> +++ head/sys/vm/vnode_pager.c	Sun Dec 27 14:42:39 2015	(r292772)
K> @@ -806,6 +806,7 @@ vnode_pager_generic_getpages(struct vnod
K>  	 * than a page size, then use special small filesystem code.
K>  	 */
K>  	if (pagesperblock == 0) {
K> +		relpbuf(bp, freecnt);
K>  		for (i = 0; i < count; i++) {
K>  			PCPU_INC(cnt.v_vnodein);
K>  			PCPU_INC(cnt.v_vnodepgsin);

The reason for this bug is that I tried to move the (pagesperblock == 0)
block above the call to getpbuf().

We actually know that filesystem is "small" at the very beginning of the
function and we can branch into "small filesystem" pager immediately.

Later I moved the block back to its place, simply because new place
wasn't tested properly. And forgot to restore relpbuf.

What filesystem did you use to show up the bug? I'm about to test the
variant with immediate branching. Shawn, would you be able to test
a patch if I produce one?

-- 
Totus tuus, Glebius.


More information about the svn-src-head mailing list