public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "hare@suse.de" <hare@suse.de>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"james.bottomley@hansenpartnership.com"
	<james.bottomley@hansenpartnership.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"hare@suse.com" <hare@suse.com>
Subject: Re: [PATCHv6 8/8] scsi: inline command aborts
Date: Tue, 11 Apr 2017 00:19:17 +0000	[thread overview]
Message-ID: <1491869956.4199.35.camel@sandisk.com> (raw)
In-Reply-To: <1491485796-44411-9-git-send-email-hare@suse.de>

On Thu, 2017-04-06 at 15:36 +0200, Hannes Reinecke wrote:
> The block layer always calls the timeout function from a workqueue
> context, so there is no need to have yet another workqueue for
> running command aborts.
> 
> [ ... ]
> @@ -271,10 +266,14 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
>  		rtn = host->hostt->eh_timed_out(scmd);
>  
>  	if (rtn == BLK_EH_NOT_HANDLED) {
> -		if (scsi_abort_command(scmd) != SUCCESS) {
> +		int ret;
> +
> +		ret = scsi_abort_command(scmd);
> +		if (ret == FAILED) {
>  			set_host_byte(scmd, DID_TIME_OUT);
>  			scsi_eh_scmd_add(scmd);
> -		}
> +		} else if (ret == FAST_IO_FAIL)
> +			rtn = BLK_EH_RESET_TIMER;
>  	}

Has this patch been tested with the traditional block layer? For the
traditional block layer scsi_times_out() is called with the queue lock
held. Does this patch cause .eh_abort_handler(), a function that may
sleep, to be called with the queue lock held?

Bart.

  parent reply	other threads:[~2017-04-11  0:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 13:36 [PATCHv6 0/8] SCSI EH cleanup Hannes Reinecke
2017-04-06 13:36 ` [PATCHv6 1/8] scsi_error: count medium access timeout only once per EH run Hannes Reinecke
2017-04-06 13:36 ` [PATCHv6 2/8] sd: Return SUCCESS in sd_eh_action() after device offline Hannes Reinecke
2017-04-10 23:54   ` Bart Van Assche
2017-04-06 13:36 ` [PATCHv6 3/8] scsi: always send command aborts Hannes Reinecke
2017-04-10 23:56   ` Bart Van Assche
2017-04-06 13:36 ` [PATCHv6 4/8] libsas: allow async aborts Hannes Reinecke
2017-04-06 13:36 ` [PATCHv6 5/8] scsi: make eh_eflags persistent Hannes Reinecke
2017-04-10 23:58   ` Bart Van Assche
2017-04-06 13:36 ` [PATCHv6 6/8] scsi: make scsi_eh_scmd_add() always succeed Hannes Reinecke
2017-04-06 13:36 ` [PATCHv6 7/8] scsi: make asynchronous aborts mandatory Hannes Reinecke
2017-04-06 13:36 ` [PATCHv6 8/8] scsi: inline command aborts Hannes Reinecke
2017-04-10  7:53   ` Christoph Hellwig
2017-04-11  0:19   ` Bart Van Assche [this message]
2017-04-20  2:14     ` Martin K. Petersen
2017-04-24 12:41       ` Hannes Reinecke
2017-04-06 17:09 ` [PATCHv6 0/8] SCSI EH cleanup Martin K. Petersen
2017-04-06 17:52 ` Benjamin Block

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=1491869956.4199.35.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=hare@suse.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.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