diff --git a/WHATS_NEW b/WHATS_NEW index e70ab27bf..2248c1dd4 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.46 - ================================ + Save and restore the previous logging level when log level is changed. Fix error message when archive initialization fails. Make sure clvmd-corosync releases the lockspace when it exits. Fix segfault for vgcfgrestore on VG with missing PVs. diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c index 521c46717..e221500b1 100644 --- a/lib/format_text/archiver.c +++ b/lib/format_text/archiver.c @@ -397,6 +397,7 @@ void check_current_backup(struct volume_group *vg) { char path[PATH_MAX]; struct volume_group *vg_backup; + int old_suppress; if (vg->status & EXPORTED_VG) return; @@ -407,15 +408,15 @@ void check_current_backup(struct volume_group *vg) return; } - log_suppress(1); + old_suppress = log_suppress(1); /* Up-to-date backup exists? */ if ((vg_backup = backup_read_vg(vg->cmd, vg->name, path)) && (vg->seqno == vg_backup->seqno) && (id_equal(&vg->id, &vg_backup->id))) { - log_suppress(0); + log_suppress(old_suppress); return; } - log_suppress(0); + log_suppress(old_suppress); if (vg_backup) archive(vg_backup); diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index 916d59a06..7703fe2c3 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -816,10 +816,11 @@ static void _read_desc(struct dm_pool *mem, { const char *d; unsigned int u = 0u; + int old_suppress; - log_suppress(1); + old_suppress = log_suppress(1); d = find_config_str(cft->root, "description", ""); - log_suppress(0); + log_suppress(old_suppress); *desc = dm_pool_strdup(mem, d); get_config_uint32(cft->root, "creation_time", &u); diff --git a/lib/snapshot/snapshot.c b/lib/snapshot/snapshot.c index b614e0647..1fdf0ab2e 100644 --- a/lib/snapshot/snapshot.c +++ b/lib/snapshot/snapshot.c @@ -37,6 +37,7 @@ static int _snap_text_import(struct lv_segment *seg, const struct config_node *s uint32_t chunk_size; const char *org_name, *cow_name; struct logical_volume *org, *cow; + int old_suppress; seg->lv->status |= SNAPSHOT; @@ -45,21 +46,21 @@ static int _snap_text_import(struct lv_segment *seg, const struct config_node *s return 0; } - log_suppress(1); + old_suppress = log_suppress(1); if (!(cow_name = find_config_str(sn, "cow_store", NULL))) { - log_suppress(0); + log_suppress(old_suppress); log_error("Snapshot cow storage not specified."); return 0; } if (!(org_name = find_config_str(sn, "origin", NULL))) { - log_suppress(0); + log_suppress(old_suppress); log_error("Snapshot origin not specified."); return 0; } - log_suppress(0); + log_suppress(old_suppress); if (!(cow = find_lv(seg->lv->vg, cow_name))) { log_error("Unknown logical volume specified for "