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
9009a728
Commit
9009a728
authored
Feb 20, 2014
by
S.Çağlar Onur
Committed by
Stéphane Graber
Feb 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix aufs mount for some fs types via adding the xino parameter
Signed-off-by:
S.Çağlar Onur
<
caglar@10ur.org
>
Acked-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
parent
c597baa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
bdev.c
src/lxc/bdev.c
+16
-5
No files found.
src/lxc/bdev.c
View file @
9009a728
...
...
@@ -2064,7 +2064,7 @@ static int aufs_detect(const char *path)
//
static
int
aufs_mount
(
struct
bdev
*
bdev
)
{
char
*
options
,
*
dup
,
*
lower
,
*
upper
;
char
*
options
,
*
dup
,
*
lower
,
*
upper
,
*
rundir
;
int
len
;
unsigned
long
mntflags
;
char
*
mntdata
;
...
...
@@ -2094,16 +2094,27 @@ static int aufs_mount(struct bdev *bdev)
// TODO We should check whether bdev->src is a blockdev, and if so
// but for now, only support aufs of a basic directory
rundir
=
get_rundir
();
if
(
!
rundir
)
return
-
1
;
// AUFS does not work on top of certain filesystems like (XFS or Btrfs)
// so add xino=RUNDIR/lxc/aufs.xino parameter to mount options
//
// see http://www.mail-archive.com/aufs-users@lists.sourceforge.net/msg02587.html
if
(
mntdata
)
{
len
=
strlen
(
lower
)
+
strlen
(
upper
)
+
strlen
(
"br==rw:=ro,
"
)
+
strlen
(
mntdata
)
+
1
;
len
=
strlen
(
lower
)
+
strlen
(
upper
)
+
strlen
(
rundir
)
+
strlen
(
"br==rw:=ro,,xino=/lxc/aufs.xino
"
)
+
strlen
(
mntdata
)
+
1
;
options
=
alloca
(
len
);
ret
=
snprintf
(
options
,
len
,
"br=%s=rw:%s=ro,%s
"
,
upper
,
lower
,
mntdata
);
ret
=
snprintf
(
options
,
len
,
"br=%s=rw:%s=ro,%s
,xino=%s/lxc/aufs.xino"
,
upper
,
lower
,
mntdata
,
rundir
);
}
else
{
len
=
strlen
(
lower
)
+
strlen
(
upper
)
+
strlen
(
"br==rw:=r
o"
)
+
1
;
len
=
strlen
(
lower
)
+
strlen
(
upper
)
+
strlen
(
rundir
)
+
strlen
(
"br==rw:=ro,xino=/lxc/aufs.xin
o"
)
+
1
;
options
=
alloca
(
len
);
ret
=
snprintf
(
options
,
len
,
"br=%s=rw:%s=ro
"
,
upper
,
lowe
r
);
ret
=
snprintf
(
options
,
len
,
"br=%s=rw:%s=ro
,xino=%s/lxc/aufs.xino"
,
upper
,
lower
,
rundi
r
);
}
free
(
rundir
);
if
(
ret
<
0
||
ret
>=
len
)
{
free
(
mntdata
);
return
-
1
;
...
...
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