From 9edcd30ddea9cef06a4239bcdd15be5563444ddf Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Sat, 1 Jun 2024 04:37:13 +0000 Subject: [PATCH] LU-17844 debug: purge the final LCONSOLE_ERROR_MSG() Replace the remaining LCONSOLE_ERROR_MSG() with LCONSOLE_ERROR(). Remove the LCONSOLE_ERROR_MSG() macro. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: I289ced87e5f77dd3eebcf94ee978e23b79e55698 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55282 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Arshad Hussain Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/libcfs_debug.h | 8 ++------ lustre/ldlm/ldlm_lib.c | 7 +++---- lustre/ldlm/ldlm_lockd.c | 7 +++---- lustre/lod/lod_qos.c | 5 ++--- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/libcfs/include/libcfs/libcfs_debug.h b/libcfs/include/libcfs/libcfs_debug.h index 4995273..8e4157a 100644 --- a/libcfs/include/libcfs/libcfs_debug.h +++ b/libcfs/include/libcfs/libcfs_debug.h @@ -184,12 +184,8 @@ static inline int cfs_cdebug_show(unsigned int mask, unsigned int subsystem) #define LCONSOLE(mask, format, ...) CDEBUG(D_CONSOLE | (mask), format, ## __VA_ARGS__) #define LCONSOLE_INFO(format, ...) CDEBUG_LIMIT(D_CONSOLE, format, ## __VA_ARGS__) #define LCONSOLE_WARN(format, ...) CDEBUG_LIMIT(D_CONSOLE | D_WARNING, format, ## __VA_ARGS__) -#define LCONSOLE_ERROR_MSG(errnum, format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, \ - "%x-%x: " format, errnum, LERRCHKSUM(errnum), ## __VA_ARGS__) -#define LCONSOLE_ERROR(format, ...) LCONSOLE_ERROR_MSG(0x00, format, ## __VA_ARGS__) - -#define LCONSOLE_EMERG(format, ...) \ - CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__) +#define LCONSOLE_ERROR(format, ...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, format, ## __VA_ARGS__) +#define LCONSOLE_EMERG(format, ...) CDEBUG(D_CONSOLE | D_EMERG, format, ## __VA_ARGS__) void libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata, const char *format1, ...) diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 8ef97ed..9a2391b 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1106,10 +1106,9 @@ int target_handle_connect(struct ptlrpc_request *req) target = class_str2obd(str); if (!target) { deuuidify(str, NULL, &target_start, &target_len); - LCONSOLE_ERROR_MSG(0x137, - "%.*s: not available for connect from %s (no target). If you are running an HA pair check that the target is mounted on the other server.\n", - target_len, target_start, - libcfs_nidstr(&req->rq_peer.nid)); + LCONSOLE_ERROR("%.*s: not available for connect from %s (no target). If you are running an HA pair check that the target is mounted on the other server.\n", + target_len, target_start, + libcfs_nidstr(&req->rq_peer.nid)); GOTO(out, rc = -ENODEV); } diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index 95d2a35..231da36 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -712,10 +712,9 @@ EXPORT_SYMBOL(ldlm_bl_timeout_by_rpc); static void ldlm_failed_ast(struct ldlm_lock *lock, int rc, const char *ast_type) { - LCONSOLE_ERROR_MSG(0x138, - "%s: A client on nid %s was evicted due to a lock %s callback time out: rc %d\n", - lock->l_export->exp_obd->obd_name, - obd_export_nid2str(lock->l_export), ast_type, rc); + LCONSOLE_ERROR("%s: A client on nid %s was evicted due to a lock %s callback time out: rc %d\n", + lock->l_export->exp_obd->obd_name, + obd_export_nid2str(lock->l_export), ast_type, rc); if (obd_dump_on_timeout) libcfs_debug_dumplog(); diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index c46c54e..e8cd761 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -302,9 +302,8 @@ static int lod_qos_calc_rr(struct lod_device *lod, struct lu_tgt_descs *ltd, if (placed != real_count) { /* This should never happen */ - LCONSOLE_ERROR_MSG(0x14e, "Failed to place all tgts in the " - "round-robin list (%d of %d).\n", - placed, real_count); + LCONSOLE_ERROR("Failed to place all tgts in the round-robin list (%d of %d).\n", + placed, real_count); for (i = 0; i < lqr->lqr_pool.op_count; i++) { LCONSOLE(D_WARNING, "rr #%d tgt idx=%d\n", i, lqr->lqr_pool.op_array[i]); -- 1.8.3.1