* Fixed two bugs in CheckBlocks(), might help with bug #4042.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31252 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1514,7 +1514,7 @@ BlockAllocator::CheckBlocks(off_t start, off_t length, bool allocated)
|
||||
return B_BAD_VALUE;
|
||||
|
||||
uint32 group = start >> fVolume->AllocationGroupShift();
|
||||
uint32 groupBlock = start % (fVolume->BlockSize() << 3);
|
||||
uint32 groupBlock = start / (fVolume->BlockSize() << 3);
|
||||
uint32 blockOffset = start % fVolume->BlockSize();
|
||||
|
||||
AllocationBlock cached(fVolume);
|
||||
@@ -1530,6 +1530,8 @@ BlockAllocator::CheckBlocks(off_t start, off_t length, bool allocated)
|
||||
}
|
||||
}
|
||||
|
||||
blockOffset = 0;
|
||||
|
||||
if (++groupBlock >= fGroups[group].NumBlocks()) {
|
||||
groupBlock = 0;
|
||||
group++;
|
||||
|
||||
Reference in New Issue
Block a user