diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-02-02 09:18:22 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-02-02 09:18:22 -0500 |
commit | eb60ceac0ebd11e9896ed1ca84fcad71a4b23601 (patch) | |
tree | 70d426737630b713bc18dc5ae8c342651f0f1f44 /fs/btrfs/disk-io.h | |
parent | 4920c9ac9a4bbc6bf9acd8c614987ee6b378e78f (diff) | |
download | lwn-eb60ceac0ebd11e9896ed1ca84fcad71a4b23601.tar.gz lwn-eb60ceac0ebd11e9896ed1ca84fcad71a4b23601.zip |
Btrfs: Add backing store, memory management
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h new file mode 100644 index 000000000000..ee95fa05c4a3 --- /dev/null +++ b/fs/btrfs/disk-io.h @@ -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 |