From: Timothy Day Date: Fri, 17 May 2024 00:30:57 +0000 (+0000) Subject: LU-17844 ptlrpc: remove all LCONSOLE_ERROR_MSG() X-Git-Tag: 2.15.64~61 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F55136%2F3;p=fs%2Flustre-release.git LU-17844 ptlrpc: 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: Ica8ebd06b7e8ea8c7eb00181ab3c0b06de2481ca Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55136 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/ptlrpc/client.c b/lustre/ptlrpc/client.c index 5815063..c1e7330 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1380,11 +1380,10 @@ static int ptlrpc_check_status(struct ptlrpc_request *req) __u32 opc = lustre_msg_get_opc(req->rq_reqmsg); if (ptlrpc_console_allow(req, opc, rc)) - LCONSOLE_ERROR_MSG(0x11, - "%s: operation %s to node %s failed: rc = %d\n", - imp->imp_obd->obd_name, - ll_opcode2str(opc), - libcfs_nidstr(nid), rc); + LCONSOLE_ERROR("%s: operation %s to node %s failed: rc = %d\n", + imp->imp_obd->obd_name, + ll_opcode2str(opc), + libcfs_nidstr(nid), rc); RETURN(rc < 0 ? rc : -EINVAL); } diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 1526c81..f8146d8 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -199,7 +199,7 @@ int ptlrpc_set_import_discon(struct obd_import *imp, imp->imp_obd->obd_name, target_len, target_start, obd_import_nid2str(imp)); } else { - LCONSOLE_ERROR_MSG(0x166, "%s: Connection to %.*s (at %s) was lost; in progress operations using this service will fail\n", + LCONSOLE_ERROR("%s: Connection to %.*s (at %s) was lost; in progress operations using this service will fail\n", imp->imp_obd->obd_name, target_len, target_start, obd_import_nid2str(imp)); if (invalid) { @@ -1392,13 +1392,13 @@ out: if (ocd && (ocd->ocd_connect_flags & OBD_CONNECT_VERSION) && (ocd->ocd_version != LUSTRE_VERSION_CODE)) { - LCONSOLE_ERROR_MSG(0x16a, "Server %s version (%d.%d.%d.%d) refused connection from this client with an incompatible version (%s). Client must be recompiled\n", - obd2cli_tgt(imp->imp_obd), - OBD_OCD_VERSION_MAJOR(ocd->ocd_version), - OBD_OCD_VERSION_MINOR(ocd->ocd_version), - OBD_OCD_VERSION_PATCH(ocd->ocd_version), - OBD_OCD_VERSION_FIX(ocd->ocd_version), - LUSTRE_VERSION_STRING); + LCONSOLE_ERROR("Server %s version (%d.%d.%d.%d) refused connection from this client with an incompatible version (%s). Client must be recompiled\n", + obd2cli_tgt(imp->imp_obd), + OBD_OCD_VERSION_MAJOR(ocd->ocd_version), + OBD_OCD_VERSION_MINOR(ocd->ocd_version), + OBD_OCD_VERSION_PATCH(ocd->ocd_version), + OBD_OCD_VERSION_FIX(ocd->ocd_version), + LUSTRE_VERSION_STRING); imp->imp_deactive = 1; ptlrpc_deactivate_import_nolock(imp); import_set_state_nolock(imp, LUSTRE_IMP_CLOSED); @@ -1599,9 +1599,9 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp) if (strcmp(imp->imp_obd->obd_type->typ_name, LUSTRE_MGC_NAME) != 0 && (connect_flags & OBD_CONNECT_LIGHTWEIGHT) == 0) { - LCONSOLE_ERROR_MSG(0x167, "%s: This client was evicted by %.*s; in progress operations using this service will fail.\n", - imp->imp_obd->obd_name, target_len, - target_start); + LCONSOLE_ERROR("%s: This client was evicted by %.*s; in progress operations using this service will fail.\n", + imp->imp_obd->obd_name, target_len, + target_start); LASSERTF(!obd_lbug_on_eviction, "LBUG upon eviction\n"); } CDEBUG(D_HA, "evicted from %s@%s; invalidating\n",