Whamcloud - gitweb
fix some mal-formatted DEBUG_REQ and LCONSOLE_ERROR_MSG messages
authorshadow <shadow>
Thu, 21 Jun 2007 06:21:40 +0000 (06:21 +0000)
committershadow <shadow>
Thu, 21 Jun 2007 06:21:40 +0000 (06:21 +0000)
b=12747
i=wangdi
i=scjody

lustre/ChangeLog
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_lockd.c
lustre/mdc/mdc_locks.c
lustre/mds/mds_xattr.c
lustre/mgs/mgs_handler.c
lustre/ost/ost_handler.c
lustre/ptlrpc/client.c
lustre/ptlrpc/niobuf.c
lustre/quota/quota_context.c

index 5e54a4d..61db18a 100644 (file)
@@ -338,6 +338,11 @@ Details    : 2.6.22 has only one visble change, SLAB_CTOR_* constants is
             removed. In this case we need drop using os depended interface to
             kmem_cache and use cfs_mem_cache API.
 
+Severity   : minor
+Bugzilla   : 12747
+Description: fix mal-formatted messages
+Details    : fix some mal-formatted DEBUG_REQ and LCONSOLE_ERROR_MSG messages 
+
 --------------------------------------------------------------------------------
 
 2007-05-03  Cluster File Systems, Inc. <info@clusterfs.com>
index efab58d..54a176a 100644 (file)
@@ -560,7 +560,7 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
         LASSERT_REQSWAB(req, REQ_REC_OFF);
         str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF, sizeof(tgtuuid)-1);
         if (str == NULL) {
-                DEBUG_REQ(D_ERROR, req, "bad target UUID for connect\n");
+                DEBUG_REQ(D_ERROR, req, "bad target UUID for connect");
                 GOTO(out, rc = -EINVAL);
         }
 
@@ -602,7 +602,7 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
         str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1,
                                 sizeof(cluuid) - 1);
         if (str == NULL) {
-                DEBUG_REQ(D_ERROR, req, "bad client UUID for connect\n");
+                DEBUG_REQ(D_ERROR, req, "bad client UUID for connect");
                 GOTO(out, rc = -EINVAL);
         }
 
@@ -644,14 +644,14 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
         if (lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_LIBCLIENT) {
                 if (!data) {
                         DEBUG_REQ(D_WARNING, req, "Refusing old (unversioned) "
-                                  "libclient connection attempt\n");
+                                  "libclient connection attempt");
                         GOTO(out, rc = -EPROTO);
                 } else if (data->ocd_version < LUSTRE_VERSION_CODE -
                                                LUSTRE_VERSION_ALLOWED_OFFSET ||
                            data->ocd_version > LUSTRE_VERSION_CODE +
                                                LUSTRE_VERSION_ALLOWED_OFFSET) {
                         DEBUG_REQ(D_WARNING, req, "Refusing %s (%d.%d.%d.%d) "
-                                  "libclient connection attempt\n",
+                                  "libclient connection attempt",
                                   data->ocd_version < LUSTRE_VERSION_CODE ?
                                   "old" : "new",
                                   OBD_OCD_VERSION_MAJOR(data->ocd_version),
@@ -797,7 +797,7 @@ int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
          * that to go to zero before we get our new export reference. */
         export = class_conn2export(&conn);
         if (!export) {
-                DEBUG_REQ(D_ERROR, req, "Missing export!\n");
+                DEBUG_REQ(D_ERROR, req, "Missing export!");
                 GOTO(out, rc = -ENODEV);
         }
 
index 135c2bd..f4d5d9b 100644 (file)
@@ -785,7 +785,7 @@ int ldlm_handle_enqueue(struct ptlrpc_request *req,
 
         if (dlm_req->lock_desc.l_resource.lr_type < LDLM_MIN_TYPE ||
             dlm_req->lock_desc.l_resource.lr_type >= LDLM_MAX_TYPE) {
-                DEBUG_REQ(D_ERROR, req, "invalid lock request type %d\n",
+                DEBUG_REQ(D_ERROR, req, "invalid lock request type %d",
                           dlm_req->lock_desc.l_resource.lr_type);
                 GOTO(out, rc = -EFAULT);
         }
@@ -793,7 +793,7 @@ int ldlm_handle_enqueue(struct ptlrpc_request *req,
         if (dlm_req->lock_desc.l_req_mode <= LCK_MINMODE ||
             dlm_req->lock_desc.l_req_mode >= LCK_MAXMODE ||
             dlm_req->lock_desc.l_req_mode & (dlm_req->lock_desc.l_req_mode-1)) {
-                DEBUG_REQ(D_ERROR, req, "invalid lock request mode %d\n",
+                DEBUG_REQ(D_ERROR, req, "invalid lock request mode %d",
                           dlm_req->lock_desc.l_req_mode);
                 GOTO(out, rc = -EFAULT);
         }
@@ -801,12 +801,12 @@ int ldlm_handle_enqueue(struct ptlrpc_request *req,
         if (req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) {
                 if (dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN) {
                         DEBUG_REQ(D_ERROR, req,
-                                  "PLAIN lock request from IBITS client?\n");
+                                  "PLAIN lock request from IBITS client?");
                         GOTO(out, rc = -EPROTO);
                 }
         } else if (dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) {
                 DEBUG_REQ(D_ERROR, req,
-                          "IBITS lock request from unaware client?\n");
+                          "IBITS lock request from unaware client?");
                 GOTO(out, rc = -EPROTO);
         }
 
index 2380297..f101e0d 100644 (file)
@@ -209,7 +209,7 @@ static void mdc_realloc_openmsg(struct ptlrpc_request *req,
         if (new_msg != NULL) {
                 struct lustre_msg *old_msg = req->rq_reqmsg;
 
-                DEBUG_REQ(D_INFO, req, "replace reqmsg for larger EA %u\n",
+                DEBUG_REQ(D_INFO, req, "replace reqmsg for larger EA %u",
                           body->eadatasize);
                 memcpy(new_msg, old_msg, old_size);
                 lustre_msg_set_buflen(new_msg, DLM_INTENT_REC_OFF + 2,
index 8a049d8..6f663ed 100644 (file)
@@ -129,7 +129,7 @@ static int mds_getxattr_internal(struct obd_device *obd,
 
         if (reqbody->valid & OBD_MD_FLXATTR) {
                 xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF+1,0);
-                DEBUG_REQ(D_INODE, req, "getxattr %s\n", xattr_name);
+                DEBUG_REQ(D_INODE, req, "getxattr %s", xattr_name);
 
                 if (inode->i_op && inode->i_op->getxattr) {
                         lock_24kernel();
@@ -142,7 +142,7 @@ static int mds_getxattr_internal(struct obd_device *obd,
                     rc != -ERANGE)
                         CDEBUG(D_OTHER, "getxattr failed: %d\n", rc);
         } else if (reqbody->valid & OBD_MD_FLXATTRLS) {
-                DEBUG_REQ(D_INODE, req, "listxattr\n");
+                DEBUG_REQ(D_INODE, req, "listxattr");
 
                 if (inode->i_op && inode->i_op->listxattr) {
                         lock_24kernel();
@@ -243,7 +243,7 @@ int mds_setxattr_internal(struct ptlrpc_request *req, struct mds_body *body)
                 GOTO(out, rc = -EPROTO);
         }
 
-        DEBUG_REQ(D_INODE, req, "%sxattr %s\n",
+        DEBUG_REQ(D_INODE, req, "%sxattr %s",
                   body->valid & OBD_MD_FLXATTR ? "set" : "remove",
                   xattr_name);
 
index 4167ddd..093e1b0 100644 (file)
@@ -491,11 +491,11 @@ int mgs_handle(struct ptlrpc_request *req)
                 req->rq_status = rc;            /* superfluous? */
                 break;
         case MGS_TARGET_REG:
-                DEBUG_REQ(D_MGS, req, "target add\n");
+                DEBUG_REQ(D_MGS, req, "target add");
                 rc = mgs_handle_target_reg(req);
                 break;
         case MGS_TARGET_DEL:
-                DEBUG_REQ(D_MGS, req, "target del\n");
+                DEBUG_REQ(D_MGS, req, "target del");
                 //rc = mgs_handle_target_del(req);
                 break;
 
@@ -516,7 +516,7 @@ int mgs_handle(struct ptlrpc_request *req)
                 rc = target_handle_ping(req);
                 break;
         case OBD_LOG_CANCEL:
-                DEBUG_REQ(D_MGS, req, "log cancel\n");
+                DEBUG_REQ(D_MGS, req, "log cancel");
                 rc = -ENOTSUPP; /* la la la */
                 break;
 
index 1de75ab..9ad72bc 100644 (file)
@@ -673,7 +673,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
 
         niocount = ioo->ioo_bufcnt;
         if (niocount > PTLRPC_MAX_BRW_PAGES) {
-                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)\n",
+                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)",
                           niocount);
                 GOTO(out, rc = -EFAULT);
         }
@@ -809,7 +809,7 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
                                 rc = -ETIMEDOUT;
                         }
                 } else {
-                        DEBUG_REQ(D_ERROR, req, "bulk PUT failed: rc %d\n", rc);
+                        DEBUG_REQ(D_ERROR, req, "bulk PUT failed: rc %d", rc);
                 }
                 comms_error = rc != 0;
         }
@@ -919,7 +919,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         }
 
         if (niocount > PTLRPC_MAX_BRW_PAGES) {
-                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)\n",
+                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)",
                           niocount);
                 GOTO(out, rc = -EFAULT);
         }
@@ -992,7 +992,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
          * grant info will be cleared for resent req, then fed_grant and 
          * total_grant will not be modified in following preprw_write*/ 
         if (lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT | MSG_REPLAY)) {
-                DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info\n");
+                DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info");
                 body->oa.o_valid &= ~OBD_MD_FLGRANT;
         }
 
@@ -1037,7 +1037,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
                         rc = -ETIMEDOUT;
                 }
         } else {
-                DEBUG_REQ(D_ERROR, req, "ptlrpc_bulk_get failed: rc %d\n", rc);
+                DEBUG_REQ(D_ERROR, req, "ptlrpc_bulk_get failed: rc %d", rc);
         }
         comms_error = rc != 0;
 
@@ -1521,7 +1521,7 @@ static int ost_handle(struct ptlrpc_request *req)
                 break;
         /* FIXME - just reply status */
         case LLOG_ORIGIN_CONNECT:
-                DEBUG_REQ(D_INODE, req, "log connect\n");
+                DEBUG_REQ(D_INODE, req, "log connect");
                 rc = llog_handle_connect(req);
                 req->rq_status = rc;
                 rc = lustre_pack_reply(req, 1, NULL, NULL);
index c256a40..80a6b50 100644 (file)
@@ -574,7 +574,7 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)
                 __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
 
                 LCONSOLE_ERROR_MSG(0x011, "an error ocurred while communicating"
-                                   " with %s The %s operation failed with %d",
+                                   " with %s The %s operation failed with %d\n",
                                    exp ? obd_export_nid2str(exp) : "(no nid)",
                                    ll_opcode2str(opc), err);
                 RETURN(err < 0 ? err : -EINVAL);
@@ -608,19 +608,19 @@ static int after_reply(struct ptlrpc_request *req)
         LASSERT (req->rq_nob_received <= req->rq_replen);
         rc = lustre_unpack_msg(req->rq_repmsg, req->rq_nob_received);
         if (rc) {
-                DEBUG_REQ(D_ERROR, req, "unpack_rep failed: %d\n", rc);
+                DEBUG_REQ(D_ERROR, req, "unpack_rep failed: %d", rc);
                 RETURN(-EPROTO);
         }
 
         rc = lustre_unpack_rep_ptlrpc_body(req, MSG_PTLRPC_BODY_OFF);
         if (rc) {
-                DEBUG_REQ(D_ERROR, req, "unpack ptlrpc body failed: %d\n", rc);
+                DEBUG_REQ(D_ERROR, req, "unpack ptlrpc body failed: %d", rc);
                 RETURN(-EPROTO);
         }
 
         if (lustre_msg_get_type(req->rq_repmsg) != PTL_RPC_MSG_REPLY &&
             lustre_msg_get_type(req->rq_repmsg) != PTL_RPC_MSG_ERR) {
-                DEBUG_REQ(D_ERROR, req, "invalid packet received (type=%u)\n",
+                DEBUG_REQ(D_ERROR, req, "invalid packet received (type=%u)",
                           lustre_msg_get_type(req->rq_repmsg));
                 RETURN(-EPROTO);
         }
index 060fb8e..5a863ec 100644 (file)
@@ -300,7 +300,7 @@ void ptlrpc_unregister_bulk (struct ptlrpc_request *req)
                         return;
 
                 LASSERT (rc == -ETIMEDOUT);
-                DEBUG_REQ(D_WARNING,req,"Unexpectedly long timeout: desc %p\n",
+                DEBUG_REQ(D_WARNING,req,"Unexpectedly long timeout: desc %p",
                           desc);
         }
 }
index 2033971..73159dc 100644 (file)
@@ -544,7 +544,7 @@ static int dqacq_interpret(struct ptlrpc_request *req, void *data, int rc)
                 qdata = lustre_quota_old_to_new(qdata_old);
         }
         if (qdata == NULL) {
-                DEBUG_REQ(D_ERROR, req, "error unpacking qunit_data\n");
+                DEBUG_REQ(D_ERROR, req, "error unpacking qunit_data");
                 RETURN(-EPROTO);
         }