Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
d848b631
Unverified
Commit
d848b631
authored
Jul 16, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
btrfs: only chown_mapped_root() if not btrfs
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
8e295bc1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
bdev.c
src/lxc/bdev/bdev.c
+7
-2
No files found.
src/lxc/bdev/bdev.c
View file @
d848b631
...
@@ -412,12 +412,17 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
...
@@ -412,12 +412,17 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
goto
err
;
goto
err
;
}
}
if
(
!
strcmp
(
new
->
type
,
"overlay"
)
||
!
strcmp
(
new
->
type
,
"overlayfs"
))
/* If the storage driver is "btrfs" then the we will create snapshot. */
if
(
strcmp
(
bdevtype
,
"btrfs"
))
{
if
(
!
strcmp
(
new
->
type
,
"overlay"
)
||
!
strcmp
(
new
->
type
,
"overlayfs"
))
src_no_prefix
=
ovl_get_lower
(
new
->
src
);
src_no_prefix
=
ovl_get_lower
(
new
->
src
);
else
else
src_no_prefix
=
lxc_storage_get_path
(
new
->
src
,
new
->
type
);
src_no_prefix
=
lxc_storage_get_path
(
new
->
src
,
new
->
type
);
if
(
am_unpriv
()
&&
chown_mapped_root
(
src_no_prefix
,
c0
->
lxc_conf
)
<
0
)
if
(
am_unpriv
()
&&
chown_mapped_root
(
src_no_prefix
,
c0
->
lxc_conf
)
<
0
)
WARN
(
"Failed to update ownership of %s"
,
new
->
dest
);
WARN
(
"Failed to chown
\"
%s
\"
"
,
src_no_prefix
);
}
if
(
snap
)
if
(
snap
)
return
new
;
return
new
;
...
...
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