* We need to reset the blockNumber, or else we'll discard the wrong blocks
which has rather desastrous consequences - thanks to Stippi for the heads up :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38242 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+3
@@ -3406,6 +3406,9 @@ block_cache_discard(void* _cache, off_t blockNumber, size_t numBlocks)
|
||||
writer.Write();
|
||||
// TODO: this can fail, too!
|
||||
|
||||
blockNumber -= numBlocks;
|
||||
// reset blockNumber to its original value
|
||||
|
||||
for (size_t i = 0; i < numBlocks; i++, blockNumber++) {
|
||||
cached_block* block = (cached_block*)hash_lookup(cache->hash,
|
||||
&blockNumber);
|
||||
|
||||
Reference in New Issue
Block a user