Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14431

error messages that do not stop with newline

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • None
    • Lustre 2.12.6
    • 9223372036854775807

    Description

      When I am using grep to check how many CERROR in the codes, I found there are still a dozen of error messages that do not end with a newline. That will cause annoying messages in system log.

      lnet/klnds/gnilnd/gnilnd_cb.c(2378):

      			CERROR("Unexpected connstamp %#llx(%#llx expected)"
      				" from %s", rxmsg->gnm_connstamp,
      				found_conn->gnc_peer_connstamp,
      				libcfs_nid2str(peer->gnp_nid));
      

      lnet/klnds/gnilnd/gnilnd_conn.c(867):

      			CERROR("Looking up network: device is in shutdown");
      

      lustre/ptlrpc/service.c(731):

      				CERROR("%s: invalid CPT pattern string: %s",
      				       conf->psc_name, cconf->cc_pattern);
      

      lustre/ptlrpc/ptlrpcd.c(754):

      			CERROR("%s: invalid CPT pattern string: %s",
      			       "ptlrpcd_cpts", ptlrpcd_cpts);
      

      lustre/include/lustre_dlm.h(1159):

      			CERROR("lock %p: delayed lvb init failed (rc %d)",
      			       lock, rc);
      

      lustre/quota/qmt_lock.c(761):

      		CERROR("%s: failed to init env.", qmt->qmt_svname);
      

      lustre/osd-ldiskfs/osd_handler.c(2377):

      				CERROR("%s: unsupported checksum type of "
      				       "T10PI type '%s'",
      				       d->od_svname, name);
      

      lustre/osd-ldiskfs/osd_handler.c(2382):

      			CERROR("%s: unsupported T10PI type '%s'",
      			       d->od_svname, name);
      

      lustre/target/tgt_handler.c(945):

      		CERROR("No target passed");
      

      lustre/obdclass/lprocfs_status.c(78):

      		CERROR("LprocFS: No memory to create <debugfs> entry %s", name);
      

      Attachments

        Issue Links

          Activity

            [LU-14431] error messages that do not stop with newline

            All of the missing space errors will go away with single-line error strings, which is one reason why they are recommended by checkpatch. The other is that it makes fining error strings in the code much easier, since words in the error will not be split across lines. 

            adilger Andreas Dilger added a comment - All of the missing space errors will go away with single-line error strings, which is one reason why they are recommended by checkpatch. The other is that it makes fining error strings in the code much easier, since words in the error will not be split across lines. 
            lixi_wc Li Xi added a comment - - edited

            Missing space after "but"

            lustre/osd-ldiskfs/osd_scrub.c(2671):
                                            CERROR("%s: UUID has been changed, but"
                                                   "failed to allocate RAM for report\n",
                                                   osd_dev2name(dev));
            
            lixi_wc Li Xi added a comment - - edited Missing space after "but" lustre/osd-ldiskfs/osd_scrub.c(2671): CERROR("%s: UUID has been changed, but" "failed to allocate RAM for report\n", osd_dev2name(dev));
            lixi_wc Li Xi added a comment -

            Missing space after ":":

            lustre/osp/osp_object.c(594):
                                     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);
            
            lixi_wc Li Xi added a comment - Missing space after ":": lustre/osp/osp_object.c(594): 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);

            Rather than putting comments in this ticket, it would probably be the same effort to make a patch that fixes them all.

            adilger Andreas Dilger added a comment - Rather than putting comments in this ticket, it would probably be the same effort to make a patch that fixes them all.
            lixi_wc Li Xi added a comment -

            1) Space is missing after "%d."
            2) Two spaces before "Not fatal"
            3) "\" is not necessary

            lustre/ptlrpc/llog_client.c(56):
                            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", \
                                   ctxt->loc_idx);                                \
            
            lixi_wc Li Xi added a comment - 1) Space is missing after "%d." 2) Two spaces before "Not fatal" 3) "\" is not necessary lustre/ptlrpc/llog_client.c(56): 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", \ ctxt->loc_idx); \
            lixi_wc Li Xi added a comment -

            Space is missing after ")":

            lustre/ptlrpc/nodemap_handler.c(1134):
                             CERROR("cannot allocate memory (%zu bytes)"
                                    "for nodemap '%s'\n", sizeof(*nodemap),
                                    name);
            
            lixi_wc Li Xi added a comment - Space is missing after ")": lustre/ptlrpc/nodemap_handler.c(1134): CERROR("cannot allocate memory (%zu bytes)" "for nodemap '%s'\n", sizeof(*nodemap), name);
            lixi_wc Li Xi added a comment -

            Space is missing after ":":

            lnet/klnds/gnilnd/gnilnd_conn.c(64):
                                            CERROR("FATAL:fmablk registration has failed "
                                                   "for %ld seconds.\n",
                                                   cfs_duration_sec(jiffies - reg_to) +
                                                            rfto);
            
            lixi_wc Li Xi added a comment - Space is missing after ":": lnet/klnds/gnilnd/gnilnd_conn.c(64): CERROR("FATAL:fmablk registration has failed " "for %ld seconds.\n", cfs_duration_sec(jiffies - reg_to) + rfto);
            lixi_wc Li Xi added a comment - - edited

            Space is missing after "response"

            lnet/lnet/acceptor.c(296):
                                     CERROR("Error sending magic+version in response"
                                           "to version %d from %pI4h: %d\n",
                                          peer_version, &peer_ip, rc);
            
            lnet/lnet/acceptor.c(250):
                                           CERROR("Error sending magic+version in response"
                                                  "to LNET magic from %pI4h: %d\n",
                                                   &peer_ip, rc);
            
            lixi_wc Li Xi added a comment - - edited Space is missing after "response" lnet/lnet/acceptor.c(296): CERROR("Error sending magic+version in response" "to version %d from %pI4h: %d\n", peer_version, &peer_ip, rc); lnet/lnet/acceptor.c(250): CERROR("Error sending magic+version in response" "to LNET magic from %pI4h: %d\n", &peer_ip, rc);
            lixi_wc Li Xi added a comment -

            The space before ":" should be removed

            lustre/ofd/ofd_dev.c(1605):
            				CERROR("%s : invalid o_seq "DOSTID"\n",
            				       ofd_name(ofd), POSTID(&oa->o_oi));
            
            lixi_wc Li Xi added a comment - The space before ":" should be removed lustre/ofd/ofd_dev.c(1605): CERROR("%s : invalid o_seq "DOSTID"\n", ofd_name(ofd), POSTID(&oa->o_oi));
            lixi_wc Li Xi added a comment - - edited

            There is no way guess what the following message is related to without reading the codes:

            lustre/obdclass/lu_object.c(2284):
                                    CERROR("[%d]: %p %x (%p,%p,%p) %d %d \"%s\"@%p\n",
                                           i, key, key->lct_tags,
                                           key->lct_init, key->lct_fini, key->lct_exit,
            			       key->lct_index, atomic_read(&key->lct_used),
                                           key->lct_owner ? key->lct_owner->name : "",
                                           key->lct_owner);
            

            Adding a prefix string like "dumping context keys" would help a lot.

            lixi_wc Li Xi added a comment - - edited There is no way guess what the following message is related to without reading the codes: lustre/obdclass/lu_object.c(2284): CERROR("[%d]: %p %x (%p,%p,%p) %d %d \"%s\"@%p\n", i, key, key->lct_tags, key->lct_init, key->lct_fini, key->lct_exit, key->lct_index, atomic_read(&key->lct_used), key->lct_owner ? key->lct_owner->name : "", key->lct_owner); Adding a prefix string like "dumping context keys" would help a lot.
            lixi_wc Li Xi added a comment - - edited

            The following message missed a space after "%llu"

            lustre/llite/statahead.c(1320):
            			CERROR("%s: reading dir "DFID" at %llu"
            			       "opendir_pid = %u : rc = %d\n",
            			       ll_i2sbi(dir)->ll_fsname,
            			       PFID(ll_inode2fid(dir)), pos,
            			       lli->lli_opendir_pid, rc);
            
            lixi_wc Li Xi added a comment - - edited The following message missed a space after "%llu" lustre/llite/statahead.c(1320): CERROR("%s: reading dir "DFID" at %llu" "opendir_pid = %u : rc = %d\n", ll_i2sbi(dir)->ll_fsname, PFID(ll_inode2fid(dir)), pos, lli->lli_opendir_pid, rc);

            People

              flei Feng Lei
              lixi_wc Li Xi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: