Whamcloud - gitweb
LU-1940 ost: wait a while for OBD_FAIL_OST_EROFS
authorHongchao Zhang <hongchao.zhang@whamcloud.com>
Tue, 13 Nov 2012 22:36:43 +0000 (06:36 +0800)
committerOleg Drokin <green@whamcloud.com>
Mon, 26 Nov 2012 16:50:58 +0000 (11:50 -0500)
for OSC, -EROFS is a recoverable error, it will resend the failed
request at most cl_resends times (obd->u.cli.cl_resends), and
its default value is 10, then for test case, the failed request
will be resent repeatly without delay, and the cl_resends could be
not enough to handle, replaces OBD_FAIL_CHECK with OBD_FAIL_TIMEOUT
will introduce some delay for -EROFS.

Signed-off-by: Hongchao Zhang <hongchao.zhang@whamcloud.com>
Change-Id: Ic2a8fe6f2d75e74f30d007940a8fd631997135e4
Reviewed-on: http://review.whamcloud.com/4622
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Yu Jian <yujian@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/ost/ost_handler.c

index 904beb0..23c1420 100644 (file)
@@ -2237,7 +2237,7 @@ int ost_handle(struct ptlrpc_request *req)
                         RETURN(0);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOSPC))
                         GOTO(out, rc = -ENOSPC);
                         RETURN(0);
                 if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOSPC))
                         GOTO(out, rc = -ENOSPC);
-                if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
+                if (OBD_FAIL_TIMEOUT(OBD_FAIL_OST_EROFS, 1))
                         GOTO(out, rc = -EROFS);
                 rc = ost_brw_write(req, oti);
                 LASSERT(current->journal_info == NULL);
                         GOTO(out, rc = -EROFS);
                 rc = ost_brw_write(req, oti);
                 LASSERT(current->journal_info == NULL);