From: Hongchao Zhang Date: Tue, 13 Nov 2012 22:36:43 +0000 (+0800) Subject: LU-1940 ost: wait a while for OBD_FAIL_OST_EROFS X-Git-Tag: 2.3.57~43 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5e073128afcf594a267b16258d1c0494664ce33d LU-1940 ost: wait a while for OBD_FAIL_OST_EROFS 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 Change-Id: Ic2a8fe6f2d75e74f30d007940a8fd631997135e4 Reviewed-on: http://review.whamcloud.com/4622 Tested-by: Hudson Reviewed-by: Andreas Dilger Reviewed-by: Yu Jian Tested-by: Maloo --- diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 904beb0..23c1420 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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); - 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);