Skip to content

Commit

Permalink
Clear injector when delay already occurred
Browse files Browse the repository at this point in the history
Signed-off-by: Don Brady <don.brady@klarasystems.com>
  • Loading branch information
don-brady committed Feb 27, 2024
1 parent b3dca09 commit cb8709e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/zfs/zio_inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ zio_handle_pool_delay(spa_t *spa, hrtime_t elapsed, zinject_type_t command)
SEC2NSEC(handler->zi_record.zi_duration);
if (pause > elapsed) {
delay = pause - elapsed;
id = handler->zi_id;
}
id = handler->zi_id;
break;
}
}
Expand All @@ -733,6 +733,8 @@ zio_handle_pool_delay(spa_t *spa, hrtime_t elapsed, zinject_type_t command)
"sec delay", (u_longlong_t)NSEC2SEC(delay));
}
zfs_sleep_until(gethrtime() + delay);
}
if (id) {
/* all done with this one-shot handler */
zio_clear_fault(id);
}
Expand Down

0 comments on commit cb8709e

Please sign in to comment.