提交 a58cb1ac 编写于 作者: F Frido Roose 提交者: Eric Blake

Release only specific sanlock resource

This is a patch for bug 826704
All sanlock resources get released when hot-dettaching a disk from the domain
because virLockManagerSanlockRelease uses the wrong function parameters/flags.
With the patch only the resources that should be released are cleaned up.
Signed-off-by: NFrido Roose <frido.roose@gmail.com>
上级 e9a24e3e
......@@ -814,7 +814,7 @@ static int virLockManagerSanlockRelease(virLockManagerPtr lock,
unsigned int flags)
{
virLockManagerSanlockPrivatePtr priv = lock->privateData;
int res_count;
int res_count = priv->res_count;
int rv;
virCheckFlags(0, -1);
......@@ -834,7 +834,8 @@ static int virLockManagerSanlockRelease(virLockManagerPtr lock,
VIR_FREE(*state);
}
if ((rv = sanlock_release(-1, priv->vm_pid, SANLK_REL_ALL, 0, NULL)) < 0) {
if ((rv = sanlock_release(-1, priv->vm_pid, 0, res_count,
priv->res_args)) < 0) {
if (rv <= -200)
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Failed to release lock: error %d"), rv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册