diff options
author | jeff <jeff@FreeBSD.org> | 2005-05-01 12:00:36 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2005-05-01 12:00:36 +0000 |
commit | dd41538cd8ddfa93239188813c57c2febbfd398f (patch) | |
tree | ab979b09966c2e18931c5a5fae41cef184fec4d1 /sys | |
parent | 6db3b00e40a9522fdeeff49475bab0a71628892f (diff) | |
download | FreeBSD-src-dd41538cd8ddfa93239188813c57c2febbfd398f.zip FreeBSD-src-dd41538cd8ddfa93239188813c57c2febbfd398f.tar.gz |
- All buffers should either be clean or dirty. If neither of these flags
are set when we attempt to remove a buffer from a queue we should panic.
Hopefully this will catch the source of the wrong bufobj panics.
Sponsored by: Isilon Systems, Inc.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_subr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index df9ac22..eefc687 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1400,6 +1400,8 @@ brelvp(struct buf *bp) BO_LOCK(bo); if (bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) buf_vlist_remove(bp); + else + panic("brelvp: Buffer %p not on queue.", bp); if ((bo->bo_flag & BO_ONWORKLST) && bo->bo_dirty.bv_cnt == 0) { bo->bo_flag &= ~BO_ONWORKLST; mtx_lock(&sync_mtx); @@ -1721,6 +1723,8 @@ reassignbuf(struct buf *bp) VI_LOCK(vp); if (bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) buf_vlist_remove(bp); + else + panic("reassignbuf: Buffer %p not on queue.", bp); /* * If dirty, put on list of dirty buffers; otherwise insert onto list * of clean buffers. |