Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2993733AbdD3XWa (ORCPT ); Sun, 30 Apr 2017 19:22:30 -0400 Received: from a2nlsmtp01-05.prod.iad2.secureserver.net ([198.71.225.49]:54668 "EHLO a2nlsmtp01-05.prod.iad2.secureserver.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S967358AbdD3XWW (ORCPT ); Sun, 30 Apr 2017 19:22:22 -0400 x-originating-ip: 107.180.71.197 From: kys@exchange.microsoft.com To: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com, leann.ogasawara@canonical.comi, marcelo.cerri@canonical.com, sthemmin@microsoft.com Cc: Alex Ng , Michael Gissing , "K. Y. Srinivasan" Subject: [PATCH 1/6] Tools: hv: vss: Thaw the filesystem and continue if freeze call has timed out Date: Sun, 30 Apr 2017 16:21:14 -0700 Message-Id: <1493594479-25329-1-git-send-email-kys@exchange.microsoft.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1493594420-25214-1-git-send-email-kys@exchange.microsoft.com> References: <1493594420-25214-1-git-send-email-kys@exchange.microsoft.com> Reply-To: kys@microsoft.com X-CMAE-Envelope: MS4wfC/+Kkw4obp4d50ijNY37Fc0yOF6BvbMPs0mxBoKPHtidI/WntaQcQmhC58X0FHuOwJQoRFvawoeNB2/TkaRzg6XREaaBvo5npYhRydtcV5ZiSgnlGd8 xpJsibkHwy2VN4M10Qsmn59ovbydDbKRbRot94HvQ2vg1J9nCHqZ1Q7ywkenATzPlT0R0ZNAKPQ4XhGQ6+ww7jJfsyEZL8EvL9/h29T/2/qu1EuY8VF6Y84Q a9nXHjNprt0ZUJ/exS87LhnyMviMK0p7oWzxIyO4X6gxTO7xA95TGH47IjBEHOoXvuAy+M9smVP8ySJ3lWoGg9OboABKlKC3MNRiP+mJwd3o7bZ+3kMxpUH0 soABpMsOJYF6AgE35J8Syz1iLE+A0mTInOp1FG4F8ihdtScNBYqcmgcHL69ZVo2wZXVLOVqJcWv713YItUUeCYO/J4pTL9PGnGHFJjFfD/mNON638yCC1vvk 6Y+u/CxuJWLVyT3YErzP42uJKJJ2pgLIk4HHFOTqpsTz9wFoiBvghATZedihWlAgt9g3V4SZ71j7PbrUmUdVOL6Y4GZhoHzxHLTaKvfA+e1CXdQ1CB6qm75P NkQfqq+xHz0ryC6H0odyV7sK Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 33 From: Alex Ng 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 Signed-off-by: Alex Ng Signed-off-by: K. Y. Srinivasan --- tools/hv/hv_vss_daemon.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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); } } -- 1.7.1