11 struct omfs_super_block
*super
;
12 struct omfs_root_block
*root
;
13 struct omfs_bitmap
*bitmap
;
15 pthread_mutex_t dev_mutex
;
23 typedef struct omfs_info omfs_info_t
;
24 typedef struct omfs_header omfs_header_t
;
25 typedef struct omfs_super_block omfs_super_t
;
26 typedef struct omfs_bitmap omfs_bitmap_t
;
27 typedef struct omfs_root_block omfs_root_t
;
28 typedef struct omfs_inode omfs_inode_t
;
30 int omfs_read_super(omfs_info_t
*info
);
31 int omfs_write_super(omfs_info_t
*info
);
32 int omfs_read_root_block(omfs_info_t
*info
);
33 int omfs_write_root_block(omfs_info_t
*info
);
34 u8
*omfs_get_block(omfs_info_t
*info
, u64 block
);
35 int omfs_write_block(omfs_info_t
*info
, u64 block
, u8
* buf
);
36 void omfs_release_block(u8
*buf
);
37 int omfs_check_crc(u8
*blk
);
38 omfs_inode_t
*omfs_get_inode(omfs_info_t
*info
, u64 block
);
39 int omfs_write_inode(omfs_info_t
*info
, omfs_inode_t
*inode
);
40 void omfs_release_inode(omfs_inode_t
*inode
);
41 void omfs_sync(omfs_info_t
*info
);
42 int omfs_load_bitmap(omfs_info_t
*info
);
43 int omfs_flush_bitmap(omfs_info_t
*info
);
44 int omfs_compute_hash(omfs_info_t
*info
, char *filename
);
45 omfs_inode_t
*omfs_new_inode(omfs_info_t
*info
, u64 block
, char *name
,
47 void omfs_clear_data(omfs_info_t
*info
, u64 block
, int count
);
50 int omfs_allocate_one_block(omfs_info_t
*info
, u64 block
);
51 int omfs_allocate_block(omfs_info_t
*info
, int size
, u64
*return_block
);
52 int omfs_clear_range(omfs_info_t
*info
, u64 start
, int count
);
53 unsigned long omfs_count_free(omfs_info_t
*info
);