Messages in this thread Patch in this message | | | From | Vitaly Kuznetsov <> | Subject | [PATCH 3/3] Tools: hv: vssdaemon: thaw everything in case of freeze failure | Date | Fri, 7 Nov 2014 18:09:30 +0100 |
| |
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
| |