From 08018a5345c98b91ce43eb55f4110485df9eb3aa Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 19 Mar 2014 00:20:39 +0100 Subject: [PATCH] archiver: drop unneeded backup check When the backup is disabled, avoid testing backup presence. This only leads to errors being logged in debug trace and the missing backup can't be fixed, since it's disabled. --- WHATS_NEW | 1 + lib/format_text/archiver.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index de96f8a76..e2c196a90 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.106 - ==================================== + Do not check for backups when when its creation is disabled. Don't allow --mergedconfig without --type current in dumpconfig. Fix memleak. Make global/lvdisplay_shows_full_device_path lvm.conf setting profilable. Make global/{units|si_unit_consistency|suffix} lvm.conf setting profilable. diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c index 31d17efce..2667bdbe8 100644 --- a/lib/format_text/archiver.c +++ b/lib/format_text/archiver.c @@ -487,6 +487,11 @@ void check_current_backup(struct volume_group *vg) struct volume_group *vg_backup; int old_suppress; + if (!vg->cmd->backup_params->enabled || !vg->cmd->backup_params->dir) { + log_debug("Skipping check for current backup, since backup is disabled."); + return; + } + if (vg_is_exported(vg)) return;