aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-01-16 15:26:31 -0500
committerChris Mason <chris.mason@oracle.com>2012-01-16 15:26:31 -0500
commit9785dbdf265ddc47d5c88267d89a97648c0dc14b (patch)
tree3a97a48d6f282f9e06c5446beeb886fcd86c4798 /fs/btrfs/ctree.h
parentd756bd2d9339447c29bde950910586df8f8941ec (diff)
parent6bf7e080d5bcb0d399ee38ce3dabbfad64448192 (diff)
Merge branch 'for-chris' of git://git.jan-o-sch.net/btrfs-unstable into integration
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index dfc136cc07d7..b6d1020c4571 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2439,11 +2439,11 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
2439 struct btrfs_root *root, u32 blocksize, 2439 struct btrfs_root *root, u32 blocksize,
2440 u64 parent, u64 root_objectid, 2440 u64 parent, u64 root_objectid,
2441 struct btrfs_disk_key *key, int level, 2441 struct btrfs_disk_key *key, int level,
2442 u64 hint, u64 empty_size); 2442 u64 hint, u64 empty_size, int for_cow);
2443void btrfs_free_tree_block(struct btrfs_trans_handle *trans, 2443void btrfs_free_tree_block(struct btrfs_trans_handle *trans,
2444 struct btrfs_root *root, 2444 struct btrfs_root *root,
2445 struct extent_buffer *buf, 2445 struct extent_buffer *buf,
2446 u64 parent, int last_ref); 2446 u64 parent, int last_ref, int for_cow);
2447struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans, 2447struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
2448 struct btrfs_root *root, 2448 struct btrfs_root *root,
2449 u64 bytenr, u32 blocksize, 2449 u64 bytenr, u32 blocksize,
@@ -2463,17 +2463,17 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
2463 u64 search_end, struct btrfs_key *ins, 2463 u64 search_end, struct btrfs_key *ins,
2464 u64 data); 2464 u64 data);
2465int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, 2465int btrfs_inc_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
2466 struct extent_buffer *buf, int full_backref); 2466 struct extent_buffer *buf, int full_backref, int for_cow);
2467int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root, 2467int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
2468 struct extent_buffer *buf, int full_backref); 2468 struct extent_buffer *buf, int full_backref, int for_cow);
2469int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans, 2469int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans,
2470 struct btrfs_root *root, 2470 struct btrfs_root *root,
2471 u64 bytenr, u64 num_bytes, u64 flags, 2471 u64 bytenr, u64 num_bytes, u64 flags,
2472 int is_data); 2472 int is_data);
2473int btrfs_free_extent(struct btrfs_trans_handle *trans, 2473int btrfs_free_extent(struct btrfs_trans_handle *trans,
2474 struct btrfs_root *root, 2474 struct btrfs_root *root,
2475 u64 bytenr, u64 num_bytes, u64 parent, 2475 u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid,
2476 u64 root_objectid, u64 owner, u64 offset); 2476 u64 owner, u64 offset, int for_cow);
2477 2477
2478int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len); 2478int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len);
2479int btrfs_free_and_pin_reserved_extent(struct btrfs_root *root, 2479int btrfs_free_and_pin_reserved_extent(struct btrfs_root *root,
@@ -2485,7 +2485,7 @@ int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
2485int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans, 2485int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
2486 struct btrfs_root *root, 2486 struct btrfs_root *root,
2487 u64 bytenr, u64 num_bytes, u64 parent, 2487 u64 bytenr, u64 num_bytes, u64 parent,
2488 u64 root_objectid, u64 owner, u64 offset); 2488 u64 root_objectid, u64 owner, u64 offset, int for_cow);
2489 2489
2490int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans, 2490int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
2491 struct btrfs_root *root); 2491 struct btrfs_root *root);
@@ -2644,10 +2644,18 @@ static inline int btrfs_insert_empty_item(struct btrfs_trans_handle *trans,
2644} 2644}
2645 2645
2646int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path); 2646int btrfs_next_leaf(struct btrfs_root *root, struct btrfs_path *path);
2647static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p)
2648{
2649 ++p->slots[0];
2650 if (p->slots[0] >= btrfs_header_nritems(p->nodes[0]))
2651 return btrfs_next_leaf(root, p);
2652 return 0;
2653}
2647int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path); 2654int btrfs_prev_leaf(struct btrfs_root *root, struct btrfs_path *path);
2648int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf); 2655int btrfs_leaf_free_space(struct btrfs_root *root, struct extent_buffer *leaf);
2649void btrfs_drop_snapshot(struct btrfs_root *root, 2656void btrfs_drop_snapshot(struct btrfs_root *root,
2650 struct btrfs_block_rsv *block_rsv, int update_ref); 2657 struct btrfs_block_rsv *block_rsv, int update_ref,
2658 int for_reloc);
2651int btrfs_drop_subtree(struct btrfs_trans_handle *trans, 2659int btrfs_drop_subtree(struct btrfs_trans_handle *trans,
2652 struct btrfs_root *root, 2660 struct btrfs_root *root,
2653 struct extent_buffer *node, 2661 struct extent_buffer *node,