*/
#include "../headers/BTreesPrivate.h"
-#include "../headers/HFSInstrumentation.h"
GetBlockProcPtr getNodeProc;
- LogStartTime(kTraceGetNode);
-
//\80\80 is nodeNum within proper range?
if( nodeNum >= btreePtr->totalNodes )
{
}
}
- LogEndTime(kTraceGetNode, noErr);
-
return noErr;
ErrorExit:
nodePtr->buffer = nil;
nodePtr->blockHeader = nil;
-
- LogEndTime(kTraceGetNode, err);
return err;
}
{
OSStatus err;
ReleaseBlockProcPtr releaseNodeProc;
-
-
- LogStartTime(kTraceReleaseNode);
+
err = noErr;
nodePtr->buffer = nil;
nodePtr->blockHeader = nil;
-
- LogEndTime(kTraceReleaseNode, err);
return err;
}
OSStatus err;
ReleaseBlockProcPtr releaseNodeProc;
-
- LogStartTime(kTraceReleaseNode);
err = noErr;
nodePtr->buffer = nil;
nodePtr->blockHeader = nil;
- LogEndTime(kTraceReleaseNode, err);
-
return err;
}
(void) CheckNode (btreePtr, nodePtr->buffer);
}
- LogStartTime(kTraceReleaseNode);
-
releaseNodeProc = btreePtr->releaseBlockProc;
err = releaseNodeProc (btreePtr->fileRefNum,
nodePtr,
flags | kMarkBlockDirty );
-
- LogEndTime(kTraceReleaseNode, err);
-
- M_ExitOnError (err);
++btreePtr->numUpdateNodes;
+ M_ExitOnError (err);
}
nodePtr->buffer = nil;
//XXX can we calculate a more accurate minimum record size?
maxRecords = ( nodeSize - sizeof (BTNodeDescriptor) ) >> 3;
-
- if (node->numRecords > maxRecords)
+
+ if (node->numRecords == 0 || node->numRecords > maxRecords)
return fsBTInvalidNodeErr;
////////////////////////// check record offsets /////////////////////////////