From: Mr NeilBrown Date: Fri, 24 Jan 2020 14:45:44 +0000 (-0500) Subject: LU-10467 ptlrpc: convert waiters on set->set_waitq X-Git-Tag: 2.13.52~25 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4e5855ae4dea7954ce1891cd23abce033fe23f03;hp=4e5855ae4dea7954ce1891cd23abce033fe23f03;p=fs%2Flustre-release.git LU-10467 ptlrpc: convert waiters on set->set_waitq There are a couple of interesting aspects of waiters on ->set_waitq. One is the only usage of LWI_TIMEOUT_INTR_ALL(). This causes l_wait_event() to enable "fatal" signals during the timeout part of the wait. (normally signals are completely blocked when there is a timeout). This can be converted to l_wait_event_abortable_timeout(). Another is that ptlrpc_expired_set() is passed as the on_timeout handler. As this always returns true, it cauess l_wait_event() to quit after the timeout, and not go "back to sleep". We can instead call this explicitly after the wait_event_timeout returns 0 - which means that it timedout. Due to this change in call pattern, we can change the function to take a ptlrpc_request_set* instead of a void*, and to not return anything. Also, ptlrpc_interrupted_set() is sometimes passed as the on_signal function. Instead we can explicitly call this when we get a negative return from wait_event_abortable. Again, we can declare it as taking the real type and not a void*. The wait on set_waitq in ptlrpcd() might be a timedout wait or, if timeout == 0, it is an indefinite wait. We make that explicit with 2 separate cases. So this patch: - changes to wait_event_idle_timeout and l_wait_event_abortable_timeout, - calls ptlrpc_*_set explicitly based on return code - changes signatures for ptlrpc_*_set() Change-Id: Ieb97aa3ba9b1f988a30bb7a424588f87f75e8023 Signed-off-by: Mr NeilBrown Reviewed-on: https://review.whamcloud.com/35982 Tested-by: jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Alex Zhuravlev Reviewed-by: Shaun Tancheff Reviewed-by: Oleg Drokin ---