1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

archive: avoid abuse of internal flag

Since archive is now postponned we use internal variable 'changed'
to mark we need to commit new metadata.
This commit is contained in:
Zdenek Kabelac 2021-06-09 16:16:26 +02:00
parent bb45e33518
commit 17b2746486
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.03.13 -
===============================
Simplified handling of archive() and backup() internal calls.
Fix load of kvdo target when it is not present in memory (2.03.12).
Version 2.03.12 - 07th May 2021

View File

@ -640,6 +640,7 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
int ret = ECMD_PROCESSED;
unsigned i;
activation_change_t activate;
int changed = 0;
static const struct {
int arg;
@ -677,10 +678,11 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
if (arg_is_set(cmd, _vgchange_args[i].arg)) {
if (!_vgchange_args[i].fn(cmd, vg))
return_ECMD_FAILED;
changed = 1;
}
}
if (vg_is_archived(vg)) {
if (changed) {
if (!vg_write(vg) || !vg_commit(vg))
return_ECMD_FAILED;