From: phil Date: Sat, 2 Aug 2003 19:13:50 +0000 (+0000) Subject: b=1644 X-Git-Tag: 0.9.1~395 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=690ae88aa4e3934dc97c1d11218f9c91b0234922;p=fs%2Flustre-release.git b=1644 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. --- diff --git a/lustre/Makefile.am b/lustre/Makefile.am index 47d3c28..425bed2 100644 --- a/lustre/Makefile.am +++ b/lustre/Makefile.am @@ -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 diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c index 887889a..30cfc3f 100644 --- a/lustre/obdecho/echo.c +++ b/lustre/obdecho/echo.c @@ -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); diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 6801e92..aebcc57 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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) {