Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2019 20:04:43 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Kurt Jaeger <pi@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Crash on very recent CURRENT if using poudriere
Message-ID:  <20190531170443.GD27392@kib.kiev.ua>
In-Reply-To: <20190531104911.GA39925@home.opsec.eu>
References:  <20190531104911.GA39925@home.opsec.eu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 31, 2019 at 12:49:11PM +0200, Kurt Jaeger wrote:
> Hi!
> 
> [panic] non-zero write count during poudriere run
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=238031
> 
> Ideas on how to proceed ?

Try this.

diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index f92383179a9..b663d8d718d 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -810,6 +810,8 @@ null_reclaim(struct vop_reclaim_args *ap)
 	 */
 	if (vp->v_writecount > 0)
 		VOP_ADD_WRITECOUNT(lowervp, -vp->v_writecount);
+	else if (vp->v_writecount < 0)
+		vp->v_writecount = 0;
 
 	VI_UNLOCK(vp);
 
diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c
index f9db5f99e50..9fe58cd4c13 100644
--- a/sys/fs/tmpfs/tmpfs_subr.c
+++ b/sys/fs/tmpfs/tmpfs_subr.c
@@ -488,6 +488,8 @@ tmpfs_destroy_vobject(struct vnode *vp, vm_object_t obj)
 	VI_LOCK(vp);
 	vm_object_clear_flag(obj, OBJ_TMPFS);
 	obj->un_pager.swp.swp_tmpfs = NULL;
+	if (vp->v_writecount < 0)
+		vp->v_writecount = 0;
 	VI_UNLOCK(vp);
 	VM_OBJECT_WUNLOCK(obj);
 }



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