lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3] Tools: hv: vssdaemon: thaw everything in case of freeze failure
Date
If one or more filesystems failed to freeze we need to thaw everything as
host doing backup won't issue THAW request after we return HV_E_FAIL and our
system will remain with frozen filesystems for ever.

There is no track of filesystems we freeze so in case there is some external
tool doing freeze/thaw requests at the same time they will collide with vss
daemon. This issue can be addressed by introducing a freeze/thaw transaction
and keeping track of what was actually frozen

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
tools/hv/hv_vss_daemon.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/tools/hv/hv_vss_daemon.c b/tools/hv/hv_vss_daemon.c
index 7be999a..e98c638 100644
--- a/tools/hv/hv_vss_daemon.c
+++ b/tools/hv/hv_vss_daemon.c
@@ -284,6 +284,12 @@ int main(int argc, char *argv[])
error = vss_operate(op);
if (error)
error = HV_E_FAIL;
+ if (error && op == VSS_OP_FREEZE) {
+ /* Need to thaw all frozen fylesystems */
+ syslog(LOG_ERR,
+ "Freeze failed, thaw everything");
+ vss_operate(VSS_OP_THAW);
+ }
break;
default:
syslog(LOG_ERR, "Illegal op:%d\n", op);
--
1.9.3


\
 
 \ /
  Last update: 2014-11-07 18:41    [W:0.040 / U:1.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site