aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.h
blob: e288fe883b9afb34c89e3b8d6d6c717183449f24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#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, struct ctree_super_block *s);
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 write_ctree_super(struct ctree_root *root, struct ctree_super_block *s);
int mkfs(int fd);

#define CTREE_SUPER_INFO_OFFSET(bs) (16 * (bs))

#endif