mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
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).
This commit is contained in:
parent
bdf0594aa8
commit
b31725d0ae
@ -113,10 +113,13 @@ int archive(struct volume_group *vg)
|
|||||||
if (vg_is_archived(vg))
|
if (vg_is_archived(vg))
|
||||||
return 1; /* VG has been already archived */
|
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;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (test_mode()) {
|
if (test_mode()) {
|
||||||
|
vg->status |= ARCHIVED_VG;
|
||||||
log_verbose("Test mode: Skipping archiving of volume group.");
|
log_verbose("Test mode: Skipping archiving of volume group.");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user