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
d27bcc36
Unverified
Commit
d27bcc36
authored
Aug 15, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "btrfs: simplify"
This reverts commit
1aa0201f
. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
97788c72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
15 deletions
+7
-15
bdev.c
src/lxc/bdev/bdev.c
+5
-0
lxcbtrfs.c
src/lxc/bdev/lxcbtrfs.c
+2
-15
No files found.
src/lxc/bdev/bdev.c
View file @
d27bcc36
...
@@ -441,6 +441,11 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
...
@@ -441,6 +441,11 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
goto
err
;
goto
err
;
}
}
if
(
mkdir_p
(
new
->
dest
,
0755
)
<
0
)
{
ERROR
(
"Failed to create directory
\"
%s
\"
"
,
new
->
dest
);
goto
err
;
}
arg
.
src
=
orig
->
dest
;
arg
.
src
=
orig
->
dest
;
arg
.
dest
=
new
->
dest
;
arg
.
dest
=
new
->
dest
;
if
(
am_unpriv
())
if
(
am_unpriv
())
...
...
src/lxc/bdev/lxcbtrfs.c
View file @
d27bcc36
...
@@ -413,19 +413,8 @@ int btrfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
...
@@ -413,19 +413,8 @@ int btrfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
if
(
snap
)
{
if
(
snap
)
{
struct
rsync_data_char
sdata
;
struct
rsync_data_char
sdata
;
if
(
!
am_unpriv
())
{
if
(
!
am_unpriv
())
ret
=
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
);
return
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
);
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to create btrfs snapshot "
"
\"
%s
\"
from
\"
%s
\"
"
,
new
->
dest
,
orig
->
dest
);
return
-
1
;
}
TRACE
(
"Created btrfs snapshot
\"
%s
\"
from
\"
%s
\"
"
,
new
->
dest
,
orig
->
dest
);
return
0
;
}
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_1
(
conf
,
btrfs_snapshot_wrapper
,
&
sdata
,
...
@@ -441,8 +430,6 @@ int btrfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
...
@@ -441,8 +430,6 @@ int btrfs_clonepaths(struct bdev *orig, struct bdev *new, const char *oldname,
ret
=
btrfs_subvolume_create
(
new
->
dest
);
ret
=
btrfs_subvolume_create
(
new
->
dest
);
if
(
ret
<
0
)
if
(
ret
<
0
)
SYSERROR
(
"Failed to create btrfs subvolume
\"
%s
\"
"
,
new
->
dest
);
SYSERROR
(
"Failed to create btrfs subvolume
\"
%s
\"
"
,
new
->
dest
);
else
TRACE
(
"Created btrfs subvolume
\"
%s
\"
"
,
new
->
dest
);
return
ret
;
return
ret
;
}
}
...
...
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