[SRU,Xenial,Yakkety,1/2] Drivers: hv: vss: Operation timeouts should match host expectation

Submitted by Joseph Salisbury on Feb. 27, 2017, 7:11 p.m.

Details

Message ID b7fefad8eb6ac47a4b8ba146cd6d4699ac17092b.1488220887.git.joseph.salisbury@canonical.com
State New
Headers show

Commit Message

Joseph Salisbury Feb. 27, 2017, 7:11 p.m.
From: Alex Ng <alexng@messages.microsoft.com>

BugLink: http://bugs.launchpad.net/bugs/1470250

Increase the timeout of backup operations. When system is under I/O load,
it needs more time to freeze. These timeout values should also match the
host timeout values more closely.

Signed-off-by: Alex Ng <alexng@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b357fd3908c1191f2f56e38aa77f2aecdae18bc8)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
 drivers/hv/hv_snapshot.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
index a670713..c42ae82 100644
--- a/drivers/hv/hv_snapshot.c
+++ b/drivers/hv/hv_snapshot.c
@@ -31,7 +31,10 @@ 
 #define VSS_MINOR  0
 #define VSS_VERSION    (VSS_MAJOR << 16 | VSS_MINOR)
 
-#define VSS_USERSPACE_TIMEOUT (msecs_to_jiffies(10 * 1000))
+/*
+ * Timeout values are based on expecations from host
+ */
+#define VSS_FREEZE_TIMEOUT (15 * 60)
 
 /*
  * Global state maintained for transaction that is being processed. For a class
@@ -179,7 +182,8 @@  static void vss_send_op(void)
 
 	vss_transaction.state = HVUTIL_USERSPACE_REQ;
 
-	schedule_delayed_work(&vss_timeout_work, VSS_USERSPACE_TIMEOUT);
+	schedule_delayed_work(&vss_timeout_work, op == VSS_OP_FREEZE ?
+			VSS_FREEZE_TIMEOUT * HZ : HV_UTIL_TIMEOUT * HZ);
 
 	rc = hvutil_transport_send(hvt, vss_msg, sizeof(*vss_msg), NULL);
 	if (rc) {