Whamcloud - gitweb
LU-10467 ldlm: convert waiting in ldlm_completion_ast() 85/35985/14
authorMr NeilBrown <neilb@suse.com>
Sat, 18 Jan 2020 14:17:51 +0000 (09:17 -0500)
committerOleg Drokin <green@whamcloud.com>
Sat, 8 Feb 2020 04:00:09 +0000 (04:00 +0000)
commit366959b8cba5b022b4c1ea9aaba47ac14d4fff7e
tree7200224b4b0a31200d9dc4bbdb53132c3ae6de0d
parentf10a447fb4ca44d396f7f17bdceedfbd03ab2581
LU-10467 ldlm: convert waiting in ldlm_completion_ast()

ldlm_completion_ast() calls l_wait_event() in two slightly different
ways depending on whether a timeout is defined.

As a non-NULL _on_signal handler in passed, the non-timed-out portion
of the wait allows signals (abortable).  As the on_timeout handler
return zero, the timed-out portion of the wait is always followed by a
non-timedout portion.

So if no timeout is defined, we can simply wait with
l_wait_event_abortable().

If there is a timeout, we first wait with wait_event_idle_timeout()
and if that times out, we call ldlm_expired_completion_wait(), then
wait with l_wait_event_abortable().

Change-Id: I6874010085864764f2fc0e294dc0c67152cb2ad2
Signed-off-by: Mr NeilBrown <neilb@suse.com>
Reviewed-on: https://review.whamcloud.com/35985
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Petros Koutoupis <pkoutoupis@cray.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/ldlm/ldlm_request.c