* 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)
|
// 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 BLOCK_CACHE_TRANSACTION_TRACING 0
|
||||||
|
#define BMESSAGE_TRACING 0
|
||||||
#define KERNEL_HEAP_TRACING 0
|
#define KERNEL_HEAP_TRACING 0
|
||||||
#define PAGE_ALLOCATION_TRACING 0
|
#define PAGE_ALLOCATION_TRACING 0
|
||||||
#define PARANOIA_TRACING 0
|
#define PARANOIA_TRACING 0
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
// be improved a lot. Furthermore, the allocation policies used here should
|
// be improved a lot. Furthermore, the allocation policies used here should
|
||||||
// have some real world tests.
|
// 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 {
|
namespace BFSBlockTracing {
|
||||||
|
|
||||||
class Allocate : public AbstractTraceEntry {
|
class Allocate : public AbstractTraceEntry {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
#include "Index.h"
|
#include "Index.h"
|
||||||
|
|
||||||
|
|
||||||
#if defined(BFS_TRACING) && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
#if BFS_TRACING && !defined(BFS_SHELL) && !defined(_BOOT_MODE)
|
||||||
namespace BFSInodeTracing {
|
namespace BFSInodeTracing {
|
||||||
|
|
||||||
class Create : public AbstractTraceEntry {
|
class Create : public AbstractTraceEntry {
|
||||||
@@ -1733,7 +1733,7 @@ Inode::_GrowStream(Transaction &transaction, off_t size)
|
|||||||
off_t start = data->MaxDoubleIndirectRange()
|
off_t start = data->MaxDoubleIndirectRange()
|
||||||
- data->MaxIndirectRange();
|
- data->MaxIndirectRange();
|
||||||
int32 indirectIndex = start / indirectSize;
|
int32 indirectIndex = start / indirectSize;
|
||||||
int32 index = start / directSize;
|
int32 index = (start % indirectSize) / directSize;
|
||||||
|
|
||||||
// distribute the blocks to the array and allocate
|
// distribute the blocks to the array and allocate
|
||||||
// new array blocks when needed
|
// new array blocks when needed
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ SubDir HAIKU_TOP src add-ons kernel file_systems bfs ;
|
|||||||
{
|
{
|
||||||
local defines =
|
local defines =
|
||||||
BFS_DEBUGGER_COMMANDS
|
BFS_DEBUGGER_COMMANDS
|
||||||
#BFS_TRACING
|
|
||||||
#BFS_BIG_ENDIAN_ONLY
|
#BFS_BIG_ENDIAN_ONLY
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
namespace BFSJournalTracing {
|
||||||
|
|
||||||
class LogEntry : public AbstractTraceEntry {
|
class LogEntry : public AbstractTraceEntry {
|
||||||
|
|||||||
Reference in New Issue
Block a user