All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH 10/14] target: Simplify the code for waiting for command completion
Date: Mon, 11 Jun 2018 21:05:57 +0000	[thread overview]
Message-ID: <5B1EE435.8060607@redhat.com> (raw)
In-Reply-To: <20180301222632.31507-11-bart.vanassche@wdc.com>

On 06/11/2018 03:37 PM, Bart Van Assche wrote:
> On Mon, 2018-06-11 at 14:02 -0500, Mike Christie wrote:
>> I see that in the current code we always do a wait if the CMD_T_ABORTED
>> bit was set, so your patch matches that. However, is the original code
>> correct? In target_release_cmd_kref below we only do a wake up if both
>> CMD_T_FABRIC_STOP and CMD_T_ABORTED is set. If wait_for_tasksúlse and
>> CMD_T_ABORTED was set, we would end up waiting forever. Is that right or
>> can it never happen?
> 
> Hello Mike,
> 
> transport_generic_free_cmd() calls target_wait_free_cmd() before waiting
> on cmd->cmd_wait_comp for aborted commands. target_wait_free_cmd() calls
> __transport_wait_for_tasks() with the fabric_stop argument set to true
> and that causes the CMD_T_FABRIC_STOP flag to be set.
>

Yeah, I see it's always set together now. Just misread the code.

      parent reply	other threads:[~2018-06-11 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 22:26 [PATCH 10/14] target: Simplify the code for waiting for command completion Bart Van Assche
2018-06-11 19:02 ` Mike Christie
2018-06-11 20:37 ` Bart Van Assche
2018-06-11 21:05 ` Mike Christie [this message]

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=5B1EE435.8060607@redhat.com \
    --to=mchristi@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.