Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311653
b: refs/heads/master
c: c3e0696
h: refs/heads/master
i:
  311651: e6e0728
v: v3
  • Loading branch information
Jan Schmidt committed Jun 27, 2012
1 parent 7a9e085 commit 47d918c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 28da9fb4467f7a650cd31af6dfad3a4e4a3abf6e
refs/heads/master: c3e0696523862c48b4d8c73ffb2867e9db478338
14 changes: 7 additions & 7 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,7 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,
static void insert_ptr(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct btrfs_path *path,
struct btrfs_disk_key *key, u64 bytenr,
int slot, int level, int tree_mod_log)
int slot, int level)
{
struct extent_buffer *lower;
int nritems;
Expand All @@ -3010,15 +3010,15 @@ static void insert_ptr(struct btrfs_trans_handle *trans,
BUG_ON(slot > nritems);
BUG_ON(nritems == BTRFS_NODEPTRS_PER_BLOCK(root));
if (slot != nritems) {
if (tree_mod_log && level)
if (level)
tree_mod_log_eb_move(root->fs_info, lower, slot + 1,
slot, nritems - slot);
memmove_extent_buffer(lower,
btrfs_node_key_ptr_offset(slot + 1),
btrfs_node_key_ptr_offset(slot),
(nritems - slot) * sizeof(struct btrfs_key_ptr));
}
if (tree_mod_log && level) {
if (level) {
ret = tree_mod_log_insert_key(root->fs_info, lower, slot,
MOD_LOG_KEY_ADD);
BUG_ON(ret < 0);
Expand Down Expand Up @@ -3106,7 +3106,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
btrfs_mark_buffer_dirty(split);

insert_ptr(trans, root, path, &disk_key, split->start,
path->slots[level + 1] + 1, level + 1, 1);
path->slots[level + 1] + 1, level + 1);

if (path->slots[level] >= mid) {
path->slots[level] -= mid;
Expand Down Expand Up @@ -3643,7 +3643,7 @@ static noinline void copy_for_split(struct btrfs_trans_handle *trans,
btrfs_set_header_nritems(l, mid);
btrfs_item_key(right, &disk_key, 0);
insert_ptr(trans, root, path, &disk_key, right->start,
path->slots[1] + 1, 1, 0);
path->slots[1] + 1, 1);

btrfs_mark_buffer_dirty(right);
btrfs_mark_buffer_dirty(l);
Expand Down Expand Up @@ -3850,7 +3850,7 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
if (mid <= slot) {
btrfs_set_header_nritems(right, 0);
insert_ptr(trans, root, path, &disk_key, right->start,
path->slots[1] + 1, 1, 0);
path->slots[1] + 1, 1);
btrfs_tree_unlock(path->nodes[0]);
free_extent_buffer(path->nodes[0]);
path->nodes[0] = right;
Expand All @@ -3859,7 +3859,7 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
} else {
btrfs_set_header_nritems(right, 0);
insert_ptr(trans, root, path, &disk_key, right->start,
path->slots[1], 1, 0);
path->slots[1], 1);
btrfs_tree_unlock(path->nodes[0]);
free_extent_buffer(path->nodes[0]);
path->nodes[0] = right;
Expand Down

0 comments on commit 47d918c

Please sign in to comment.