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
13687337
Unverified
Commit
13687337
authored
Sep 24, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: use userns_exec_full()
Closes #1800. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
7d9d482b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
aufs.c
src/lxc/storage/aufs.c
+2
-2
btrfs.c
src/lxc/storage/btrfs.c
+1
-1
overlay.c
src/lxc/storage/overlay.c
+1
-1
storage.c
src/lxc/storage/storage.c
+2
-2
storage.h
src/lxc/storage/storage.h
+0
-1
No files found.
src/lxc/storage/aufs.c
View file @
13687337
...
@@ -136,8 +136,8 @@ int aufs_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
...
@@ -136,8 +136,8 @@ int aufs_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
rdata
.
src
=
odelta
;
rdata
.
src
=
odelta
;
rdata
.
dest
=
ndelta
;
rdata
.
dest
=
ndelta
;
if
(
am_unpriv
())
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
conf
,
rsync_delta_wrapper
,
&
rdata
,
ret
=
userns_exec_
full
(
conf
,
rsync_delta_wrapper
,
"rsync_delta_wrapper"
);
&
rdata
,
"rsync_delta_wrapper"
);
else
else
ret
=
rsync_delta
(
&
rdata
);
ret
=
rsync_delta
(
&
rdata
);
if
(
ret
)
{
if
(
ret
)
{
...
...
src/lxc/storage/btrfs.c
View file @
13687337
...
@@ -397,7 +397,7 @@ int btrfs_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
...
@@ -397,7 +397,7 @@ int btrfs_clonepaths(struct lxc_storage *orig, struct lxc_storage *new,
return
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
);
return
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
);
sdata
.
dest
=
new
->
dest
;
sdata
.
dest
=
new
->
dest
;
sdata
.
src
=
orig
->
dest
;
sdata
.
src
=
orig
->
dest
;
return
userns_exec_
1
(
conf
,
btrfs_snapshot_wrapper
,
&
sdata
,
return
userns_exec_
full
(
conf
,
btrfs_snapshot_wrapper
,
&
sdata
,
"btrfs_snapshot_wrapper"
);
"btrfs_snapshot_wrapper"
);
}
}
...
...
src/lxc/storage/overlay.c
View file @
13687337
...
@@ -752,7 +752,7 @@ static int ovl_do_rsync(struct lxc_storage *orig, struct lxc_storage *new,
...
@@ -752,7 +752,7 @@ static int ovl_do_rsync(struct lxc_storage *orig, struct lxc_storage *new,
rdata
.
orig
=
orig
;
rdata
.
orig
=
orig
;
rdata
.
new
=
new
;
rdata
.
new
=
new
;
if
(
am_unpriv
())
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
conf
,
ovl_rsync_wrapper
,
&
rdata
,
ret
=
userns_exec_
full
(
conf
,
ovl_rsync_wrapper
,
&
rdata
,
"ovl_rsync_wrapper"
);
"ovl_rsync_wrapper"
);
else
else
ret
=
ovl_rsync
(
&
rdata
);
ret
=
ovl_rsync
(
&
rdata
);
...
...
src/lxc/storage/storage.c
View file @
13687337
...
@@ -454,8 +454,8 @@ struct lxc_storage *storage_copy(struct lxc_container *c0, const char *cname,
...
@@ -454,8 +454,8 @@ struct lxc_storage *storage_copy(struct lxc_container *c0, const char *cname,
data
.
orig
=
orig
;
data
.
orig
=
orig
;
data
.
new
=
new
;
data
.
new
=
new
;
if
(
am_unpriv
())
if
(
am_unpriv
())
ret
=
userns_exec_
1
(
c0
->
lxc_conf
,
rsync_rootfs_wrapper
,
&
data
,
ret
=
userns_exec_
full
(
c0
->
lxc_conf
,
rsync_rootfs_wrapper
,
"rsync_rootfs_wrapper"
);
&
data
,
"rsync_rootfs_wrapper"
);
else
else
ret
=
rsync_rootfs
(
&
data
);
ret
=
rsync_rootfs
(
&
data
);
...
...
src/lxc/storage/storage.h
View file @
13687337
...
@@ -128,7 +128,6 @@ extern struct lxc_storage *storage_create(const char *dest, const char *type,
...
@@ -128,7 +128,6 @@ extern struct lxc_storage *storage_create(const char *dest, const char *type,
extern
void
storage_put
(
struct
lxc_storage
*
bdev
);
extern
void
storage_put
(
struct
lxc_storage
*
bdev
);
extern
bool
storage_destroy
(
struct
lxc_conf
*
conf
);
extern
bool
storage_destroy
(
struct
lxc_conf
*
conf
);
/* callback function to be used with userns_exec_1() */
extern
int
storage_destroy_wrapper
(
void
*
data
);
extern
int
storage_destroy_wrapper
(
void
*
data
);
extern
bool
rootfs_is_blockdev
(
struct
lxc_conf
*
conf
);
extern
bool
rootfs_is_blockdev
(
struct
lxc_conf
*
conf
);
...
...
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