diff --git a/build/config_headers/tracing_config.h b/build/config_headers/tracing_config.h index c56588e8a1..294748e4ca 100644 --- a/build/config_headers/tracing_config.h +++ b/build/config_headers/tracing_config.h @@ -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 diff --git a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp index fc7c134909..ea4d6ab25a 100644 --- a/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp +++ b/src/add-ons/kernel/file_systems/bfs/BlockAllocator.cpp @@ -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 { diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index fe65e22dda..5687771542 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -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 diff --git a/src/add-ons/kernel/file_systems/bfs/Jamfile b/src/add-ons/kernel/file_systems/bfs/Jamfile index d92f5c545f..602767850d 100644 --- a/src/add-ons/kernel/file_systems/bfs/Jamfile +++ b/src/add-ons/kernel/file_systems/bfs/Jamfile @@ -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 ] ; diff --git a/src/add-ons/kernel/file_systems/bfs/Journal.cpp b/src/add-ons/kernel/file_systems/bfs/Journal.cpp index 7b65b8cde1..d9e183e250 100644 --- a/src/add-ons/kernel/file_systems/bfs/Journal.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Journal.cpp @@ -82,7 +82,7 @@ class LogEntry : public DoublyLinkedListLinkImpl { }; -#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 {