Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-28 Thread Bart Van Assche
On Tue, 2017-11-28 at 12:04 +0300, Pavel Tikhomirov wrote: > 1-st, Stuart - thanks for adding me to CC, 2-nd Bart - no idea why you > didn't? =) That must have been an oversight. Sorry that I had not added you to the Cc-list. I will add you to the Cc-list when I post the next version of this

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-28 Thread Pavel Tikhomirov
Resend again, Added proper in-reply-to, finally, sorry for my mailing skills. 1-st, Stuart - thanks for adding me to CC, 2-nd Bart - no idea why you didn't? =) If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-28 Thread Pavel Tikhomirov
Sorry, missed the thread, resending. 1-st, Stuart - thanks for adding me to CC, 2-nd Bart - no idea why you didn't? =) If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that neither function wakes up the SCSI error

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-28 Thread Pavel Tikhomirov
1-st, Stuart - thanks for adding me to CC, 2-nd Bart - no idea why you didn't? =) If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that neither function wakes up the SCSI error handler. Fix this by making every function

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-27 Thread Bart Van Assche
On Mon, 2017-11-27 at 15:53 -0600, Stuart Hayes wrote: > Could you modify this patch to make scsi_dec_host_busy() get the spin lock > right before checking host_failed instead of right after, like Pavel's patch, > to protect against this? Hello Stuart, Thanks for the feedback. I will look into

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-27 Thread Stuart Hayes
For what it's worth, this does not fix the problem that both Pavel's original patch (https://patchwork.kernel.org/patch/9938919/) and the patch I submitted (https://patchwork.kernel.org/patch/10067059/) would fix. I verified that this patch still fails on my system. The only problem I am able

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-27 Thread Bart Van Assche
On Thu, 2017-11-23 at 09:18 +0100, Christoph Hellwig wrote: > > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > > index 5e89049e9b4e..f7f014c755d7 100644 > > --- a/drivers/scsi/scsi_error.c > > +++ b/drivers/scsi/scsi_error.c > > @@ -61,9 +61,10 @@ static int

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-23 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH] Ensure that the SCSI error handler gets woken up

2017-11-23 Thread Christoph Hellwig
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > index 5e89049e9b4e..f7f014c755d7 100644 > --- a/drivers/scsi/scsi_error.c > +++ b/drivers/scsi/scsi_error.c > @@ -61,9 +61,10 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd); > static int scsi_try_to_abort_cmd(struct

[PATCH] Ensure that the SCSI error handler gets woken up

2017-11-22 Thread Bart Van Assche
If scsi_eh_scmd_add() is called concurrently with scsi_host_queue_ready() while shost->host_blocked > 0 then it can happen that neither function wakes up the SCSI error handler. Fix this by making every function that decreases the host_busy counter to wake up the error handler if necessary.