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
8cc9f7a4
Unverified
Commit
8cc9f7a4
authored
Aug 15, 2017
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "btrfs: enable unprivileged snapshots"
This reverts commit
2d66f571
. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
05ed3a82
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
bdev.c
src/lxc/bdev/bdev.c
+3
-14
No files found.
src/lxc/bdev/bdev.c
View file @
8cc9f7a4
...
@@ -432,28 +432,17 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
...
@@ -432,28 +432,17 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
if
(
bdevtype
&&
strcmp
(
orig
->
type
,
"btrfs"
)
==
0
&&
if
(
bdevtype
&&
strcmp
(
orig
->
type
,
"btrfs"
)
==
0
&&
strcmp
(
new
->
type
,
"btrfs"
)
==
0
&&
strcmp
(
new
->
type
,
"btrfs"
)
==
0
&&
btrfs_same_fs
(
orig
->
dest
,
new
->
dest
)
==
0
)
{
btrfs_same_fs
(
orig
->
dest
,
new
->
dest
)
==
0
)
{
struct
rsync_data_char
arg
;
if
(
btrfs_destroy
(
new
)
<
0
)
{
if
(
btrfs_destroy
(
new
)
<
0
)
{
ERROR
(
"Error destroying %s subvolume"
,
new
->
dest
);
ERROR
(
"Error destroying %s subvolume"
,
new
->
dest
);
goto
err
;
goto
err
;
}
}
if
(
mkdir_p
(
new
->
dest
,
0755
)
<
0
)
{
if
(
mkdir_p
(
new
->
dest
,
0755
)
<
0
)
{
ERROR
(
"Error creating %s directory"
,
new
->
dest
);
ERROR
(
"Error creating %s directory"
,
new
->
dest
);
goto
err
;
goto
err
;
}
}
if
(
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
)
<
0
)
{
arg
.
src
=
orig
->
dest
;
ERROR
(
"Error restoring %s to %s"
,
orig
->
dest
,
arg
.
dest
=
new
->
dest
;
new
->
dest
);
if
(
am_unpriv
())
ret
=
userns_exec_1
(
c0
->
lxc_conf
,
btrfs_snapshot_wrapper
,
&
arg
,
"btrfs_snapshot_wrapper"
);
else
ret
=
btrfs_snapshot
(
orig
->
dest
,
new
->
dest
);
if
(
ret
<
0
)
{
SYSERROR
(
"Failed to create btrfs snapshot
\"
%s
\"
of
\"
%s
\"
"
,
new
->
dest
,
orig
->
dest
);
goto
err
;
goto
err
;
}
}
bdev_put
(
orig
);
bdev_put
(
orig
);
...
...
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