From: Chen Hanxiao <chen_han_xiao@126.com>
To: mdroth@linux.vnet.ibm.com
Cc: tomoki.sekiyama@gmail.com, qemu-devel@nongnu.org,
Chen Hanxiao <chen_han_xiao@126.com>
Subject: [Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout
Date: Fri, 22 Sep 2017 10:46:06 +0800 [thread overview]
Message-ID: <1506048366-23368-1-git-send-email-chen_han_xiao@126.com> (raw)
From: Chen Hanxiao <chenhanxiao@gmail.com>
When VM is in a heavy IO, if the command "guest-fsfreeze-freeze"
is executed, VSS may timeout when trying to hold writes.
Inside guest, Event ID 12298(VSS_ERROR_HOLD_WRITES_TIMEOUT)
is logged in the Event Viewer.
At that time, if we call AbortBackup, qga may hang forever.
This patch will solve this issues.
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
---
qga/vss-win32/requester.cpp | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 301762d..3d9c971 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -419,6 +419,16 @@ void requester_freeze(int *num_vols, ErrorSet *errset)
break;
}
}
+
+ if (wait_status == WAIT_TIMEOUT) {
+ err_set(errset, E_FAIL,
+ "timeout when try to receive Frozen event from VSS provider");
+ /* If we are here, VSS had timeout.
+ * Don't call AbortBackup, just return directly.
+ */
+ goto out1;
+ }
+
if (wait_status != WAIT_OBJECT_0) {
err_set(errset, E_FAIL,
"couldn't receive Frozen event from VSS provider");
@@ -432,6 +442,8 @@ out:
if (vss_ctx.pVssbc) {
vss_ctx.pVssbc->AbortBackup();
}
+
+out1:
requester_cleanup();
CoUninitialize();
}
--
2.7.5
next reply other threads:[~2017-09-22 2:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 2:46 Chen Hanxiao [this message]
2017-09-22 21:12 ` [Qemu-devel] [PATCH] qga-win: don't hang if vss hold writes timeout Tomoki Sekiyama
2017-09-23 3:11 ` Chen Hanxiao
2017-09-23 5:26 ` Tomoki Sekiyama
2017-09-26 5:50 ` Chen Hanxiao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1506048366-23368-1-git-send-email-chen_han_xiao@126.com \
--to=chen_han_xiao@126.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=tomoki.sekiyama@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.