[Sheepdog] [PATCH] collie: release vdi lock when qemu died with its host machine

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Sat Apr 17 21:16:07 CEST 2010


Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
 collie/group.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/collie/group.c b/collie/group.c
index f3bef66..f2ec7a9 100644
--- a/collie/group.c
+++ b/collie/group.c
@@ -1050,6 +1050,17 @@ static void __sd_confch(struct work *work, int idx)
 		if (node) {
 			int nr;
 			struct sheepdog_node_list_entry e[SD_MAX_NODES];
+			struct vm *vm, *n;
+
+			list_for_each_entry_safe(vm, n, &sys->vm_list, list) {
+				if (memcmp(vm->ent.host_addr, node->ent.addr,
+					   sizeof(node->ent.addr)) != 0)
+					continue;
+				if (vm->ent.host_port != node->ent.port)
+					continue;
+
+				list_del(&vm->list);
+			}
 
 			list_del(&node->list);
 			free(node);
-- 
1.5.6.5




More information about the sheepdog mailing list