Whamcloud - gitweb
LU-17844 target: remove some LCONSOLE_ERROR_MSG() 13/55113/2
authorTimothy Day <timday@amazon.com>
Wed, 15 May 2024 03:41:59 +0000 (03:41 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 29 May 2024 04:52:36 +0000 (04:52 +0000)
Replace LCONSOLE_ERROR_MSG() with LCONSOLE_ERROR().

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I8de0221e29c8ec70759eea38a67001f283f6fe39
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55113
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/target/tgt_handler.c
lustre/target/tgt_lastrcvd.c
lustre/target/tgt_mount.c

index 1d5cb42..eb549ae 100644 (file)
@@ -2016,8 +2016,7 @@ static int check_read_checksum(struct niobuf_local *local_nb, int npages,
                                           oa->o_flags : 0);
 
        if (cksum_type != server_cksum_type)
-               msg = "the server may have not used the checksum type specified"
-                     " in the original request - likely a protocol problem";
+               msg = "the server may have not used the checksum type specified in the original request - likely a protocol problem";
        else
                msg = "should have changed on the client or in transit";
 
@@ -2025,17 +2024,15 @@ static int check_read_checksum(struct niobuf_local *local_nb, int npages,
        end = local_nb[npages-1].lnb_file_offset +
                                        local_nb[npages-1].lnb_len - 1;
 
-       LCONSOLE_ERROR_MSG(0x132, "%s: BAD READ CHECKSUM: %s: from %s inode "
-               DFID " object "DOSTID" extent [%llu-%llu], client returned csum"
-               " %x (type %x), server csum %x (type %x)\n",
-               exp->exp_obd->obd_name,
-               msg, libcfs_nidstr(&peer->nid),
-               oa->o_valid & OBD_MD_FLFID ? oa->o_parent_seq : 0ULL,
-               oa->o_valid & OBD_MD_FLFID ? oa->o_parent_oid : 0,
-               oa->o_valid & OBD_MD_FLFID ? oa->o_parent_ver : 0,
-               POSTID(&oa->o_oi),
-               start, end, client_cksum, cksum_type, server_cksum,
-               server_cksum_type);
+       LCONSOLE_ERROR("%s: BAD READ CHECKSUM: %s: from %s inode " DFID " object "DOSTID" extent [%llu-%llu], client returned csum %x (type %x), server csum %x (type %x)\n",
+                      exp->exp_obd->obd_name,
+                      msg, libcfs_nidstr(&peer->nid),
+                      oa->o_valid & OBD_MD_FLFID ? oa->o_parent_seq : 0ULL,
+                      oa->o_valid & OBD_MD_FLFID ? oa->o_parent_oid : 0,
+                      oa->o_valid & OBD_MD_FLFID ? oa->o_parent_ver : 0,
+                      POSTID(&oa->o_oi),
+                      start, end, client_cksum, cksum_type, server_cksum,
+                      server_cksum_type);
 
        return 1;
 }
@@ -2631,22 +2628,20 @@ static void tgt_warn_on_cksum(struct ptlrpc_request *req,
                return;
        }
 
-       LCONSOLE_ERROR_MSG(0x168, "%s: BAD WRITE CHECKSUM: from %s%s%s inode "
-                          DFID" object "DOSTID" extent [%llu-%llu"
-                          "]: client csum %x, server csum %x\n",
-                          exp->exp_obd->obd_name, libcfs_idstr(&req->rq_peer),
-                          via, router,
-                          body->oa.o_valid & OBD_MD_FLFID ?
-                          body->oa.o_parent_seq : (__u64)0,
-                          body->oa.o_valid & OBD_MD_FLFID ?
-                          body->oa.o_parent_oid : 0,
-                          body->oa.o_valid & OBD_MD_FLFID ?
-                          body->oa.o_parent_ver : 0,
-                          POSTID(&body->oa.o_oi),
-                          local_nb[0].lnb_file_offset,
-                          local_nb[npages-1].lnb_file_offset +
-                          local_nb[npages - 1].lnb_len - 1,
-                          client_cksum, server_cksum);
+       LCONSOLE_ERROR("%s: BAD WRITE CHECKSUM: from %s%s%s inode " DFID " object " DOSTID " extent [%llu-%llu]: client csum %x, server csum %x\n",
+                      exp->exp_obd->obd_name, libcfs_idstr(&req->rq_peer),
+                      via, router,
+                      body->oa.o_valid & OBD_MD_FLFID ?
+                      body->oa.o_parent_seq : (__u64)0,
+                      body->oa.o_valid & OBD_MD_FLFID ?
+                      body->oa.o_parent_oid : 0,
+                      body->oa.o_valid & OBD_MD_FLFID ?
+                      body->oa.o_parent_ver : 0,
+                      POSTID(&body->oa.o_oi),
+                      local_nb[0].lnb_file_offset,
+                      local_nb[npages-1].lnb_file_offset +
+                      local_nb[npages - 1].lnb_len - 1,
+                      client_cksum, server_cksum);
 }
 
 int tgt_brw_write(struct tgt_session_info *tsi)
index 8801607..a4f0d71 100644 (file)
@@ -1904,21 +1904,17 @@ int tgt_server_data_init(const struct lu_env *env, struct lu_target *tgt)
                                       tgt->lut_obd->obd_uuid.uuid,
                                       sizeof(lsd->lsd_uuid));
                        } else {
-                               LCONSOLE_ERROR_MSG(0x157, "Trying to start "
-                                                  "OBD %s using the wrong "
-                                                  "disk %s. Were the /dev/ "
-                                                  "assignments rearranged?\n",
-                                                  tgt->lut_obd->obd_uuid.uuid,
-                                                  lsd->lsd_uuid);
+                               LCONSOLE_ERROR("Trying to start OBD %s using the wrong disk %s. Were the /dev/ assignments rearranged?\n",
+                                              tgt->lut_obd->obd_uuid.uuid,
+                                              lsd->lsd_uuid);
                                RETURN(-EINVAL);
                        }
                }
 
                if (lsd->lsd_osd_index != index) {
-                       LCONSOLE_ERROR_MSG(0x157,
-                                          "%s: index %d in last rcvd is different with the index %d in config log, It might be disk corruption!\n",
-                                          tgt_name(tgt),
-                                          lsd->lsd_osd_index, index);
+                       LCONSOLE_ERROR("%s: index %d in last rcvd is different with the index %d in config log, It might be disk corruption!\n",
+                                      tgt_name(tgt), lsd->lsd_osd_index,
+                                      index);
                        RETURN(-EINVAL);
                }
        }
index 6ca4016..0ca65ed 100644 (file)
@@ -231,8 +231,7 @@ static int server_start_mgs(struct super_block *sb)
        lmi = server_find_mount(LUSTRE_MGS_OBDNAME);
        if (lmi) {
                lsi = s2lsi(lmi->lmi_sb);
-               LCONSOLE_ERROR_MSG(0x15d,
-                                  "The MGS service was already started from server\n");
+               LCONSOLE_ERROR("The MGS service was already started from server\n");
                RETURN(-EALREADY);
        }
 
@@ -254,9 +253,8 @@ static int server_start_mgs(struct super_block *sb)
        if (rc < 0) {
                server_deregister_mount(LUSTRE_MGS_OBDNAME);
 report_err:
-               LCONSOLE_ERROR_MSG(0x15e,
-                                  "Failed to start MGS '%s' (%d). Is the 'mgs' module loaded?\n",
-                                  LUSTRE_MGS_OBDNAME, rc);
+               LCONSOLE_ERROR("Failed to start MGS '%s' (%d). Is the 'mgs' module loaded?\n",
+                              LUSTRE_MGS_OBDNAME, rc);
        }
        RETURN(rc);
 }
@@ -1368,9 +1366,8 @@ again:
                                mti_len, mti, NULL);
        if (rc < 0) {
                if (mti->mti_flags & LDD_F_ERROR) {
-                       LCONSOLE_ERROR_MSG(0x160,
-                                          "%s: the MGS refuses to allow this server to start: rc = %d. Please see messages on the MGS.\n",
-                                          lsi->lsi_svname, rc);
+                       LCONSOLE_ERROR("%s: the MGS refuses to allow this server to start: rc = %d. Please see messages on the MGS.\n",
+                                      lsi->lsi_svname, rc);
                } else if (must_succeed) {
                        if ((rc == -ESHUTDOWN || rc == -EIO) && ++tried < 5) {
                                /* The connection with MGS is not established.
@@ -1381,9 +1378,8 @@ again:
                                        goto again;
                        }
 
-                       LCONSOLE_ERROR_MSG(0x15f,
-                                          "%s: cannot register this server with the MGS: rc = %d. Is the MGS running?\n",
-                                          lsi->lsi_svname, rc);
+                       LCONSOLE_ERROR("%s: cannot register this server with the MGS: rc = %d. Is the MGS running?\n",
+                                      lsi->lsi_svname, rc);
                } else {
                        CDEBUG(D_HA,
                               "%s: error registering with the MGS: rc = %d (not fatal)\n",
@@ -2196,9 +2192,8 @@ int server_fill_super(struct super_block *sb)
               lsi->lsi_svname, lsi->lsi_lmd->lmd_dev);
 
        if (class_name2obd(lsi->lsi_svname)) {
-               LCONSOLE_ERROR_MSG(0x161,
-                                  "The target named %s is already running. Double-mount may have compromised the disk journal.\n",
-                                  lsi->lsi_svname);
+               LCONSOLE_ERROR("The target named %s is already running. Double-mount may have compromised the disk journal.\n",
+                              lsi->lsi_svname);
                lustre_put_lsi(sb);
                RETURN(-EALREADY);
        }