public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Mike Christie <michael.christie@oracle.com>
Cc: <mlombard@redhat.com>, <martin.petersen@oracle.com>,
	<linux-scsi@vger.kernel.org>, <target-devel@vger.kernel.org>
Subject: Re: [PATCH 6/7] scsi: target: drop tas arg from __transport_wait_for_tasks
Date: Thu, 8 Dec 2022 12:24:42 +0300	[thread overview]
Message-ID: <20221208092442.GC15327@yadro.com> (raw)
In-Reply-To: <20221208031002.106700-7-michael.christie@oracle.com>

On Wed, Dec 07, 2022 at 09:10:01PM -0600, Mike Christie wrote:
> 
> The tas arg is no longer used by callers of __transport_wait_for_tasks
> so drop it.
> 
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
>  drivers/target/target_core_transport.c | 20 ++++++++------------
>  1 file changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index 8bbf0c834b74..d42ba260f197 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -2902,15 +2902,14 @@ static void transport_write_pending_qf(struct se_cmd *cmd)
>  }
> 
>  static bool
> -__transport_wait_for_tasks(struct se_cmd *, bool, bool *, bool *,
> -                          unsigned long *flags);
> +__transport_wait_for_tasks(struct se_cmd *, bool, bool *, unsigned long *flags);
> 
> -static void target_wait_free_cmd(struct se_cmd *cmd, bool *aborted, bool *tas)
> +static void target_wait_free_cmd(struct se_cmd *cmd, bool *aborted)
>  {
>         unsigned long flags;
> 
>         spin_lock_irqsave(&cmd->t_state_lock, flags);
> -       __transport_wait_for_tasks(cmd, true, aborted, tas, &flags);
> +       __transport_wait_for_tasks(cmd, true, aborted, &flags);
>         spin_unlock_irqrestore(&cmd->t_state_lock, flags);
>  }
> 
> @@ -2955,10 +2954,10 @@ int transport_generic_free_cmd(struct se_cmd *cmd, int wait_for_tasks)
>  {
>         DECLARE_COMPLETION_ONSTACK(compl);
>         int ret = 0;
> -       bool aborted = false, tas = false;
> +       bool aborted = false;
> 
>         if (wait_for_tasks)
> -               target_wait_free_cmd(cmd, &aborted, &tas);
> +               target_wait_free_cmd(cmd, &aborted);
> 
>         if (cmd->se_cmd_flags & SCF_SE_LUN_CMD) {
>                 /*
> @@ -3237,7 +3236,7 @@ void transport_clear_lun_ref(struct se_lun *lun)
> 
>  static bool
>  __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
> -                          bool *aborted, bool *tas, unsigned long *flags)
> +                          bool *aborted, unsigned long *flags)
>         __releases(&cmd->t_state_lock)
>         __acquires(&cmd->t_state_lock)
>  {
> @@ -3249,9 +3248,6 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
>         if (cmd->transport_state & CMD_T_ABORTED)
>                 *aborted = true;
> 
> -       if (cmd->transport_state & CMD_T_TAS)
> -               *tas = true;
> -
>         if (!(cmd->se_cmd_flags & SCF_SE_LUN_CMD) &&
>             !(cmd->se_cmd_flags & SCF_SCSI_TMR_CDB))
>                 return false;
> @@ -3292,10 +3288,10 @@ __transport_wait_for_tasks(struct se_cmd *cmd, bool fabric_stop,
>  bool transport_wait_for_tasks(struct se_cmd *cmd)
>  {
>         unsigned long flags;
> -       bool ret, aborted = false, tas = false;
> +       bool ret, aborted = false;
> 
>         spin_lock_irqsave(&cmd->t_state_lock, flags);
> -       ret = __transport_wait_for_tasks(cmd, false, &aborted, &tas, &flags);
> +       ret = __transport_wait_for_tasks(cmd, false, &aborted, &flags);
>         spin_unlock_irqrestore(&cmd->t_state_lock, flags);
> 
>         return ret;
> --
> 2.25.1
> 
>

Reviewed-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
 


  reply	other threads:[~2022-12-08  9:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08  3:09 [PATCH 0/7] scsi target task management fixes Mike Christie
2022-12-08  3:09 ` [PATCH 1/7] scsi: target: Move sess cmd counter to new struct Mike Christie
2022-12-08  3:09 ` [PATCH 2/7] scsi: target: Move cmd counter allocation Mike Christie
2022-12-08  3:09 ` [PATCH 3/7] scsi: target: Pass in cmd counter to use during cmd setup Mike Christie
2022-12-08  3:09 ` [PATCH 4/7] scsi: target: iscsit: Alloc per conn cmd counter Mike Christie
2022-12-08  3:10 ` [PATCH 5/7] scsi: target: iscsit/isert: stop/wait on cmds during conn close Mike Christie
2022-12-09 12:32   ` Dmitry Bogdanov
2022-12-10 18:48     ` Mike Christie
2022-12-11  1:38       ` Mike Christie
2023-01-12  3:11         ` Mike Christie
2022-12-11  1:20   ` Mike Christie
2022-12-08  3:10 ` [PATCH 6/7] scsi: target: drop tas arg from __transport_wait_for_tasks Mike Christie
2022-12-08  9:24   ` Dmitry Bogdanov [this message]
2022-12-08  3:10 ` [PATCH 7/7] scsi: target: Fix multiple LUN_RESET handling Mike Christie
2022-12-08  9:21   ` Dmitry Bogdanov

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=20221208092442.GC15327@yadro.com \
    --to=d.bogdanov@yadro.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox