cached_block::Compare() was ignoring the upper 32 bit of the block
number. Was a problem only for partitions > 2^32 * block size (4TB for 1KB blocks). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24393 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+5
-1
@@ -296,7 +296,11 @@ cached_block::Compare(void *_cacheEntry, const void *_block)
|
||||
cached_block *cacheEntry = (cached_block *)_cacheEntry;
|
||||
const off_t *block = (const off_t *)_block;
|
||||
|
||||
return cacheEntry->block_number - *block;
|
||||
off_t diff = cacheEntry->block_number - *block;
|
||||
if (diff > 0)
|
||||
return 1;
|
||||
|
||||
return diff < 0 ? -1 : 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user