[haiku-commits] BRANCH ahenriksson-github.fixes - src/add-ons/kernel/file_systems/bfs

  • From: ahenriksson-github.fixes <community@xxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 23 Jul 2012 18:49:36 +0200 (CEST)

added 1 changeset to branch 'refs/remotes/ahenriksson-github/fixes'
old head: 38ccbefd64f652b8993f83c901156d515f44356d
new head: 740b0eba5e9e6ab171b33115e73232386372e764

----------------------------------------------------------------------------

740b0eb: Incorrect checking of already set double indirect blocks
  
  Wrong variable usage in inner loop caused some double indirect stream
  runs to be checked twice when block size was smaller than
  DOUBLE_INDIRECT_ARRAY_SIZE, while some were incorrectly marked as
  unallocated in the bitmap.

                                      [ ahenriksson <sausageboy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Commit:      740b0eba5e9e6ab171b33115e73232386372e764

Author:      ahenriksson <sausageboy@xxxxxxxxx>
Date:        Mon Jul 23 12:35:39 2012 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
.../kernel/file_systems/bfs/BlockAllocator.cpp     |    2 +-

----------------------------------------------------------------------------

diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp 
b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
index bc0f217..e732005 100644
--- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
+++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp
@@ -2013,7 +2013,7 @@ BlockAllocator::_CheckInodeBlocks(Inode* inode, const 
char* name)
                                        
fCheckCookie->control.stats.double_indirect_block_runs++;
                                        
fCheckCookie->control.stats.blocks_in_double_indirect
                                                += runs[index % 
runsPerBlock].Length();
-                               } while ((++index % runsPerArray) != 0);
+                               } while ((++index % runsPerBlock) != 0);
                        }
 
                        
fCheckCookie->control.stats.double_indirect_array_blocks++;


Other related posts: