Whamcloud - gitweb
Minor bugfix to allow multiple networked operations:
authorbraam <braam>
Fri, 1 Feb 2002 18:18:06 +0000 (18:18 +0000)
committerbraam <braam>
Fri, 1 Feb 2002 18:18:06 +0000 (18:18 +0000)
- small fix to avoid crash in getattr
- properly unlink MDs and MEs after we send buffers
- fixups to the test scripts

lustre/include/linux/lustre_net.h
lustre/llite/namei.c
lustre/ptlrpc/rpc.c
lustre/tests/llmount.sh
lustre/tests/mdcreqcleanup.sh

index f403154..4c3b375 100644 (file)
@@ -74,6 +74,7 @@ struct ptlrpc_request {
        wait_queue_head_t rq_wait_for_rep;
 
         ptl_md_t rq_reply_md;
+        ptl_handle_md_t rq_reply_md_h;
         ptl_md_t rq_req_md;
         __u32 rq_reply_portal;
         __u32 rq_req_portal;
index afb5b14..01df8cb 100644 (file)
@@ -95,7 +95,7 @@ static struct dentry *ll_lookup(struct inode * dir, struct dentry *dentry)
        if (!ino)
                goto negative;
 
-        sbi = (struct ll_sb_info *)(&dentry->d_inode->i_sb->u.generic_sbp);
+        sbi = (struct ll_sb_info *)(&dir->i_sb->u.generic_sbp);
 
        err = mdc_getattr(sbi->ll_peer_ptr, ino, type,
                          OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, &rep, &hdr);
index f529207..9c0e38a 100644 (file)
@@ -105,7 +105,6 @@ int ptl_send_buf(struct ptlrpc_request *request, struct lustre_peer *peer,
 
 int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer)
 {
-        ptl_handle_md_t reply_md_h;
         ptl_handle_me_t me_h;
         ptl_process_id_t local_id;
         int rc;
@@ -123,7 +122,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer)
         local_id.rid = PTL_ID_ANY;
 
         rc = PtlMEAttach(peer->peer_ni, request->rq_reply_portal, local_id,
-                         request->rq_xid, 0, PTL_RETAIN, &me_h);
+                         request->rq_xid, 0, PTL_UNLINK, &me_h);
         if (rc != PTL_OK) {
                 EXIT;
                 /* FIXME: tear down EQ, free reqbuf */
@@ -132,12 +131,13 @@ int ptl_send_rpc(struct ptlrpc_request *request, struct lustre_peer *peer)
 
         request->rq_reply_md.start = request->rq_repbuf;
         request->rq_reply_md.length = request->rq_replen;
-        request->rq_reply_md.threshold = PTL_MD_THRESH_INF;
+        request->rq_reply_md.threshold = 1;
         request->rq_reply_md.options = PTL_MD_OP_PUT;
         request->rq_reply_md.user_ptr = request;
         request->rq_reply_md.eventq = req_eq;
 
-        rc = PtlMDAttach(me_h, request->rq_reply_md, PTL_RETAIN, &reply_md_h);
+        rc = PtlMDAttach(me_h, request->rq_reply_md, PTL_UNLINK,
+                         &request->rq_reply_md_h);
         if (rc != PTL_OK) {
                 EXIT;
                 return rc;
index 9499617..f119e03 100755 (executable)
@@ -52,7 +52,4 @@ quit
 EOF
 
 mkdir /mnt/obd
-mount -t lustre_light -o device=3 none /mnt/obd
-
-
-
+# mount -t lustre_light -o device=3 none /mnt/obd
index 8096a03..033ec8d 100755 (executable)
@@ -9,7 +9,7 @@ EOF
 rmmod mds
 rmmod osc
 rmmod ost
-rmmod obext2
+rmmod obdext2
 rmmod obdclass
 rmmod ptlrpc
 /usr/src/portals/linux/utils/ptlctl <<EOF