Module Name: src
Committed By: pooka
Date: Wed Aug 5 14:09:27 UTC 2009
Modified Files:
src/sys/ufs/lfs: lfs_vfsops.c
Log Message:
Use nestiobuf instead of homerolled equivalent.
To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 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.274 src/sys/ufs/lfs/lfs_vfsops.c:1.275
--- src/sys/ufs/lfs/lfs_vfsops.c:1.274 Mon Jun 29 05:08:18 2009
+++ src/sys/ufs/lfs/lfs_vfsops.c Wed Aug 5 14:09:26 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.274 2009/06/29 05:08:18 dholland Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.275 2009/08/05 14:09:26 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.274 2009/06/29 05:08:18 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.275 2009/08/05 14:09:26 pooka Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -1748,11 +1748,14 @@
bp = getiobuf(NULL, true);
UVMHIST_LOG(ubchist, "vp %p bp %p num now %d",
vp, bp, vp->v_numoutput, 0);
- bp->b_data = (char *)kva +
- (vaddr_t)(offset - pg->offset);
- bp->b_resid = bp->b_bcount = iobytes;
- bp->b_cflags = BC_BUSY;
- bp->b_iodone = uvm_aio_biodone1;
+ nestiobuf_setup(mbp, bp, offset - pg->offset, iobytes);
+ /*
+ * LFS doesn't like async I/O here, dies with
+ * and assert in lfs_bwrite(). Is that assert
+ * valid? I retained non-async behaviour when
+ * converted this to use nestiobuf --pooka
+ */
+ bp->b_flags &= ~B_ASYNC;
}
/* XXX This is silly ... is this necessary? */