From: Timothy Day Date: Fri, 17 May 2024 00:15:25 +0000 (+0000) Subject: LU-17844 obdclass: remove all LCONSOLE_ERROR_MSG() X-Git-Tag: 2.15.64~62 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F34%2F55134%2F3;p=fs%2Flustre-release.git LU-17844 obdclass: remove all LCONSOLE_ERROR_MSG() These magic numbers aren't so magical anymore. Just use LCONSOLE_ERROR(). Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: Ib5310f65cda7a3537837e8a38801e6d1771d4759 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55134 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Arshad Hussain Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 413d134..e64ad42 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -125,8 +125,7 @@ SERVER_ONLY struct obd_type *class_get_type(const char *name) if (!request_module("%s", modname)) { CDEBUG(D_INFO, "Loaded module '%s'\n", modname); } else { - LCONSOLE_ERROR_MSG(0x158, "Can't load module '%s'\n", - modname); + LCONSOLE_ERROR("Can't load module '%s'\n", modname); } rcu_read_lock(); type = class_search_type(name); diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c index ed6fa85..2cbc6e7 100644 --- a/lustre/obdclass/obd_config.c +++ b/lustre/obdclass/obd_config.c @@ -415,7 +415,7 @@ static int parse_nid(char *buf, void *value, int quiet) return 0; if (!quiet) - LCONSOLE_ERROR_MSG(0x159, "Can't parse NID '%s'\n", buf); + LCONSOLE_ERROR("Can't parse NID '%s'\n", buf); return -EINVAL; } @@ -1484,7 +1484,7 @@ int class_process_config(struct lustre_cfg *lcfg) GOTO(out, err = 0); } case LCFG_SET_UPCALL: { - LCONSOLE_ERROR_MSG(0x15a, "recovery upcall is deprecated\n"); + LCONSOLE_ERROR("recovery upcall is deprecated\n"); /* COMPAT_146 Don't fail on old configs */ GOTO(out, err = 0); } diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 00c545f..a6dbb44 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -103,13 +103,11 @@ out: OBD_FREE_PTR(bufs); if (rc == -EINVAL) - LCONSOLE_ERROR_MSG(0x15b, - "%s: Configuration from log %s failed from MGS %d. Check client and MGS are on compatible version.\n", - mgc->obd_name, logname, rc); + LCONSOLE_ERROR("%s: Configuration from log %s failed from MGS %d. Check client and MGS are on compatible version.\n", + mgc->obd_name, logname, rc); else if (rc != 0) - LCONSOLE_ERROR_MSG(0x15c, - "%s: Confguration from log %s failed from MGS %d. Communication error between node & MGS, a bad configuration, or other errors. See syslog for more info\n", - mgc->obd_name, logname, rc); + LCONSOLE_ERROR("%s: Confguration from log %s failed from MGS %d. Communication error between node & MGS, a bad configuration, or other errors. See syslog for more info\n", + mgc->obd_name, logname, rc); RETURN(rc); } @@ -1180,7 +1178,7 @@ static int lmd_parse_mgs(struct lustre_mount_data *lmd, char *ptr, char **tail) if (next && next != *tail) length += *tail - next + 1; if (length == 0) { - LCONSOLE_ERROR_MSG(0x159, "Can't parse NID '%s'\n", ptr); + LCONSOLE_ERROR("Can't parse NID '%s'\n", ptr); return -EINVAL; } @@ -1429,16 +1427,14 @@ int lmd_parse(char *options, struct lustre_mount_data *lmd) ENTRY; LASSERT(lmd); if (!options) { - LCONSOLE_ERROR_MSG(0x162, - "Missing mount data: check /sbin/mount.lustre_tgt is installed.\n"); + LCONSOLE_ERROR("Missing mount data: check /sbin/mount.lustre_tgt is installed.\n"); RETURN(-EINVAL); } /* Options should be a string - try to detect old lmd data */ if ((raw->lmd_magic & 0xffffff00) == (LMD_MAGIC & 0xffffff00)) { - LCONSOLE_ERROR_MSG(0x163, - "Using an old version of /sbin/mount.lustre. Please install version %s\n", - LUSTRE_VERSION_STRING); + LCONSOLE_ERROR("Using an old version of /sbin/mount.lustre. Please install version %s\n", + LUSTRE_VERSION_STRING); RETURN(-EINVAL); } lmd->lmd_magic = LMD_MAGIC; @@ -1688,8 +1684,7 @@ bad_string: GOTO(invalid, rc); if (!devname) { - LCONSOLE_ERROR_MSG(0x164, - "Can't find device name (need mount option 'device=...')\n"); + LCONSOLE_ERROR("Can't find device name (need mount option 'device=...')\n"); GOTO(invalid, rc = -ENODEV); }