From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: Bodo Stroesser <bostroesser@gmail.com>,
Maurizio Lombardi <mlombard@redhat.com>,
<target-devel@vger.kernel.org>
Subject: Re: tcm_loop and aborted TMRs
Date: Fri, 25 Nov 2022 12:34:10 +0300 [thread overview]
Message-ID: <20221125084920.GC5248@yadro.com> (raw)
In-Reply-To: <addec585-4271-cd9c-fcf0-fd780f269aa8@oracle.com>
On Mon, Nov 21, 2022 at 01:25:55PM -0600, Mike Christie wrote:
>
> On 11/21/22 7:35 AM, Dmitry Bogdanov wrote:
> >>
> > I will vote to your old patch. qla2xxx was fixed long time ago.
>
> What is the qla fix? I think we still leak. In commit
>
> commit 605e74025f953b995a3a241ead43bde71c1c99b5
> Author: Mike Christie <michael.christie@oracle.com>
> Date: Sun Nov 1 12:59:31 2020 -0600
>
> scsi: qla2xxx: Move sess cmd list/lock to driver
>
> when I changed the locking I had added the check:
>
> static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
> {
> struct qla_tgt_cmd *cmd;
> unsigned long flags;
>
> if (se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB)
> return;
>
Yes, I was thinking about that commit.
> because tmrs are not on the sess_cmd_list that's accessed the
> next line down. We don't crash as a result, but I think we need
> to add code to send the cleanup command to the FW. Bodo and I
> were working on that part, but someone with more qla experience
> needed to work on it so it could be properly tested. We didn't
> hear back from the qla engineers so progress had stalled.
>
Yes, you are right, FW expects some response on every ABORT IOCB
to clear its resources.
I can prepare the patch for qla2xxx.
But still, I do not see a sense of new Bodo's solution.
Calling target_put_sess_cmd due to SCF_ACK_REF forbids any async long
term work in fabric drivers in aborted_task callback. It is
intentionally. qla2xxx does not require to wait for the completion of
all requests to FW. All terminate exchange requests are such.
SAM-5 states that an aborted(due to LUN_RESET) TMR should not be
responded to initiator:
7.11 Task management function lifetime
The task management function shall exist until:
a) the task manager sends a service response for the task management function;
b) an I_T nexus loss (see 6.3.4);
* c) a logical unit reset (see 6.3.3);
d) a hard reset (see 6.3.2);
e) power loss expected (see 6.3.5); or
f) a power on condition (see 6.3.1)
BR,
Dmitry
next prev parent reply other threads:[~2022-11-25 9:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 16:20 tcm_loop and aborted TMRs Maurizio Lombardi
2022-11-11 16:21 ` Maurizio Lombardi
2022-11-11 21:18 ` Mike Christie
2022-11-12 13:59 ` Bodo Stroesser
2022-11-12 21:46 ` michael.christie
2022-11-19 11:42 ` Bodo Stroesser
2022-11-21 13:35 ` Dmitry Bogdanov
2022-11-21 19:25 ` Mike Christie
2022-11-25 9:34 ` Dmitry Bogdanov [this message]
2022-11-27 18:59 ` Mike Christie
2022-12-01 14:15 ` Bodo Stroesser
2022-12-08 3:45 ` Mike Christie
2024-07-24 13:42 ` Gao Xiang
2024-07-30 21:40 ` michael.christie
2024-07-31 13:49 ` Gao Xiang
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=20221125084920.GC5248@yadro.com \
--to=d.bogdanov@yadro.com \
--cc=bostroesser@gmail.com \
--cc=michael.christie@oracle.com \
--cc=mlombard@redhat.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 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.