Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
40cc610a
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看板
提交
40cc610a
编写于
3月 25, 2014
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Indent top-level labels by one space in src/locking/
上级
d46f4a3c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
49 addition
and
49 deletion
+49
-49
src/locking/domain_lock.c
src/locking/domain_lock.c
+5
-5
src/locking/lock_daemon.c
src/locking/lock_daemon.c
+13
-13
src/locking/lock_daemon_config.c
src/locking/lock_daemon_config.c
+2
-2
src/locking/lock_daemon_dispatch.c
src/locking/lock_daemon_dispatch.c
+8
-8
src/locking/lock_driver_lockd.c
src/locking/lock_driver_lockd.c
+9
-9
src/locking/lock_driver_sanlock.c
src/locking/lock_driver_sanlock.c
+10
-10
src/locking/lock_manager.c
src/locking/lock_manager.c
+1
-1
src/locking/sanlock_helper.c
src/locking/sanlock_helper.c
+1
-1
未找到文件。
src/locking/domain_lock.c
浏览文件 @
40cc610a
...
...
@@ -155,7 +155,7 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
return
lock
;
error:
error:
virLockManagerFree
(
lock
);
return
NULL
;
}
...
...
@@ -270,7 +270,7 @@ int virDomainLockDiskAttach(virLockManagerPluginPtr plugin,
ret
=
0
;
cleanup:
cleanup:
virLockManagerFree
(
lock
);
return
ret
;
...
...
@@ -297,7 +297,7 @@ int virDomainLockDiskDetach(virLockManagerPluginPtr plugin,
ret
=
0
;
cleanup:
cleanup:
virLockManagerFree
(
lock
);
return
ret
;
...
...
@@ -327,7 +327,7 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
ret
=
0
;
cleanup:
cleanup:
virLockManagerFree
(
lock
);
return
ret
;
...
...
@@ -354,7 +354,7 @@ int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
ret
=
0
;
cleanup:
cleanup:
virLockManagerFree
(
lock
);
return
ret
;
...
...
src/locking/lock_daemon.c
浏览文件 @
40cc610a
...
...
@@ -164,7 +164,7 @@ virLockDaemonNew(virLockDaemonConfigPtr config, bool privileged)
return
lockd
;
error:
error:
virLockDaemonFree
(
lockd
);
return
NULL
;
}
...
...
@@ -246,7 +246,7 @@ virLockDaemonNewPostExecRestart(virJSONValuePtr object, bool privileged)
return
lockd
;
error:
error:
virLockDaemonFree
(
lockd
);
return
NULL
;
}
...
...
@@ -396,7 +396,7 @@ virLockDaemonPidFilePath(bool privileged,
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -431,7 +431,7 @@ virLockDaemonUnixSocketPaths(bool privileged,
}
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -551,7 +551,7 @@ virLockDaemonSetupLogging(virLockDaemonConfigPtr config,
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -816,7 +816,7 @@ virLockDaemonClientNew(virNetServerClientPtr client,
return
priv
;
error:
error:
virMutexDestroy
(
&
priv
->
lock
);
VIR_FREE
(
priv
);
return
NULL
;
...
...
@@ -871,7 +871,7 @@ virLockDaemonClientNewPostExecRestart(virNetServerClientPtr client,
}
return
priv
;
error:
error:
virLockDaemonClientFree
(
priv
);
return
NULL
;
}
...
...
@@ -917,7 +917,7 @@ virLockDaemonClientPreExecRestart(virNetServerClientPtr client ATTRIBUTE_UNUSED,
return
object
;
error:
error:
virJSONValueFree
(
object
);
return
NULL
;
}
...
...
@@ -955,7 +955,7 @@ virLockDaemonExecRestartStatePath(bool privileged,
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -1028,7 +1028,7 @@ virLockDaemonPostExecRestart(const char *state_file,
ret
=
1
;
cleanup:
cleanup:
unlink
(
state_file
);
VIR_FREE
(
wantmagic
);
VIR_FREE
(
state
);
...
...
@@ -1123,7 +1123,7 @@ virLockDaemonPreExecRestart(const char *state_file,
abort
();
/* This should be impossible to reach */
cleanup:
cleanup:
VIR_FREE
(
pairs
);
VIR_FREE
(
state
);
virJSONValueFree
(
object
);
...
...
@@ -1451,7 +1451,7 @@ int main(int argc, char **argv) {
else
ret
=
0
;
cleanup:
cleanup:
virObjectUnref
(
lockProgram
);
virLockDaemonFree
(
lockDaemon
);
if
(
statuswrite
!=
-
1
)
{
...
...
@@ -1472,7 +1472,7 @@ cleanup:
VIR_FREE
(
run_dir
);
return
ret
;
no_memory:
no_memory:
VIR_ERROR
(
_
(
"Can't allocate memory"
));
exit
(
EXIT_FAILURE
);
}
src/locking/lock_daemon_config.c
浏览文件 @
40cc610a
...
...
@@ -102,7 +102,7 @@ virLockDaemonConfigFilePath(bool privileged, char **configfile)
return
0
;
error:
error:
return
-
1
;
}
...
...
@@ -144,7 +144,7 @@ virLockDaemonConfigLoadOptions(virLockDaemonConfigPtr data,
return
0
;
error:
error:
return
-
1
;
}
...
...
src/locking/lock_daemon_dispatch.c
浏览文件 @
40cc610a
...
...
@@ -88,7 +88,7 @@ virLockSpaceProtocolDispatchAcquireResource(virNetServerPtr server ATTRIBUTE_UNU
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -137,7 +137,7 @@ virLockSpaceProtocolDispatchCreateResource(virNetServerPtr server ATTRIBUTE_UNUS
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -186,7 +186,7 @@ virLockSpaceProtocolDispatchDeleteResource(virNetServerPtr server ATTRIBUTE_UNUS
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -242,7 +242,7 @@ virLockSpaceProtocolDispatchNew(virNetServerPtr server ATTRIBUTE_UNUSED,
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -288,7 +288,7 @@ virLockSpaceProtocolDispatchRegister(virNetServerPtr server ATTRIBUTE_UNUSED,
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -339,7 +339,7 @@ virLockSpaceProtocolDispatchReleaseResource(virNetServerPtr server ATTRIBUTE_UNU
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -378,7 +378,7 @@ virLockSpaceProtocolDispatchRestrict(virNetServerPtr server ATTRIBUTE_UNUSED,
priv
->
restricted
=
true
;
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
@@ -423,7 +423,7 @@ virLockSpaceProtocolDispatchCreateLockSpace(virNetServerPtr server ATTRIBUTE_UNU
rv
=
0
;
cleanup:
cleanup:
if
(
rv
<
0
)
virNetMessageSaveError
(
rerr
);
virMutexUnlock
(
&
priv
->
lock
);
...
...
src/locking/lock_driver_lockd.c
浏览文件 @
40cc610a
...
...
@@ -220,7 +220,7 @@ virLockManagerLockDaemonConnectionRegister(virLockManagerPtr lock,
rv
=
0
;
cleanup:
cleanup:
return
rv
;
}
...
...
@@ -249,7 +249,7 @@ virLockManagerLockDaemonConnectionRestrict(virLockManagerPtr lock ATTRIBUTE_UNUS
rv
=
0
;
cleanup:
cleanup:
return
rv
;
}
...
...
@@ -288,7 +288,7 @@ static virNetClientPtr virLockManagerLockDaemonConnectionNew(bool privileged,
return
client
;
error:
error:
VIR_FREE
(
lockdpath
);
virNetClientClose
(
client
);
virObjectUnref
(
client
);
...
...
@@ -315,7 +315,7 @@ virLockManagerLockDaemonConnect(virLockManagerPtr lock,
return
client
;
error:
error:
virNetClientClose
(
client
);
virObjectUnref
(
client
);
return
NULL
;
...
...
@@ -355,7 +355,7 @@ static int virLockManagerLockDaemonSetupLockspace(const char *path)
rv
=
0
;
cleanup:
cleanup:
virObjectUnref
(
program
);
virNetClientClose
(
client
);
virObjectUnref
(
client
);
...
...
@@ -401,7 +401,7 @@ static int virLockManagerLockDaemonInit(unsigned int version,
return
0
;
error:
error:
virLockManagerLockDaemonDeinit
();
return
-
1
;
}
...
...
@@ -649,7 +649,7 @@ static int virLockManagerLockDaemonAddResource(virLockManagerPtr lock,
return
0
;
error:
error:
VIR_FREE
(
newLockspace
);
VIR_FREE
(
newName
);
return
-
1
;
...
...
@@ -715,7 +715,7 @@ static int virLockManagerLockDaemonAcquire(virLockManagerPtr lock,
rv
=
0
;
cleanup:
cleanup:
if
(
rv
!=
0
&&
fd
)
VIR_FORCE_CLOSE
(
*
fd
);
virNetClientClose
(
client
);
...
...
@@ -770,7 +770,7 @@ static int virLockManagerLockDaemonRelease(virLockManagerPtr lock,
rv
=
0
;
cleanup:
cleanup:
virNetClientClose
(
client
);
virObjectUnref
(
client
);
virObjectUnref
(
program
);
...
...
src/locking/lock_driver_sanlock.c
浏览文件 @
40cc610a
...
...
@@ -334,7 +334,7 @@ static int virLockManagerSanlockSetupLockspace(void)
* either call a sanlock API that blocks us until lockspace changes state,
* or we can fallback to polling.
*/
retry:
retry:
if
((
rv
=
sanlock_add_lockspace
(
&
ls
,
0
))
<
0
)
{
if
(
-
rv
==
EINPROGRESS
&&
--
retries
)
{
#ifdef HAVE_SANLOCK_INQ_LOCKSPACE
...
...
@@ -373,9 +373,9 @@ retry:
VIR_FREE
(
dir
);
return
0
;
error_unlink:
error_unlink:
unlink
(
path
);
error:
error:
VIR_FORCE_CLOSE
(
fd
);
VIR_FREE
(
path
);
VIR_FREE
(
dir
);
...
...
@@ -424,7 +424,7 @@ static int virLockManagerSanlockInit(unsigned int version,
return
0
;
error:
error:
virLockManagerSanlockDeinit
();
return
-
1
;
}
...
...
@@ -490,7 +490,7 @@ static int virLockManagerSanlockNew(virLockManagerPtr lock,
lock
->
privateData
=
priv
;
return
0
;
error:
error:
VIR_FREE
(
priv
);
return
-
1
;
}
...
...
@@ -559,7 +559,7 @@ static int virLockManagerSanlockAddLease(virLockManagerPtr lock,
ret
=
0
;
cleanup:
cleanup:
if
(
ret
==
-
1
)
VIR_FREE
(
res
);
return
ret
;
...
...
@@ -624,7 +624,7 @@ static int virLockManagerSanlockAddDisk(virLockManagerPtr lock,
ret
=
0
;
cleanup:
cleanup:
if
(
ret
==
-
1
)
VIR_FREE
(
res
);
VIR_FREE
(
path
);
...
...
@@ -707,7 +707,7 @@ static int virLockManagerSanlockCreateLease(struct sanlk_resource *res)
return
0
;
error_unlink:
error_unlink:
unlink
(
res
->
disks
[
0
].
path
);
VIR_FORCE_CLOSE
(
fd
);
return
-
1
;
...
...
@@ -850,7 +850,7 @@ virLockManagerSanlockRegisterKillscript(int sock,
ret
=
0
;
cleanup:
cleanup:
VIR_FREE
(
args
);
return
ret
;
}
...
...
@@ -1002,7 +1002,7 @@ static int virLockManagerSanlockAcquire(virLockManagerPtr lock,
return
0
;
error:
error:
if
(
res_free
)
{
for
(
i
=
0
;
i
<
res_count
;
i
++
)
{
VIR_FREE
(
res_args
[
i
]);
...
...
src/locking/lock_manager.c
浏览文件 @
40cc610a
...
...
@@ -197,7 +197,7 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
VIR_FREE
(
modfile
);
return
plugin
;
cleanup:
cleanup:
VIR_FREE
(
configFile
);
VIR_FREE
(
plugin
);
VIR_FREE
(
modfile
);
...
...
src/locking/sanlock_helper.c
浏览文件 @
40cc610a
...
...
@@ -105,7 +105,7 @@ main(int argc, char **argv)
break
;
}
cleanup:
cleanup:
if
(
dom
)
virDomainFree
(
dom
);
if
(
conn
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录