public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Hannes Reinecke <hare@suse.de>, Jinpu Wang <jinpu.wang@profitbricks.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@infradead.org>,
	linux-scsi@vger.kernel.org,
	Sebastian Parschauer <s.parschauer@gmx.de>,
	Bart Van Assche <bart.vanassche@sandisk.com>
Subject: Re: [PATCHv2]sd: Don't treat succeeded SYNC as error
Date: Wed, 11 May 2016 08:05:20 -0700	[thread overview]
Message-ID: <1462979120.2356.4.camel@HansenPartnership.com> (raw)
In-Reply-To: <1462949004.2674.6.camel@linux.vnet.ibm.com>

On Tue, 2016-05-10 at 23:43 -0700, James Bottomley wrote:
> On Wed, 2016-05-11 at 08:21 +0200, Hannes Reinecke wrote:
[..]
> > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> > index 7cb66b0..68c0e74 100644
> > --- a/drivers/scsi/scsi_lib.c
> > +++ b/drivers/scsi/scsi_lib.c
> > @@ -693,7 +693,7 @@ static bool scsi_end_request(struct request
> > *req, int error,
> >         struct scsi_device *sdev = cmd->device;
> >         struct request_queue *q = sdev->request_queue;
> > 
> > -       if (blk_update_request(req, error, bytes))
> > +       if (bytes && blk_update_request(req, error, bytes))
> >                 return true;
> 
> Um, I think you mean 
> 
> if (bytes == 0 || blk_update_request())

Actually, even this would be wrong.  We expect scsi_end_request called
with blk_rq_bytes() to complete the request and return false.  If you
do the above, it won't and we'll trigger a BUG lower down (or retry
forever).

James



  reply	other threads:[~2016-05-11 15:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-29 12:49 [PATCHv2]sd: Don't treat succeeded SYNC as error Jinpu Wang
2016-05-02 10:05 ` Hannes Reinecke
2016-05-02 13:44   ` James Bottomley
2016-05-02 13:57     ` James Bottomley
2016-05-04 17:02     ` Jinpu Wang
2016-05-09 16:41       ` Jinpu Wang
2016-05-10 14:48         ` Jinpu Wang
2016-05-10 15:08           ` James Bottomley
2016-05-10 15:46             ` Jinpu Wang
2016-05-10 16:00               ` James Bottomley
2016-05-11  8:21                 ` Jinpu Wang
2016-05-11  6:21             ` Hannes Reinecke
2016-05-11  6:43               ` James Bottomley
2016-05-11 15:05                 ` James Bottomley [this message]
2016-05-12 13:22                   ` Jinpu Wang

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=1462979120.2356.4.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=hare@suse.de \
    --cc=hch@infradead.org \
    --cc=jinpu.wang@profitbricks.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=s.parschauer@gmx.de \
    /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