diff options
author | phk <phk@FreeBSD.org> | 2004-10-22 08:47:20 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-22 08:47:20 +0000 |
commit | 52a089c5262ab46beaee3c8aaedbd0c47da5b403 (patch) | |
tree | bc42241b941aa567a6f2ea05e7900cd388eae620 /sys/nfsclient/nfs_bio.c | |
parent | ec23a3b685c6fad6459a67f5c814bf8203a9c664 (diff) | |
download | FreeBSD-src-52a089c5262ab46beaee3c8aaedbd0c47da5b403.zip FreeBSD-src-52a089c5262ab46beaee3c8aaedbd0c47da5b403.tar.gz |
Add b_bufobj to struct buf which eventually will eliminate the need for b_vp.
Initialize b_bufobj for all buffers.
Make incore() and gbincore() take a bufobj instead of a vnode.
Make inmem() local to vfs_bio.c
Change a lot of VI_[UN]LOCK(bp->b_vp) to BO_[UN]LOCK(bp->b_bufobj)
also VI_MTX() to BO_MTX(),
Make buf_vlist_add() take a bufobj instead of a vnode.
Eliminate other uses of bp->b_vp where bp->b_bufobj will do.
Various minor polishing: remove "register", turn panic into KASSERT,
use new function declarations, TAILQ_FOREACH_SAFE() etc.
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 5364af4..7148834 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -455,7 +455,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) for (nra = 0; nra < nmp->nm_readahead && nra < seqcount && (off_t)(lbn + 1 + nra) * biosize < np->n_size; nra++) { rabn = lbn + 1 + nra; - if (incore(vp, rabn) == NULL) { + if (incore(&vp->v_bufobj, rabn) == NULL) { rabp = nfs_getcacheblk(vp, rabn, biosize, td); if (!rabp) { error = nfs_sigintr(nmp, NULL, td); @@ -651,7 +651,7 @@ again: (bp->b_flags & B_INVAL) == 0 && (np->n_direofoffset == 0 || (lbn + 1) * NFS_DIRBLKSIZ < np->n_direofoffset) && - incore(vp, lbn + 1) == NULL) { + incore(&vp->v_bufobj, lbn + 1) == NULL) { rabp = nfs_getcacheblk(vp, lbn + 1, NFS_DIRBLKSIZ, td); if (rabp) { if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) { |