From 4986b5c767fd4d8d6b7515a16cac1456a283531e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 14 Oct 2008 22:42:49 +0000 Subject: [PATCH] * Fixed the wrong check for the largest block: it was always checked, no matter if the largest block was marked invalid or not. Thanks for testing, luroh :-) * Fixed warning. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28113 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index a9c9a3bfe4..d4c076816a 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -818,7 +818,7 @@ BlockAllocator::AllocateBlocks(Transaction& transaction, int32 group, start = 0; } - if (current == fGroups[group].NumBits()) { + if (current == (int32)fGroups[group].NumBits()) { if (range > bestLength) { bestGroup = group; bestStart = rangeStart; @@ -1075,7 +1075,7 @@ BlockAllocator::_CheckGroup(int32 groupIndex) const dprintf("group %d first free too late\n", (int)groupIndex); } - if (largestStart != group.fLargestStart + if (group.fLargestValid && largestStart != group.fLargestStart || largestLength != group.fLargestLength) { panic("bfs %p: group %d largest differs: %d.%d, checked %d.%d.\n", fVolume, (int)groupIndex, (int)group.fLargestStart,