]> sourceware.org Git - lvm2.git/commitdiff
backup: set in vg_commit
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 9 Mar 2021 10:30:28 +0000 (11:30 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 10 Mar 2021 00:09:46 +0000 (01:09 +0100)
Another step towards better automatic handling of backup,
and automatically setup needs_backup after commit.

In some next step we should reduce number of backups and takem
then only at the command finish with  vg_committed content.

lib/metadata/lv_manip.c
lib/metadata/metadata.c

index f580e5835340a990539229d75e51e2d0285b9507..2ecd45eb1513bde976eae2ccc2432db1b86973ba 100644 (file)
@@ -6791,8 +6791,6 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
                                        display_lvname(pool_lv));
        }
 
-       vg->needs_backup = 1;
-
        lockd_lv(cmd, lock_lv, "un", LDLV_PERSISTENT);
        lockd_free_lv(cmd, vg, lv->name, &lv->lvid.id[1], lv->lock_args);
 
index 5de144616fa799b4abf6025bb994f84ecda85f65..22cb783375445b26b2bf20295792ca516332af3c 100644 (file)
@@ -3173,7 +3173,8 @@ int vg_commit(struct volume_group *vg)
                        dm_list_init(&vg->msg_list);
                        vg->needs_write_and_commit = 0;
                }
-       }
+               vg->needs_backup = 0;
+        }
 
        /* If at least one mda commit succeeded, it was committed */
        return ret;
This page took 0.052377 seconds and 5 git commands to generate.