Module Name: src Committed By: pooka Date: Wed Aug 5 15:39:57 UTC 2009
Modified Files: src/sys/ufs/lfs: lfs_vfsops.c Log Message: Compensate v_numoutput & nestbuf for lfs's rather peculiar I/O habits. To generate a diff of this commit: cvs rdiff -u -r1.276 -r1.277 src/sys/ufs/lfs/lfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/ufs/lfs/lfs_vfsops.c diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.276 src/sys/ufs/lfs/lfs_vfsops.c:1.277 --- src/sys/ufs/lfs/lfs_vfsops.c:1.276 Wed Aug 5 14:37:01 2009 +++ src/sys/ufs/lfs/lfs_vfsops.c Wed Aug 5 15:39:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vfsops.c,v 1.276 2009/08/05 14:37:01 pooka Exp $ */ +/* $NetBSD: lfs_vfsops.c,v 1.277 2009/08/05 15:39:57 pooka Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007 @@ -61,7 +61,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.276 2009/08/05 14:37:01 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.277 2009/08/05 15:39:57 pooka Exp $"); #if defined(_KERNEL_OPT) #include "opt_lfs.h" @@ -1756,6 +1756,15 @@ * converted this to use nestiobuf --pooka */ bp->b_flags &= ~B_ASYNC; + /* + * LFS uses VOP_BWRITE instead of VOP_STRATEGY. + * Therefore biodone doesn't get called for + * the buffer. Therefore decrement the output + * counter that nestiobuf_setup() incremented. + */ + mutex_enter(&vp->v_interlock); + vp->v_numoutput--; + mutex_exit(&vp->v_interlock); } /* XXX This is silly ... is this necessary? */