- Add and enhance asserts related to the wrong bufobj panic.

Sponsored by:	Isilon Systems, Inc.
Approved by:	re (blanket vfs)
This commit is contained in:
Jeff Roberson 2005-06-14 20:32:27 +00:00
parent 12c2dcde40
commit 7a06fe49dc
2 changed files with 4 additions and 1 deletions

View File

@ -2544,7 +2544,7 @@ getblk(struct vnode * vp, daddr_t blkno, int size, int slpflag, int slptimeo,
CTR4(KTR_BUF, "getblk(%p, %ld, %d) = %p", vp, (long)blkno, size, bp);
KASSERT(BUF_REFCNT(bp) == 1, ("getblk: bp %p not locked",bp));
KASSERT(bp->b_bufobj == bo,
("wrong b_bufobj %p should be %p", bp->b_bufobj, bo));
("bp %p wrong b_bufobj %p should be %p", bp, bp->b_bufobj, bo));
return (bp);
}

View File

@ -408,6 +408,9 @@ vop_stdfsync(ap)
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL))
continue;
VI_UNLOCK(vp);
KASSERT(bp->b_bufobj == &vp->v_bufobj,
("bp %p wrong b_bufobj %p should be %p",
bp, bp->b_bufobj, &vp->v_bufobj));
if ((bp->b_flags & B_DELWRI) == 0)
panic("fsync: not dirty");
if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) {