diff options
author | phk <phk@FreeBSD.org> | 2004-10-21 15:53:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-21 15:53:54 +0000 |
commit | 3833976d1250bf118a46939f409012d87e558de6 (patch) | |
tree | 9d355bca75100170618443d740a1312fd842af5d /sys/ufs/ffs/ffs_rawread.c | |
parent | fdf614c0bad1564664cac5105be08477d1bcdd72 (diff) | |
download | FreeBSD-src-3833976d1250bf118a46939f409012d87e558de6.zip FreeBSD-src-3833976d1250bf118a46939f409012d87e558de6.tar.gz |
Move the VI_BWAIT flag into no bo_flag element of bufobj and call it BO_WWAIT
Add bufobj_wref(), bufobj_wdrop() and bufobj_wwait() to handle the write
count on a bufobj. Bufobj_wdrop() replaces vwakeup().
Use these functions all relevant places except in ffs_softdep.c where
the use if interlocked_sleep() makes this impossible.
Rename b_vnbufs to b_bobufs now that we touch all the relevant files anyway.
Diffstat (limited to 'sys/ufs/ffs/ffs_rawread.c')
-rw-r--r-- | sys/ufs/ffs/ffs_rawread.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/ufs/ffs/ffs_rawread.c b/sys/ufs/ffs/ffs_rawread.c index fcc6193..e5cc03e 100644 --- a/sys/ufs/ffs/ffs_rawread.c +++ b/sys/ufs/ffs/ffs_rawread.c @@ -137,12 +137,9 @@ ffs_rawread_sync(struct vnode *vp, struct thread *td) /* Wait for pending writes to complete */ spl = splbio(); while (vp->v_numoutput) { - vp->v_iflag |= VI_BWAIT; - error = msleep((caddr_t)&vp->v_numoutput, - VI_MTX(vp), - PRIBIO + 1, - "rawrdfls", 0); + error = bufobj_wwait(&vp->v_bufobj, 0, 0); if (error != 0) { + /* XXX: can't happen with a zero timeout ??? */ splx(spl); VI_UNLOCK(vp); if (upgraded != 0) |