bioops.io_start() was being called in a situation where the buffer could
authorMatthew Dillon <dillon@dragonflybsd.org>
Tue, 21 Feb 2006 18:46:56 +0000 (18:46 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Tue, 21 Feb 2006 18:46:56 +0000 (18:46 +0000)
commit2aee763bde004bfb950ba9eb3ec05ace0b8a0210
tree276433ba314a23036617ab95e9a9c782cd06e95c
parent9710083970a517d499c77c8d3d873196e6098002
bioops.io_start() was being called in a situation where the buffer could
be brelse()'d afterwords instead of I/O being initiated.  When this occurs,
the buffer may contain softupdates-modified data which is never reverted,
resulting in serious filesystem corruption.  When io_start is called on a
buffer, I/O MUST be initiated and terminated with a biodone() or the buffer's
data may not be properly reverted.

Solve the problem by moving the io_start() call a little further on in the
code, after the potential brelse().

There is a possibility that this bug is responsible for the 'dirbad' panics
often reported in DragonFly and FreeBSD circles.
sys/kern/vfs_cluster.c