Whamcloud - gitweb
LU-17844 ptlrpc: remove all LCONSOLE_ERROR_MSG() 36/55136/3
authorTimothy Day <timday@amazon.com>
Fri, 17 May 2024 00:30:57 +0000 (00:30 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 19 Jun 2024 01:12:09 +0000 (01:12 +0000)
These magic numbers aren't so magical anymore. Just
use LCONSOLE_ERROR().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Ica8ebd06b7e8ea8c7eb00181ab3c0b06de2481ca
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55136
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/client.c
lustre/ptlrpc/import.c

index 5815063..c1e7330 100644 (file)
@@ -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);
        }
 
index 1526c81..f8146d8 100644 (file)
@@ -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",