]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/btrfs/disk-io.h
Btrfs: initial move to kernel module land
[linux-2.6-omap-h63xx.git] / fs / btrfs / disk-io.h
index b5dee2fae4daa6297355687a30205f592a9ef493..d888cf5c350bf5b114e128584621b43269bbd543 100644 (file)
@@ -2,29 +2,35 @@
 #define __DISKIO__
 #include "list.h"
 
-struct tree_buffer {
+struct btrfs_buffer {
        u64 blocknr;
        int count;
-       union {
-               struct node node;
-               struct leaf leaf;
-       };
        struct list_head dirty;
        struct list_head cache;
+       union {
+               struct btrfs_node node;
+               struct btrfs_leaf leaf;
+       };
 };
 
-struct tree_buffer *read_tree_block(struct ctree_root *root, u64 blocknr);
-struct tree_buffer *find_tree_block(struct ctree_root *root, u64 blocknr);
-int write_tree_block(struct ctree_root *root, struct tree_buffer *buf);
-int dirty_tree_block(struct ctree_root *root, struct tree_buffer *buf);
-int clean_tree_block(struct ctree_root *root, struct tree_buffer *buf);
-int commit_transaction(struct ctree_root *root);
-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);
-int write_ctree_super(struct ctree_root *root, struct ctree_super_block *s);
-int mkfs(int fd);
+struct btrfs_buffer *read_tree_block(struct btrfs_root *root, u64 blocknr);
+struct btrfs_buffer *find_tree_block(struct btrfs_root *root, u64 blocknr);
+int write_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
+                    struct btrfs_buffer *buf);
+int dirty_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
+                    struct btrfs_buffer *buf);
+int clean_tree_block(struct btrfs_trans_handle *trans,
+                    struct btrfs_root *root, struct btrfs_buffer *buf);
+int btrfs_commit_transaction(struct btrfs_trans_handle *trans, struct btrfs_root
+                            *root, struct btrfs_super_block *s);
+struct btrfs_root *open_ctree(char *filename, struct btrfs_super_block *s);
+struct btrfs_root *open_ctree_fd(int fp, struct btrfs_super_block *super);
+int close_ctree(struct btrfs_root *root, struct btrfs_super_block *s);
+void btrfs_block_release(struct btrfs_root *root, struct btrfs_buffer *buf);
+int write_ctree_super(struct btrfs_trans_handle *trans, struct btrfs_root *root,
+                     struct btrfs_super_block *s);
+int mkfs(int fd, u64 num_blocks, u32 blocksize);
 
-#define CTREE_SUPER_INFO_OFFSET(bs) (16 * (bs))
+#define BTRFS_SUPER_INFO_OFFSET (16 * 1024)
 
 #endif