diff options
author | Jeff Roberson <jeff@FreeBSD.org> | 2005-05-01 12:00:36 +0000 |
---|---|---|
committer | Jeff Roberson <jeff@FreeBSD.org> | 2005-05-01 12:00:36 +0000 |
commit | b2e2166483acc51ab617238b02ea00adf0bb7d03 (patch) | |
tree | ab979b09966c2e18931c5a5fae41cef184fec4d1 /sys/kern/vfs_subr.c | |
parent | d1401c9000732247c8f8db3b6abe7a2e53393d5d (diff) | |
download | src-b2e2166483acc51ab617238b02ea00adf0bb7d03.tar.gz src-b2e2166483acc51ab617238b02ea00adf0bb7d03.zip |
- 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.
Notes
Notes:
svn path=/head/; revision=145767
Diffstat (limited to 'sys/kern/vfs_subr.c')
-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 df9ac22a29c1..eefc6873e7e8 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. |