From 01022ca7032cb25372ee27b162bea8f39bcb5425 Mon Sep 17 00:00:00 2001 From: "Thordur I. Bjornsson" Date: Fri, 9 Jan 2009 20:28:11 +0000 Subject: keep b_proc set to the proccess, thats doing the io as advertised closes PR3948 OK tedu@ (and blambert@ I think). --- sys/kern/vfs_bio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 350b6fb8214..f5a4fa2d1a6 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_bio.c,v 1.108 2008/11/22 12:40:39 pedro Exp $ */ +/* $OpenBSD: vfs_bio.c,v 1.109 2009/01/09 20:28:10 thib Exp $ */ /* $NetBSD: vfs_bio.c,v 1.44 1996/06/11 11:15:36 pk Exp $ */ /*- @@ -362,6 +362,7 @@ bio_doread(struct vnode *vp, daddr64_t blkno, int size, int async) SET(bp->b_flags, B_READ | async); bcstats.pendingreads++; bcstats.numreads++; + bp->b_proc = curproc; VOP_STRATEGY(bp); /* Pay for the read. */ curproc->p_stats->p_ru.ru_inblock++; /* XXX */ @@ -536,6 +537,7 @@ bread_cluster(struct vnode *vp, daddr64_t blkno, int size, struct buf **rbpp) bp->b_vp = vp; bcstats.pendingreads++; bcstats.numreads++; + bp->b_proc = curproc; VOP_STRATEGY(bp); curproc->p_stats->p_ru.ru_inblock++; @@ -685,6 +687,7 @@ bdwrite(struct buf *bp) void bawrite(struct buf *bp) { + bp->b_proc = NULL; SET(bp->b_flags, B_ASYNC); VOP_BWRITE(bp); @@ -1146,6 +1149,7 @@ void biodone(struct buf *bp) { splassert(IPL_BIO); + bp->b_proc = NULL; if (ISSET(bp->b_flags, B_DONE)) panic("biodone already"); -- cgit v1.2.3