diff options
author | Chunwei Chen <[email protected]> | 2014-02-25 17:32:21 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-04-14 13:27:56 -0700 |
commit | 0b75bdb369df4e0dab96b2778a6421773268df21 (patch) | |
tree | 2b8184592909819f2657e96f6090b9410c76be64 /module/zfs/zio_inject.c | |
parent | 888f7141a3fcb73e2ec254de7628eee12022c4fc (diff) |
Use ddi_time_after and friends to compare time
Also, make sure we use clock_t for ddi_get_lbolt to prevent type conversion
from screwing things.
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #2142
Diffstat (limited to 'module/zfs/zio_inject.c')
-rw-r--r-- | module/zfs/zio_inject.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/zfs/zio_inject.c b/module/zfs/zio_inject.c index 39ec590b5..13d188731 100644 --- a/module/zfs/zio_inject.c +++ b/module/zfs/zio_inject.c @@ -345,9 +345,10 @@ spa_handle_ignored_writes(spa_t *spa) if (handler->zi_record.zi_duration > 0) { VERIFY(handler->zi_record.zi_timer == 0 || - handler->zi_record.zi_timer + - handler->zi_record.zi_duration * hz > - ddi_get_lbolt64()); + ddi_time_after64( + (int64_t)handler->zi_record.zi_timer + + handler->zi_record.zi_duration * hz, + ddi_get_lbolt64())); } else { /* duration is negative so the subtraction here adds */ VERIFY(handler->zi_record.zi_timer == 0 || |