Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128933
b: refs/heads/master
c: 8d5bf1c
h: refs/heads/master
i:
  128931: a5e23ba
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent fa2725d commit 86fcedb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 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: 4bef084857ab8fe71cf49eae349c25e440a49150
refs/heads/master: 8d5bf1cb35ea29795862ff0ea2f4c4d7e22727f3
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2239,8 +2239,9 @@ static int btrfs_set_inode_index(struct inode *dir, struct inode *inode,

if (BTRFS_I(dir)->index_cnt == (u64)-1) {
ret = btrfs_set_inode_index_count(dir);
if (ret)
if (ret) {
return ret;
}
}

*index = BTRFS_I(dir)->index_cnt;
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
inode->i_nlink = nlink;
btrfs_update_inode(trans, root, inode);
}
BTRFS_I(inode)->index_cnt = (u64)-1;

return 0;
}
Expand Down Expand Up @@ -2714,6 +2715,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
struct btrfs_key tmp_key;
struct btrfs_root *log;
struct btrfs_fs_info *fs_info = log_root_tree->fs_info;
u64 highest_inode;
struct walk_control wc = {
.process_func = process_one_buffer,
.stage = 0,
Expand Down Expand Up @@ -2772,6 +2774,11 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
path);
BUG_ON(ret);
}
ret = btrfs_find_highest_inode(wc.replay_dest, &highest_inode);
if (ret == 0) {
wc.replay_dest->highest_inode = highest_inode;
wc.replay_dest->last_inode_alloc = highest_inode;
}

key.offset = found_key.offset - 1;
free_extent_buffer(log->node);
Expand Down

0 comments on commit 86fcedb

Please sign in to comment.