Skip to content

Commit

Permalink
Fix raidz_003/004_pos.ksh kill after timeout expiration
Browse files Browse the repository at this point in the history
  • Loading branch information
fuporovvStack committed Oct 13, 2023
1 parent 89698bb commit b14cefa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/raidz_test/raidz_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,14 @@ run_sweep(void)
VERIFY(free_slots <= max_free_slots);
while (free_slots < max_free_slots) {
(void) cv_wait(&sem_cv, &sem_mtx);

/* check if should stop the test (timeout) */
time_diff = (gethrtime() - start_time) / NANOSEC
if (rto_opts.rto_sweep_timeout > 0 &&
time_diff >= rto_opts.rto_sweep_timeout) {
sweep_state = SWEEP_TIMEOUT;
rto_opts.rto_should_stop = B_TRUE;
}
}
mutex_exit(&sem_mtx);

Expand Down

0 comments on commit b14cefa

Please sign in to comment.