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>
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);
}
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);
}
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),
* 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);
}
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);
}
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);
}
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);
}
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,
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();
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();
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);
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;
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;
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);
}
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;
}
}
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);
}
* 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;
}
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;
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);
__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);
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);
}
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);
}
}
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);
}