Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
btree.h File Reference
#include "hfs_fs.h"

Go to the source code of this file.

Data Structures

struct  hfs_btree
 
struct  hfs_bnode
 
struct  hfs_find_data
 
struct  hfs_bnode_desc
 
struct  hfs_btree_header_rec
 

Macros

#define NODE_HASH_SIZE   256
 
#define HFS_BNODE_ERROR   0
 
#define HFS_BNODE_NEW   1
 
#define HFS_BNODE_DELETED   2
 
#define HFS_NODE_INDEX   0x00 /* An internal (index) node */
 
#define HFS_NODE_HEADER   0x01 /* The tree header node (node 0) */
 
#define HFS_NODE_MAP   0x02 /* Holds part of the bitmap of used nodes */
 
#define HFS_NODE_LEAF   0xFF /* A leaf (ndNHeight==1) node */
 
#define HFS_NODE_INDEX   0x00 /* An internal (index) node */
 
#define HFS_NODE_HEADER   0x01 /* The tree header node (node 0) */
 
#define HFS_NODE_MAP   0x02 /* Holds part of the bitmap of used nodes */
 
#define HFS_NODE_LEAF   0xFF /* A leaf (ndNHeight==1) node */
 
#define BTREE_ATTR_BADCLOSE
 
#define HFS_TREE_BIGKEYS
 
#define HFS_TREE_VARIDXKEYS
 

Typedefs

typedef int(* btree_keycmp )(const btree_key *, const btree_key *)
 

Functions

struct hfs_btreehfs_btree_open (struct super_block *, u32, btree_keycmp)
 
void hfs_btree_close (struct hfs_btree *)
 
void hfs_btree_write (struct hfs_btree *)
 
struct hfs_bnodehfs_bmap_alloc (struct hfs_btree *)
 
void hfs_bmap_free (struct hfs_bnode *node)
 
void hfs_bnode_read (struct hfs_bnode *, void *, int, int)
 
u16 hfs_bnode_read_u16 (struct hfs_bnode *, int)
 
u8 hfs_bnode_read_u8 (struct hfs_bnode *, int)
 
void hfs_bnode_read_key (struct hfs_bnode *, void *, int)
 
void hfs_bnode_write (struct hfs_bnode *, void *, int, int)
 
void hfs_bnode_write_u16 (struct hfs_bnode *, int, u16)
 
void hfs_bnode_write_u8 (struct hfs_bnode *, int, u8)
 
void hfs_bnode_clear (struct hfs_bnode *, int, int)
 
void hfs_bnode_copy (struct hfs_bnode *, int, struct hfs_bnode *, int, int)
 
void hfs_bnode_move (struct hfs_bnode *, int, int, int)
 
void hfs_bnode_dump (struct hfs_bnode *)
 
void hfs_bnode_unlink (struct hfs_bnode *)
 
struct hfs_bnodehfs_bnode_findhash (struct hfs_btree *, u32)
 
struct hfs_bnodehfs_bnode_find (struct hfs_btree *, u32)
 
void hfs_bnode_unhash (struct hfs_bnode *)
 
void hfs_bnode_free (struct hfs_bnode *)
 
struct hfs_bnodehfs_bnode_create (struct hfs_btree *, u32)
 
void hfs_bnode_get (struct hfs_bnode *)
 
void hfs_bnode_put (struct hfs_bnode *)
 
u16 hfs_brec_lenoff (struct hfs_bnode *, u16, u16 *)
 
u16 hfs_brec_keylen (struct hfs_bnode *, u16)
 
int hfs_brec_insert (struct hfs_find_data *, void *, int)
 
int hfs_brec_remove (struct hfs_find_data *)
 
int hfs_find_init (struct hfs_btree *, struct hfs_find_data *)
 
void hfs_find_exit (struct hfs_find_data *)
 
int __hfs_brec_find (struct hfs_bnode *, struct hfs_find_data *)
 
int hfs_brec_find (struct hfs_find_data *)
 
int hfs_brec_read (struct hfs_find_data *, void *, int)
 
int hfs_brec_goto (struct hfs_find_data *, int)
 

Variables

struct hfs_bnode_desc __packed
 

Macro Definition Documentation

#define BTREE_ATTR_BADCLOSE
Value:
0x00000001 /* b-tree not closed properly. not
used by hfsplus. */

Definition at line 161 of file btree.h.

#define HFS_BNODE_DELETED   2

Definition at line 67 of file btree.h.

#define HFS_BNODE_ERROR   0

Definition at line 65 of file btree.h.

#define HFS_BNODE_NEW   1

Definition at line 66 of file btree.h.

#define HFS_NODE_HEADER   0x01 /* The tree header node (node 0) */

Definition at line 157 of file btree.h.

#define HFS_NODE_HEADER   0x01 /* The tree header node (node 0) */

Definition at line 157 of file btree.h.

#define HFS_NODE_INDEX   0x00 /* An internal (index) node */

Definition at line 156 of file btree.h.

#define HFS_NODE_INDEX   0x00 /* An internal (index) node */

Definition at line 156 of file btree.h.

#define HFS_NODE_LEAF   0xFF /* A leaf (ndNHeight==1) node */

Definition at line 159 of file btree.h.

#define HFS_NODE_LEAF   0xFF /* A leaf (ndNHeight==1) node */

Definition at line 159 of file btree.h.

#define HFS_NODE_MAP   0x02 /* Holds part of the bitmap of used nodes */

Definition at line 158 of file btree.h.

#define HFS_NODE_MAP   0x02 /* Holds part of the bitmap of used nodes */

Definition at line 158 of file btree.h.

#define HFS_TREE_BIGKEYS
Value:
0x00000002 /* key length is u16 instead of u8.
used by hfsplus. */

Definition at line 162 of file btree.h.

#define HFS_TREE_VARIDXKEYS
Value:
0x00000004 /* variable key length instead of
max key length. use din catalog
b-tree but not in extents
b-tree (hfsplus). */

Definition at line 163 of file btree.h.

#define NODE_HASH_SIZE   256

Definition at line 13 of file btree.h.

Typedef Documentation

typedef int(* btree_keycmp)(const btree_key *, const btree_key *)

Definition at line 11 of file btree.h.

Function Documentation

int __hfs_brec_find ( struct hfs_bnode ,
struct hfs_find_data  
)

Definition at line 40 of file bfind.c.

struct hfs_bnode* hfs_bmap_alloc ( struct hfs_btree )
read

Definition at line 222 of file btree.c.

void hfs_bmap_free ( struct hfs_bnode node)

Definition at line 311 of file btree.c.

void hfs_bnode_clear ( struct hfs_bnode ,
int  ,
int   
)

Definition at line 85 of file bnode.c.

void hfs_bnode_copy ( struct hfs_bnode ,
int  ,
struct hfs_bnode ,
int  ,
int   
)

Definition at line 97 of file bnode.c.

struct hfs_bnode* hfs_bnode_create ( struct hfs_btree ,
u32   
)
read

Definition at line 408 of file bnode.c.

void hfs_bnode_dump ( struct hfs_bnode )

Definition at line 135 of file bnode.c.

struct hfs_bnode* hfs_bnode_find ( struct hfs_btree ,
u32   
)
read

Definition at line 315 of file bnode.c.

struct hfs_bnode* hfs_bnode_findhash ( struct hfs_btree ,
u32   
)
read

Definition at line 218 of file bnode.c.

void hfs_bnode_free ( struct hfs_bnode )

Definition at line 398 of file bnode.c.

void hfs_bnode_get ( struct hfs_bnode )

Definition at line 442 of file bnode.c.

void hfs_bnode_move ( struct hfs_bnode ,
int  ,
int  ,
int   
)

Definition at line 118 of file bnode.c.

void hfs_bnode_put ( struct hfs_bnode )

Definition at line 452 of file bnode.c.

void hfs_bnode_read ( struct hfs_bnode ,
void ,
int  ,
int   
)

Definition at line 17 of file bnode.c.

void hfs_bnode_read_key ( struct hfs_bnode ,
void ,
int   
)

Definition at line 45 of file bnode.c.

u16 hfs_bnode_read_u16 ( struct hfs_bnode ,
int   
)

Definition at line 29 of file bnode.c.

u8 hfs_bnode_read_u8 ( struct hfs_bnode ,
int   
)

Definition at line 37 of file bnode.c.

void hfs_bnode_unhash ( struct hfs_bnode )

Definition at line 300 of file bnode.c.

void hfs_bnode_unlink ( struct hfs_bnode )

Definition at line 171 of file bnode.c.

void hfs_bnode_write ( struct hfs_bnode ,
void ,
int  ,
int   
)

Definition at line 60 of file bnode.c.

void hfs_bnode_write_u16 ( struct hfs_bnode ,
int  ,
u16   
)

Definition at line 72 of file bnode.c.

void hfs_bnode_write_u8 ( struct hfs_bnode ,
int  ,
u8   
)

Definition at line 79 of file bnode.c.

int hfs_brec_find ( struct hfs_find_data )

Definition at line 92 of file bfind.c.

int hfs_brec_goto ( struct hfs_find_data ,
int   
)

Definition at line 159 of file bfind.c.

int hfs_brec_insert ( struct hfs_find_data ,
void ,
int   
)

Definition at line 66 of file brec.c.

u16 hfs_brec_keylen ( struct hfs_bnode ,
u16   
)

Definition at line 30 of file brec.c.

u16 hfs_brec_lenoff ( struct hfs_bnode ,
u16  ,
u16  
)

Definition at line 18 of file brec.c.

int hfs_brec_read ( struct hfs_find_data ,
void ,
int   
)

Definition at line 146 of file bfind.c.

int hfs_brec_remove ( struct hfs_find_data )

Definition at line 176 of file brec.c.

void hfs_btree_close ( struct hfs_btree )

Definition at line 137 of file btree.c.

struct hfs_btree* hfs_btree_open ( struct super_block ,
u32  ,
btree_keycmp   
)
read

Definition at line 18 of file btree.c.

void hfs_btree_write ( struct hfs_btree )

Definition at line 159 of file btree.c.

void hfs_find_exit ( struct hfs_find_data )

Definition at line 30 of file bfind.c.

int hfs_find_init ( struct hfs_btree ,
struct hfs_find_data  
)

Definition at line 14 of file bfind.c.

Variable Documentation