[PATCH 3/3] Tools: hv: vssdaemon: thaw everything in case of freeze failure
From: Vitaly Kuznetsov
Date: Fri Nov 07 2014 - 12:09:50 EST
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@xxxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/