linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
To: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	USB list <linux-usb@vger.kernel.org>,
	linux-block@vger.kernel.org,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: reeze while write on external usb 3.0 hard disk [Bug 204095]
Date: Sun, 13 Oct 2019 20:11:16 +0200	[thread overview]
Message-ID: <20191013181116.GA3858@lazy.lzy> (raw)
In-Reply-To: <20190930182501.GA4043@lazy.lzy>

On Mon, Sep 30, 2019 at 08:25:01PM +0200, Piergiorgio Sartor wrote:
> On Sun, Sep 29, 2019 at 09:01:48PM -0400, Alan Stern wrote:
> > On Sun, 29 Sep 2019, Piergiorgio Sartor wrote:
> > 
> > > On Wed, Sep 25, 2019 at 02:31:58PM -0400, Alan Stern wrote:
> > > > On Wed, 25 Sep 2019, Piergiorgio Sartor wrote:
> > > > 
> > > > > On Mon, Aug 26, 2019 at 07:38:33PM +0200, Piergiorgio Sartor wrote:
> > > > > > On Tue, Aug 20, 2019 at 06:37:22PM +0200, Piergiorgio Sartor wrote:
> > > > > > > On Tue, Aug 20, 2019 at 09:23:26AM +0200, Christoph Hellwig wrote:
> > > > > > > > On Mon, Aug 19, 2019 at 10:14:25AM -0400, Alan Stern wrote:
> > > > > > > > > Let's bring this to the attention of some more people.
> > > > > > > > > 
> > > > > > > > > It looks like the bug that was supposed to be fixed by commit
> > > > > > > > > d74ffae8b8dd ("usb-storage: Add a limitation for
> > > > > > > > > blk_queue_max_hw_sectors()"), which is part of 5.2.5, but apparently
> > > > > > > > > the bug still occurs.
> > > > > > > > 
> > > > > > > > Piergiorgio,
> > > > > > > > 
> > > > > > > > can you dump the content of max_hw_sectors_kb file for your USB storage
> > > > > > > > device and send that to this thread?
> > > > > > > 
> > > > > > > Hi all,
> > > > > > > 
> > > > > > > for both kernels, 5.1.20 (working) and 5.2.8 (not working),
> > > > > > > the content of /sys/dev/x:y/queue/max_hw_sectors_kb is 512
> > > > > > > for USB storage devices (2.0 and 3.0).
> > > > > > > 
> > > > > > > This is for the PC showing the issue.
> > > > > > > 
> > > > > > > In an other PC, which does not show the issus at the moment,
> > > > > > > the values are 120, for USB2.0, and 256, for USB3.0.
> > 
> > > > One thing you can try is git bisect from 5.1.20 (or maybe just 5.1.0)  
> > > > to 5.2.8.  If you can identify a particular commit which caused the
> > > > problem to start, that would help.
> > > 
> > > OK, I tried a bisect (2 days compilations...).
> > > Assuming I've done everything correctly (how to
> > > test this? How to remove the guilty patch?), this
> > > was the result:
> > > 
> > > 09324d32d2a0843e66652a087da6f77924358e62 is the first bad commit
> > > commit 09324d32d2a0843e66652a087da6f77924358e62
> > > Author: Christoph Hellwig <hch@lst.de>
> > > Date:   Tue May 21 09:01:41 2019 +0200
> > > 
> > >     block: force an unlimited segment size on queues with a virt boundary
> > > 
> > >     We currently fail to update the front/back segment size in the bio when
> > >     deciding to allow an otherwise gappy segement to a device with a
> > >     virt boundary.  The reason why this did not cause problems is that
> > >     devices with a virt boundary fundamentally don't use segments as we
> > >     know it and thus don't care.  Make that assumption formal by forcing
> > >     an unlimited segement size in this case.
> > > 
> > >     Fixes: f6970f83ef79 ("block: don't check if adjacent bvecs in one bio can be mergeable")
> > >     Signed-off-by: Christoph Hellwig <hch@lst.de>
> > >     Reviewed-by: Ming Lei <ming.lei@redhat.com>
> > >     Reviewed-by: Hannes Reinecke <hare@suse.com>
> > >     Signed-off-by: Jens Axboe <axboe@kernel.dk>
> > > 
> > > :040000 040000 57ba04a02f948022c0f6ba24bfa36f3b565b2440 8c925f71ce75042529c001bf244b30565d19ebf3 M      block
> > > 
> > > What to do now?
> > 
> > Here's how to verify that the bisection got a correct result.  First, 
> > do a git checkout of commit 09324d32d2a0, build the kernel, and make 
> > sure that it exhibits the problem.
> > 
> > Next, have git write out the contents of that commit in the form of a
> > patch (git show commit-id >patchfile), and revert it (git apply -R
> > patchfile).  Build the kernel from that tree, and make sure that it
> > does not exhibit the problem.  If it doesn't, you have definitely shown
> > that this commit is the cause (or at least, is _one_ of the causes).
> 
> I tried as suggested, i.e. jumping to commit
> 09324d32d2a0843e66652a087da6f77924358e62, testing,
> removing the patch, testing.
> The result was as expected.
> I was able to reproduce the issue with the commit,
> I was not able to reproduce it without.
> It seems this patch / commit is causing the problem.
> Directly or indirectly.
> 
> What are the next steps?

Hi all,

I tested kernel 5.3.5 (Fedora kernel-5.3.5-200.fc30.x86_64),
with same problematic results.

Again, what should be done now?
Could you please revert the patch?

Or is there something else to check?

Thanks,

bye,

-- 

piergiorgio

  reply	other threads:[~2019-10-13 18:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190817095422.GA4200@lazy.lzy>
2019-08-19 14:14 ` reeze while write on external usb 3.0 hard disk [Bug 204095] Alan Stern
2019-08-20  7:23   ` Christoph Hellwig
2019-08-20 16:37     ` Piergiorgio Sartor
2019-08-26 17:38       ` Piergiorgio Sartor
2019-08-29 14:08         ` Christoph Hellwig
2019-09-25 17:07         ` Piergiorgio Sartor
2019-09-25 18:31           ` Alan Stern
2019-09-27  9:04             ` Peter Chen
2019-09-29 20:13             ` Piergiorgio Sartor
2019-09-30  1:01               ` Alan Stern
2019-09-30 18:25                 ` Piergiorgio Sartor
2019-10-13 18:11                   ` Piergiorgio Sartor [this message]
2019-10-16 17:01                     ` Alan Stern
2019-10-17 17:53                       ` Piergiorgio Sartor
2019-10-17 19:23                         ` Alan Stern
2019-11-08 23:05                           ` Piergiorgio Sartor

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=20191013181116.GA3858@lazy.lzy \
    --to=piergiorgio.sartor@nexgo.de \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).