Btrfs: Add backing store, memory management

Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Chris Mason 2007-02-02 09:18:22 -05:00 committed by David Woodhouse
parent 4920c9ac9a
commit eb60ceac0e
8 changed files with 1446 additions and 162 deletions

21
fs/btrfs/disk-io.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef __DISKIO__
#define __DISKIO__
struct tree_buffer {
u64 blocknr;
int count;
union {
struct node node;
struct leaf leaf;
};
};
struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
struct ctree_root *open_ctree(char *filename);
int close_ctree(struct ctree_root *root);
void tree_block_release(struct ctree_root *root, struct tree_buffer *buf);
struct tree_buffer *alloc_free_block(struct ctree_root *root);
int update_root_block(struct ctree_root *root);
#endif