From 503bf7f29a49914082480a7cdceb914e42a95dd8 Mon Sep 17 00:00:00 2001 From: Lei Feng Date: Tue, 23 Feb 2021 11:35:18 +0800 Subject: [PATCH] LU-14431 log: Add ending newline for some messages. Some log messages don't have ending newline. So two log messages will be merged into one line and cause error for parsing program. Add ending newline for these messages. Signed-off-by: Lei Feng Change-Id: I79acba9fc494c148dfe2c56cdbe7694b4bbc5cf4 Test-Parameters: trivial Reviewed-on: https://review.whamcloud.com/41723 Tested-by: jenkins Reviewed-by: Li Xi Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Anjus George --- lnet/klnds/gnilnd/gnilnd_cb.c | 8 ++++---- lnet/klnds/gnilnd/gnilnd_conn.c | 2 +- lustre/include/lustre_dlm.h | 2 +- lustre/ldlm/ldlm_lib.c | 2 +- lustre/osd-ldiskfs/osd_handler.c | 7 +++---- lustre/osp/osp_object.c | 2 +- lustre/ptlrpc/llog_client.c | 2 +- lustre/ptlrpc/service.c | 2 +- lustre/quota/qmt_lock.c | 2 +- lustre/target/tgt_handler.c | 2 +- 10 files changed, 15 insertions(+), 16 deletions(-) diff --git a/lnet/klnds/gnilnd/gnilnd_cb.c b/lnet/klnds/gnilnd/gnilnd_cb.c index edd60ce..5ebf765 100644 --- a/lnet/klnds/gnilnd/gnilnd_cb.c +++ b/lnet/klnds/gnilnd/gnilnd_cb.c @@ -1290,7 +1290,7 @@ kgnilnd_tx_log_retrans(kgn_conn_t *conn, kgn_tx_t *tx) * that we fill up our mailbox, we'll keep trying to resend that msg * until we exceed the max_retrans _or_ gnc_last_rx expires, indicating * that he hasn't send us any traffic in return */ - + /* some reasonable throttling of the debug message */ if (log_retrans) { unsigned long now = jiffies; @@ -2274,8 +2274,8 @@ kgnilnd_eager_recv(struct lnet_ni *ni, void *private, struct lnet_msg *lntmsg, CERROR("Couldnt find matching peer %p or conn %p / %p\n", peer, conn, found_conn); if (found_conn) { - CERROR("Unexpected connstamp %#llx(%#llx expected)" - " from %s", rxmsg->gnm_connstamp, + CERROR("Unexpected connstamp %#llx(%#llx expected) from %s\n", + rxmsg->gnm_connstamp, found_conn->gnc_peer_connstamp, libcfs_nid2str(peer->gnp_nid)); } @@ -4786,7 +4786,7 @@ kgnilnd_process_conns(kgn_device_t *dev, unsigned long deadline) conn = list_first_entry(&dev->gnd_ready_conns, kgn_conn_t, gnc_schedlist); list_del_init(&conn->gnc_schedlist); - /* + /* * Since we are processing conn now, we don't need to be on the delaylist any longer. */ diff --git a/lnet/klnds/gnilnd/gnilnd_conn.c b/lnet/klnds/gnilnd/gnilnd_conn.c index dab5633..a4d1a5e 100644 --- a/lnet/klnds/gnilnd/gnilnd_conn.c +++ b/lnet/klnds/gnilnd/gnilnd_conn.c @@ -868,7 +868,7 @@ kgnilnd_unpack_connreq(kgn_dgram_t *dgram) rc = kgnilnd_find_net(connreq->gncr_dstnid, &net); if (rc == -ESHUTDOWN) { - CERROR("Looking up network: device is in shutdown"); + CERROR("Looking up network: device is in shutdown\n"); return rc; } else if (rc == -ENONET) { CERROR("Connection data from %s: she sent " diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h index b1a9eae..be307fd 100644 --- a/lustre/include/lustre_dlm.h +++ b/lustre/include/lustre_dlm.h @@ -1222,7 +1222,7 @@ static inline int ldlm_lvbo_fill(struct ldlm_lock *lock, void *buf, int *len) /* init lvb now if not already */ rc = ldlm_lvbo_init(lock->l_resource); if (rc < 0) { - CERROR("lock %p: delayed lvb init failed (rc %d)", + CERROR("lock %p: delayed lvb init failed (rc %d)\n", lock, rc); return rc; } diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 3626bda..34e0b14 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -1343,7 +1343,7 @@ no_export: } else if (lustre_msg_get_conn_cnt(req->rq_reqmsg) == 1 && rc != EALREADY) { if (!strstr(cluuid.uuid, "mdt")) - LCONSOLE_WARN("%s: Rejecting reconnect from the known client %s (at %s) because it is indicating it is a new client", + LCONSOLE_WARN("%s: Rejecting reconnect from the known client %s (at %s) because it is indicating it is a new client\n", target->obd_name, cluuid.uuid, libcfs_nid2str(req->rq_peer.nid)); GOTO(out, rc = -EALREADY); diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index ac5e9d0..972f2b9 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -2429,13 +2429,12 @@ static void osd_conf_get(const struct lu_env *env, OBD_CKSUM_T10IP512 : OBD_CKSUM_T10IP4K; } else { - CERROR("%s: unsupported checksum type of " - "T10PI type '%s'", + CERROR("%s: unsupported checksum type of T10PI type '%s'\n", d->od_svname, name); } } else { - CERROR("%s: unsupported T10PI type '%s'", + CERROR("%s: unsupported T10PI type '%s'\n", d->od_svname, name); } } @@ -7851,7 +7850,7 @@ static int osd_mount(const struct lu_env *env, } if (lmd_flags & LMD_FLG_DEV_RDONLY) { - LCONSOLE_WARN("%s: not support dev_rdonly on this device", + LCONSOLE_WARN("%s: not support dev_rdonly on this device\n", name); GOTO(out_mnt, rc = -EOPNOTSUPP); diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index bd47f5b..494cc4c 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -589,7 +589,7 @@ int osp_attr_get(const struct lu_env *env, struct dt_object *dt, if (cache) obj->opo_non_exist = 1; } else { - CERROR("%s:osp_attr_get update error "DFID": rc = %d\n", + CERROR("%s: osp_attr_get update error "DFID": rc = %d\n", dev->dd_lu_dev.ld_obd->obd_name, PFID(lu_object_fid(&dt->do_lu)), rc); } diff --git a/lustre/ptlrpc/llog_client.c b/lustre/ptlrpc/llog_client.c index ac25e7e..2180bda 100644 --- a/lustre/ptlrpc/llog_client.c +++ b/lustre/ptlrpc/llog_client.c @@ -54,7 +54,7 @@ } else { \ CERROR("ctxt->loc_imp == NULL for context idx %d." \ "Unable to complete MDS/OSS recovery," \ - "but I'll try again next time. Not fatal.\n", \ + "but I'll try again next time. Not fatal.\n", \ ctxt->loc_idx); \ imp = NULL; \ mutex_unlock(&ctxt->loc_mutex); \ diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 49cdbba..1086f9c 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -743,7 +743,7 @@ struct ptlrpc_service *ptlrpc_register_service(struct ptlrpc_service_conf *conf, strlen(cconf->cc_pattern), 0, ncpts - 1, &el); if (rc != 0) { - CERROR("%s: invalid CPT pattern string: %s", + CERROR("%s: invalid CPT pattern string: %s\n", conf->psc_name, cconf->cc_pattern); RETURN(ERR_PTR(-EINVAL)); } diff --git a/lustre/quota/qmt_lock.c b/lustre/quota/qmt_lock.c index 1e0a1a3..f981838 100644 --- a/lustre/quota/qmt_lock.c +++ b/lustre/quota/qmt_lock.c @@ -1016,7 +1016,7 @@ int qmt_start_reba_thread(struct qmt_device *qmt) rc = lu_env_init(&args->qra_env, LCT_MD_THREAD); if (rc) { - CERROR("%s: failed to init env.", qmt->qmt_svname); + CERROR("%s: failed to init env.\n", qmt->qmt_svname); GOTO(out_env, rc); } diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 4558c37..a37e52e 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -967,7 +967,7 @@ int tgt_adapt_sptlrpc_conf(struct lu_target *tgt) int rc; if (unlikely(tgt == NULL)) { - CERROR("No target passed"); + CERROR("No target passed\n"); return -EINVAL; } -- 1.8.3.1