Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2015 23:59:52 +0300
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        Konstantin Belousov <kib@FreeBSD.org>
Cc:        Shawn Webb <shawn.webb@hardenedbsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r292772 - head/sys/vm
Message-ID:  <20151229205952.GV7277@FreeBSD.org>
In-Reply-To: <201512271442.tBREgdRr079655@repo.freebsd.org>
References:  <201512271442.tBREgdRr079655@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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