* Fixed at least the "dd" part of bug #2148: the second double indirect array
block would be incorrectly addressed when allocating a stream - this could cause random blocks to be overwritten, and therefore could cause many sorts of problems. * Moved BFS_TRACING macro to the tracing_config.h file, and let it follow the new semantics of those other macros in there. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25249 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -18,8 +18,9 @@
|
||||
|
||||
// macros specifying the tracing level for individual components (0 is disabled)
|
||||
|
||||
#define BMESSAGE_TRACING 0
|
||||
#define BFS_TRACING 0
|
||||
#define BLOCK_CACHE_TRANSACTION_TRACING 0
|
||||
#define BMESSAGE_TRACING 0
|
||||
#define KERNEL_HEAP_TRACING 0
|
||||
#define PAGE_ALLOCATION_TRACING 0
|
||||
#define PARANOIA_TRACING 0
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
// be improved a lot. Furthermore, the allocation policies used here should
|
||||
// have some real world tests.
|
||||
|
||||
#if defined(BFS_TRACING) && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
#if BFS_TRACING && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
namespace BFSBlockTracing {
|
||||
|
||||
class Allocate : public AbstractTraceEntry {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "Index.h"
|
||||
|
||||
|
||||
#if defined(BFS_TRACING) && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
#if BFS_TRACING && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
namespace BFSInodeTracing {
|
||||
|
||||
class Create : public AbstractTraceEntry {
|
||||
@@ -1733,7 +1733,7 @@ Inode::_GrowStream(Transaction &transaction, off_t size)
|
||||
off_t start = data->MaxDoubleIndirectRange()
|
||||
- data->MaxIndirectRange();
|
||||
int32 indirectIndex = start / indirectSize;
|
||||
int32 index = start / directSize;
|
||||
int32 index = (start % indirectSize) / directSize;
|
||||
|
||||
// distribute the blocks to the array and allocate
|
||||
// new array blocks when needed
|
||||
|
||||
@@ -11,7 +11,6 @@ SubDir HAIKU_TOP src add-ons kernel file_systems bfs ;
|
||||
{
|
||||
local defines =
|
||||
BFS_DEBUGGER_COMMANDS
|
||||
#BFS_TRACING
|
||||
#BFS_BIG_ENDIAN_ONLY
|
||||
;
|
||||
|
||||
@@ -47,6 +46,6 @@ KernelAddon bfs :
|
||||
;
|
||||
|
||||
SEARCH on [ FGristFiles
|
||||
kernel_cpp.cpp
|
||||
kernel_cpp.cpp
|
||||
] = [ FDirName $(HAIKU_TOP) src system kernel util ] ;
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ class LogEntry : public DoublyLinkedListLinkImpl<LogEntry> {
|
||||
};
|
||||
|
||||
|
||||
#if defined(BFS_TRACING) && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
#if BFS_TRACING && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||
namespace BFSJournalTracing {
|
||||
|
||||
class LogEntry : public AbstractTraceEntry {
|
||||
|
||||
Reference in New Issue
Block a user