[Sheepdog] [PATCH] sheep: handle CPG_EVENT_REQUEST even if CPG_EVENT_CONCHG exists

zituan at taobao.com zituan at taobao.com
Wed Sep 14 05:24:14 CEST 2011

From: Yibin Shen <zituan at taobao.com>

This patch prevents a CPG_EVENT_CONCHG event from blocking VM I/Os.

for more details, if a CPG_EVENT_CONCHG event occured inside the
CPG_EVENT_DELIVER and CPG_EVENT_REQUEST event pair(for example:
a vdi lookup oreration followed by a meta object read operation),
then whole cluster will hang forever for the meta object operation
be blocked. this patch delays a CPG_EVENT_CONCHG event handling.

Signed-off-by: Yibin Shen <zituan at taobao.com>
 sheep/group.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/sheep/group.c b/sheep/group.c
index eb0c4e2..b9dd9d7 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1487,10 +1487,8 @@ do_retry:
 	list_for_each_entry_safe(cevent, n, &sys->cpg_event_siblings, cpg_event_list) {
 		struct request *req = container_of(cevent, struct request, cev);
-		if (cevent->ctype == CPG_EVENT_DELIVER)
+		if (cevent->ctype == CPG_EVENT_DELIVER || cevent->ctype == CPG_EVENT_CONCHG)
-		if (cevent->ctype == CPG_EVENT_CONCHG)
-			break;

More information about the sheepdog mailing list