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
d24ee97b
Commit
d24ee97b
authored
Nov 09, 2016
by
David Sterba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: use new helpers to set uuids in eb
Signed-off-by:
David Sterba
<
dsterba@suse.com
>
parent
f157bf76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
34 deletions
+17
-34
fs/btrfs/ctree.c
fs/btrfs/ctree.c
+9
-20
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+3
-7
fs/btrfs/ioctl.c
fs/btrfs/ioctl.c
+3
-5
fs/btrfs/volumes.c
fs/btrfs/volumes.c
+2
-2
No files found.
fs/btrfs/ctree.c
View file @
d24ee97b
...
...
@@ -271,8 +271,7 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
else
btrfs_set_header_owner
(
cow
,
new_root_objectid
);
write_extent_buffer
(
cow
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer_fsid
(
cow
,
root
->
fs_info
->
fsid
);
WARN_ON
(
btrfs_header_generation
(
buf
)
>
trans
->
transid
);
if
(
new_root_objectid
==
BTRFS_TREE_RELOC_OBJECTID
)
...
...
@@ -1141,8 +1140,7 @@ static noinline int __btrfs_cow_block(struct btrfs_trans_handle *trans,
else
btrfs_set_header_owner
(
cow
,
root
->
root_key
.
objectid
);
write_extent_buffer
(
cow
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer_fsid
(
cow
,
root
->
fs_info
->
fsid
);
ret
=
update_ref_for_cow
(
trans
,
root
,
buf
,
cow
,
&
last_ref
);
if
(
ret
)
{
...
...
@@ -3358,11 +3356,8 @@ static noinline int insert_new_root(struct btrfs_trans_handle *trans,
btrfs_set_header_backref_rev
(
c
,
BTRFS_MIXED_BACKREF_REV
);
btrfs_set_header_owner
(
c
,
root
->
root_key
.
objectid
);
write_extent_buffer
(
c
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer
(
c
,
root
->
fs_info
->
chunk_tree_uuid
,
btrfs_header_chunk_tree_uuid
(
c
),
BTRFS_UUID_SIZE
);
write_extent_buffer_fsid
(
c
,
root
->
fs_info
->
fsid
);
write_extent_buffer_chunk_tree_uuid
(
c
,
root
->
fs_info
->
chunk_tree_uuid
);
btrfs_set_node_key
(
c
,
&
lower_key
,
0
);
btrfs_set_node_blockptr
(
c
,
0
,
lower
->
start
);
...
...
@@ -3495,11 +3490,9 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
btrfs_set_header_generation
(
split
,
trans
->
transid
);
btrfs_set_header_backref_rev
(
split
,
BTRFS_MIXED_BACKREF_REV
);
btrfs_set_header_owner
(
split
,
root
->
root_key
.
objectid
);
write_extent_buffer
(
split
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer
(
split
,
root
->
fs_info
->
chunk_tree_uuid
,
btrfs_header_chunk_tree_uuid
(
split
),
BTRFS_UUID_SIZE
);
write_extent_buffer_fsid
(
split
,
root
->
fs_info
->
fsid
);
write_extent_buffer_chunk_tree_uuid
(
split
,
root
->
fs_info
->
chunk_tree_uuid
);
ret
=
tree_mod_log_eb_copy
(
root
->
fs_info
,
split
,
c
,
0
,
mid
,
c_nritems
-
mid
);
...
...
@@ -4283,12 +4276,8 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
btrfs_set_header_backref_rev
(
right
,
BTRFS_MIXED_BACKREF_REV
);
btrfs_set_header_owner
(
right
,
root
->
root_key
.
objectid
);
btrfs_set_header_level
(
right
,
0
);
write_extent_buffer
(
right
,
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer
(
right
,
fs_info
->
chunk_tree_uuid
,
btrfs_header_chunk_tree_uuid
(
right
),
BTRFS_UUID_SIZE
);
write_extent_buffer_fsid
(
right
,
fs_info
->
fsid
);
write_extent_buffer_chunk_tree_uuid
(
right
,
fs_info
->
chunk_tree_uuid
);
if
(
split
==
0
)
{
if
(
mid
<=
slot
)
{
...
...
fs/btrfs/disk-io.c
View file @
d24ee97b
...
...
@@ -1419,11 +1419,8 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
btrfs_set_header_owner
(
leaf
,
objectid
);
root
->
node
=
leaf
;
write_extent_buffer
(
leaf
,
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer
(
leaf
,
fs_info
->
chunk_tree_uuid
,
btrfs_header_chunk_tree_uuid
(
leaf
),
BTRFS_UUID_SIZE
);
write_extent_buffer_fsid
(
leaf
,
fs_info
->
fsid
);
write_extent_buffer_chunk_tree_uuid
(
leaf
,
fs_info
->
chunk_tree_uuid
);
btrfs_mark_buffer_dirty
(
leaf
);
root
->
commit_root
=
btrfs_root_node
(
root
);
...
...
@@ -1506,8 +1503,7 @@ static struct btrfs_root *alloc_log_tree(struct btrfs_trans_handle *trans,
btrfs_set_header_owner
(
leaf
,
BTRFS_TREE_LOG_OBJECTID
);
root
->
node
=
leaf
;
write_extent_buffer
(
root
->
node
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer_fsid
(
root
->
node
,
root
->
fs_info
->
fsid
);
btrfs_mark_buffer_dirty
(
root
->
node
);
btrfs_tree_unlock
(
root
->
node
);
return
root
;
...
...
fs/btrfs/ioctl.c
View file @
d24ee97b
...
...
@@ -507,11 +507,9 @@ static noinline int create_subvol(struct inode *dir,
btrfs_set_header_backref_rev
(
leaf
,
BTRFS_MIXED_BACKREF_REV
);
btrfs_set_header_owner
(
leaf
,
objectid
);
write_extent_buffer
(
leaf
,
root
->
fs_info
->
fsid
,
btrfs_header_fsid
(),
BTRFS_FSID_SIZE
);
write_extent_buffer
(
leaf
,
root
->
fs_info
->
chunk_tree_uuid
,
btrfs_header_chunk_tree_uuid
(
leaf
),
BTRFS_UUID_SIZE
);
write_extent_buffer_fsid
(
leaf
,
root
->
fs_info
->
fsid
);
write_extent_buffer_chunk_tree_uuid
(
leaf
,
root
->
fs_info
->
chunk_tree_uuid
);
btrfs_mark_buffer_dirty
(
leaf
);
inode_item
=
&
root_item
->
inode
;
...
...
fs/btrfs/volumes.c
View file @
d24ee97b
...
...
@@ -1595,8 +1595,8 @@ static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans,
btrfs_set_dev_extent_chunk_objectid
(
leaf
,
extent
,
chunk_objectid
);
btrfs_set_dev_extent_chunk_offset
(
leaf
,
extent
,
chunk_offset
);
write_extent_buffer
(
leaf
,
root
->
fs_info
->
chunk_tree_uuid
,
btrfs_dev_extent_chunk_tree_uuid
(
extent
),
BTRFS_UUID_SIZE
);
write_extent_buffer
_chunk_tree_uuid
(
leaf
,
root
->
fs_info
->
chunk_tree_uuid
);
btrfs_set_dev_extent_length
(
leaf
,
extent
,
num_bytes
);
btrfs_mark_buffer_dirty
(
leaf
);
...
...
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