mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
Reinitialize archive and backup handling on toolcontext refresh.
For example, when using '--config "backup { ... }"' line, the values from lvm.conf (or default values) should be overridden. This patch adds reinitialisation of archive and backup handling on toolcontext refresh which makes these settings to be applied.
This commit is contained in:
parent
34cbedceaf
commit
dc8478458e
@ -1,5 +1,6 @@
|
||||
Version 2.02.74 -
|
||||
==================================
|
||||
Reinitialize archive and backup handling on toolcontext refresh.
|
||||
Fix opprobriously slow I/O to cluster mirrors created with --nosync.
|
||||
Make poll_mirror_progress report PROGRESS_CHECK_FAILED if LV is not a mirror.
|
||||
Like mirrors, don't scan origins if ignore_suspended_devices() is set.
|
||||
|
@ -1343,6 +1343,9 @@ int refresh_toolcontext(struct cmd_context *cmd)
|
||||
if (!_init_segtypes(cmd))
|
||||
return 0;
|
||||
|
||||
if (!_init_backup(cmd))
|
||||
return 0;
|
||||
|
||||
cmd->config_valid = 1;
|
||||
|
||||
reset_lvm_errno(1);
|
||||
|
@ -40,6 +40,8 @@ int archive_init(struct cmd_context *cmd, const char *dir,
|
||||
unsigned int keep_days, unsigned int keep_min,
|
||||
int enabled)
|
||||
{
|
||||
archive_exit(cmd);
|
||||
|
||||
if (!(cmd->archive_params = dm_pool_zalloc(cmd->libmem,
|
||||
sizeof(*cmd->archive_params)))) {
|
||||
log_error("archive_params alloc failed");
|
||||
@ -156,6 +158,8 @@ int archive_display_file(struct cmd_context *cmd, const char *file)
|
||||
int backup_init(struct cmd_context *cmd, const char *dir,
|
||||
int enabled)
|
||||
{
|
||||
backup_exit(cmd);
|
||||
|
||||
if (!(cmd->backup_params = dm_pool_zalloc(cmd->libmem,
|
||||
sizeof(*cmd->backup_params)))) {
|
||||
log_error("backup_params alloc failed");
|
||||
|
Loading…
Reference in New Issue
Block a user