Tools: hv: vss: Thaw the filesystem and continue if freeze call has timed out
authorAlex Ng <alexng@messages.microsoft.com>
Sun, 30 Apr 2017 23:21:14 +0000 (16:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 May 2017 14:55:28 +0000 (16:55 +0200)
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: Michael Gissing <mg@faulpeltz.net>
Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_vss_daemon.c

index e0829809c897064554ca4ad342e4dd22c6c1c024..7ba54195934c9aba4083b28b2ea02ce2b2c456db 100644 (file)
@@ -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);
                }
        }