Whamcloud - gitweb
branch: HEAD
authorericm <ericm>
Wed, 20 May 2009 18:52:07 +0000 (18:52 +0000)
committerericm <ericm>
Wed, 20 May 2009 18:52:07 +0000 (18:52 +0000)
only set READ_COMPLETED flag when read actually succeeded.
b=19352
r=jay
r=wangdi

lustre/obdclass/cl_page.c
lustre/osc/osc_request.c

index d79c6c8..5dcf62d 100644 (file)
@@ -1249,7 +1249,7 @@ void cl_page_completion(const struct lu_env *env,
 
         ENTRY;
         CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, ioret);
 
         ENTRY;
         CL_PAGE_HEADER(D_TRACE, env, pg, "%i %i\n", crt, ioret);
-        if (crt == CRT_READ) {
+        if (crt == CRT_READ && ioret == 0) {
                 PASSERT(env, pg, !(pg->cp_flags & CPF_READ_COMPLETED));
                 pg->cp_flags |= CPF_READ_COMPLETED;
         }
                 PASSERT(env, pg, !(pg->cp_flags & CPF_READ_COMPLETED));
                 pg->cp_flags |= CPF_READ_COMPLETED;
         }
index a3fad25..f13fe08 100644 (file)
@@ -1480,9 +1480,10 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
 
         /* The rest of this function executes only for OST_READs */
 
 
         /* The rest of this function executes only for OST_READs */
 
+        /* if unwrap_bulk failed, return -EAGAIN to retry */
         rc = sptlrpc_cli_unwrap_bulk_read(req, req->rq_bulk, rc);
         if (rc < 0)
         rc = sptlrpc_cli_unwrap_bulk_read(req, req->rq_bulk, rc);
         if (rc < 0)
-                GOTO(out, rc);
+                GOTO(out, rc = -EAGAIN);
 
         if (rc > aa->aa_requested_nob) {
                 CERROR("Unexpected rc %d (%d requested)\n", rc,
 
         if (rc > aa->aa_requested_nob) {
                 CERROR("Unexpected rc %d (%d requested)\n", rc,