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
1fa6817b
Unverified
Commit
1fa6817b
authored
Sep 23, 2017
by
Christian Brauner
Committed by
Stéphane Graber
Sep 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lvm: fix thinpool logical volumes
Closes #1827. Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
c37f111f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lvm.c
src/lxc/storage/lvm.c
+6
-4
No files found.
src/lxc/storage/lvm.c
View file @
1fa6817b
...
@@ -264,17 +264,18 @@ int lvm_umount(struct lxc_storage *bdev)
...
@@ -264,17 +264,18 @@ int lvm_umount(struct lxc_storage *bdev)
int
lvm_compare_lv_attr
(
const
char
*
path
,
int
pos
,
const
char
expected
)
int
lvm_compare_lv_attr
(
const
char
*
path
,
int
pos
,
const
char
expected
)
{
{
struct
lxc_popen_FILE
*
f
;
struct
lxc_popen_FILE
*
f
;
int
ret
,
len
,
status
;
int
ret
,
status
;
size_t
len
;
char
*
cmd
;
char
*
cmd
;
char
output
[
12
];
char
output
[
12
];
int
start
=
0
;
int
start
=
0
;
const
char
*
lvscmd
=
"lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
;
const
char
*
lvscmd
=
"lvs --unbuffered --noheadings -o lv_attr %s 2>/dev/null"
;
len
=
strlen
(
lvscmd
)
+
strlen
(
path
)
-
1
;
len
=
strlen
(
lvscmd
)
+
strlen
(
path
)
+
1
;
cmd
=
alloca
(
len
);
cmd
=
alloca
(
len
);
ret
=
snprintf
(
cmd
,
len
,
lvscmd
,
path
);
ret
=
snprintf
(
cmd
,
len
,
lvscmd
,
path
);
if
(
ret
<
0
||
ret
>=
len
)
if
(
ret
<
0
||
(
size_t
)
ret
>=
len
)
return
-
1
;
return
-
1
;
f
=
lxc_popen
(
cmd
);
f
=
lxc_popen
(
cmd
);
...
@@ -283,6 +284,7 @@ int lvm_compare_lv_attr(const char *path, int pos, const char expected)
...
@@ -283,6 +284,7 @@ int lvm_compare_lv_attr(const char *path, int pos, const char expected)
return
-
1
;
return
-
1
;
}
}
ret
=
0
;
if
(
!
fgets
(
output
,
12
,
f
->
f
))
if
(
!
fgets
(
output
,
12
,
f
->
f
))
ret
=
1
;
ret
=
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