Whamcloud - gitweb
- minor fixes to get mdc_readpage working over again.
authorbraam <braam>
Sun, 3 Mar 2002 03:17:46 +0000 (03:17 +0000)
committerbraam <braam>
Sun, 3 Mar 2002 03:17:46 +0000 (03:17 +0000)
lustre/include/linux/lustre_net.h
lustre/mdc/mdc_request.c
lustre/osc/osc_request.c
lustre/ost/ost_handler.c
lustre/ptlrpc/niobuf.c
lustre/tests/llmount.sh

index 6e0a233..6978066 100644 (file)
@@ -199,7 +199,7 @@ typedef int (*svc_handler_t)(struct obd_device *obddev,
 int ptlrpc_check_bulk_sent(struct ptlrpc_bulk_desc *);
 int ptlrpc_send_bulk(struct ptlrpc_bulk_desc *, int portal);
 int ptl_send_buf(struct ptlrpc_request *, struct lustre_peer *, int portal);
-int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *);
+int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *);
 int ptlrpc_reply(struct obd_device *obddev, struct ptlrpc_service *svc,
                  struct ptlrpc_request *req);
 int ptlrpc_error(struct obd_device *obddev, struct ptlrpc_service *svc,
index 91a7181..66d34cf 100644 (file)
@@ -194,12 +194,9 @@ int mdc_readpage(struct ptlrpc_client *cl, ino_t ino, int type, __u64 offset,
         bulk->b_buflen = PAGE_SIZE;
         bulk->b_buf = (void *)(long)niobuf.addr;
        bulk->b_portal = MDS_BULK_PORTAL;
+        bulk->b_xid = request->rq_xid;
 
-        spin_lock(&cl->cli_lock);
-        bulk->b_xid = cl->cli_xid++;
-        spin_unlock(&cl->cli_lock);
-
-        rc = ptlrpc_wait_bulk(bulk);
+        rc = ptlrpc_register_bulk(bulk);
         if (rc) {
                 CERROR("%s: couldn't setup bulk sink: error %d.\n",
                        __FUNCTION__, rc);
index f6bd069..92e1b95 100644 (file)
@@ -393,7 +393,7 @@ int osc_brw_read(struct obd_conn *conn, obd_count num_oa, struct obdo **oa,
                 *(__u32 *)ptr2 = bulk[n]->b_xid;
                 ptr2 = (char *)ptr2 + sizeof(__u32);
 
-                rc = ptlrpc_wait_bulk(bulk[n]);
+                rc = ptlrpc_register_bulk(bulk[n]);
                 if (rc)
                         goto out;
         }
index ca57958..01e4edb 100644 (file)
@@ -357,7 +357,7 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req)
                         bulk_vec[i]->b_buf = (void *)(unsigned long)dst->addr;
                         bulk_vec[i]->b_buflen = PAGE_SIZE;
                         bulk_vec[i]->b_portal = OSC_BULK_PORTAL;
-                        rc = ptlrpc_wait_bulk(bulk_vec[i]);
+                        rc = ptlrpc_register_bulk(bulk_vec[i]);
                         if (rc)
                                 goto out;
 
index 33a4900..9b1a181 100644 (file)
@@ -154,7 +154,7 @@ int ptlrpc_send_bulk(struct ptlrpc_bulk_desc *bulk, int portal)
         return rc;
 }
 
-int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *bulk)
+int ptlrpc_register_bulk(struct ptlrpc_bulk_desc *bulk)
 {
         int rc;
 
@@ -186,12 +186,15 @@ int ptlrpc_wait_bulk(struct ptlrpc_bulk_desc *bulk)
 
         CDEBUG(D_NET, "Setup bulk sink buffer: %u bytes, xid %u, portal %u\n",
                bulk->b_buflen, bulk->b_xid, bulk->b_portal);
+        EXIT;
+        return 0;
 
  cleanup2:
+        EXIT;
         PtlMEUnlink(bulk->b_me_h);
  cleanup1:
         PtlMDUnlink(bulk->b_md_h);
-
+        EXIT;
         return rc;
 }
 
index b16d19d..7f47f9a 100755 (executable)
@@ -62,4 +62,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