diff options
author | Don Brady <[email protected]> | 2017-11-04 14:25:13 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-11-04 13:25:13 -0700 |
commit | 1c27024e22af4386b592b30d40e6a0820ceb48c1 (patch) | |
tree | 689d4b821fd6910a137a0f93351351def5011cec /module/zfs/zio_inject.c | |
parent | df1f129bc4150fd6ea3f23a01154a71ffa48bf12 (diff) |
Undo c89 workarounds to match with upstream
With PR 5756 the zfs module now supports c99 and the
remaining past c89 workarounds can be undone.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Signed-off-by: Don Brady <[email protected]>
Closes #6816
Diffstat (limited to 'module/zfs/zio_inject.c')
-rw-r--r-- | module/zfs/zio_inject.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index e1ea825d7..62ca41bf4 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -472,10 +472,6 @@ zio_handle_io_delay(zio_t *zio) vdev_t *vd = zio->io_vd; inject_handler_t *min_handler = NULL; hrtime_t min_target = 0; - inject_handler_t *handler; - hrtime_t idle; - hrtime_t busy; - hrtime_t target; rw_enter(&inject_lock, RW_READER); @@ -528,7 +524,7 @@ zio_handle_io_delay(zio_t *zio) */ mutex_enter(&inject_delay_mtx); - for (handler = list_head(&inject_handlers); + for (inject_handler_t *handler = list_head(&inject_handlers); handler != NULL; handler = list_next(&inject_handlers, handler)) { if (handler->zi_record.zi_cmd != ZINJECT_DELAY_IO) continue; @@ -580,10 +576,10 @@ zio_handle_io_delay(zio_t *zio) * each lane will become idle, we use that value to * determine when this request should complete. */ - idle = handler->zi_record.zi_timer + gethrtime(); - busy = handler->zi_record.zi_timer + + hrtime_t idle = handler->zi_record.zi_timer + gethrtime(); + hrtime_t busy = handler->zi_record.zi_timer + handler->zi_lanes[handler->zi_next_lane]; - target = MAX(idle, busy); + hrtime_t target = MAX(idle, busy); if (min_handler == NULL) { min_handler = handler; |