Blame SOURCES/ovt-Ignore-ENXIO-errors-with-SyncDriver.patch

2cf6a7
From ebc8bf4a58f7f65dbb7e7b2e1152322159faa228 Mon Sep 17 00:00:00 2001
2cf6a7
From: Cathy Avery <cavery@redhat.com>
2cf6a7
Date: Fri, 1 Jun 2018 15:58:51 +0200
2cf6a7
Subject: [PATCH] Ignore ENXIO errors with SyncDriver
2cf6a7
2cf6a7
RH-Author: Cathy Avery <cavery@redhat.com>
2cf6a7
Message-id: <20180601155851.7526-1-cavery@redhat.com>
2cf6a7
Patchwork-id: 80546
2cf6a7
O-Subject: [RHEL7.5.z open-vm-tools PATCH] Ignore ENXIO errors with SyncDriver
2cf6a7
Bugzilla: 1582123
2cf6a7
RH-Acked-by: Richard Jones <rjones@redhat.com>
2cf6a7
RH-Acked-by: Mohammed Gamal <mgamal@redhat.com>
2cf6a7
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
2cf6a7
2cf6a7
A quiesced snapshot fails when the target VM has a bind mount.  The
2cf6a7
problem is that the syncDriver gets an ENXIO error when it tries to
2cf6a7
open the mount point.  To fix the problem, let the quiesce operation
2cf6a7
skip a mount point when opening it results in an ENXIO error.
2cf6a7
2cf6a7
This change is based on pull request
2cf6a7
https://github.com/vmware/open-vm-tools/pull/218 .
2cf6a7
2cf6a7
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
2cf6a7
2cf6a7
Conflicts:
2cf6a7
           open-vm-tools/AUTHORS version 10.1.10 is empty.
2cf6a7
2cf6a7
(cherry picked from commit 6559b7dfd9f6f40c2df76e1b1e785fa3eb1c1da4)
2cf6a7
Signed-off-by: Cathy Avery <cavery@redhat.com>
2cf6a7
---
2cf6a7
 lib/syncDriver/syncDriverLinux.c | 10 +++++++++-
2cf6a7
 1 file changed, 9 insertions(+), 1 deletion(-)
2cf6a7
2cf6a7
diff --git a/open-vm-tools/lib/syncDriver/syncDriverLinux.c b/open-vm-tools/lib/syncDriver/syncDriverLinux.c
2cf6a7
index da0a8cb..4422729 100644
2cf6a7
--- a/lib/syncDriver/syncDriverLinux.c
2cf6a7
+++ b/lib/syncDriver/syncDriverLinux.c
2cf6a7
@@ -1,5 +1,5 @@
2cf6a7
 /*********************************************************
2cf6a7
- * Copyright (C) 2011-2017 VMware, Inc. All rights reserved.
2cf6a7
+ * Copyright (C) 2011-2018 VMware, Inc. All rights reserved.
2cf6a7
  *
2cf6a7
  * This program is free software; you can redistribute it and/or modify it
2cf6a7
  * under the terms of the GNU Lesser General Public License as published
2cf6a7
@@ -195,6 +195,14 @@ LinuxDriver_Freeze(const GSList *paths,
2cf6a7
             Debug(LGPFX "cannot access mounted directory '%s'.\n", path);
2cf6a7
             continue;
2cf6a7
 
2cf6a7
+         case ENXIO:
2cf6a7
+            /*
2cf6a7
+             * A bind-mounted file, such as a mount of /dev/log for a
2cf6a7
+             * chrooted application, will land us here.  Just skip it.
2cf6a7
+             */
2cf6a7
+            Debug(LGPFX "no such device or address '%s'.\n", path);
2cf6a7
+            continue;
2cf6a7
+
2cf6a7
          case EIO:
2cf6a7
             /*
2cf6a7
              * A mounted HGFS filesystem with the backend disabled will give
2cf6a7
-- 
2cf6a7
1.8.3.1
2cf6a7