Whamcloud - gitweb
b=1644
authorphil <phil>
Sat, 2 Aug 2003 19:13:50 +0000 (19:13 +0000)
committerphil <phil>
Sat, 2 Aug 2003 19:13:50 +0000 (19:13 +0000)
r=eeb
This patch fixes the LBUG by clearing the bits that indicate that the
OST/echo_server is sending valid cache grant information.

Li Zongliang tested this patch but was unable to check it in.

lustre/Makefile.am
lustre/obdecho/echo.c
lustre/ost/ost_handler.c

index 47d3c28..425bed2 100644 (file)
@@ -12,12 +12,12 @@ DIRS24 = ptlbd
 endif
 
 if LIBLUSTRE
-SUBDIRS = portals lov obdclass ptlrpc obdecho ldlm osc utils mdc #liblustre
+SUBDIRS = portals obdclass lov ptlrpc obdecho ldlm osc utils mdc #liblustre
 else
 # NOTE: keep extN before obdclass, mds, and obdfilter.  Keep obdclass as early
 # as possible, to have the best chance at stopping with "wrong kernel version"
 # instead of some related build failure.
-SUBDIRS = portals $(DIRS24) obdclass mds utils ldlm obdfilter mdc osc ost
+SUBDIRS = portals obdclass $(DIRS24) mds utils ldlm obdfilter mdc osc ost
 SUBDIRS+= llite obdecho lov cobd tests doc scripts conf ptlrpc
 endif
 
index 887889a..30cfc3f 100644 (file)
@@ -248,6 +248,9 @@ int echo_preprw(int cmd, struct obd_export *export, struct obdo *oa,
         if (obd == NULL)
                 RETURN(-EINVAL);
 
+        /* Temp fix to stop falling foul of osc_announce_cached() */
+        oa->o_valid &= ~(OBD_MD_FLBLOCKS | OBD_MD_FLRDEV);
+
         memset(res, 0, sizeof(*res) * niocount);
 
         CDEBUG(D_PAGE, "%s %d obdos with %d IOs\n",
@@ -280,7 +283,7 @@ int echo_preprw(int cmd, struct obd_export *export, struct obdo *oa,
                                 }
                         }
 
-                        tot_bytes += r->len;
+                        tot_bytes += nb->len;
 
                         atomic_inc(&obd->u.echo.eo_prep);
 
index 6801e92..aebcc57 100644 (file)
@@ -418,6 +418,9 @@ static int ost_brw_read(struct ptlrpc_request *req)
                 GOTO(out, rc = -EFAULT);
         }
 
+        /* BUG 974: when we send back cache grants, don't clear this flag */
+        body->oa.o_valid &= ~OBD_MD_FLRDEV;
+
         ioo = lustre_swab_reqbuf(req, 1, sizeof(*ioo), lustre_swab_obd_ioobj);
         if (ioo == NULL) {
                 CERROR("Missing/short ioobj\n");
@@ -580,6 +583,9 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
                 GOTO(out, rc = -EFAULT);
         }
 
+        /* BUG 974: when we send back cache grants, don't clear this flag */
+        body->oa.o_valid &= ~OBD_MD_FLRDEV;
+
         LASSERT_REQSWAB(req, 1);
         objcount = req->rq_reqmsg->buflens[1] / sizeof(*ioo);
         if (objcount == 0) {