From 258db3ad8ea2eb083fe4488d8b0b156094274cc0 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Thu, 1 Apr 2010 10:34:09 +0000 Subject: [PATCH] Change most remaining log_error WARNING messages to log_warn. --- WHATS_NEW | 1 + lib/cache/lvmcache.c | 40 +++++++++++++++++------------------ lib/commands/toolcontext.c | 4 ++-- lib/config/config.c | 6 +++--- lib/device/dev-io.c | 8 +++---- lib/format1/import-export.c | 6 +++--- lib/format_text/import_vsn1.c | 6 +++--- lib/locking/locking.c | 3 +-- lib/metadata/lv_manip.c | 2 +- tools/pvscan.c | 2 +- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 29a6f4a87..4d0de9d1a 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.63 - ================================ + Change most remaining log_error WARNING messages to log_warn. Always use blocking lock for VGs and orphan locks. Allocate all segments memory from vg private mempool. Return newly allocated PV segment after segment split. diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index 9caa216bf..73102ecea 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -903,37 +903,37 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid, */ if (!(primary_vginfo->status & EXPORTED_VG) && (vgstatus & EXPORTED_VG)) - log_error("WARNING: Duplicate VG name %s: " - "Existing %s takes precedence over " - "exported %s", new_vginfo->vgname, - uuid_primary, uuid_new); + log_warn("WARNING: Duplicate VG name %s: " + "Existing %s takes precedence over " + "exported %s", new_vginfo->vgname, + uuid_primary, uuid_new); else if ((primary_vginfo->status & EXPORTED_VG) && !(vgstatus & EXPORTED_VG)) { - log_error("WARNING: Duplicate VG name %s: " - "%s takes precedence over exported %s", - new_vginfo->vgname, uuid_new, - uuid_primary); + log_warn("WARNING: Duplicate VG name %s: " + "%s takes precedence over exported %s", + new_vginfo->vgname, uuid_new, + uuid_primary); use_new = 1; } else if (primary_vginfo->creation_host && !strcmp(primary_vginfo->creation_host, primary_vginfo->fmt->cmd->hostname)) - log_error("WARNING: Duplicate VG name %s: " - "Existing %s (created here) takes precedence " - "over %s", new_vginfo->vgname, uuid_primary, - uuid_new); + log_warn("WARNING: Duplicate VG name %s: " + "Existing %s (created here) takes precedence " + "over %s", new_vginfo->vgname, uuid_primary, + uuid_new); else if (!primary_vginfo->creation_host && creation_host) { - log_error("WARNING: Duplicate VG name %s: " - "%s (with creation_host) takes precedence over %s", - new_vginfo->vgname, uuid_new, - uuid_primary); + log_warn("WARNING: Duplicate VG name %s: " + "%s (with creation_host) takes precedence over %s", + new_vginfo->vgname, uuid_new, + uuid_primary); use_new = 1; } else if (creation_host && !strcmp(creation_host, primary_vginfo->fmt->cmd->hostname)) { - log_error("WARNING: Duplicate VG name %s: " - "%s (created here) takes precedence over %s", - new_vginfo->vgname, uuid_new, - uuid_primary); + log_warn("WARNING: Duplicate VG name %s: " + "%s (created here) takes precedence over %s", + new_vginfo->vgname, uuid_new, + uuid_primary); use_new = 1; } diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 7aac3619f..818e4527f 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -233,8 +233,8 @@ static int _process_config(struct cmd_context *cmd) } if (*cmd->proc_dir && !dir_exists(cmd->proc_dir)) { - log_error("WARNING: proc dir %s not found - some checks will be bypassed", - cmd->proc_dir); + log_warn("WARNING: proc dir %s not found - some checks will be bypassed", + cmd->proc_dir); cmd->proc_dir[0] = '\0'; } diff --git a/lib/config/config.c b/lib/config/config.c index b224f5531..08f0d9c7c 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -911,9 +911,9 @@ static struct config_node *_find_config_node(const struct config_node *cn, if (!cn_found) cn_found = cn; else - log_error("WARNING: Ignoring duplicate" - " config node: %s (" - "seeking %s)", cn->key, path); + log_warn("WARNING: Ignoring duplicate" + " config node: %s (" + "seeking %s)", cn->key, path); } cn = cn->sib; diff --git a/lib/device/dev-io.c b/lib/device/dev-io.c index 06675e22c..886271dd8 100644 --- a/lib/device/dev-io.c +++ b/lib/device/dev-io.c @@ -383,8 +383,8 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet) if (dev->open_count && !need_excl) { /* FIXME Ensure we never get here */ - log_debug("WARNING: %s already opened read-only", - dev_name(dev)); + log_error(INTERNAL_ERROR "%s already opened read-only", + dev_name(dev)); dev->open_count++; } @@ -392,8 +392,8 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet) } if (memlock()) - log_error("WARNING: dev_open(%s) called while suspended", - dev_name(dev)); + log_error(INTERNAL_ERROR "dev_open(%s) called while suspended", + dev_name(dev)); if (dev->flags & DEV_REGULAR) name = dev_name(dev); diff --git a/lib/format1/import-export.c b/lib/format1/import-export.c index b0c0cd47f..cd7cc7f8a 100644 --- a/lib/format1/import-export.c +++ b/lib/format1/import-export.c @@ -110,9 +110,9 @@ int import_pv(const struct format_type *fmt, struct dm_pool *mem, size = pv->pe_count * (uint64_t) vg->extent_size + pv->pe_start; if (size > pv->size) - log_error("WARNING: Physical Volume %s is too " - "large for underlying device", - pv_dev_name(pv)); + log_warn("WARNING: Physical Volume %s is too " + "large for underlying device", + pv_dev_name(pv)); } } diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index 5ddcb03af..ae9742aee 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -264,9 +264,9 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem, size = pv->pe_count * (uint64_t) vg->extent_size + pv->pe_start; if (size > pv->size) - log_error("WARNING: Physical Volume %s is too " - "large for underlying device", - pv_dev_name(pv)); + log_warn("WARNING: Physical Volume %s is too " + "large for underlying device", + pv_dev_name(pv)); } } diff --git a/lib/locking/locking.c b/lib/locking/locking.c index cf0d3ae17..241a8ea9d 100644 --- a/lib/locking/locking.c +++ b/lib/locking/locking.c @@ -293,8 +293,7 @@ int init_locking(int type, struct cmd_context *cmd) find_config_tree_int(cmd, "locking/fallback_to_local_locking", find_config_tree_int(cmd, "global/fallback_to_local_locking", DEFAULT_FALLBACK_TO_LOCAL_LOCKING))) { - log_warn_suppress(suppress_messages, - "WARNING: Falling back to local file-based locking."); + log_warn_suppress(suppress_messages, "WARNING: Falling back to local file-based locking."); log_warn_suppress(suppress_messages, "Volume Groups with the clustered attribute will " "be inaccessible."); diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index bf8b58c77..198c8a210 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -3172,7 +3172,7 @@ int lv_create_single(struct volume_group *vg, } if (!lp->zero && !lp->snapshot) - log_error("WARNING: \"%s\" not zeroed", lv->name); + log_warn("WARNING: \"%s\" not zeroed", lv->name); else if (!set_lv(cmd, lv, UINT64_C(0), 0)) { log_error("Aborting. Failed to wipe %s.", lp->snapshot ? "snapshot exception store" : diff --git a/tools/pvscan.c b/tools/pvscan.c index cbeccb787..ea4a3866d 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -152,7 +152,7 @@ int pvscan(struct cmd_context *cmd, int argc __attribute((unused)), /* Also check for MD use? */ /******* if (MAJOR(pv_create_kdev_t(pv[p]->pv_name)) != MD_MAJOR) { - log_print + log_warn ("WARNING: physical volume \"%s\" belongs to a meta device", pv[p]->pv_name); }