Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
8d5bf1cb
Commit
8d5bf1cb
authored
Sep 11, 2008
by
Chris Mason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Update the highest objectid in a root after log replay is done
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
4bef0848
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
fs/btrfs/inode.c
fs/btrfs/inode.c
+2
-1
fs/btrfs/tree-log.c
fs/btrfs/tree-log.c
+7
-0
No files found.
fs/btrfs/inode.c
View file @
8d5bf1cb
...
@@ -2239,9 +2239,10 @@ static int btrfs_set_inode_index(struct inode *dir, struct inode *inode,
...
@@ -2239,9 +2239,10 @@ static int btrfs_set_inode_index(struct inode *dir, struct inode *inode,
if
(
BTRFS_I
(
dir
)
->
index_cnt
==
(
u64
)
-
1
)
{
if
(
BTRFS_I
(
dir
)
->
index_cnt
==
(
u64
)
-
1
)
{
ret
=
btrfs_set_inode_index_count
(
dir
);
ret
=
btrfs_set_inode_index_count
(
dir
);
if
(
ret
)
if
(
ret
)
{
return
ret
;
return
ret
;
}
}
}
*
index
=
BTRFS_I
(
dir
)
->
index_cnt
;
*
index
=
BTRFS_I
(
dir
)
->
index_cnt
;
BTRFS_I
(
dir
)
->
index_cnt
++
;
BTRFS_I
(
dir
)
->
index_cnt
++
;
...
...
fs/btrfs/tree-log.c
View file @
8d5bf1cb
...
@@ -1027,6 +1027,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
...
@@ -1027,6 +1027,7 @@ static noinline int fixup_inode_link_count(struct btrfs_trans_handle *trans,
inode
->
i_nlink
=
nlink
;
inode
->
i_nlink
=
nlink
;
btrfs_update_inode
(
trans
,
root
,
inode
);
btrfs_update_inode
(
trans
,
root
,
inode
);
}
}
BTRFS_I
(
inode
)
->
index_cnt
=
(
u64
)
-
1
;
return
0
;
return
0
;
}
}
...
@@ -2714,6 +2715,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
...
@@ -2714,6 +2715,7 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
struct
btrfs_key
tmp_key
;
struct
btrfs_key
tmp_key
;
struct
btrfs_root
*
log
;
struct
btrfs_root
*
log
;
struct
btrfs_fs_info
*
fs_info
=
log_root_tree
->
fs_info
;
struct
btrfs_fs_info
*
fs_info
=
log_root_tree
->
fs_info
;
u64
highest_inode
;
struct
walk_control
wc
=
{
struct
walk_control
wc
=
{
.
process_func
=
process_one_buffer
,
.
process_func
=
process_one_buffer
,
.
stage
=
0
,
.
stage
=
0
,
...
@@ -2772,6 +2774,11 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
...
@@ -2772,6 +2774,11 @@ int btrfs_recover_log_trees(struct btrfs_root *log_root_tree)
path
);
path
);
BUG_ON
(
ret
);
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
;
key
.
offset
=
found_key
.
offset
-
1
;
free_extent_buffer
(
log
->
node
);
free_extent_buffer
(
log
->
node
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment