(This is mainly for Luoqi, John, or David, or anyone who understands
struct buf's and NFS).
I see some other weirdness in bread() relating to NFS as well.
int
bread(struct vnode * vp, daddr_t blkno, int size, struct ucred * cred,
struct buf ** bpp)
{
struct buf *bp;
bp = getblk(vp, blkno, size, 0, 0);
*bpp = bp;
/* if not found in cache, do some I/O */
if ((bp->b_flags & B_CACHE) == 0) {
if (curproc != NULL)
curproc->p_stats->p_ru.ru_inblock++;
bp->b_flags |= B_READ;
bp->b_flags &= ~(B_DONE | B_ERROR | B_INVAL);
if (bp->b_rcred == NOCRED) {
if (cred != NOCRED)
crhold(cred);
bp->b_rcred = cred;
}
vfs_busy_pages(bp, 0);
VOP_STRATEGY(vp, bp);
return (biowait(bp));
}
return (0);
}
The question is: Do we have to check for B_DELWRI here and flush the bp
before we issue the read op?
-Matt
To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-current" in the body of the message