diff options
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs.h | 6 | ||||
-rw-r--r-- | sys/nfs/nfs_bio.c | 16 | ||||
-rw-r--r-- | sys/nfs/nfs_vnops.c | 11 |
3 files changed, 16 insertions, 17 deletions
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h index 78a54a2..6fd3a89 100644 --- a/sys/nfs/nfs.h +++ b/sys/nfs/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.45 1999/02/25 00:03:50 peter Exp $ + * $Id: nfs.h,v 1.46 1999/05/02 23:56:23 alc Exp $ */ #ifndef _NFS_NFS_H_ @@ -605,7 +605,7 @@ int nfs_readrpc __P((struct vnode *, struct uio *, struct ucred *)); int nfs_writerpc __P((struct vnode *, struct uio *, struct ucred *, int *, int *)); int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *)); -int nfs_asyncio __P((struct buf *, struct ucred *)); +int nfs_asyncio __P((struct buf *, struct ucred *, struct proc *)); int nfs_doio __P((struct buf *, struct ucred *, struct proc *)); int nfs_readlinkrpc __P((struct vnode *, struct uio *, struct ucred *)); int nfs_sigintr __P((struct nfsmount *, struct nfsreq *, struct proc *)); @@ -658,7 +658,7 @@ void nfs_clearcommit __P((struct mount *)); int nfsrv_errmap __P((struct nfsrv_descript *, int)); void nfsrvw_sort __P((gid_t *, int)); void nfsrv_setcred __P((struct ucred *, struct ucred *)); -int nfs_writebp __P((struct buf *, int)); +int nfs_writebp __P((struct buf *, int, struct proc *)); int nfsrv_object_create __P((struct vnode *)); void nfsrv_wakenfsd __P((struct nfssvc_sock *slp)); int nfsrv_writegather __P((struct nfsrv_descript **, struct nfssvc_sock *, diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index 0d8a782..c7269ef 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_bio.c 8.9 (Berkeley) 3/30/95 - * $Id: nfs_bio.c,v 1.69 1999/04/06 03:07:54 peter Exp $ + * $Id: nfs_bio.c,v 1.70 1999/05/02 23:56:24 alc Exp $ */ @@ -465,7 +465,7 @@ nfs_bioread(vp, uio, ioflag, cred) if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) { rabp->b_flags |= (B_READ | B_ASYNC); vfs_busy_pages(rabp, 0); - if (nfs_asyncio(rabp, cred)) { + if (nfs_asyncio(rabp, cred, p)) { rabp->b_flags |= B_INVAL|B_ERROR; vfs_unbusy_pages(rabp); brelse(rabp); @@ -627,7 +627,7 @@ nfs_bioread(vp, uio, ioflag, cred) if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) { rabp->b_flags |= (B_READ | B_ASYNC); vfs_busy_pages(rabp, 0); - if (nfs_asyncio(rabp, cred)) { + if (nfs_asyncio(rabp, cred, p)) { rabp->b_flags |= B_INVAL|B_ERROR; vfs_unbusy_pages(rabp); brelse(rabp); @@ -894,7 +894,6 @@ again: if (bp->b_dirtyend > 0 && (on > bp->b_dirtyend || (on + n) < bp->b_dirtyoff)) { - bp->b_proc = p; if (VOP_BWRITE(bp) == EINTR) return (EINTR); goto again; @@ -960,7 +959,6 @@ again: * to turn off caching in this case. Very odd. XXX */ if ((np->n_flag & NQNFSNONCACHE) || (ioflag & IO_SYNC)) { - bp->b_proc = p; if (ioflag & IO_INVAL) bp->b_flags |= B_NOCACHE; error = VOP_BWRITE(bp); @@ -973,9 +971,8 @@ again: } } else if ((n + on) == biosize && (nmp->nm_flag & NFSMNT_NQNFS) == 0) { - bp->b_proc = (struct proc *)0; bp->b_flags |= B_ASYNC; - (void)nfs_writebp(bp, 0); + (void)nfs_writebp(bp, 0, 0); } else { bdwrite(bp); } @@ -1097,9 +1094,10 @@ nfs_vinvalbuf(vp, flags, cred, p, intrflg) * is eventually dequeued by the async daemon, nfs_doio() *will*. */ int -nfs_asyncio(bp, cred) +nfs_asyncio(bp, cred, procp) register struct buf *bp; struct ucred *cred; + struct proc *procp; { struct nfsmount *nmp; int i; @@ -1165,7 +1163,7 @@ again: error = tsleep(&nmp->nm_bufq, slpflag | PRIBIO, "nfsaio", slptimeo); if (error) { - if (nfs_sigintr(nmp, NULL, bp->b_proc)) + if (nfs_sigintr(nmp, NULL, procp)) return (EINTR); if (slpflag == PCATCH) { slpflag = 0; diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c index 5170d21..3a9e340 100644 --- a/sys/nfs/nfs_vnops.c +++ b/sys/nfs/nfs_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95 - * $Id: nfs_vnops.c,v 1.126 1999/05/03 20:59:14 alc Exp $ + * $Id: nfs_vnops.c,v 1.127 1999/05/06 18:13:05 peter Exp $ */ @@ -2668,7 +2668,7 @@ nfs_strategy(ap) * otherwise just do it ourselves. */ if ((bp->b_flags & B_ASYNC) == 0 || - nfs_asyncio(bp, NOCRED)) + nfs_asyncio(bp, NOCRED, p)) error = nfs_doio(bp, cr, p); return (error); } @@ -3026,7 +3026,7 @@ nfs_bwrite(ap) struct vnode *a_bp; } */ *ap; { - return (nfs_writebp(ap->a_bp, 1)); + return (nfs_writebp(ap->a_bp, 1, curproc)); } /* @@ -3035,9 +3035,10 @@ nfs_bwrite(ap) * B_CACHE if this is a VMIO buffer. */ int -nfs_writebp(bp, force) +nfs_writebp(bp, force, procp) register struct buf *bp; int force; + struct proc *procp; { int s; int oldflags = bp->b_flags; @@ -3076,7 +3077,7 @@ nfs_writebp(bp, force) off = ((u_quad_t)bp->b_blkno) * DEV_BSIZE + bp->b_dirtyoff; bp->b_flags |= B_WRITEINPROG; retv = nfs_commit(bp->b_vp, off, bp->b_dirtyend-bp->b_dirtyoff, - bp->b_wcred, bp->b_proc); + bp->b_wcred, procp); bp->b_flags &= ~B_WRITEINPROG; if (!retv) { bp->b_dirtyoff = bp->b_dirtyend = 0; |