spin_unlock(&scrub->os_lock);
}
- if (!scrub->os_full_speed && !osd_scrub_has_window(it)) {
- memset(&lwi, 0, sizeof(lwi));
- l_wait_event(thread->t_ctl_waitq,
- osd_scrub_wakeup(scrub, it),
- &lwi);
- }
+ if (!scrub->os_full_speed && !osd_scrub_has_window(it))
+ wait_event_idle(thread->t_ctl_waitq,
+ osd_scrub_wakeup(scrub, it));
if (unlikely(!thread_is_running(thread)))
GOTO(out, rc = SCRUB_NEXT_EXIT);
}
if (!scrub->os_full_speed) {
- struct l_wait_info lwi = { 0 };
struct osd_otable_it *it = dev->od_otable_it;
- l_wait_event(thread->t_ctl_waitq,
- it->ooi_user_ready || !thread_is_running(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ it->ooi_user_ready ||
+ !thread_is_running(thread));
+
if (unlikely(!thread_is_running(thread)))
GOTO(post, rc = 0);
struct osd_device *dev = it->ooi_dev;
struct lustre_scrub *scrub = &dev->od_scrub;
struct ptlrpc_thread *thread = &scrub->os_thread;
- struct l_wait_info lwi = { 0 };
struct lustre_mdt_attrs *lma = NULL;
nvlist_t *nvbuf = NULL;
int size = 0;
}
if (it->ooi_pos >= scrub->os_pos_current)
- l_wait_event(thread->t_ctl_waitq,
- osd_otable_it_wakeup(scrub, it),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ osd_otable_it_wakeup(scrub, it));
if (!thread_is_running(thread) && !it->ooi_used_outside)
GOTO(out, rc = 1);