mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-02 04:22:02 +03:00
backup: automatically store data on vg_unlock
Previously there have been necessary explicit call of backup (often either forgotten or over-used). With this patch the necessity to store backup is remember at vg_commit and once the VG is unlocked, the committed metadata are automatically store in backup file. This may possibly alter some printed messages from command when the backup is now taken later.
This commit is contained in:
@ -56,8 +56,11 @@ int lock_vol(struct cmd_context *cmd, const char *vol, uint32_t flags, const str
|
||||
|
||||
#define unlock_vg(cmd, vg, vol) \
|
||||
do { \
|
||||
if (is_real_vg(vol) && !sync_local_dev_names(cmd)) \
|
||||
stack; \
|
||||
if (is_real_vg(vol)) { \
|
||||
if (!sync_local_dev_names(cmd)) \
|
||||
stack; \
|
||||
vg_backup_if_needed(vg); \
|
||||
} \
|
||||
if (!lock_vol(cmd, vol, LCK_VG_UNLOCK, NULL)) \
|
||||
stack; \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user