DragonFly commits List (threaded) for 2006-03
cvs commit: src/sys/kern vfs_cluster.c
dillon 2006/03/10 09:51:54 PST
DragonFly src repository
cluster_read() was very dangerously issuing a blind BMAP for a buffer
cache block that was not yet locked, then locking the block and
unconditionally setting its block number translation to the results.
Due to the potential blocking that can occur inbetween these two operations,
it is possible (but not proven) that this can result in a buffer with a
stale translation. If that buffer is later dirtied and written to disk,
the filesystem can become corrupt.
Change the code to getblk() the block prior to attempting to BMAP it, and
make the fbp argument to cluster_rbuild() mandatory.
Revision Changes Path
1.18 +29 -27 src/sys/kern/vfs_cluster.c