Whamcloud - gitweb
LU-13539 all: Cleanup LASSERTF uses missing newlines 40/38540/2
authorShaun Tancheff <shaun.tancheff@hpe.com>
Fri, 8 May 2020 17:40:36 +0000 (12:40 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 May 2020 08:25:59 +0000 (08:25 +0000)
LASSERTF() usage that does not include a terminating newline
present an unclear syslog entry from admins.

This adds the terminating newline for a few cases.

Test-Parameters: trivial
HPE-bug-id: LUS-8853
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I3f088601c2ad6d59e2868e86bfbd5315e36ece98
Reviewed-on: https://review.whamcloud.com/38540
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.super@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/lod/lod_object.c
lustre/lov/lov_cl_internal.h
lustre/osd-ldiskfs/osd_quota.c
lustre/ptlrpc/client.c
lustre/ptlrpc/import.c

index f14680c..65a552d 100644 (file)
@@ -7444,7 +7444,7 @@ static int lod_declare_update_write_pending(const struct lu_env *env,
                if (lo->ldo_mirrors[i].lme_stale)
                        continue;
 
-               LASSERTF(primary < 0, DFID " has multiple primary: %u / %u",
+               LASSERTF(primary < 0, DFID " has multiple primary: %u / %u\n",
                         PFID(lod_object_fid(lo)),
                         lo->ldo_mirrors[i].lme_id,
                         lo->ldo_mirrors[primary].lme_id);
index 7768625..394eddb 100644 (file)
@@ -340,7 +340,8 @@ static inline struct lov_layout_raid0 *lov_r0(struct lov_object *lov, int i)
 {
        LASSERT(lov->lo_type == LLT_COMP);
        LASSERTF(i < lov->u.composite.lo_entry_count,
-                "entry %d entry_count %d", i, lov->u.composite.lo_entry_count);
+                "entry %d entry_count %d\n", i,
+                lov->u.composite.lo_entry_count);
 
        return &lov->u.composite.lo_entries[i].lle_raid0;
 }
@@ -370,7 +371,8 @@ static inline struct lov_layout_entry *lov_entry(struct lov_object *lov, int i)
 {
        LASSERT(lov->lo_type == LLT_COMP);
        LASSERTF(i < lov->u.composite.lo_entry_count,
-                "entry %d entry_count %d", i, lov->u.composite.lo_entry_count);
+                "entry %d entry_count %d\n", i,
+                lov->u.composite.lo_entry_count);
 
        return &lov->u.composite.lo_entries[i];
 }
index 6b836a6..b3dc66a 100644 (file)
@@ -47,7 +47,7 @@ static inline int fid2type(const struct lu_fid *fid)
                return PRJQUOTA;
        }
 
-       LASSERTF(0, "invalid fid for quota type: %u", fid_oid(fid));
+       LASSERTF(0, "invalid fid for quota type: %u\n", fid_oid(fid));
        return USRQUOTA;
 }
 
index 2c64cfa..f113b2e 100644 (file)
@@ -888,7 +888,7 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp,
        if (request) {
                ptlrpc_cli_req_init(request);
 
-               LASSERTF((unsigned long)imp > 0x1000, "%p", imp);
+               LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp);
                LASSERT(imp != LP_POISON);
                LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n",
                         imp->imp_client);
index 873d2e2..8ea5f78 100644 (file)
@@ -1547,7 +1547,7 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp)
                                           "using this service will fail.\n",
                                           imp->imp_obd->obd_name, target_len,
                                           target_start);
-                       LASSERTF(!obd_lbug_on_eviction, "LBUG upon eviction");
+                       LASSERTF(!obd_lbug_on_eviction, "LBUG upon eviction\n");
                 }
                 CDEBUG(D_HA, "evicted from %s@%s; invalidating\n",
                        obd2cli_tgt(imp->imp_obd),