From 5e073128afcf594a267b16258d1c0494664ce33d Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Wed, 14 Nov 2012 06:36:43 +0800 Subject: [PATCH] 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 --- lustre/ost/ost_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.3.1