Blame SOURCES/ovt-Provide-alternate-method-to-allow-expected-pre-froze.patch

af4ca1
From 5b3562a9f0ea7ab11212639753cdf9064394df92 Mon Sep 17 00:00:00 2001
af4ca1
From: Katy Feng <fkaty@vmware.com>
af4ca1
Date: Tue, 22 Aug 2023 11:11:42 -0700
af4ca1
Subject: [PATCH] Provide alternate method to allow (expected) pre-frozen
af4ca1
 filesystems when taking a quiesced snapshot.
af4ca1
af4ca1
RH-Author: Ani Sinha <None>
af4ca1
RH-MergeRequest: 29: Provide alternate method to allow (expected) pre-frozen filesystems when taking a quiesced snapshot.
af4ca1
RH-Bugzilla: 2226921
af4ca1
RH-Acked-by: Vitaly Kuznetsov <vkuznets@redhat.com>
af4ca1
RH-Commit: [1/1] 5582a9588692896258f3711c278e97127e748f67
af4ca1
af4ca1
Effective with open-vm-tools 12.2.0, Linux quiesced snapshots will fail if
af4ca1
any filesystem(s) have been prefrozen by other than the vmtoolsd process.
af4ca1
This has been done to assure that filesystems are inactive while the
af4ca1
snapshots are being taken. Some existing prefreeze scripts may be freezing
af4ca1
some filesystem(s). In these cases, the vmtoolsd process must be informed of
af4ca1
anticipated pre-frozen filesystems by providing an "excludedFileSystem" list in
af4ca1
the [vmbackup] section of the tools.conf file.
af4ca1
af4ca1
This change provides a new switch in the tools.conf file to allow pre-frozen
af4ca1
filesystems to be encountered and accepted when doing a quiesced snapshot
af4ca1
operation. With the default value of "false", the "ignoreFrozenFileSystems"
af4ca1
can be configured with a setting of "true" to notify the quiesced snapshot
af4ca1
operation that pre-frozen filesystems are allowed.
af4ca1
af4ca1
(cherry picked from commit 60c3a80ddc2b400366ed05169e16a6bed6501da2)
af4ca1
Signed-off-by: Ani Sinha <anisinha@redhat.com>
af4ca1
af4ca1
 Conflicts:
af4ca1
	open-vm-tools/services/plugins/vix/foundryToolsDaemon.c
af4ca1
	open-vm-tools/services/plugins/vmbackup/syncDriverOps.c
af4ca1
	open-vm-tools/tools.conf
af4ca1
---
af4ca1
 open-vm-tools/lib/include/syncDriver.h        |  5 ++--
af4ca1
 open-vm-tools/lib/syncDriver/nullDriver.c     | 10 ++++---
af4ca1
 open-vm-tools/lib/syncDriver/syncDriverInt.h  | 14 ++++++----
af4ca1
 .../lib/syncDriver/syncDriverLinux.c          | 25 +++++++++++++----
af4ca1
 .../lib/syncDriver/syncDriverPosix.c          |  7 +++--
af4ca1
 open-vm-tools/lib/syncDriver/vmSyncDriver.c   | 10 ++++---
af4ca1
 .../services/plugins/vix/foundryToolsDaemon.c | 16 +++++++++--
af4ca1
 .../services/plugins/vmbackup/stateMachine.c  |  8 ++++--
af4ca1
 .../services/plugins/vmbackup/syncDriverOps.c |  5 ++--
af4ca1
 .../services/plugins/vmbackup/vmBackupInt.h   | 19 ++++++++-----
af4ca1
 open-vm-tools/tools.conf                      | 28 +++++++++++++++++++
af4ca1
 11 files changed, 109 insertions(+), 38 deletions(-)
af4ca1
af4ca1
diff --git a/open-vm-tools/lib/include/syncDriver.h b/open-vm-tools/lib/include/syncDriver.h
af4ca1
index 20712f66..8ef229d4 100644
af4ca1
--- a/open-vm-tools/lib/include/syncDriver.h
af4ca1
+++ b/open-vm-tools/lib/include/syncDriver.h
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2005-2018 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2005-2018, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -51,7 +51,8 @@ typedef enum {
af4ca1
 Bool SyncDriver_Init(void);
af4ca1
 Bool SyncDriver_Freeze(const char *drives, Bool enableNullDriver,
af4ca1
                        SyncDriverHandle *handle,
af4ca1
-                       const char *excludedFileSystems);
af4ca1
+                       const char *excludedFileSystems,
af4ca1
+                       Bool ignoreFrozenFS);
af4ca1
 Bool SyncDriver_Thaw(const SyncDriverHandle handle);
af4ca1
 SyncDriverStatus SyncDriver_QueryStatus(const SyncDriverHandle handle,
af4ca1
                                         int32 timeout);
af4ca1
diff --git a/open-vm-tools/lib/syncDriver/nullDriver.c b/open-vm-tools/lib/syncDriver/nullDriver.c
af4ca1
index 5e19e208..be96222a 100644
af4ca1
--- a/open-vm-tools/lib/syncDriver/nullDriver.c
af4ca1
+++ b/open-vm-tools/lib/syncDriver/nullDriver.c
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2011-2016 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2011-2016, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -54,8 +54,9 @@ NullDriverClose(SyncDriverHandle handle)
af4ca1
  *
af4ca1
  * Calls sync().
af4ca1
  *
af4ca1
- * @param[in]  paths     Unused.
af4ca1
- * @param[out] handle    Where to store the operation handle.
af4ca1
+ * @param[in]  paths            Unused.
af4ca1
+ * @param[out] handle           Where to store the operation handle.
af4ca1
+ * @param[in]  ignoreFrozenFS   Unused.
af4ca1
  *
af4ca1
  * @return A SyncDriverErr.
af4ca1
  *
af4ca1
@@ -64,7 +65,8 @@ NullDriverClose(SyncDriverHandle handle)
af4ca1
 
af4ca1
 SyncDriverErr
af4ca1
 NullDriver_Freeze(const GSList *paths,
af4ca1
-                  SyncDriverHandle *handle)
af4ca1
+                  SyncDriverHandle *handle,
af4ca1
+                  Bool ignoreFrozenFS)
af4ca1
 {
af4ca1
    /*
af4ca1
     * This is more of a "let's at least do something" than something that
af4ca1
diff --git a/open-vm-tools/lib/syncDriver/syncDriverInt.h b/open-vm-tools/lib/syncDriver/syncDriverInt.h
af4ca1
index 04f37bf2..a5706298 100644
af4ca1
--- a/open-vm-tools/lib/syncDriver/syncDriverInt.h
af4ca1
+++ b/open-vm-tools/lib/syncDriver/syncDriverInt.h
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2011-2017 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2011-2017, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -41,7 +41,8 @@ typedef enum {
af4ca1
 } SyncDriverErr;
af4ca1
 
af4ca1
 typedef SyncDriverErr (*SyncFreezeFn)(const GSList *paths,
af4ca1
-                                      SyncDriverHandle *handle);
af4ca1
+                                      SyncDriverHandle *handle,
af4ca1
+                                      Bool ignoreFrozenFs);
af4ca1
 
af4ca1
 typedef struct SyncHandle {
af4ca1
    SyncDriverErr (*thaw)(const SyncDriverHandle handle);
af4ca1
@@ -55,15 +56,18 @@ typedef struct SyncHandle {
af4ca1
 #if defined(__linux__)
af4ca1
 SyncDriverErr
af4ca1
 LinuxDriver_Freeze(const GSList *userPaths,
af4ca1
-                   SyncDriverHandle *handle);
af4ca1
+                   SyncDriverHandle *handle,
af4ca1
+                   Bool ignoreFrozenFs);
af4ca1
 
af4ca1
 SyncDriverErr
af4ca1
 VmSync_Freeze(const GSList *userPaths,
af4ca1
-              SyncDriverHandle *handle);
af4ca1
+              SyncDriverHandle *handle,
af4ca1
+              Bool ignoreFrozenFs);
af4ca1
 
af4ca1
 SyncDriverErr
af4ca1
 NullDriver_Freeze(const GSList *userPaths,
af4ca1
-                  SyncDriverHandle *handle);
af4ca1
+                  SyncDriverHandle *handle,
af4ca1
+                  Bool ignoreFrozenFs);
af4ca1
 #endif
af4ca1
 
af4ca1
 #endif
af4ca1
diff --git a/open-vm-tools/lib/syncDriver/syncDriverLinux.c b/open-vm-tools/lib/syncDriver/syncDriverLinux.c
af4ca1
index 6d9a3568..4581098e 100644
af4ca1
--- a/open-vm-tools/lib/syncDriver/syncDriverLinux.c
af4ca1
+++ b/open-vm-tools/lib/syncDriver/syncDriverLinux.c
af4ca1
@@ -199,8 +199,9 @@ LinuxFiGetAttr(const SyncDriverHandle handle,   // IN (ignored)
af4ca1
  * slow when guest is performing significant IO. Therefore, caller should
af4ca1
  * consider running this function in a separate thread.
af4ca1
  *
af4ca1
- * @param[in]  paths    List of paths to freeze.
af4ca1
- * @param[out] handle   Handle to use for thawing.
af4ca1
+ * @param[in]  paths           List of paths to freeze.
af4ca1
+ * @param[out] handle          Handle to use for thawing.
af4ca1
+ * @param[in]  ignoreFrozenFS  Switch to allow EBUSY error.
af4ca1
  *
af4ca1
  * @return A SyncDriverErr.
af4ca1
  *
af4ca1
@@ -209,7 +210,8 @@ LinuxFiGetAttr(const SyncDriverHandle handle,   // IN (ignored)
af4ca1
 
af4ca1
 SyncDriverErr
af4ca1
 LinuxDriver_Freeze(const GSList *paths,
af4ca1
-                   SyncDriverHandle *handle)
af4ca1
+                   SyncDriverHandle *handle,
af4ca1
+                   Bool ignoreFrozenFS)
af4ca1
 {
af4ca1
    ssize_t count = 0;
af4ca1
    Bool first = TRUE;
af4ca1
@@ -324,9 +326,12 @@ LinuxDriver_Freeze(const GSList *paths,
af4ca1
           * Previously, an EBUSY error was ignored, assuming that we may try
af4ca1
           * to freeze the same superblock more than once depending on the
af4ca1
           * OS configuration (e.g., usage of bind mounts).
af4ca1
-          * Using the filesystem Id to check if this is a filesystem that we
af4ca1
-          * have seen previously and will ignore this FD only if that is
af4ca1
-          * the case.  Log a warning otherwise since the quiesced snapshot
af4ca1
+          * Use the filesystem Id to check if this filesystem has been
af4ca1
+          * handled before and, if so, ignore it.
af4ca1
+          * Alternatively, allow (ignore) the EBUSY if the
af4ca1
+          * "ignoreFrozenFileSystems" switch inside "vmbackup" section of
af4ca1
+          * tools.conf file is TRUE.
af4ca1
+          * Otherwise, log a warning as the quiesced snapshot
af4ca1
           * attempt will fail.
af4ca1
           */
af4ca1
          if (ioctlerr == EBUSY) {
af4ca1
@@ -339,6 +344,14 @@ LinuxDriver_Freeze(const GSList *paths,
af4ca1
                 */
af4ca1
                Debug(LGPFX "skipping path '%s' - previously frozen", path);
af4ca1
                continue;
af4ca1
+            } else if (ignoreFrozenFS) {
af4ca1
+               /*
af4ca1
+                * Ignores the EBUSY error if the FS has been frozen by another
af4ca1
+                * process and the 'ignoreFrozenFileSystems' setting is
af4ca1
+                * turned on in tools.conf file.
af4ca1
+                */
af4ca1
+               Debug(LGPFX "Ignoring the frozen filesystem '%s'",path);
af4ca1
+               continue;
af4ca1
             }
af4ca1
             /*
af4ca1
              * It appears that this FS has been locked or frozen by another
af4ca1
diff --git a/open-vm-tools/lib/syncDriver/syncDriverPosix.c b/open-vm-tools/lib/syncDriver/syncDriverPosix.c
af4ca1
index 7b6132ba..27369639 100644
af4ca1
--- a/open-vm-tools/lib/syncDriver/syncDriverPosix.c
af4ca1
+++ b/open-vm-tools/lib/syncDriver/syncDriverPosix.c
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2005-2019 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2005-2019, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -456,7 +456,8 @@ Bool
af4ca1
 SyncDriver_Freeze(const char *userPaths,              // IN
af4ca1
                   Bool enableNullDriver,              // IN
af4ca1
                   SyncDriverHandle *handle,           // OUT
af4ca1
-                  const char *excludedFileSystems)    // IN
af4ca1
+                  const char *excludedFileSystems,    // IN
af4ca1
+                  Bool ignoreFrozenFS)                // IN
af4ca1
 {
af4ca1
    GSList *paths = NULL;
af4ca1
    SyncDriverErr err = SD_UNAVAILABLE;
af4ca1
@@ -517,7 +518,7 @@ SyncDriver_Freeze(const char *userPaths,              // IN
af4ca1
          continue;
af4ca1
       }
af4ca1
 #endif
af4ca1
-      err = freezeFn(paths, handle);
af4ca1
+      err = freezeFn(paths, handle, ignoreFrozenFS);
af4ca1
    }
af4ca1
 
af4ca1
    /*
af4ca1
diff --git a/open-vm-tools/lib/syncDriver/vmSyncDriver.c b/open-vm-tools/lib/syncDriver/vmSyncDriver.c
af4ca1
index 2bd0e886..a0d4a315 100644
af4ca1
--- a/open-vm-tools/lib/syncDriver/vmSyncDriver.c
af4ca1
+++ b/open-vm-tools/lib/syncDriver/vmSyncDriver.c
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2011-2016 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2011-2016, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -91,8 +91,9 @@ VmSyncClose(SyncDriverHandle handle)
af4ca1
  * Opens a description to the driver's proc node, and if successful, send an
af4ca1
  * ioctl to freeze the requested filesystems.
af4ca1
  *
af4ca1
- * @param[in]  paths    List of paths to freeze.
af4ca1
- * @param[out] handle   Where to store the handle to use for thawing.
af4ca1
+ * @param[in]  paths          List of paths to freeze.
af4ca1
+ * @param[out] handle         Where to store the handle to use for thawing.
af4ca1
+ * @param[in]  ignoreFrozenFS Unused.
af4ca1
  *
af4ca1
  * @return A SyncDriverErr.
af4ca1
  *
af4ca1
@@ -101,7 +102,8 @@ VmSyncClose(SyncDriverHandle handle)
af4ca1
 
af4ca1
 SyncDriverErr
af4ca1
 VmSync_Freeze(const GSList *paths,
af4ca1
-              SyncDriverHandle *handle)
af4ca1
+              SyncDriverHandle *handle,
af4ca1
+              Bool ignoreFrozenFS)
af4ca1
 {
af4ca1
    int file;
af4ca1
    Bool first = TRUE;
af4ca1
diff --git a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c
af4ca1
index 99a40a8c..437c90fd 100644
af4ca1
--- a/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c
af4ca1
+++ b/open-vm-tools/services/plugins/vix/foundryToolsDaemon.c
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2003-2019 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2003-2021, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -544,6 +544,8 @@ ToolsDaemonTcloSyncDriverFreeze(RpcInData *data)
af4ca1
    GKeyFile *confDictRef = ctx->config;
af4ca1
    Bool enableNullDriver;
af4ca1
    GSource *timer;
af4ca1
+   char *excludedFileSystems;
af4ca1
+   Bool ignoreFrozenFS;
af4ca1
 
af4ca1
    /*
af4ca1
     * Parse the arguments
af4ca1
@@ -576,14 +578,22 @@ ToolsDaemonTcloSyncDriverFreeze(RpcInData *data)
af4ca1
       goto abort;
af4ca1
    }
af4ca1
 
af4ca1
-   enableNullDriver = VixTools_ConfigGetBoolean(confDictRef,
af4ca1
+   enableNullDriver = VMTools_ConfigGetBoolean(confDictRef,
af4ca1
                                                 "vmbackup",
af4ca1
                                                 "enableNullDriver",
af4ca1
                                                 FALSE);
af4ca1
+   excludedFileSystems = VMTools_ConfigGetString(confDictRef,
af4ca1
+                                                  "vmbackup",
af4ca1
+                                                  "excludedFileSystems",
af4ca1
+                                                  NULL);
af4ca1
+   ignoreFrozenFS = VMTools_ConfigGetBoolean(confDictRef,
af4ca1
+                                             "vmbackup",
af4ca1
+                                             "ignoreFrozenFileSystems",
af4ca1
+                                             FALSE);
af4ca1
 
af4ca1
    /* Perform the actual freeze. */
af4ca1
    if (!SyncDriver_Freeze(driveList, enableNullDriver, &gSyncDriverHandle,
af4ca1
-                          NULL) ||
af4ca1
+                          excludedFileSystems, ignoreFrozenFS) ||
af4ca1
        SyncDriver_QueryStatus(gSyncDriverHandle, INFINITE) != SYNCDRIVER_IDLE) {
af4ca1
       g_warning("%s: Failed to Freeze drives '%s'\n",
af4ca1
                 __FUNCTION__, driveList);
af4ca1
diff --git a/open-vm-tools/services/plugins/vmbackup/stateMachine.c b/open-vm-tools/services/plugins/vmbackup/stateMachine.c
af4ca1
index 6b422869..9e6f0541 100644
af4ca1
--- a/open-vm-tools/services/plugins/vmbackup/stateMachine.c
af4ca1
+++ b/open-vm-tools/services/plugins/vmbackup/stateMachine.c
af4ca1
@@ -1024,9 +1024,13 @@ VmBackupStartCommon(RpcInData *data,
af4ca1
 #if defined(__linux__)
af4ca1
    gBackupState->excludedFileSystems =
af4ca1
          VMBACKUP_CONFIG_GET_STR(ctx->config, "excludedFileSystems", NULL);
af4ca1
-   g_debug("Using excludedFileSystems = \"%s\"\n",
af4ca1
+   gBackupState->ignoreFrozenFS =
af4ca1
+       VMBACKUP_CONFIG_GET_BOOL(ctx->config, "ignoreFrozenFileSystems", FALSE);
af4ca1
+
af4ca1
+   g_debug("Using excludedFileSystems = \"%s\", ignoreFrozenFileSystems = %d\n",
af4ca1
            (gBackupState->excludedFileSystems != NULL) ?
af4ca1
-            gBackupState->excludedFileSystems : "(null)");
af4ca1
+            gBackupState->excludedFileSystems : "(null)",
af4ca1
+           gBackupState->ignoreFrozenFS);
af4ca1
 #endif
af4ca1
    g_debug("Quiescing volumes: %s",
af4ca1
            (gBackupState->volumes) ? gBackupState->volumes : "(null)");
af4ca1
diff --git a/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c b/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c
af4ca1
index 4245feba..d8b635f1 100644
af4ca1
--- a/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c
af4ca1
+++ b/open-vm-tools/services/plugins/vmbackup/syncDriverOps.c
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2007-2019 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (C) 2007-2019, 2021, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -276,7 +276,8 @@ VmBackupNewDriverOp(VmBackupState *state,       // IN
af4ca1
                                      useNullDriverPrefs ?
af4ca1
                                         state->enableNullDriver : FALSE,
af4ca1
                                      op->syncHandle,
af4ca1
-                                     state->excludedFileSystems);
af4ca1
+                                     state->excludedFileSystems,
af4ca1
+                                     state->ignoreFrozenFS);
af4ca1
          break;
af4ca1
       case OP_THAW:
af4ca1
          op->manifest = SyncNewManifest(state, *op->syncHandle);
af4ca1
diff --git a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h
af4ca1
index 0c912174..65e2e552 100644
af4ca1
--- a/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h
af4ca1
+++ b/open-vm-tools/services/plugins/vmbackup/vmBackupInt.h
af4ca1
@@ -1,5 +1,5 @@
af4ca1
 /*********************************************************
af4ca1
- * Copyright (C) 2008-2019 VMware, Inc. All rights reserved.
af4ca1
+ * Copyright (c) 2008-2019, 2023 VMware, Inc. All rights reserved.
af4ca1
  *
af4ca1
  * This program is free software; you can redistribute it and/or modify it
af4ca1
  * under the terms of the GNU Lesser General Public License as published
af4ca1
@@ -100,18 +100,22 @@ struct VmBackupSyncCompleter;
af4ca1
  * Don't modify the fields directly - rather, use VmBackup_SetCurrentOp,
af4ca1
  * which does most of the handling needed by users of the state machine.
af4ca1
  *
af4ca1
- * NOTE: The thread for freeze operation modifies currentOp in BackupState
af4ca1
- *       which is also accessed by the AsyncCallback driving the state
af4ca1
- *       machine (run by main thread). Also, gcc might generate two
af4ca1
- *       instructions for writing a 64-bit value. Therefore, protect the
af4ca1
- *       access to currentOp and related fields using opLock mutex.
af4ca1
+ * NOTE 1: The thread for freeze operation modifies currentOp in BackupState
af4ca1
+ *         which is also accessed by the AsyncCallback driving the state
af4ca1
+ *         machine (run by main thread). Also, gcc might generate two
af4ca1
+ *         instructions for writing a 64-bit value. Therefore, protect the
af4ca1
+ *         access to currentOp and related fields using opLock mutex.
af4ca1
+ *
af4ca1
+ * NOTE 2: Only used by Linux guests, ignored on Windows guests and is
af4ca1
+ *         initialized to "false" when the VmBackupState is initialized
af4ca1
+ *         at the start of a backup operation.
af4ca1
  */
af4ca1
 
af4ca1
 typedef struct VmBackupState {
af4ca1
    ToolsAppCtx   *ctx;
af4ca1
    VmBackupOp    *currentOp;
af4ca1
    const char    *currentOpName;
af4ca1
-   GMutex         opLock;          // See note above
af4ca1
+   GMutex         opLock;          // See note 1 above
af4ca1
    char          *volumes;
af4ca1
    char          *snapshots;
af4ca1
    guint          pollPeriod;
af4ca1
@@ -127,6 +131,7 @@ typedef struct VmBackupState {
af4ca1
    Bool           allowHWProvider;
af4ca1
    Bool           execScripts;
af4ca1
    Bool           enableNullDriver;
af4ca1
+   Bool           ignoreFrozenFS;   // See note 2 above
af4ca1
    Bool           needsPriv;
af4ca1
    gchar         *scriptArg;
af4ca1
    guint          timeout;
af4ca1
diff --git a/open-vm-tools/tools.conf b/open-vm-tools/tools.conf
af4ca1
index 7c99b4dc..57ad9271 100644
af4ca1
--- a/open-vm-tools/tools.conf
af4ca1
+++ b/open-vm-tools/tools.conf
af4ca1
@@ -270,11 +270,39 @@
af4ca1
 # including '/'
af4ca1
 #excludedFileSystems=
af4ca1
 
af4ca1
+
af4ca1
+# Linux:
af4ca1
+# It is possible that filesystems are being frozen in pre-freeze scripts
af4ca1
+# to control the order in which those specific filesystems are to be frozen.
af4ca1
+# The vmtoolsd process must be informed of all such filesystems with the help
af4ca1
+# of "excludedFileSystems" setting of tools.conf.
af4ca1
+#
af4ca1
+# A temporary workaround is available (starting from 12.3.0) for admins to allow
af4ca1
+# quiesceing operation to succeed until the "excludedFileSystems" list
af4ca1
+# is configured.
af4ca1
+#
af4ca1
+# If another process thaws the file system while a quiescing operation
af4ca1
+# operation is ongoing, the snapshot may be compromised. Once the
af4ca1
+# "excludedFileSystems" list is configured this setting MUST be unset (or set
af4ca1
+# to false).
af4ca1
+#
af4ca1
+# The value of ignoreFrozenFileSystems is a true or false; the default is
af4ca1
+# false.
af4ca1
+#
af4ca1
+# Set to true to ignore pre-frozen file systems during the quiescing operation.
af4ca1
+#
af4ca1
+# ignoreFrozenFileSystems is Linux only (Not supported on Windows).
af4ca1
+#ignoreFrozenFileSystems=false
af4ca1
+
af4ca1
 # Whether to execute scripts on quiescing.
af4ca1
 # Scripts are executed from /etc/vmware-tools/backupScripts.d on Linux and
af4ca1
 # %installpath%\backupScripts.d on Windows, and the legacy scripts
af4ca1
 # "c:\windows\pre-freeze-script.bat"
af4ca1
 # "c:\windows\post-thaw-script.bat"
af4ca1
+# execScripts specifies whether to execute scripts as part of the quiescing
af4ca1
+# operation. Scripts are executed from the scripts directory along with the
af4ca1
+# legacy scripts.
af4ca1
+
af4ca1
 #
af4ca1
 # Linux:
af4ca1
 # "/usr/sbin/pre-freeze-script"
af4ca1
-- 
af4ca1
2.41.0
af4ca1