Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128973
b: refs/heads/master
c: 3bb1a1b
h: refs/heads/master
i:
  128971: bab6eda
v: v3
  • Loading branch information
Yan Zheng authored and Chris Mason committed Oct 9, 2008
1 parent 5eaf366 commit 6889d38
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 145 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a76a3cd40c1127ca199d4f7f37bf0d541bf44eb2
refs/heads/master: 3bb1a1bc42f2ae9582c28adf620484efcd4da38d
24 changes: 12 additions & 12 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ int noinline __btrfs_cow_block(struct btrfs_trans_handle *trans,

ret = btrfs_alloc_reserved_extent(trans, root, parent_start,
root->root_key.objectid,
trans->transid, level, 0,
&ins);
trans->transid, level, &ins);
BUG_ON(ret);
cow = btrfs_init_new_buffer(trans, root, prealloc_dest,
buf->len);
Expand Down Expand Up @@ -333,7 +332,7 @@ int noinline __btrfs_cow_block(struct btrfs_trans_handle *trans,
buf->len, buf->start,
root->root_key.objectid,
btrfs_header_generation(buf),
0, 0, 1);
level, 1);
}
free_extent_buffer(buf);
add_root_to_dirty_list(root);
Expand All @@ -347,7 +346,7 @@ int noinline __btrfs_cow_block(struct btrfs_trans_handle *trans,
WARN_ON(btrfs_header_generation(parent) != trans->transid);
btrfs_free_extent(trans, root, buf->start, buf->len,
parent_start, btrfs_header_owner(parent),
btrfs_header_generation(parent), 0, 0, 1);
btrfs_header_generation(parent), level, 1);
}
if (unlock_orig)
btrfs_tree_unlock(buf);
Expand Down Expand Up @@ -927,7 +926,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
ret = btrfs_update_extent_ref(trans, root, child->start,
mid->start, child->start,
root->root_key.objectid,
trans->transid, level - 1, 0);
trans->transid, level - 1);
BUG_ON(ret);

add_root_to_dirty_list(root);
Expand All @@ -940,7 +939,8 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
free_extent_buffer(mid);
ret = btrfs_free_extent(trans, root, mid->start, mid->len,
mid->start, root->root_key.objectid,
btrfs_header_generation(mid), 0, 0, 1);
btrfs_header_generation(mid),
level, 1);
/* once for the root ptr */
free_extent_buffer(mid);
return ret;
Expand Down Expand Up @@ -1006,7 +1006,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
wret = btrfs_free_extent(trans, root, bytenr,
blocksize, parent->start,
btrfs_header_owner(parent),
generation, 0, 0, 1);
generation, level, 1);
if (wret)
ret = wret;
} else {
Expand Down Expand Up @@ -1055,7 +1055,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
wret = btrfs_free_extent(trans, root, bytenr, blocksize,
parent->start,
btrfs_header_owner(parent),
root_gen, 0, 0, 1);
root_gen, level, 1);
if (wret)
ret = wret;
} else {
Expand Down Expand Up @@ -1691,13 +1691,13 @@ int btrfs_merge_path(struct btrfs_trans_handle *trans,
blocksize, parent->start,
btrfs_header_owner(parent),
btrfs_header_generation(parent),
level - 1, 0);
level - 1);
BUG_ON(ret);
ret = btrfs_free_extent(trans, root, bytenr,
blocksize, parent->start,
btrfs_header_owner(parent),
btrfs_header_generation(parent),
level - 1, 0, 1);
level - 1, 1);
BUG_ON(ret);

if (generation == trans->transid) {
Expand Down Expand Up @@ -1973,7 +1973,7 @@ static int noinline insert_new_root(struct btrfs_trans_handle *trans,
ret = btrfs_update_extent_ref(trans, root, lower->start,
lower->start, c->start,
root->root_key.objectid,
trans->transid, level - 1, 0);
trans->transid, level - 1);
BUG_ON(ret);

/* the super has an extra ref to root->node */
Expand Down Expand Up @@ -3213,7 +3213,7 @@ noinline int btrfs_del_leaf(struct btrfs_trans_handle *trans,
btrfs_level_size(root, 0),
path->nodes[1]->start,
btrfs_header_owner(path->nodes[1]),
root_gen, 0, 0, 1);
root_gen, 0, 1);
return ret;
}
/*
Expand Down
25 changes: 6 additions & 19 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ struct btrfs_extent_ref {
__le64 root;
__le64 generation;
__le64 objectid;
__le64 offset;
__le32 num_refs;
} __attribute__ ((__packed__));

Expand Down Expand Up @@ -1082,16 +1081,13 @@ static inline u8 *btrfs_dev_extent_chunk_tree_uuid(struct btrfs_dev_extent *dev)
BTRFS_SETGET_FUNCS(ref_root, struct btrfs_extent_ref, root, 64);
BTRFS_SETGET_FUNCS(ref_generation, struct btrfs_extent_ref, generation, 64);
BTRFS_SETGET_FUNCS(ref_objectid, struct btrfs_extent_ref, objectid, 64);
BTRFS_SETGET_FUNCS(ref_offset, struct btrfs_extent_ref, offset, 64);
BTRFS_SETGET_FUNCS(ref_num_refs, struct btrfs_extent_ref, num_refs, 32);

BTRFS_SETGET_STACK_FUNCS(stack_ref_root, struct btrfs_extent_ref, root, 64);
BTRFS_SETGET_STACK_FUNCS(stack_ref_generation, struct btrfs_extent_ref,
generation, 64);
BTRFS_SETGET_STACK_FUNCS(stack_ref_objectid, struct btrfs_extent_ref,
objectid, 64);
BTRFS_SETGET_STACK_FUNCS(stack_ref_offset, struct btrfs_extent_ref,
offset, 64);
BTRFS_SETGET_STACK_FUNCS(stack_ref_num_refs, struct btrfs_extent_ref,
num_refs, 32);

Expand Down Expand Up @@ -1522,29 +1518,20 @@ struct extent_buffer *btrfs_alloc_free_block(struct btrfs_trans_handle *trans,
struct extent_buffer *btrfs_init_new_buffer(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 bytenr, u32 blocksize);
int btrfs_insert_extent_backref(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path,
u64 bytenr, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset);
int btrfs_alloc_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 num_bytes, u64 parent, u64 min_bytes,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset,
u64 empty_size, u64 hint_byte,
u64 owner, u64 empty_size, u64 hint_byte,
u64 search_end, struct btrfs_key *ins, u64 data);
int btrfs_alloc_reserved_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset,
struct btrfs_key *ins);
u64 owner, struct btrfs_key *ins);
int btrfs_alloc_logged_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset,
struct btrfs_key *ins);
u64 owner, struct btrfs_key *ins);
int btrfs_reserve_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 num_bytes, u64 min_alloc_size,
Expand All @@ -1563,7 +1550,7 @@ int btrfs_free_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 bytenr, u64 num_bytes, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner_objectid, u64 owner_offset, int pin);
u64 owner_objectid, int pin);
int btrfs_free_reserved_extent(struct btrfs_root *root, u64 start, u64 len);
int btrfs_finish_extent_commit(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
Expand All @@ -1572,12 +1559,12 @@ int btrfs_inc_extent_ref(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
u64 bytenr, u64 num_bytes, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset);
u64 owner_objectid);
int btrfs_update_extent_ref(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 bytenr,
u64 orig_parent, u64 parent,
u64 root_objectid, u64 ref_generation,
u64 owner, u64 owner_offset);
u64 owner_objectid);
int btrfs_write_dirty_block_groups(struct btrfs_trans_handle *trans,
struct btrfs_root *root);
int btrfs_free_block_groups(struct btrfs_fs_info *info);
Expand Down
Loading

0 comments on commit 6889d38

Please sign in to comment.