From: Hannes Reinecke <hare@suse.de>
To: Himanshu Madhani <himanshu.madhani@qlogic.com>, jbottomley@parallels.com
Cc: hch@lst.de, giridhar.malavali@qlogic.com,
andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org,
target-devel@vger.kernel.org
Subject: Re: [PATCH v2 2/8] qla2xxx: cleanup cmd in qla workqueue before processing TMR
Date: Mon, 27 Jul 2015 10:11:48 +0200 [thread overview]
Message-ID: <55B5E7C4.7090401@suse.de> (raw)
In-Reply-To: <1436904049-27707-3-git-send-email-himanshu.madhani@qlogic.com>
On 07/14/2015 10:00 PM, Himanshu Madhani wrote:
> From: Swapnil Nagle <swapnil.nagle@purestorage.com>
>
> Since cmds go into qla_tgt_wq and TMRs don't, it's possible that TMR
> like TASK_ABORT can be queued over the cmd for which it was meant.
> To avoid this race, use a per-port list to keep track of cmds that
> are enqueued to qla_tgt_wq but not yet processed. When a TMR arrives,
> iterate through this list and remove any cmds that match the TMR.
> This patch supports TASK_ABORT and LUN_RESET.
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Swapnil Nagle <swapnil.nagle@purestorage.com>
> Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
> Acked-by: Quinn Tran <quinn.tran@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
[ .. ]
> @@ -3374,14 +3462,25 @@ static void qlt_create_sess_from_atio(struct work_struct *work)
> unsigned long flags;
> uint8_t *s_id = op->atio.u.isp24.fcp_hdr.s_id;
>
> + spin_lock_irqsave(&vha->cmd_list_lock, flags);
> + list_del(&op->cmd_list);
> + spin_unlock_irqrestore(&vha->cmd_list_lock, flags);
> +
> + if (op->aborted) {
> + ql_dbg(ql_dbg_tgt_mgt, vha, 0xf083,
> + "sess_op with tag %u is aborted\n",
> + op->atio.u.isp24.exchange_addr);
> + goto out_term;
> + }
> +
> ql_dbg(ql_dbg_tgt_mgt, vha, 0xf022,
> - "qla_target(%d): Unable to find wwn login"
> - " (s_id %x:%x:%x), trying to create it manually\n",
> - vha->vp_idx, s_id[0], s_id[1], s_id[2]);
> + "qla_target(%d): Unable to find wwn login"
> + " (s_id %x:%x:%x), trying to create it manually\n",
> + vha->vp_idx, s_id[0], s_id[1], s_id[2]);
>
> if (op->atio.u.raw.entry_count > 1) {
> ql_dbg(ql_dbg_tgt_mgt, vha, 0xf023,
> - "Dropping multy entry atio %p\n", &op->atio);
> + "Dropping multy entry atio %p\n", &op->atio);
> goto out_term;
> }
>
Pointless indentation change.
Other than that:
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-07-27 8:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 20:00 [PATCH v2 0/8] qla2xxx: Updates for Target Mode driver Himanshu Madhani
2015-07-14 20:00 ` [PATCH v2 1/8] qla2xxx: kill sessions/log out initiator on RSCN and port down events Himanshu Madhani
2015-07-27 8:09 ` Hannes Reinecke
2015-07-27 18:09 ` Roland Dreier
2015-07-28 5:54 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 2/8] qla2xxx: cleanup cmd in qla workqueue before processing TMR Himanshu Madhani
2015-07-27 8:11 ` Hannes Reinecke [this message]
2015-07-14 20:00 ` [PATCH v2 3/8] qla2xxx: delay plogi/prli ack until existing sessions are deleted Himanshu Madhani
2015-07-27 8:14 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 4/8] qla2xxx: Abort stale cmds on qla_tgt_wq when plogi arrives Himanshu Madhani
2015-07-27 8:14 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 5/8] qla2xxx: added sess generations to detect RSCN update races Himanshu Madhani
2015-07-27 8:16 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 6/8] qla2xxx: disable scsi_transport_fc registration in target mode Himanshu Madhani
2015-07-27 8:17 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 7/8] qla2xxx: drop cmds/tmrs arrived while session is being deleted Himanshu Madhani
2015-07-27 8:17 ` Hannes Reinecke
2015-07-14 20:00 ` [PATCH v2 8/8] qla2xxx: terminate exchange when command is aborted by LIO Himanshu Madhani
2015-07-27 8:18 ` Hannes Reinecke
2015-07-24 7:38 ` [PATCH v2 0/8] qla2xxx: Updates for Target Mode driver Nicholas A. Bellinger
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=55B5E7C4.7090401@suse.de \
--to=hare@suse.de \
--cc=andrew.vasquez@qlogic.com \
--cc=giridhar.malavali@qlogic.com \
--cc=hch@lst.de \
--cc=himanshu.madhani@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
--cc=target-devel@vger.kernel.org \
/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.