Whamcloud - gitweb
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>