1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Change most remaining log_error WARNING messages to log_warn.

This commit is contained in:
Alasdair Kergon 2010-04-01 10:34:09 +00:00
parent a39d299df4
commit 258db3ad8e
10 changed files with 39 additions and 39 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.63 - Version 2.02.63 -
================================ ================================
Change most remaining log_error WARNING messages to log_warn.
Always use blocking lock for VGs and orphan locks. Always use blocking lock for VGs and orphan locks.
Allocate all segments memory from vg private mempool. Allocate all segments memory from vg private mempool.
Return newly allocated PV segment after segment split. Return newly allocated PV segment after segment split.

10
lib/cache/lvmcache.c vendored
View File

@ -903,13 +903,13 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid,
*/ */
if (!(primary_vginfo->status & EXPORTED_VG) && if (!(primary_vginfo->status & EXPORTED_VG) &&
(vgstatus & EXPORTED_VG)) (vgstatus & EXPORTED_VG))
log_error("WARNING: Duplicate VG name %s: " log_warn("WARNING: Duplicate VG name %s: "
"Existing %s takes precedence over " "Existing %s takes precedence over "
"exported %s", new_vginfo->vgname, "exported %s", new_vginfo->vgname,
uuid_primary, uuid_new); uuid_primary, uuid_new);
else if ((primary_vginfo->status & EXPORTED_VG) && else if ((primary_vginfo->status & EXPORTED_VG) &&
!(vgstatus & EXPORTED_VG)) { !(vgstatus & EXPORTED_VG)) {
log_error("WARNING: Duplicate VG name %s: " log_warn("WARNING: Duplicate VG name %s: "
"%s takes precedence over exported %s", "%s takes precedence over exported %s",
new_vginfo->vgname, uuid_new, new_vginfo->vgname, uuid_new,
uuid_primary); uuid_primary);
@ -917,12 +917,12 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid,
} else if (primary_vginfo->creation_host && } else if (primary_vginfo->creation_host &&
!strcmp(primary_vginfo->creation_host, !strcmp(primary_vginfo->creation_host,
primary_vginfo->fmt->cmd->hostname)) primary_vginfo->fmt->cmd->hostname))
log_error("WARNING: Duplicate VG name %s: " log_warn("WARNING: Duplicate VG name %s: "
"Existing %s (created here) takes precedence " "Existing %s (created here) takes precedence "
"over %s", new_vginfo->vgname, uuid_primary, "over %s", new_vginfo->vgname, uuid_primary,
uuid_new); uuid_new);
else if (!primary_vginfo->creation_host && creation_host) { else if (!primary_vginfo->creation_host && creation_host) {
log_error("WARNING: Duplicate VG name %s: " log_warn("WARNING: Duplicate VG name %s: "
"%s (with creation_host) takes precedence over %s", "%s (with creation_host) takes precedence over %s",
new_vginfo->vgname, uuid_new, new_vginfo->vgname, uuid_new,
uuid_primary); uuid_primary);
@ -930,7 +930,7 @@ static int _insert_vginfo(struct lvmcache_vginfo *new_vginfo, const char *vgid,
} else if (creation_host && } else if (creation_host &&
!strcmp(creation_host, !strcmp(creation_host,
primary_vginfo->fmt->cmd->hostname)) { primary_vginfo->fmt->cmd->hostname)) {
log_error("WARNING: Duplicate VG name %s: " log_warn("WARNING: Duplicate VG name %s: "
"%s (created here) takes precedence over %s", "%s (created here) takes precedence over %s",
new_vginfo->vgname, uuid_new, new_vginfo->vgname, uuid_new,
uuid_primary); uuid_primary);

View File

@ -233,7 +233,7 @@ static int _process_config(struct cmd_context *cmd)
} }
if (*cmd->proc_dir && !dir_exists(cmd->proc_dir)) { if (*cmd->proc_dir && !dir_exists(cmd->proc_dir)) {
log_error("WARNING: proc dir %s not found - some checks will be bypassed", log_warn("WARNING: proc dir %s not found - some checks will be bypassed",
cmd->proc_dir); cmd->proc_dir);
cmd->proc_dir[0] = '\0'; cmd->proc_dir[0] = '\0';
} }

View File

@ -911,7 +911,7 @@ static struct config_node *_find_config_node(const struct config_node *cn,
if (!cn_found) if (!cn_found)
cn_found = cn; cn_found = cn;
else else
log_error("WARNING: Ignoring duplicate" log_warn("WARNING: Ignoring duplicate"
" config node: %s (" " config node: %s ("
"seeking %s)", cn->key, path); "seeking %s)", cn->key, path);
} }

View File

@ -383,7 +383,7 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
if (dev->open_count && !need_excl) { if (dev->open_count && !need_excl) {
/* FIXME Ensure we never get here */ /* FIXME Ensure we never get here */
log_debug("WARNING: %s already opened read-only", log_error(INTERNAL_ERROR "%s already opened read-only",
dev_name(dev)); dev_name(dev));
dev->open_count++; dev->open_count++;
} }
@ -392,7 +392,7 @@ int dev_open_flags(struct device *dev, int flags, int direct, int quiet)
} }
if (memlock()) if (memlock())
log_error("WARNING: dev_open(%s) called while suspended", log_error(INTERNAL_ERROR "dev_open(%s) called while suspended",
dev_name(dev)); dev_name(dev));
if (dev->flags & DEV_REGULAR) if (dev->flags & DEV_REGULAR)

View File

@ -110,7 +110,7 @@ int import_pv(const struct format_type *fmt, struct dm_pool *mem,
size = pv->pe_count * (uint64_t) vg->extent_size + size = pv->pe_count * (uint64_t) vg->extent_size +
pv->pe_start; pv->pe_start;
if (size > pv->size) if (size > pv->size)
log_error("WARNING: Physical Volume %s is too " log_warn("WARNING: Physical Volume %s is too "
"large for underlying device", "large for underlying device",
pv_dev_name(pv)); pv_dev_name(pv));
} }

View File

@ -264,7 +264,7 @@ static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
size = pv->pe_count * (uint64_t) vg->extent_size + size = pv->pe_count * (uint64_t) vg->extent_size +
pv->pe_start; pv->pe_start;
if (size > pv->size) if (size > pv->size)
log_error("WARNING: Physical Volume %s is too " log_warn("WARNING: Physical Volume %s is too "
"large for underlying device", "large for underlying device",
pv_dev_name(pv)); pv_dev_name(pv));
} }

View File

@ -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, "locking/fallback_to_local_locking",
find_config_tree_int(cmd, "global/fallback_to_local_locking", find_config_tree_int(cmd, "global/fallback_to_local_locking",
DEFAULT_FALLBACK_TO_LOCAL_LOCKING))) { DEFAULT_FALLBACK_TO_LOCAL_LOCKING))) {
log_warn_suppress(suppress_messages, log_warn_suppress(suppress_messages, "WARNING: Falling back to local file-based locking.");
"WARNING: Falling back to local file-based locking.");
log_warn_suppress(suppress_messages, log_warn_suppress(suppress_messages,
"Volume Groups with the clustered attribute will " "Volume Groups with the clustered attribute will "
"be inaccessible."); "be inaccessible.");

View File

@ -3172,7 +3172,7 @@ int lv_create_single(struct volume_group *vg,
} }
if (!lp->zero && !lp->snapshot) 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)) { else if (!set_lv(cmd, lv, UINT64_C(0), 0)) {
log_error("Aborting. Failed to wipe %s.", log_error("Aborting. Failed to wipe %s.",
lp->snapshot ? "snapshot exception store" : lp->snapshot ? "snapshot exception store" :

View File

@ -152,7 +152,7 @@ int pvscan(struct cmd_context *cmd, int argc __attribute((unused)),
/* Also check for MD use? */ /* Also check for MD use? */
/******* /*******
if (MAJOR(pv_create_kdev_t(pv[p]->pv_name)) != MD_MAJOR) { 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", ("WARNING: physical volume \"%s\" belongs to a meta device",
pv[p]->pv_name); pv[p]->pv_name);
} }