All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@purestorage.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: target-devel <target-devel@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>,
	Andrew Vasquez <andrew.vasquez@qlogic.com>,
	Giridhar Malavali <giridhar.malavali@qlogic.com>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <JBottomley@parallels.com>,
	Joern Engel <joern@logfs.org>,
	Madhuranath Iyengar <mni@risingtidesystems.com>
Subject: Re: [RFC-v4 3/3] qla2xxx: Add tcm_qla2xxx fabric module for mainline target
Date: Mon, 2 Jan 2012 13:38:35 -0800	[thread overview]
Message-ID: <CAL1RGDX2FkenDkJxkB2hcj1hyqfsTJF2O0tygpwHNRgHupSsBw@mail.gmail.com> (raw)
In-Reply-To: <1324677068.16979.103.camel@haakon2.linux-iscsi.org>

On Fri, Dec 23, 2011 at 1:51 PM, Nicholas A. Bellinger
<nab@linux-iscsi.org> wrote:
> So the (t_transport_complete == 0) check causing the issue above should
> be safe to remove now..  The same is true for the !cmd->se_cmd.se_dev
> check in tcm_qla2xxx_free_cmd() as well.

Basically you're saying the following is the right fix?

--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -401,21 +401,6 @@ static void tcm_qla2xxx_complete_free(struct
work_struct *work)
  */
 void tcm_qla2xxx_free_cmd(struct qla_tgt_cmd *cmd)
 {
-       barrier();
-       /*
-        * Handle tcm_qla2xxx_init_cmd() -> transport_get_lun_for_cmd()
-        * failure case where cmd->se_cmd.se_dev was not assigned, and
-        * a call to transport_generic_free_cmd_intr() is not possible..
-        */
-       if (!cmd->se_cmd.se_dev) {
-               target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd);
-               transport_generic_free_cmd(&cmd->se_cmd, 0);
-               return;
-       }
-
-       if (!atomic_read(&cmd->se_cmd.t_transport_complete))
-               target_put_sess_cmd(cmd->se_cmd.se_sess, &cmd->se_cmd);
-
        INIT_WORK(&cmd->work, tcm_qla2xxx_complete_free);
        queue_work(tcm_qla2xxx_free_wq, &cmd->work);
 }

(I'm deleting the barrier() as part of this too because it's almost certainly
wrong... an indirect call through a function pointer that gets here is just
as much of a compiler optimization barrier anyway).

 - R.
--
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

  reply	other threads:[~2012-01-02 21:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-18  2:02 [RFC-v4 0/3] qla2xxx: v3.4 target mode LLD changes + tcm_qla2xxx fabric module Nicholas A. Bellinger
2011-12-18  2:02 ` [RFC-v4 1/3] qla2xxx: Add LLD internal target-mode support Nicholas A. Bellinger
2011-12-19 22:59   ` Roland Dreier
2011-12-21 21:48     ` Nicholas A. Bellinger
2011-12-21 22:46       ` Roland Dreier
2011-12-18  2:02 ` [RFC-v4 2/3] qla2xxx: Enable 2xxx series LLD target mode support Nicholas A. Bellinger
2011-12-18  2:02 ` [RFC-v4 3/3] qla2xxx: Add tcm_qla2xxx fabric module for mainline target Nicholas A. Bellinger
2011-12-22  8:10   ` Roland Dreier
2011-12-23 21:51     ` Nicholas A. Bellinger
2012-01-02 21:38       ` Roland Dreier [this message]
2012-01-10  0:24         ` Nicholas A. Bellinger
2011-12-21 17:11 ` [RFC-v4 0/3] qla2xxx: v3.4 target mode LLD changes + tcm_qla2xxx fabric module Christoph Hellwig
2011-12-22 22:25   ` Andrew Vasquez
2011-12-23 21:59     ` 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=CAL1RGDX2FkenDkJxkB2hcj1hyqfsTJF2O0tygpwHNRgHupSsBw@mail.gmail.com \
    --to=roland@purestorage.com \
    --cc=JBottomley@parallels.com \
    --cc=andrew.vasquez@qlogic.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=hch@lst.de \
    --cc=joern@logfs.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mni@risingtidesystems.com \
    --cc=nab@linux-iscsi.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.