In routine ffs_balloc(), after we have determined that the block is already there, we use the following statement to read the block in:
if (flags & B_CLRBUF) { error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp); if (error) { brelse(nbp); goto fail; } } else { nbp = getblk(vp, lbn, fs->fs_bsize, 0, 0); nbp->b_blkno = fsbtodb(fs, nb); } The semantics of B_CLRBUF is confusing here. Even if it is allowed to be twisted a little bit, what about the case when we are writing a FULL block? Do we still have to read its old contents back which is going to be erased entirely? Note that ufs_write() always sets B_CLRBUF. Thanks for any enlightenment. -Zhihui To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message