Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
f0e752a4
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f0e752a4
编写于
5月 21, 2013
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
src/storage: Remove the whitespace before ';'
上级
3de80af2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
29 deletion
+29
-29
src/storage/storage_backend.c
src/storage/storage_backend.c
+7
-7
src/storage/storage_backend_disk.c
src/storage/storage_backend_disk.c
+1
-1
src/storage/storage_backend_iscsi.c
src/storage/storage_backend_iscsi.c
+5
-5
src/storage/storage_backend_logical.c
src/storage/storage_backend_logical.c
+3
-3
src/storage/storage_driver.c
src/storage/storage_driver.c
+13
-13
未找到文件。
src/storage/storage_backend.c
浏览文件 @
f0e752a4
...
@@ -1485,14 +1485,14 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
...
@@ -1485,14 +1485,14 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
return
-
1
;
return
-
1
;
}
}
for
(
i
=
0
;
i
<
nregex
;
i
++
)
{
for
(
i
=
0
;
i
<
nregex
;
i
++
)
{
err
=
regcomp
(
&
reg
[
i
],
regex
[
i
],
REG_EXTENDED
);
err
=
regcomp
(
&
reg
[
i
],
regex
[
i
],
REG_EXTENDED
);
if
(
err
!=
0
)
{
if
(
err
!=
0
)
{
char
error
[
100
];
char
error
[
100
];
regerror
(
err
,
&
reg
[
i
],
error
,
sizeof
(
error
));
regerror
(
err
,
&
reg
[
i
],
error
,
sizeof
(
error
));
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Failed to compile regex %s"
),
error
);
_
(
"Failed to compile regex %s"
),
error
);
for
(
j
=
0
;
j
<=
i
;
j
++
)
for
(
j
=
0
;
j
<=
i
;
j
++
)
regfree
(
&
reg
[
j
]);
regfree
(
&
reg
[
j
]);
VIR_FREE
(
reg
);
VIR_FREE
(
reg
);
return
-
1
;
return
-
1
;
...
@@ -1538,7 +1538,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
...
@@ -1538,7 +1538,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
if
(
!
p
)
if
(
!
p
)
p
=
line
;
p
=
line
;
for
(
i
=
0
;
i
<=
maxReg
&&
i
<
nregex
;
i
++
)
{
for
(
i
=
0
;
i
<=
maxReg
&&
i
<
nregex
;
i
++
)
{
if
(
regexec
(
&
reg
[
i
],
p
,
nvars
[
i
]
+
1
,
vars
,
0
)
==
0
)
{
if
(
regexec
(
&
reg
[
i
],
p
,
nvars
[
i
]
+
1
,
vars
,
0
)
==
0
)
{
maxReg
++
;
maxReg
++
;
...
@@ -1546,7 +1546,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
...
@@ -1546,7 +1546,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
ngroup
=
0
;
ngroup
=
0
;
/* NULL terminate each captured group in the line */
/* NULL terminate each captured group in the line */
for
(
j
=
0
;
j
<
nvars
[
i
]
;
j
++
)
{
for
(
j
=
0
;
j
<
nvars
[
i
]
;
j
++
)
{
/* NB vars[0] is the full pattern, so we offset j by 1 */
/* NB vars[0] is the full pattern, so we offset j by 1 */
p
[
vars
[
j
+
1
].
rm_eo
]
=
'\0'
;
p
[
vars
[
j
+
1
].
rm_eo
]
=
'\0'
;
if
(
VIR_STRDUP
(
groups
[
ngroup
++
],
p
+
vars
[
j
+
1
].
rm_so
)
<
0
)
if
(
VIR_STRDUP
(
groups
[
ngroup
++
],
p
+
vars
[
j
+
1
].
rm_so
)
<
0
)
...
@@ -1559,7 +1559,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
...
@@ -1559,7 +1559,7 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
goto
cleanup
;
goto
cleanup
;
/* Release matches & restart to matching the first regex */
/* Release matches & restart to matching the first regex */
for
(
j
=
0
;
j
<
totgroups
;
j
++
)
for
(
j
=
0
;
j
<
totgroups
;
j
++
)
VIR_FREE
(
groups
[
j
]);
VIR_FREE
(
groups
[
j
]);
maxReg
=
0
;
maxReg
=
0
;
ngroup
=
0
;
ngroup
=
0
;
...
@@ -1571,13 +1571,13 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
...
@@ -1571,13 +1571,13 @@ virStorageBackendRunProgRegex(virStoragePoolObjPtr pool,
ret
=
virCommandWait
(
cmd
,
NULL
);
ret
=
virCommandWait
(
cmd
,
NULL
);
cleanup:
cleanup:
if
(
groups
)
{
if
(
groups
)
{
for
(
j
=
0
;
j
<
totgroups
;
j
++
)
for
(
j
=
0
;
j
<
totgroups
;
j
++
)
VIR_FREE
(
groups
[
j
]);
VIR_FREE
(
groups
[
j
]);
VIR_FREE
(
groups
);
VIR_FREE
(
groups
);
}
}
VIR_FREE
(
vars
);
VIR_FREE
(
vars
);
for
(
i
=
0
;
i
<
nregex
;
i
++
)
for
(
i
=
0
;
i
<
nregex
;
i
++
)
regfree
(
&
reg
[
i
]);
regfree
(
&
reg
[
i
]);
VIR_FREE
(
reg
);
VIR_FREE
(
reg
);
...
...
src/storage/storage_backend_disk.c
浏览文件 @
f0e752a4
...
@@ -553,7 +553,7 @@ virStorageBackendDiskPartBoundries(virStoragePoolObjPtr pool,
...
@@ -553,7 +553,7 @@ virStorageBackendDiskPartBoundries(virStoragePoolObjPtr pool,
aligned to the cylinder boundary */
aligned to the cylinder boundary */
extraBytes
=
cylinderSize
-
(
allocation
%
cylinderSize
);
extraBytes
=
cylinderSize
-
(
allocation
%
cylinderSize
);
for
(
i
=
0
;
i
<
dev
->
nfreeExtent
;
i
++
)
{
for
(
i
=
0
;
i
<
dev
->
nfreeExtent
;
i
++
)
{
unsigned
long
long
size
=
unsigned
long
long
size
=
dev
->
freeExtents
[
i
].
end
-
dev
->
freeExtents
[
i
].
end
-
dev
->
freeExtents
[
i
].
start
;
dev
->
freeExtents
[
i
].
start
;
...
...
src/storage/storage_backend_iscsi.c
浏览文件 @
f0e752a4
...
@@ -562,7 +562,7 @@ virStorageBackendISCSIScanTargets(const char *portal,
...
@@ -562,7 +562,7 @@ virStorageBackendISCSIScanTargets(const char *portal,
&
list
,
NULL
)
<
0
)
&
list
,
NULL
)
<
0
)
goto
cleanup
;
goto
cleanup
;
for
(
i
=
0
;
i
<
list
.
ntargets
;
i
++
)
{
for
(
i
=
0
;
i
<
list
.
ntargets
;
i
++
)
{
/* We have to ignore failure, because we can't undo
/* We have to ignore failure, because we can't undo
* the results of 'sendtargets', unless we go scrubbing
* the results of 'sendtargets', unless we go scrubbing
* around in the dirt in /var/lib/iscsi.
* around in the dirt in /var/lib/iscsi.
...
@@ -578,7 +578,7 @@ virStorageBackendISCSIScanTargets(const char *portal,
...
@@ -578,7 +578,7 @@ virStorageBackendISCSIScanTargets(const char *portal,
*
ntargetsret
=
list
.
ntargets
;
*
ntargetsret
=
list
.
ntargets
;
*
targetsret
=
list
.
targets
;
*
targetsret
=
list
.
targets
;
}
else
{
}
else
{
for
(
i
=
0
;
i
<
list
.
ntargets
;
i
++
)
{
for
(
i
=
0
;
i
<
list
.
ntargets
;
i
++
)
{
VIR_FREE
(
list
.
targets
[
i
]);
VIR_FREE
(
list
.
targets
[
i
]);
}
}
VIR_FREE
(
list
.
targets
);
VIR_FREE
(
list
.
targets
);
...
@@ -640,7 +640,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -640,7 +640,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
goto
cleanup
;
goto
cleanup
;
}
}
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
{
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
{
if
(
VIR_ALLOC_N
(
list
.
sources
[
i
].
devices
,
1
)
<
0
||
if
(
VIR_ALLOC_N
(
list
.
sources
[
i
].
devices
,
1
)
<
0
||
VIR_ALLOC_N
(
list
.
sources
[
i
].
hosts
,
1
)
<
0
)
{
VIR_ALLOC_N
(
list
.
sources
[
i
].
hosts
,
1
)
<
0
)
{
virReportOOMError
();
virReportOOMError
();
...
@@ -661,13 +661,13 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -661,13 +661,13 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
cleanup:
cleanup:
if
(
list
.
sources
)
{
if
(
list
.
sources
)
{
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
{
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
{
VIR_FREE
(
list
.
sources
[
i
].
hosts
);
VIR_FREE
(
list
.
sources
[
i
].
hosts
);
VIR_FREE
(
list
.
sources
[
i
].
devices
);
VIR_FREE
(
list
.
sources
[
i
].
devices
);
}
}
VIR_FREE
(
list
.
sources
);
VIR_FREE
(
list
.
sources
);
}
}
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
for
(
i
=
0
;
i
<
ntargets
;
i
++
)
VIR_FREE
(
targets
[
i
]);
VIR_FREE
(
targets
[
i
]);
VIR_FREE
(
targets
);
VIR_FREE
(
targets
);
VIR_FREE
(
portal
);
VIR_FREE
(
portal
);
...
...
src/storage/storage_backend_logical.c
浏览文件 @
f0e752a4
...
@@ -364,7 +364,7 @@ virStorageBackendLogicalFindPoolSourcesFunc(virStoragePoolObjPtr pool ATTRIBUTE_
...
@@ -364,7 +364,7 @@ virStorageBackendLogicalFindPoolSourcesFunc(virStoragePoolObjPtr pool ATTRIBUTE_
goto
error
;
goto
error
;
thisSource
=
NULL
;
thisSource
=
NULL
;
for
(
i
=
0
;
i
<
sourceList
->
nsources
;
i
++
)
{
for
(
i
=
0
;
i
<
sourceList
->
nsources
;
i
++
)
{
if
(
STREQ
(
sourceList
->
sources
[
i
].
name
,
vgname
))
{
if
(
STREQ
(
sourceList
->
sources
[
i
].
name
,
vgname
))
{
thisSource
=
&
sourceList
->
sources
[
i
];
thisSource
=
&
sourceList
->
sources
[
i
];
break
;
break
;
...
@@ -514,7 +514,7 @@ virStorageBackendLogicalBuildPool(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -514,7 +514,7 @@ virStorageBackendLogicalBuildPool(virConnectPtr conn ATTRIBUTE_UNUSED,
vgcmd
=
virCommandNewArgList
(
VGCREATE
,
pool
->
def
->
source
.
name
,
NULL
);
vgcmd
=
virCommandNewArgList
(
VGCREATE
,
pool
->
def
->
source
.
name
,
NULL
);
for
(
i
=
0
;
i
<
pool
->
def
->
source
.
ndevice
;
i
++
)
{
for
(
i
=
0
;
i
<
pool
->
def
->
source
.
ndevice
;
i
++
)
{
virCommandPtr
pvcmd
;
virCommandPtr
pvcmd
;
/*
/*
* LVM requires that the first sector is blanked if using
* LVM requires that the first sector is blanked if using
...
@@ -669,7 +669,7 @@ virStorageBackendLogicalDeletePool(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -669,7 +669,7 @@ virStorageBackendLogicalDeletePool(virConnectPtr conn ATTRIBUTE_UNUSED,
/* now remove the pv devices and clear them out */
/* now remove the pv devices and clear them out */
ret
=
0
;
ret
=
0
;
for
(
i
=
0
;
i
<
pool
->
def
->
source
.
ndevice
;
i
++
)
{
for
(
i
=
0
;
i
<
pool
->
def
->
source
.
ndevice
;
i
++
)
{
cmd
=
virCommandNewArgList
(
PVREMOVE
,
cmd
=
virCommandNewArgList
(
PVREMOVE
,
pool
->
def
->
source
.
devices
[
i
].
path
,
pool
->
def
->
source
.
devices
[
i
].
path
,
NULL
);
NULL
);
...
...
src/storage/storage_driver.c
浏览文件 @
f0e752a4
...
@@ -68,7 +68,7 @@ static void
...
@@ -68,7 +68,7 @@ static void
storageDriverAutostart
(
virStorageDriverStatePtr
driver
)
{
storageDriverAutostart
(
virStorageDriverStatePtr
driver
)
{
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
virStoragePoolObjPtr
pool
=
driver
->
pools
.
objs
[
i
];
virStoragePoolObjPtr
pool
=
driver
->
pools
.
objs
[
i
];
virStorageBackendPtr
backend
;
virStorageBackendPtr
backend
;
bool
started
=
false
;
bool
started
=
false
;
...
@@ -314,7 +314,7 @@ storageConnectNumOfStoragePools(virConnectPtr conn) {
...
@@ -314,7 +314,7 @@ storageConnectNumOfStoragePools(virConnectPtr conn) {
unsigned
int
i
,
nactive
=
0
;
unsigned
int
i
,
nactive
=
0
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
nactive
++
;
nactive
++
;
...
@@ -333,7 +333,7 @@ storageConnectListStoragePools(virConnectPtr conn,
...
@@ -333,7 +333,7 @@ storageConnectListStoragePools(virConnectPtr conn,
int
got
=
0
,
i
;
int
got
=
0
,
i
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
got
<
nnames
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
got
<
nnames
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
VIR_STRDUP
(
names
[
got
],
driver
->
pools
.
objs
[
i
]
->
def
->
name
)
<
0
)
{
if
(
VIR_STRDUP
(
names
[
got
],
driver
->
pools
.
objs
[
i
]
->
def
->
name
)
<
0
)
{
...
@@ -349,7 +349,7 @@ storageConnectListStoragePools(virConnectPtr conn,
...
@@ -349,7 +349,7 @@ storageConnectListStoragePools(virConnectPtr conn,
cleanup:
cleanup:
storageDriverUnlock
(
driver
);
storageDriverUnlock
(
driver
);
for
(
i
=
0
;
i
<
got
;
i
++
)
for
(
i
=
0
;
i
<
got
;
i
++
)
VIR_FREE
(
names
[
i
]);
VIR_FREE
(
names
[
i
]);
memset
(
names
,
0
,
nnames
*
sizeof
(
*
names
));
memset
(
names
,
0
,
nnames
*
sizeof
(
*
names
));
return
-
1
;
return
-
1
;
...
@@ -361,7 +361,7 @@ storageConnectNumOfDefinedStoragePools(virConnectPtr conn) {
...
@@ -361,7 +361,7 @@ storageConnectNumOfDefinedStoragePools(virConnectPtr conn) {
unsigned
int
i
,
nactive
=
0
;
unsigned
int
i
,
nactive
=
0
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
!
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
if
(
!
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
nactive
++
;
nactive
++
;
...
@@ -380,7 +380,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn,
...
@@ -380,7 +380,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn,
int
got
=
0
,
i
;
int
got
=
0
,
i
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
got
<
nnames
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
got
<
nnames
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
!
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
!
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
VIR_STRDUP
(
names
[
got
],
driver
->
pools
.
objs
[
i
]
->
def
->
name
)
<
0
)
{
if
(
VIR_STRDUP
(
names
[
got
],
driver
->
pools
.
objs
[
i
]
->
def
->
name
)
<
0
)
{
...
@@ -396,7 +396,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn,
...
@@ -396,7 +396,7 @@ storageConnectListDefinedStoragePools(virConnectPtr conn,
cleanup:
cleanup:
storageDriverUnlock
(
driver
);
storageDriverUnlock
(
driver
);
for
(
i
=
0
;
i
<
got
;
i
++
)
{
for
(
i
=
0
;
i
<
got
;
i
++
)
{
VIR_FREE
(
names
[
i
]);
VIR_FREE
(
names
[
i
]);
}
}
memset
(
names
,
0
,
nnames
*
sizeof
(
*
names
));
memset
(
names
,
0
,
nnames
*
sizeof
(
*
names
));
...
@@ -1114,7 +1114,7 @@ storagePoolListVolumes(virStoragePoolPtr obj,
...
@@ -1114,7 +1114,7 @@ storagePoolListVolumes(virStoragePoolPtr obj,
goto
cleanup
;
goto
cleanup
;
}
}
for
(
i
=
0
;
i
<
pool
->
volumes
.
count
&&
n
<
maxnames
;
i
++
)
{
for
(
i
=
0
;
i
<
pool
->
volumes
.
count
&&
n
<
maxnames
;
i
++
)
{
if
(
VIR_STRDUP
(
names
[
n
++
],
pool
->
volumes
.
objs
[
i
]
->
name
)
<
0
)
if
(
VIR_STRDUP
(
names
[
n
++
],
pool
->
volumes
.
objs
[
i
]
->
name
)
<
0
)
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -1125,7 +1125,7 @@ storagePoolListVolumes(virStoragePoolPtr obj,
...
@@ -1125,7 +1125,7 @@ storagePoolListVolumes(virStoragePoolPtr obj,
cleanup:
cleanup:
if
(
pool
)
if
(
pool
)
virStoragePoolObjUnlock
(
pool
);
virStoragePoolObjUnlock
(
pool
);
for
(
n
=
0
;
n
<
maxnames
;
n
++
)
for
(
n
=
0
;
n
<
maxnames
;
n
++
)
VIR_FREE
(
names
[
n
]);
VIR_FREE
(
names
[
n
]);
memset
(
names
,
0
,
maxnames
*
sizeof
(
*
names
));
memset
(
names
,
0
,
maxnames
*
sizeof
(
*
names
));
...
@@ -1174,7 +1174,7 @@ storagePoolListAllVolumes(virStoragePoolPtr pool,
...
@@ -1174,7 +1174,7 @@ storagePoolListAllVolumes(virStoragePoolPtr pool,
goto
cleanup
;
goto
cleanup
;
}
}
for
(
i
=
0
;
i
<
obj
->
volumes
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
obj
->
volumes
.
count
;
i
++
)
{
if
(
!
(
vol
=
virGetStorageVol
(
pool
->
conn
,
obj
->
def
->
name
,
if
(
!
(
vol
=
virGetStorageVol
(
pool
->
conn
,
obj
->
def
->
name
,
obj
->
volumes
.
objs
[
i
]
->
name
,
obj
->
volumes
.
objs
[
i
]
->
name
,
obj
->
volumes
.
objs
[
i
]
->
key
,
obj
->
volumes
.
objs
[
i
]
->
key
,
...
@@ -1253,7 +1253,7 @@ storageVolLookupByKey(virConnectPtr conn,
...
@@ -1253,7 +1253,7 @@ storageVolLookupByKey(virConnectPtr conn,
virStorageVolPtr
ret
=
NULL
;
virStorageVolPtr
ret
=
NULL
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
!
ret
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
!
ret
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
virStorageVolDefPtr
vol
=
virStorageVolDefPtr
vol
=
...
@@ -1290,7 +1290,7 @@ storageVolLookupByPath(virConnectPtr conn,
...
@@ -1290,7 +1290,7 @@ storageVolLookupByPath(virConnectPtr conn,
return
NULL
;
return
NULL
;
storageDriverLock
(
driver
);
storageDriverLock
(
driver
);
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
!
ret
;
i
++
)
{
for
(
i
=
0
;
i
<
driver
->
pools
.
count
&&
!
ret
;
i
++
)
{
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
virStoragePoolObjLock
(
driver
->
pools
.
objs
[
i
]);
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
if
(
virStoragePoolObjIsActive
(
driver
->
pools
.
objs
[
i
]))
{
virStorageVolDefPtr
vol
;
virStorageVolDefPtr
vol
;
...
@@ -2169,7 +2169,7 @@ storageVolDelete(virStorageVolPtr obj,
...
@@ -2169,7 +2169,7 @@ storageVolDelete(virStorageVolPtr obj,
if
(
backend
->
deleteVol
(
obj
->
conn
,
pool
,
vol
,
flags
)
<
0
)
if
(
backend
->
deleteVol
(
obj
->
conn
,
pool
,
vol
,
flags
)
<
0
)
goto
cleanup
;
goto
cleanup
;
for
(
i
=
0
;
i
<
pool
->
volumes
.
count
;
i
++
)
{
for
(
i
=
0
;
i
<
pool
->
volumes
.
count
;
i
++
)
{
if
(
pool
->
volumes
.
objs
[
i
]
==
vol
)
{
if
(
pool
->
volumes
.
objs
[
i
]
==
vol
)
{
VIR_INFO
(
"Deleting volume '%s' from storage pool '%s'"
,
VIR_INFO
(
"Deleting volume '%s' from storage pool '%s'"
,
vol
->
name
,
pool
->
def
->
name
);
vol
->
name
,
pool
->
def
->
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录