summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorAlexey Lyashkov <alexey_lyashkov@xyratex.com>2016-09-18 16:38:22 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:53:45 +0200
commitc86a6c1189a182c3b2670bbc91c3e66123c0cdba (patch)
tree7fc92882075dc3646b69ace399e54eac3f51a188 /drivers/staging/lustre
parent8971ee5bc1ab24eb63ac379b7bd7e16619862834 (diff)
downloadlinux-c86a6c1189a182c3b2670bbc91c3e66123c0cdba.tar.bz2
staging: lustre: ldlm: evict clients returning errors on ASTs
To test proper behavior of clients returning errors on ASTs we can induce a failure with setting OBD_FAIL_LDLM_BL_CALLBACK_NET. Handle the new additonal case of cfs_fail_err being set as well so that the cfs_fail_err can be sent back in a reply. Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5581 Xyratex-bug-id: MRP-2041 Reviewed-on: http://review.whamcloud.com/11752 Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
index b91b26d9dd53..ff2c28ed4f1d 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c
@@ -559,8 +559,11 @@ static int ldlm_callback_handler(struct ptlrpc_request *req)
switch (lustre_msg_get_opc(req->rq_reqmsg)) {
case LDLM_BL_CALLBACK:
- if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_BL_CALLBACK_NET))
+ if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_BL_CALLBACK_NET)) {
+ if (cfs_fail_err)
+ ldlm_callback_reply(req, -(int)cfs_fail_err);
return 0;
+ }
break;
case LDLM_CP_CALLBACK:
if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CP_CALLBACK_NET))