Fix a bug in our RB_SCAN calls. A critical section is required to
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 5 Dec 2005 06:13:16 +0000 (06:13 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 5 Dec 2005 06:13:16 +0000 (06:13 +0000)
commit2ef16e04ed7ba0133f5896ef04ddbd3e12b15e86
tree5392f06d1f6f54c08f43a5bbac7bf136d697162f
parentd5568b50ffb7da58a7aa9cbc9bc0195ff8c403ec
Fix a bug in our RB_SCAN calls.  A critical section is required to
protect the RB tree against I/O completions.  Also do not abort a scan
if an I/O completion moves a buffer off the dirty list and onto the clean
list while we are trying to lock it.

There is a small chance that this bug could have resulted in dirty buffers
being left intact after being freed from the filesystem bitmap, which in
turn can cause filesystem corruption (dirbad and other panics).

Note that this was a DragonFly-only bug.
sys/vfs/ufs/ffs_softdep.c