public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: John Garry <john.g.garry@oracle.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	linux-scsi@vger.kernel.org, Niklas Cassel <Niklas.Cassel@wdc.com>,
	Damien Le Moal <damien.lemoal@opensource.wdc.com>
Subject: Re: [External] : [PATCH] scsi_error: do not queue pointless abort workqueue functions
Date: Wed, 9 Nov 2022 13:48:23 +0100	[thread overview]
Message-ID: <8eca30f9-1191-e92e-1c48-bf73f14850e6@suse.de> (raw)
In-Reply-To: <bc23a83b-af57-0920-4155-cf6aa4057a60@oracle.com>

On 11/9/22 09:28, John Garry wrote:
> On 09/11/2022 07:47, Hannes Reinecke wrote:
>> If a host template doesn't implement the .eh_abort_handler()
>> there is no point in queueing the abort workqueue function;
>> all it does is invoking SCSI EH anyway.
>> So return 'FAILED' from scsi_abort_command() if the .eh_abort_handler()
>> is not implemented and save us from having to wait for the
>> abort workqueue function to complete.
> 
> Do we ever use shost->tmf_work_q in this case? Doesn't seem much point 
> in allocating it, apart from keeping the code simpler
> 
Actually, no. Guess we can skip allocating it.

>>
>> Cc: Niklas Cassel <Niklas.Cassel@wdc.com>
>> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
>> Cc: John Garry <john.garry@oracle.com>
> 
> That's someone else :)
> 
Oh. Sorry, John :-)

>> Signed-off-by: Hannes Reinecke <hare@suse.de>
>> ---
>>   drivers/scsi/scsi_error.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
>> index be2a70c5ac6d..e9f9c8f52c59 100644
>> --- a/drivers/scsi/scsi_error.c
>> +++ b/drivers/scsi/scsi_error.c
>> @@ -242,6 +242,11 @@ scsi_abort_command(struct scsi_cmnd *scmd)
>>           return FAILED;
>>       }
>> +    if (!shost->hostt->eh_abort_handler) {
> 
> nit: no need for {}, but maybe better put comment above the check if 
> removing it. However maybe it's also a bit obvious comment.
> 
Yeah, will do.

>> +        /* No abort handler, fail command directly */
>> +        return FAILED;
>> +    }
>> +
>>       spin_lock_irqsave(shost->host_lock, flags);
>>       if (shost->eh_deadline != -1 && !shost->last_reset)
>>           shost->last_reset = jiffies;
> 
Cheers,

Hannes
-- 
Dr. Hannes Reinecke		           Kernel Storage Architect
hare@suse.de			                  +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer


  reply	other threads:[~2022-11-09 12:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-09  7:47 [PATCH] scsi_error: do not queue pointless abort workqueue functions Hannes Reinecke
2022-11-09  8:28 ` [External] : " John Garry
2022-11-09 12:48   ` Hannes Reinecke [this message]
2022-11-09  9:29 ` Niklas Cassel
2022-11-10 10:38 ` Niklas Cassel

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=8eca30f9-1191-e92e-1c48-bf73f14850e6@suse.de \
    --to=hare@suse.de \
    --cc=Niklas.Cassel@wdc.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=john.g.garry@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /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