diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-01-09 20:28:11 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2009-01-09 20:28:11 +0000 |
commit | 01022ca7032cb25372ee27b162bea8f39bcb5425 (patch) | |
tree | f1eceac1a7f7666f814fb3d640eb9cda2afd9584 /sys | |
parent | 70fb358a614176616b77d6db256af5a8a4ec4a62 (diff) |
keep b_proc set to the proccess,
thats doing the io as advertised
closes PR3948
OK tedu@ (and blambert@ I think).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 6 |
1 files changed, 5 insertions, 1 deletions
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"); |