[Zesty,1/1] UBUNTU: SAUCE: Tools: hv: vss: Thaw the filesystem and continue after freeze fails

Submitted by Joseph Salisbury on Feb. 27, 2017, 6:55 p.m.

Details

Message ID b74cd26e69eb27cf275434c5704e43eb1c122857.1488220676.git.joseph.salisbury@canonical.com
State New
Headers show

Commit Message

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

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

If a FREEZE operation takes too long, the driver may time out and move on
to another  operation. The daemon is unaware of this and attempts to
notify the driver that the FREEZE succeeded. This results in an error from
the driver and the daemon leaves the filesystem in frozen state.

Fix this by thawing the filesystem and continuing.

Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
 tools/hv/hv_vss_daemon.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Seth Forshee March 1, 2017, 1:26 p.m.

Patch hide | download patch | download mbox

diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c
index e082980..7ba5419 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -261,7 +261,9 @@  int main(int argc, char *argv[])
 		if (len != sizeof(struct hv_vss_msg)) {
 			syslog(LOG_ERR, "write failed; error: %d %s", errno,
 			       strerror(errno));
-			exit(EXIT_FAILURE);
+
+			if (op == VSS_OP_FREEZE)
+				vss_operate(VSS_OP_THAW);
 		}
 	}