Re: reeze while write on external usb 3.0 hard disk [Bug 204095]
From: Piergiorgio Sartor
Date: Fri Nov 08 2019 - 18:05:56 EST
On Thu, Oct 17, 2019 at 03:23:34PM -0400, Alan Stern wrote:
> On Thu, 17 Oct 2019, Piergiorgio Sartor wrote:
>
> > > Here is one more thing you can try. I have no idea whether it will
> > > make any difference, but the Changelog entry for the patch you
> > > identified suggests that it might help.
> > >
> > > Alan Stern
> > >
> > >
> > >
> > > Index: usb-devel/drivers/usb/storage/scsiglue.c
> > > ===================================================================
> > > --- usb-devel.orig/drivers/usb/storage/scsiglue.c
> > > +++ usb-devel/drivers/usb/storage/scsiglue.c
> > > @@ -68,7 +68,6 @@ static const char* host_info(struct Scsi
> > > static int slave_alloc (struct scsi_device *sdev)
> > > {
> > > struct us_data *us = host_to_us(sdev->host);
> > > - int maxp;
> > >
> > > /*
> > > * Set the INQUIRY transfer length to 36. We don't use any of
> > > @@ -78,15 +77,6 @@ static int slave_alloc (struct scsi_devi
> > > sdev->inquiry_len = 36;
> > >
> > > /*
> > > - * USB has unusual scatter-gather requirements: the length of each
> > > - * scatterlist element except the last must be divisible by the
> > > - * Bulk maxpacket value. Fortunately this value is always a
> > > - * power of 2. Inform the block layer about this requirement.
> > > - */
> > > - maxp = usb_maxpacket(us->pusb_dev, us->recv_bulk_pipe, 0);
> > > - blk_queue_virt_boundary(sdev->request_queue, maxp - 1);
> > > -
> > > - /*
> > > * Some host controllers may have alignment requirements.
> > > * We'll play it safe by requiring 512-byte alignment always.
> > > */
> >
> > Hi,
> >
> > I tested the patch.
> >
> > Assumming I did everything properly, add patch,
> > test, issue not showing up, remove patch, re-test,
> > issue present.
> >
> > It seems this patch you provide solves the issue.
> >
> > Thanks a lot for the support and the solution.
> >
> > I guess now this patch will be integrated into
> > mainline sometimes.
> > Please let me know, in this thread or directly, in
> > which kernel it will be available.
>
> I'm busy for the next few days, but I will submit the patch next week.
Hi again,
this message to let you know I tested
kernel 5.3.9 (always from Fedora), to
which Greg Kroah-Hartman added your
patch, and everything seems to work
fine, no problems detected so far.
Thanks,
bye,
--
piergiorgio