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
39c2e2e3
Unverified
Commit
39c2e2e3
authored
Mar 17, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: keep a reference to lxc_rootfs in lxc_storage
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
1633166b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
storage.c
src/lxc/storage/storage.c
+4
-5
storage.h
src/lxc/storage/storage.h
+2
-0
No files found.
src/lxc/storage/storage.c
View file @
39c2e2e3
...
@@ -598,14 +598,13 @@ struct lxc_storage *storage_init(struct lxc_conf *conf)
...
@@ -598,14 +598,13 @@ struct lxc_storage *storage_init(struct lxc_conf *conf)
if
(
!
q
)
if
(
!
q
)
return
NULL
;
return
NULL
;
bdev
=
m
alloc
(
sizeof
(
struct
lxc_storage
));
bdev
=
z
alloc
(
sizeof
(
struct
lxc_storage
));
if
(
!
bdev
)
if
(
!
bdev
)
return
NULL
;
return
NULL
;
memset
(
bdev
,
0
,
sizeof
(
struct
lxc_storage
));
bdev
->
ops
=
q
->
ops
;
bdev
->
type
=
q
->
name
;
bdev
->
ops
=
q
->
ops
;
bdev
->
rootfs
=
&
conf
->
rootfs
;
bdev
->
type
=
q
->
name
;
if
(
mntopts
)
if
(
mntopts
)
bdev
->
mntopts
=
strdup
(
mntopts
);
bdev
->
mntopts
=
strdup
(
mntopts
);
...
...
src/lxc/storage/storage.h
View file @
39c2e2e3
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#endif
#endif
#include "compiler.h"
#include "compiler.h"
#include "conf.h"
#ifndef MS_DIRSYNC
#ifndef MS_DIRSYNC
#define MS_DIRSYNC 128
#define MS_DIRSYNC 128
...
@@ -87,6 +88,7 @@ struct lxc_storage {
...
@@ -87,6 +88,7 @@ struct lxc_storage {
/* index for the connected nbd device. */
/* index for the connected nbd device. */
int
nbd_idx
;
int
nbd_idx
;
int
flags
;
int
flags
;
struct
lxc_rootfs
*
rootfs
;
};
};
/**
/**
...
...
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