diff options
author | Garrett D'Amore <garrett@nexenta.com> | 2011-08-18 12:28:47 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@nexenta.com> | 2011-08-18 12:28:47 -0700 |
commit | 6319b0c72e1681f79a5f33dfa976a63eedd4a2a4 (patch) | |
tree | b97c7c82708e121bd8a6cb3b632734b8382cca94 | |
parent | 8ed558133403bcd904d4d7f182337b09f9fbf225 (diff) | |
download | illumos-joyent-6319b0c72e1681f79a5f33dfa976a63eedd4a2a4.tar.gz |
1385 iscsi target drops due to taskq
Reviewed by: Jason Brian King <jason.brian.king@gmail.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Dmitry Yusupov <dmitry@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Eric Shrock <eric.schrock@delphix.com>
-rw-r--r-- | usr/src/uts/common/io/comstar/port/iscsit/iscsit.c | 16 | ||||
-rw-r--r-- | usr/src/uts/common/sys/idm/idm_impl.h | 8 |
2 files changed, 13 insertions, 11 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 4df6327f31..59bdf682e0 100644 --- a/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c +++ b/usr/src/uts/common/io/comstar/port/iscsit/iscsit.c @@ -21,6 +21,9 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ #include <sys/cpuvar.h> #include <sys/types.h> @@ -2165,7 +2168,6 @@ iscsit_post_scsi_cmd(idm_conn_t *ic, idm_pdu_t *rx_pdu) } } -/*ARGSUSED*/ void iscsit_deferred_dispatch(idm_pdu_t *rx_pdu) { @@ -2188,16 +2190,8 @@ iscsit_deferred_dispatch(idm_pdu_t *rx_pdu) iscsit_conn_dispatch_hold(ict); mutex_exit(&ict->ict_mutex); - if (taskq_dispatch(iscsit_global.global_dispatch_taskq, - iscsit_deferred, rx_pdu, DDI_NOSLEEP) == NULL) { - /* - * In the unlikely scenario that we couldn't get the resources - * to dispatch the PDU then just drop it. - */ - idm_pdu_complete(rx_pdu, IDM_STATUS_FAIL); - idm_conn_event(ict->ict_ic, CE_TRANSPORT_FAIL, NULL); - iscsit_conn_dispatch_rele(ict); - } + taskq_dispatch_ent(iscsit_global.global_dispatch_taskq, + iscsit_deferred, rx_pdu, 0, &rx_pdu->isp_tqent); } static void diff --git a/usr/src/uts/common/sys/idm/idm_impl.h b/usr/src/uts/common/sys/idm/idm_impl.h index 11e9534687..72641bbfad 100644 --- a/usr/src/uts/common/sys/idm/idm_impl.h +++ b/usr/src/uts/common/sys/idm/idm_impl.h @@ -21,6 +21,10 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. */ +/* + * Copyright 2011 Nexenta Systems, Inc. All rights reserved. + */ + #ifndef _IDM_IMPL_H_ #define _IDM_IMPL_H_ @@ -30,6 +34,7 @@ extern "C" { #include <sys/avl.h> #include <sys/socket_impl.h> +#include <sys/taskq_impl.h> /* * IDM lock order: @@ -373,6 +378,9 @@ typedef struct idm_pdu_s { uint_t isp_hdrbuflen; uint_t isp_databuflen; time_t isp_queue_time; + + /* Taskq dispatching state for deferred PDU */ + taskq_ent_t isp_tqent; } idm_pdu_t; /* |