void *data, __u32 flags)
{
struct ptlrpc_thread *thread = &scrub->os_thread;
- struct l_wait_info lwi = { 0 };
struct task_struct *task;
int rc;
ENTRY;
if (unlikely(thread_is_stopping(thread))) {
spin_unlock(&scrub->os_lock);
- l_wait_event(thread->t_ctl_waitq,
- thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_stopped(thread));
goto again;
}
spin_unlock(&scrub->os_lock);
RETURN(rc);
}
- l_wait_event(thread->t_ctl_waitq,
- thread_is_running(thread) || thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_running(thread) || thread_is_stopped(thread));
RETURN(0);
}
void scrub_stop(struct lustre_scrub *scrub)
{
struct ptlrpc_thread *thread = &scrub->os_thread;
- struct l_wait_info lwi = { 0 };
/* os_lock: sync status between stop and scrub thread */
spin_lock(&scrub->os_lock);
thread_set_flags(thread, SVC_STOPPING);
spin_unlock(&scrub->os_lock);
wake_up_all(&thread->t_ctl_waitq);
- l_wait_event(thread->t_ctl_waitq,
- thread_is_stopped(thread),
- &lwi);
+ wait_event_idle(thread->t_ctl_waitq,
+ thread_is_stopped(thread));
/* Do not skip the last lock/unlock, which can guarantee that
* the caller cannot return until the OI scrub thread exit. */
spin_lock(&scrub->os_lock);
seq_printf(m, "run_time: %lld seconds\n"
"average_speed: %lld objects/sec\n"
- "real-time_speed: %lld objects/sec\n"
+ "real_time_speed: %lld objects/sec\n"
"current_position: %llu\n"
"scrub_in_prior: %s\n"
"scrub_full_speed: %s\n"
} else {
if (sf->sf_run_time != 0)
speed = div_s64(speed, sf->sf_run_time);
- seq_printf(m, "run_time: %ld seconds\n"
+ seq_printf(m, "run_time: %d seconds\n"
"average_speed: %lld objects/sec\n"
- "real-time_speed: N/A\n"
+ "real_time_speed: N/A\n"
"current_position: N/A\n",
sf->sf_run_time, speed);
}