Btrfs: Fixup reference counting on cows
[deliverable/linux.git] / fs / btrfs / disk-io.h
CommitLineData
eb60ceac
CM
1#ifndef __DISKIO__
2#define __DISKIO__
ed2ff2cb 3#include "list.h"
eb60ceac
CM
4
5struct tree_buffer {
6 u64 blocknr;
7 int count;
8 union {
9 struct node node;
10 struct leaf leaf;
11 };
ed2ff2cb
CM
12 struct list_head dirty;
13 struct list_head cache;
eb60ceac
CM
14};
15
16struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
9a8dd150 17struct tree_buffer *find_tree_block(struct ctree_root *root, u64 blocknr);
eb60ceac 18int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
ed2ff2cb
CM
19int dirty_tree_block(struct ctree_root *root, struct tree_buffer *buf);
20int clean_tree_block(struct ctree_root *root, struct tree_buffer *buf);
a28ec197 21int commit_transaction(struct ctree_root *root, struct ctree_super_block *s);
cfaa7295 22struct ctree_root *open_ctree(char *filename, struct ctree_super_block *s);
a28ec197 23int close_ctree(struct ctree_root *root, struct ctree_super_block *s);
eb60ceac 24void tree_block_release(struct ctree_root *root, struct tree_buffer *buf);
cfaa7295 25int write_ctree_super(struct ctree_root *root, struct ctree_super_block *s);
d97e63b6
CM
26int mkfs(int fd);
27
28#define CTREE_SUPER_INFO_OFFSET(bs) (16 * (bs))
eb60ceac
CM
29
30#endif
This page took 0.025568 seconds and 5 git commands to generate.