1
0
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:
Zdenek Kabelac 2016-12-18 16:36:33 +01:00
parent 5bb6266046
commit 75f2388093
2 changed files with 4 additions and 1 deletions

View File

@ -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.

View File

@ -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;
}