Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
83df7c1d
Commit
83df7c1d
authored
Aug 27, 2007
by
Chris Mason
Committed by
David Woodhouse
Aug 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: Make sure to cow the root during a snapshot
Signed-off-by:
Chris Mason
<
chris.mason@oracle.com
>
parent
2cc58cf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
fs/btrfs/inode.c
fs/btrfs/inode.c
+2
-0
No files found.
fs/btrfs/inode.c
View file @
83df7c1d
...
...
@@ -2096,6 +2096,7 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
struct
btrfs_trans_handle
*
trans
;
struct
btrfs_key
key
;
struct
btrfs_root_item
new_root_item
;
struct
buffer_head
*
tmp
;
int
ret
;
int
err
;
u64
objectid
;
...
...
@@ -2123,6 +2124,7 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
key
.
offset
=
1
;
key
.
flags
=
0
;
btrfs_set_key_type
(
&
key
,
BTRFS_ROOT_ITEM_KEY
);
btrfs_cow_block
(
trans
,
root
,
root
->
node
,
NULL
,
0
,
&
tmp
);
btrfs_set_root_blocknr
(
&
new_root_item
,
bh_blocknr
(
root
->
node
));
ret
=
btrfs_insert_root
(
trans
,
root
->
fs_info
->
tree_root
,
&
key
,
...
...
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