blob: ee95fa05c4a3e1fcf79928fcc7f6951086223b30 [file] [log] [blame]
Chris Masoneb60cea2007-02-02 09:18:22 -05001#ifndef __DISKIO__
2#define __DISKIO__
3
4struct tree_buffer {
5 u64 blocknr;
6 int count;
7 union {
8 struct node node;
9 struct leaf leaf;
10 };
11};
12
13struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
14int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
15struct ctree_root *open_ctree(char *filename);
16int close_ctree(struct ctree_root *root);
17void tree_block_release(struct ctree_root *root, struct tree_buffer *buf);
18struct tree_buffer *alloc_free_block(struct ctree_root *root);
19int update_root_block(struct ctree_root *root);
20
21#endif