From 03ea276e84d58ba88e9c2933076823f651df4ba6 Mon Sep 17 00:00:00 2001 From: chs Date: Mon, 31 Dec 2001 06:44:58 +0000 Subject: [PATCH] in genfs_gop_write(), actually set the B_ASYNC flag on buffers that we're not going to wait for. this doesn't matter for real devices since we call VOP_STRATEGY() directly, but NFS uses this flag to decide whether or not to hand the buffer off to an nfsiod thread. --- sys/miscfs/genfs/genfs_vnops.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/miscfs/genfs/genfs_vnops.c b/sys/miscfs/genfs/genfs_vnops.c index a54e25a643be..2413cff1fde4 100644 --- a/sys/miscfs/genfs/genfs_vnops.c +++ b/sys/miscfs/genfs/genfs_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_vnops.c,v 1.44 2001/12/31 06:40:08 chs Exp $ */ +/* $NetBSD: genfs_vnops.c,v 1.45 2001/12/31 06:44:58 chs Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.44 2001/12/31 06:40:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.45 2001/12/31 06:44:58 chs Exp $"); #include "opt_nfsserver.h" @@ -1349,7 +1349,7 @@ genfs_gop_write(struct vnode *vp, struct vm_page **pgs, int npages, int flags) mbp->b_bufsize = npages << PAGE_SHIFT; mbp->b_data = (void *)kva; mbp->b_resid = mbp->b_bcount = bytes; - mbp->b_flags = B_BUSY|B_WRITE|B_AGE| (async ? B_CALL : 0); + mbp->b_flags = B_BUSY|B_WRITE|B_AGE| (async ? (B_CALL|B_ASYNC) : 0); mbp->b_iodone = uvm_aio_biodone; mbp->b_vp = vp; LIST_INIT(&mbp->b_dep); @@ -1387,7 +1387,7 @@ genfs_gop_write(struct vnode *vp, struct vm_page **pgs, int npages, int flags) bp->b_data = (char *)kva + (vaddr_t)(offset - pg->offset); bp->b_resid = bp->b_bcount = iobytes; - bp->b_flags = B_BUSY|B_WRITE|B_CALL; + bp->b_flags = B_BUSY|B_WRITE|B_CALL|B_ASYNC; bp->b_iodone = uvm_aio_biodone1; bp->b_vp = vp; LIST_INIT(&bp->b_dep);