Whamcloud - gitweb
- set rq_reqmsg to NULL in null_free_req with rq_reqbuf
authortappro <tappro>
Mon, 9 Oct 2006 20:45:34 +0000 (20:45 +0000)
committertappro <tappro>
Mon, 9 Oct 2006 20:45:34 +0000 (20:45 +0000)
- add debug info

lustre/ptlrpc/pack_generic.c
lustre/ptlrpc/sec_null.c

index 3eb9604..1ffbae5 100644 (file)
@@ -480,7 +480,7 @@ void *lustre_msg_buf(struct lustre_msg *m, int n, int min_size)
         case LUSTRE_MSG_MAGIC_V2_SWABBED:
                 return lustre_msg_buf_v2(m, n, min_size);
         default:
-                LASSERTF(0, "incorrect message magic: %08x\n", m->lm_magic);
+                LASSERTF(0, "incorrect message magic: %08x(msg:%p)\n", m->lm_magic, m);
                 return NULL;
         }
 }
@@ -1206,8 +1206,8 @@ __u32 lustre_msg_get_opc(struct lustre_msg *msg)
                 return pb->pb_opc;
         }
         default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 666;
+                LASSERTF(0, "incorrect message magic: %08x(msg:%p)\n", msg->lm_magic, msg);
+                return 0;
         }
 }
 
index 9b82d51..dc1c622 100644 (file)
@@ -125,8 +125,12 @@ void null_free_reqbuf(struct ptlrpc_sec *sec,
                       struct ptlrpc_request *req)
 {
         if (!req->rq_pool) {
+                LASSERTF(req->rq_reqmsg == req->rq_reqbuf,
+                         "reqmsg %p is not reqbuf %p in NULL sec\n",
+                         req->rq_reqmsg, req->rq_reqbuf);
+
                 OBD_FREE(req->rq_reqbuf, req->rq_reqbuf_len);
-                req->rq_reqbuf = NULL;
+                req->rq_reqmsg = req->rq_reqbuf = NULL;
                 req->rq_reqbuf_len = 0;
         }
 }