aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-26 16:00:06 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-26 16:00:06 -0400
commitdee26a9f7aab7ffe1193cd1415b23a69426acc9f (patch)
tree7271c85340349817b92647d8882247478192d1bb /fs/btrfs/ctree.h
parent4730a4bc5bf3861d2cb40999374b3ac0ee2a1e0d (diff)
btrfs_get_block, file read/write
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 0aa1052d9f67..7b7120d3ab42 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -198,7 +198,7 @@ struct btrfs_file_extent_item {
198 __le64 disk_blocknr; 198 __le64 disk_blocknr;
199 __le64 disk_num_blocks; 199 __le64 disk_num_blocks;
200 /* 200 /*
201 * the logical offset in file bytes (no csums) 201 * the logical offset in file blocks (no csums)
202 * this extent record is for. This allows a file extent to point 202 * this extent record is for. This allows a file extent to point
203 * into the middle of an existing extent on disk, sharing it 203 * into the middle of an existing extent on disk, sharing it
204 * between two snapshots (useful if some bytes in the middle of the 204 * between two snapshots (useful if some bytes in the middle of the
@@ -812,12 +812,19 @@ static inline struct btrfs_root *btrfs_sb(struct super_block *sb)
812 ((type *)(btrfs_leaf_data(leaf) + \ 812 ((type *)(btrfs_leaf_data(leaf) + \
813 btrfs_item_offset((leaf)->items + (slot)))) 813 btrfs_item_offset((leaf)->items + (slot))))
814 814
815/* extent-item.c */
815struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans, 816struct buffer_head *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
816 struct btrfs_root *root); 817 struct btrfs_root *root);
818int btrfs_alloc_extent(struct btrfs_trans_handle *trans, struct btrfs_root
819 *root, u64 num_blocks, u64 search_start, u64
820 search_end, u64 owner, struct btrfs_key *ins);
817int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, 821int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
818 struct buffer_head *buf); 822 struct buffer_head *buf);
819int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root 823int btrfs_free_extent(struct btrfs_trans_handle *trans, struct btrfs_root
820 *root, u64 blocknr, u64 num_blocks, int pin); 824 *root, u64 blocknr, u64 num_blocks, int pin);
825int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct
826 btrfs_root *root);
827/* ctree.c */
821int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root 828int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
822 *root, struct btrfs_key *key, struct btrfs_path *p, int 829 *root, struct btrfs_key *key, struct btrfs_path *p, int
823 ins_len, int cow); 830 ins_len, int cow);
@@ -834,8 +841,7 @@ int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
834int btrfs_leaf_free_space(struct btrfs_root *root, struct btrfs_leaf *leaf); 841int btrfs_leaf_free_space(struct btrfs_root *root, struct btrfs_leaf *leaf);
835int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root 842int btrfs_drop_snapshot(struct btrfs_trans_handle *trans, struct btrfs_root
836 *root, struct buffer_head *snap); 843 *root, struct buffer_head *snap);
837int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans, struct 844/* root-item.c */
838 btrfs_root *root);
839int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, 845int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
840 struct btrfs_key *key); 846 struct btrfs_key *key);
841int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root 847int btrfs_insert_root(struct btrfs_trans_handle *trans, struct btrfs_root
@@ -846,6 +852,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
846 *item); 852 *item);
847int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct 853int btrfs_find_last_root(struct btrfs_root *root, u64 objectid, struct
848 btrfs_root_item *item, struct btrfs_key *key); 854 btrfs_root_item *item, struct btrfs_key *key);
855/* dir-item.c */
849int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root 856int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
850 *root, const char *name, int name_len, u64 dir, u64 857 *root, const char *name, int name_len, u64 dir, u64
851 objectid, u8 type); 858 objectid, u8 type);
@@ -854,6 +861,7 @@ int btrfs_lookup_dir_item(struct btrfs_trans_handle *trans, struct btrfs_root
854 const char *name, int name_len, int mod); 861 const char *name, int name_len, int mod);
855int btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path, 862int btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path,
856 const char *name, int name_len); 863 const char *name, int name_len);
864/* inode-map.c */
857int btrfs_find_free_objectid(struct btrfs_trans_handle *trans, 865int btrfs_find_free_objectid(struct btrfs_trans_handle *trans,
858 struct btrfs_root *fs_root, 866 struct btrfs_root *fs_root,
859 u64 dirid, u64 *objectid); 867 u64 dirid, u64 *objectid);
@@ -863,9 +871,21 @@ int btrfs_insert_inode_map(struct btrfs_trans_handle *trans,
863int btrfs_lookup_inode_map(struct btrfs_trans_handle *trans, 871int btrfs_lookup_inode_map(struct btrfs_trans_handle *trans,
864 struct btrfs_root *root, struct btrfs_path *path, 872 struct btrfs_root *root, struct btrfs_path *path,
865 u64 objectid, int mod); 873 u64 objectid, int mod);
874/* inode-item.c */
866int btrfs_insert_inode(struct btrfs_trans_handle *trans, struct btrfs_root 875int btrfs_insert_inode(struct btrfs_trans_handle *trans, struct btrfs_root
867 *root, u64 objectid, struct btrfs_inode_item 876 *root, u64 objectid, struct btrfs_inode_item
868 *inode_item); 877 *inode_item);
869int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root 878int btrfs_lookup_inode(struct btrfs_trans_handle *trans, struct btrfs_root
870 *root, struct btrfs_path *path, u64 objectid, int mod); 879 *root, struct btrfs_path *path, u64 objectid, int mod);
880
881/* file-item.c */
882int btrfs_alloc_file_extent(struct btrfs_trans_handle *trans,
883 struct btrfs_root *root,
884 u64 objectid, u64 offset,
885 u64 num_blocks, u64 hint_block,
886 u64 *result);
887int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
888 struct btrfs_root *root,
889 struct btrfs_path *path, u64 objectid,
890 u64 blocknr, u64 num_blocks, int mod);
871#endif 891#endif