All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
To: thenzl@redhat.com, cleech@redhat.com, lduncan@suse.com
Cc: linux-scsi@vger.kernel.org,
	Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Subject: [PATCH v3 04/10] scsi_transport_iscsi: Use flush_work in iscsi_remove_session
Date: Fri, 24 Mar 2017 14:11:43 +0530	[thread overview]
Message-ID: <1490344909-29541-5-git-send-email-jitendra.bhivare@broadcom.com> (raw)
In-Reply-To: <1490344909-29541-1-git-send-email-jitendra.bhivare@broadcom.com>

scsi_flush_work flushes workqueue for the Scsi_Host.
In iSCSI offload enabled host, this would wait for all other
sessions under the host.

Use flush_work for the session being removed instead.

Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
---
 drivers/scsi/scsi_transport_iscsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 568c9f2..a424eae 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -2158,7 +2158,6 @@ static int iscsi_iter_destroy_conn_fn(struct device *dev, void *data)
 
 void iscsi_remove_session(struct iscsi_cls_session *session)
 {
-	struct Scsi_Host *shost = iscsi_session_to_shost(session);
 	unsigned long flags;
 	int err;
 
@@ -2185,7 +2184,7 @@ void iscsi_remove_session(struct iscsi_cls_session *session)
 
 	scsi_target_unblock(&session->dev, SDEV_TRANSPORT_OFFLINE);
 	/* flush running scans then delete devices */
-	scsi_flush_work(shost);
+	flush_work(&session->scan_work);
 	__iscsi_unbind_session(&session->unbind_work);
 
 	/* hw iscsi may not have removed all connections from session */
-- 
2.7.4

  parent reply	other threads:[~2017-03-24  8:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  8:41 [PATCH v3 00/10] be2iscsi: driver update 11.4.0.0 Jitendra Bhivare
2017-03-24  8:41 ` [PATCH v3 01/10] be2iscsi: Check tag in beiscsi_mccq_compl_wait Jitendra Bhivare
2017-03-24  8:41 ` [PATCH v3 02/10] be2iscsi: Fix closing of connection Jitendra Bhivare
2017-03-24 13:17   ` Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 03/10] be2iscsi: Replace spin_unlock_bh with spin_lock Jitendra Bhivare
2017-03-24  8:41 ` Jitendra Bhivare [this message]
2017-03-24 17:22   ` [PATCH v3 04/10] scsi_transport_iscsi: Use flush_work in iscsi_remove_session Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 05/10] be2iscsi: Increase HDQ default queue size Jitendra Bhivare
2017-03-24 17:23   ` Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 06/10] be2iscsi: Use num_cons field in Rx CQE Jitendra Bhivare
2017-03-24 17:17   ` Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 07/10] be2iscsi: Remove free_list for ASYNC handles Jitendra Bhivare
2017-03-24 17:18   ` Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 08/10] be2iscsi: Check size before copying ASYNC handle Jitendra Bhivare
2017-03-24 17:19   ` Tomas Henzl
2017-03-24  8:41 ` [PATCH v3 09/10] be2iscsi: Update Copyright Jitendra Bhivare
2017-03-24  8:41 ` [PATCH v3 10/10] be2iscsi: Update driver version Jitendra Bhivare
2017-03-24 17:19   ` Tomas Henzl
2017-03-24 16:52 ` [PATCH v3 00/10] be2iscsi: driver update 11.4.0.0 Chris Leech
2017-03-28  2:04 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490344909-29541-5-git-send-email-jitendra.bhivare@broadcom.com \
    --to=jitendra.bhivare@broadcom.com \
    --cc=cleech@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.