diff options
author | Josef 'Jeff' Sipek <josef.sipek@nexenta.com> | 2014-05-07 01:25:12 -0400 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2014-05-14 19:37:21 -0400 |
commit | 55a3a0ef881a0e1c7da841d46bb5878758497dc1 (patch) | |
tree | 2de52a3d43083aaf6f80243ee1e33ed351b74d99 | |
parent | aa6577ebdcd1cd4be810e610056636f5df7904f9 (diff) | |
download | illumos-joyent-55a3a0ef881a0e1c7da841d46bb5878758497dc1.tar.gz |
4780 comstar iSCSI target shouldn't abuse ddi_get_time(9f)
Reviewed by: Eric Diven <eric.diven@delphix.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r-- | usr/src/uts/common/io/comstar/port/iscsit/iscsit.c | 8 | ||||
-rw-r--r-- | usr/src/uts/common/sys/idm/idm_impl.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c index 810311b7ee..1e852526c3 100644 --- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c +++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c @@ -21,7 +21,7 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #include <sys/cpuvar.h> @@ -3125,7 +3125,7 @@ iscsit_check_cmdsn_and_queue(idm_pdu_t *rx_pdu) * staging queue, the commands are processed out of the * queue in cmdSN order only. */ - rx_pdu->isp_queue_time = ddi_get_time(); + rx_pdu->isp_queue_time = gethrtime(); iscsit_add_pdu_to_queue(ist, rx_pdu); mutex_exit(&ist->ist_sn_mutex); return (ISCSIT_CMDSN_GT_EXPCMDSN); @@ -3395,8 +3395,8 @@ iscsit_rxpdu_queue_monitor_session(iscsit_sess_t *ist) * stop scanning the staging queue until the timer * fires again */ - if ((ddi_get_time() - next_pdu->isp_queue_time) - < rxpdu_queue_threshold) { + if ((gethrtime() - next_pdu->isp_queue_time) + < (rxpdu_queue_threshold * NANOSEC)) { mutex_exit(&ist->ist_sn_mutex); return; } diff --git a/usr/src/uts/common/sys/idm/idm_impl.h b/usr/src/uts/common/sys/idm/idm_impl.h index 72641bbfad..87d3674ad1 100644 --- a/usr/src/uts/common/sys/idm/idm_impl.h +++ b/usr/src/uts/common/sys/idm/idm_impl.h @@ -22,7 +22,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ /* - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #ifndef _IDM_IMPL_H_ @@ -377,7 +377,7 @@ typedef struct idm_pdu_s { uint32_t isp_flags; uint_t isp_hdrbuflen; uint_t isp_databuflen; - time_t isp_queue_time; + hrtime_t isp_queue_time; /* Taskq dispatching state for deferred PDU */ taskq_ent_t isp_tqent; |