- 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:
parent
12c2dcde40
commit
7a06fe49dc
@ -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);
|
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(BUF_REFCNT(bp) == 1, ("getblk: bp %p not locked",bp));
|
||||||
KASSERT(bp->b_bufobj == bo,
|
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);
|
return (bp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -408,6 +408,9 @@ vop_stdfsync(ap)
|
|||||||
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL))
|
if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL))
|
||||||
continue;
|
continue;
|
||||||
VI_UNLOCK(vp);
|
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)
|
if ((bp->b_flags & B_DELWRI) == 0)
|
||||||
panic("fsync: not dirty");
|
panic("fsync: not dirty");
|
||||||
if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) {
|
if ((vp->v_object != NULL) && (bp->b_flags & B_CLUSTEROK)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user