]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfscommon/headers/BTreesPrivate.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / bsd / hfs / hfscommon / headers / BTreesPrivate.h
index 805c86346b69ffbf7c10eb804171c3dda4ed8ece..852942dd069c29230fc7636765ac2a63d2ea0047 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2003 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -185,7 +185,7 @@ typedef enum {
 
 typedef struct BTreeControlBlock {                                     // fields specific to BTree CBs
 
 
 typedef struct BTreeControlBlock {                                     // fields specific to BTree CBs
 
-       UInt8                                            reserved1;                     // keep for alignment with old style fields
+       UInt8           keyCompareType;   /* Key string Comparison Type */
        UInt8                                            btreeType;
        UInt16                                           treeDepth;
        FileReference                            fileRefNum;            // refNum of btree file
        UInt8                                            btreeType;
        UInt16                                           treeDepth;
        FileReference                            fileRefNum;            // refNum of btree file
@@ -221,7 +221,7 @@ typedef struct BTreeControlBlock {                                  // fields specific to BTree CBs
        UInt32                                           numHintChecks;
        UInt32                                           numPossibleHints;      // Looks like a formated hint
        UInt32                                           numValidHints;         // Hint used to find correct record.
        UInt32                                           numHintChecks;
        UInt32                                           numPossibleHints;      // Looks like a formated hint
        UInt32                                           numValidHints;         // Hint used to find correct record.
-
+       UInt32                                  reservedNodes;
 } BTreeControlBlock, *BTreeControlBlockPtr;
 
 
 } BTreeControlBlock, *BTreeControlBlockPtr;
 
 
@@ -314,6 +314,10 @@ OSStatus   ExtendBTree                             (BTreeControlBlockPtr    btreePtr,
 
 UInt32         CalcMapBits                             (BTreeControlBlockPtr    btreePtr);
 
 
 UInt32         CalcMapBits                             (BTreeControlBlockPtr    btreePtr);
 
+SInt32         BTAvailableNodes                        (BTreeControlBlock *btree);
+
+void           BTUpdateReserve                         (BTreeControlBlockPtr btreePtr,
+                                                         int nodes);
 
 //////////////////////////////// Misc Operations ////////////////////////////////
 
 
 //////////////////////////////// Misc Operations ////////////////////////////////
 
@@ -398,9 +402,6 @@ OSStatus    GetMapNode                              (BTreeControlBlockPtr    btreePtr,
 
 //// Node Buffer Operations
 
 
 //// Node Buffer Operations
 
-OSStatus       CheckNode                               (BTreeControlBlockPtr    btreePtr,
-                                                                        NodeDescPtr                     node );
-
 void           ClearNode                               (BTreeControlBlockPtr    btreePtr,
                                                                         NodeDescPtr                     node );
 
 void           ClearNode                               (BTreeControlBlockPtr    btreePtr,
                                                                         NodeDescPtr                     node );