Whamcloud - gitweb
minor changes to debug prepw and prepare page
authorbraam <braam>
Mon, 25 Feb 2002 18:13:41 +0000 (18:13 +0000)
committerbraam <braam>
Mon, 25 Feb 2002 18:13:41 +0000 (18:13 +0000)
remove some debug crud from the OST handler

lustre/include/linux/lustre_lib.h
lustre/lib/page.c
lustre/mds/handler.c
lustre/ost/ost_handler.c

index c92e40f..81e133e 100644 (file)
@@ -35,7 +35,7 @@
 /* page.c */
 inline void lustre_put_page(struct page *page);
 struct page * lustre_get_page(struct inode *dir, unsigned long n);
-void lustre_prepare_page(unsigned from, unsigned to, struct page *page);
+int lustre_prepare_page(unsigned from, unsigned to, struct page *page);
 int lustre_commit_page(struct page *page, unsigned from, unsigned to);
 #endif
 
index 8d11b58..8f1437e 100644 (file)
@@ -106,7 +106,7 @@ fail:
        return ERR_PTR(-EIO);
 }
 
-void lustre_prepare_page(unsigned from, unsigned to, struct page *page)
+int lustre_prepare_page(unsigned from, unsigned to, struct page *page)
 {
        int err;
 
@@ -115,9 +115,8 @@ void lustre_prepare_page(unsigned from, unsigned to, struct page *page)
        if (err) { 
                 CERROR("page index %ld from %d to %d err %d\n", 
                                 page->index, from, to, err); 
-               BUG();
         }
-
+        return err;
 }
 
 int lustre_commit_page(struct page *page, unsigned from, unsigned to)
index cbb4290..5d7efd3 100644 (file)
@@ -457,9 +457,7 @@ int mds_main(void *arg)
 
                wake_up(&mds->mds_done_waitq);
                interruptible_sleep_on(&mds->mds_waitq);
-               barrier();
-               CDEBUG(D_INODE, "lustre_mds wakes\n");
-               CDEBUG(D_INODE, "pick up req here and continue\n"); 
+               CDEBUG(D_INODE, "mds_wakes pick up req here and continue\n"); 
 
                if (mds->mds_service != NULL) {
                        ptl_event_t ev;
index 45e8238..1d4b93c 100644 (file)
@@ -393,6 +393,11 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req)
                (cmd, &conn, objcount, (struct obd_ioobj *)tmp1, 
                 niocount, (struct niobuf *)tmp2, (struct niobuf *)res); 
 
+       if (req->rq_rep.ost->result) {
+               EXIT;
+               goto out;
+       }
+
        if (cmd == OBD_BRW_WRITE) { 
                for (i=0; i<niocount; i++) { 
                        src = &((struct niobuf *)tmp2)[i];
@@ -401,6 +406,7 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req)
                               (void *)(unsigned long)src->addr, 
                               src->len);
                }
+               barrier();
        } else { 
                for (i=0; i<niocount; i++) { 
                        dst = &((struct niobuf *)tmp2)[i];
@@ -409,6 +415,7 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req)
                               (void *)(unsigned long)src->addr, 
                               PAGE_SIZE); 
                }
+               barrier();
        }
 
        req->rq_rep.ost->result = 
@@ -416,6 +423,7 @@ int ost_brw(struct ost_obd *obddev, struct ptlrpc_request *req)
                (cmd, &conn, objcount, (struct obd_ioobj *)tmp1, 
                 niocount, (struct niobuf *)res); 
 
+ out:
        EXIT;
        return 0;
 }
@@ -532,22 +540,18 @@ int ost_main(void *arg)
                wake_up(&ost->ost_done_waitq);
                interruptible_sleep_on(&ost->ost_waitq);
                barrier();
-               CDEBUG(D_INODE, "lustre_ost wakes\n");
-               CDEBUG(D_INODE, "pick up req here and continue\n"); 
+               CDEBUG(D_INODE, "ost_wakes: pick up req here and continue\n"); 
 
 
                if (ost->ost_service != NULL) {
                        ptl_event_t ev;
 
-                       CDEBUG(D_INODE, "\n"); 
                        while (1) {
                                struct ptlrpc_request request;
                                struct ptlrpc_service *service;
-                               CDEBUG(D_INODE, "\n"); 
                                rc = PtlEQGet(ost->ost_service->srv_eq_h, &ev);
                                if (rc != PTL_OK && rc != PTL_EQ_DROPPED)
                                        break;
-                               CDEBUG(D_INODE, "\n"); 
 
                                service = (struct ptlrpc_service *)ev.mem_desc.user_ptr;