From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@daterainc.com>
Cc: target-devel <target-devel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Quinn Tran <quinn.tran@qlogic.com>,
Himanshu Madhani <himanshu.madhani@qlogic.com>,
Sagi Grimberg <sagig@mellanox.com>,
Christoph Hellwig <hch@lst.de>, Hannes Reinecke <hare@suse.de>,
Andy Grover <agrover@redhat.com>,
Mike Christie <mchristi@redhat.com>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: Re: [PATCH-v2 1/3] target: Fix LUN_RESET active I/O handling for ACK_KREF
Date: Tue, 26 Jan 2016 18:19:00 +0100 [thread overview]
Message-ID: <20160126171900.GA3663@lst.de> (raw)
In-Reply-To: <1453513067-23169-2-git-send-email-nab@daterainc.com>
> +static bool __target_check_io_state(struct se_cmd *se_cmd)
> +{
> + struct se_session *sess = se_cmd->se_sess;
> +
> + assert_spin_locked(&se_session->sess_cmd_lock);
> + WARN_ON_ONCE(!irqs_disabled());
Btw, I looked a the code and can't really see what sess_cmd_lock is
supposed to protect here.
> + sess = cmd->se_sess;
> + if (WARN_ON_ONCE(!sess))
> + continue;
> +
> + spin_lock(&sess->sess_cmd_lock);
> + rc = __target_check_io_state(cmd);
> + spin_unlock(&sess->sess_cmd_lock);
> + if (!rc) {
> + printk("LUN_RESET I/O: non-zero kref_get_unless_zero\n");
> + continue;
> + }
And thus why we care about taking it here.
next prev parent reply other threads:[~2016-01-26 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 1:37 [PATCH-v2 0/3] target: Fix LUN_RESET active I/O + TMR handling Nicholas A. Bellinger
2016-01-23 1:37 ` [PATCH-v2 1/3] target: Fix LUN_RESET active I/O handling for ACK_KREF Nicholas A. Bellinger
2016-01-26 17:19 ` Christoph Hellwig [this message]
2016-01-28 5:34 ` Nicholas A. Bellinger
2016-01-28 17:00 ` Sagi Grimberg
2016-01-23 1:37 ` [PATCH-v2 2/3] target: Fix LUN_RESET active TMR descriptor handling Nicholas A. Bellinger
2016-01-26 17:21 ` Christoph Hellwig
2016-01-23 1:37 ` [PATCH-v2 3/3] target: Fix TAS handling for multi-session se_node_acls Nicholas A. Bellinger
2016-01-26 17:22 ` Christoph Hellwig
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=20160126171900.GA3663@lst.de \
--to=hch@lst.de \
--cc=agrover@redhat.com \
--cc=hare@suse.de \
--cc=himanshu.madhani@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mchristi@redhat.com \
--cc=nab@daterainc.com \
--cc=nab@linux-iscsi.org \
--cc=quinn.tran@qlogic.com \
--cc=sagig@mellanox.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).