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
a3e85dae
Unverified
Commit
a3e85dae
authored
Jul 19, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: add arg to create_snapshot()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
618b655b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
bdev.c
src/lxc/bdev/bdev.c
+1
-1
bdev.h
src/lxc/bdev/bdev.h
+1
-1
lxcbtrfs.c
src/lxc/bdev/lxcbtrfs.c
+1
-1
lxcbtrfs.h
src/lxc/bdev/lxcbtrfs.h
+1
-1
No files found.
src/lxc/bdev/bdev.c
View file @
a3e85dae
...
...
@@ -436,7 +436,7 @@ struct bdev *bdev_copy(struct lxc_container *c0, const char *cname,
if
(
!
strcmp
(
orig
->
type
,
"btrfs"
)
&&
!
strcmp
(
new
->
type
,
"btrfs"
))
{
bool
bret
=
false
;
if
(
snap
||
btrfs_same_fs
(
orig
->
dest
,
new
->
dest
)
==
0
)
bret
=
new
->
ops
->
create_snapshot
(
c0
->
lxc_conf
,
orig
,
new
);
bret
=
new
->
ops
->
create_snapshot
(
c0
->
lxc_conf
,
orig
,
new
,
0
);
else
bret
=
new
->
ops
->
create_clone
(
c0
->
lxc_conf
,
orig
,
new
,
0
);
if
(
!
bret
)
...
...
src/lxc/bdev/bdev.h
View file @
a3e85dae
...
...
@@ -76,7 +76,7 @@ struct bdev_ops {
bool
(
*
create_clone
)(
struct
lxc_conf
*
conf
,
struct
bdev
*
orig
,
struct
bdev
*
new
,
uint64_t
newsize
);
bool
(
*
create_snapshot
)(
struct
lxc_conf
*
conf
,
struct
bdev
*
orig
,
struct
bdev
*
new
);
struct
bdev
*
new
,
uint64_t
newsize
);
bool
can_snapshot
;
bool
can_backup
;
};
...
...
src/lxc/bdev/lxcbtrfs.c
View file @
a3e85dae
...
...
@@ -464,7 +464,7 @@ bool btrfs_create_clone(struct lxc_conf *conf, struct bdev *orig,
}
bool
btrfs_create_snapshot
(
struct
lxc_conf
*
conf
,
struct
bdev
*
orig
,
struct
bdev
*
new
)
struct
bdev
*
new
,
uint64_t
newsize
)
{
int
ret
;
...
...
src/lxc/bdev/lxcbtrfs.h
View file @
a3e85dae
...
...
@@ -416,6 +416,6 @@ int btrfs_snapshot_wrapper(void *data);
bool
btrfs_create_clone
(
struct
lxc_conf
*
conf
,
struct
bdev
*
orig
,
struct
bdev
*
new
,
uint64_t
newsize
);
bool
btrfs_create_snapshot
(
struct
lxc_conf
*
conf
,
struct
bdev
*
orig
,
struct
bdev
*
new
);
struct
bdev
*
new
,
uint64_t
newsize
);
#endif // __LXC_BTRFS_H
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