Skip to contentSkip to conversation

master - archive: add missing bit set

PATCH Zdenek Kabelac 1 participant 1 message Jul 2, 2013

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b31725d0ae0539f2d13a2454849de557fe91c4fb
Commit:        b31725d0ae0539f2d13a2454849de557fe91c4fb
Parent:        bdf0594aa8064bc08623bc56f934aa0dd44d9220
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Jul 2 11:07:15 2013 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Jul 2 11:07:15 2013 +0200

archive: add missing bit set

In the last update not all code paths have set the archived flag. If we run in test mode or without archiving enabled - set the bit as well - so test whether archiving has been called succesfully will be ok. (in relase fix).

---
 lib/format_text/archiver.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
lib/format_text/archiver.c +4 -1
index c012c8f..1e6dbac 100644
@@ -113,10 +113,13 @@ int archive(struct volume_group *vg)
 	if (vg_is_archived(vg))
 		return 1; /* VG has been already archived */
 
-	if (!vg->cmd->archive_params->enabled || !vg->cmd->archive_params->dir)
+	if (!vg->cmd->archive_params->enabled || !vg->cmd->archive_params->dir) {
+		vg->status |= ARCHIVED_VG;
 		return 1;
+	}
 
 	if (test_mode()) {
+		vg->status |= ARCHIVED_VG;
 		log_verbose("Test mode: Skipping archiving of volume group.");
 		return 1;
 	}