mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
backup: show warning once per command
When command calls backup() more then once (which is actually not wanted) this warning message is shown repeatedly: "WARNING: This metadata update is NOT backed up." Instead now print message just once and less confuse user.
This commit is contained in:
parent
5bb6266046
commit
75f2388093
@ -1,5 +1,6 @@
|
||||
Version 2.02.169 -
|
||||
=====================================
|
||||
Warn about command not making metadata backup just once per command.
|
||||
Enable usage of cached volume as thin volume's external origin.
|
||||
Support cache volume activation with -real layer.
|
||||
Improve search of lock-holder for external origin and thin-pool.
|
||||
|
@ -35,6 +35,7 @@ struct archive_params {
|
||||
struct backup_params {
|
||||
int enabled;
|
||||
char *dir;
|
||||
int suppress;
|
||||
};
|
||||
|
||||
int archive_init(struct cmd_context *cmd, const char *dir,
|
||||
@ -235,7 +236,8 @@ static int _backup(struct volume_group *vg)
|
||||
int backup_locally(struct volume_group *vg)
|
||||
{
|
||||
if (!vg->cmd->backup_params->enabled || !vg->cmd->backup_params->dir) {
|
||||
log_warn("WARNING: This metadata update is NOT backed up");
|
||||
log_warn_suppress(vg->cmd->backup_params->suppress++,
|
||||
"WARNING: This metadata update is NOT backed up.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user