This is a basic conditional wait. Instead of using
l_wait_condition() use the linux standard wait_event_idle().
Change-Id: I5c81914de003468ac20b6c65f1b6bee2d4cf6891
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/37696
Reviewed-by: Neil Brown <neilb@suse.de>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
LPU64||%llu
LPX64i||%llx
LPX64||%#llx
LPU64||%llu
LPX64i||%llx
LPX64||%#llx
+l_wait_event||wait_event_idle
+l_wait_event_exclusive||l_wait_event_abortable_exclusive
+l_wait_event_exclusive_head||wait_event_idle_exclusive_lifo_timeout
+l_wait_condition||wait_event_idle
\bMAX\(||max_t
\bMIN\(||min_t
mdo2fid||mdd_object_fid
\bMAX\(||max_t
\bMIN\(||min_t
mdo2fid||mdd_object_fid
- * We have to l_wait_event() whatever the result, to give liblustre
+ * We have to wait_event_idle_timeout() whatever the result, to get
* a chance to run reply_in_callback(), and to make sure we've
* unlinked before returning a req to the pool.
*/
* a chance to run reply_in_callback(), and to make sure we've
* unlinked before returning a req to the pool.
*/
/* The unlink ensures the callback happens ASAP and is the last
* one. If it fails, it must be because completion just happened,
/* The unlink ensures the callback happens ASAP and is the last
* one. If it fails, it must be because completion just happened,
- * but we must still l_wait_event() in this case, to give liblustre
- * a chance to run server_bulk_callback()*/
+ * but we must still wait_event_idle_timeout() in this case, to give
+ * us a chance to run server_bulk_callback()
+ */
mdunlink_iterate_helper(desc->bd_mds, desc->bd_md_max_brw);
for (;;) {
mdunlink_iterate_helper(desc->bd_mds, desc->bd_md_max_brw);
for (;;) {
/* the unlink ensures the callback happens ASAP and is the last
* one. If it fails, it must be because completion just happened,
/* the unlink ensures the callback happens ASAP and is the last
* one. If it fails, it must be because completion just happened,
- * but we must still l_wait_event() in this case to give liblustre
- * a chance to run client_bulk_callback() */
+ * but we must still wait_event_idle_timeout() in this case to give
+ * us a chance to run client_bulk_callback()
+ */
mdunlink_iterate_helper(desc->bd_mds, desc->bd_md_max_brw);
if (ptlrpc_client_bulk_active(req) == 0) /* completed or */
mdunlink_iterate_helper(desc->bd_mds, desc->bd_md_max_brw);
if (ptlrpc_client_bulk_active(req) == 0) /* completed or */
wake_up(&ptlrpc_hr.hr_waitq);
while (!ptlrpc_hr.hr_stopping) {
wake_up(&ptlrpc_hr.hr_waitq);
while (!ptlrpc_hr.hr_stopping) {
- l_wait_condition(hrt->hrt_waitq, hrt_dont_sleep(hrt, &replies));
+ wait_event_idle(hrt->hrt_waitq, hrt_dont_sleep(hrt, &replies));
while (!list_empty(&replies)) {
struct ptlrpc_reply_state *rs;
while (!list_empty(&replies)) {
struct ptlrpc_reply_state *rs;