From: John Wolfe Date: Fri, 26 Mar 2021 03:21:18 +0000 (-0700) Subject: Disable NVMe quiesced snapshot by default. X-Git-Tag: stable-11.3.0~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5a922bfd6268ee0690f0aabc03d88bdb781b867;p=thirdparty%2Fopen-vm-tools.git Disable NVMe quiesced snapshot by default. Open-vm-tools has no FSS. Enable the feature only when it has been completely verified and FSS is enabled on the host side. --- diff --git a/open-vm-tools/services/plugins/vmbackup/stateMachine.c b/open-vm-tools/services/plugins/vmbackup/stateMachine.c index e426dcf5b..03331e4b1 100644 --- a/open-vm-tools/services/plugins/vmbackup/stateMachine.c +++ b/open-vm-tools/services/plugins/vmbackup/stateMachine.c @@ -91,6 +91,16 @@ VM_EMBED_VERSION(VMTOOLSD_VERSION_STRING); VMTools_ConfigGetInteger(config, "vmbackup", key, defVal) #define VMBACKUP_CFG_ENABLEVSS "enableVSS" +#define VMBACKUP_CFG_ENABLENVME "enableNVMe" + +/** + * Default value for VMBACKUP_CFG_ENABLENVME setting in + * tools configuration file. + * + * TRUE will allow the host to use NVMe feature in snapshot, + * FALSE otherwise. + */ +#define VMBACKUP_CFG_ENABLENVME_DEFAULT FALSE static VmBackupState *gBackupState = NULL; @@ -1465,8 +1475,14 @@ VmBackupCapabilities(gpointer src, ToolsAppCapability caps[] = { { TOOLS_CAP_NEW, NULL, CAP_VMBACKUP_NVME, }, }; + Bool enableNVMe = VMBACKUP_CONFIG_GET_BOOL(ctx->config, + VMBACKUP_CFG_ENABLENVME, + VMBACKUP_CFG_ENABLENVME_DEFAULT); + + g_debug("%s - vmbackup NVMe feature is %s\n", __FUNCTION__, + enableNVMe ? "enabled" : "disabled"); - caps[0].value = set ? 1 : 0; + caps[0].value = enableNVMe && set ? 1 : 0; return VMTools_WrapArray(caps, sizeof *caps, ARRAYSIZE(caps)); }