[Haiku-commits] r31252 - haiku/trunk/src/add-ons/kernel/file_systems/bfs

axeld at BerliOS axeld at mail.berlios.de
Fri Jun 26 15:47:14 CEST 2009


Author: axeld
Date: 2009-06-26 15:47:13 +0200 (Fri, 26 Jun 2009)
New Revision: 31252
ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=31252&view=rev

Modified:
   haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
Log:
* Fixed two bugs in CheckBlocks(), might help with bug #4042.


Modified: haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp	2009-06-26 13:12:06 UTC (rev 31251)
+++ haiku/trunk/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp	2009-06-26 13:47:13 UTC (rev 31252)
@@ -1514,7 +1514,7 @@
 		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 @@
 			}
 		}
 
+		blockOffset = 0;
+
 		if (++groupBlock >= fGroups[group].NumBlocks()) {
 			groupBlock = 0;
 			group++;




More information about the Haiku-commits mailing list