* The block allocator now uses block_cache_discard() to make sure the file

and the block cache don't interfere when working on the same blocks.
* This has fixed all kinds of file corruptions I could reproduce before,
  therefore likely also bug #3010.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28517 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-11-05 16:09:47 +00:00
parent fbc2cd83dc
commit 897a2e2113

View File

@ -867,6 +867,11 @@ BlockAllocator::AllocateBlocks(Transaction& transaction, int32 groupIndex,
// If the value is not correct at mount time, it will be
// fixed anyway.
// We need to flush any remaining blocks in the new allocation to make sure
// they won't interfere with the file cache.
block_cache_discard(fVolume->BlockCache(), fVolume->ToBlock(run),
run.Length());
T(Allocate(run));
return B_OK;
}