Re: [PATCH 2/5] scsi: advansys: use sg helper to operate sgl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2019-06-10 at 15:36 -0400, Ewan D. Milne wrote:
> On Mon, 2019-06-10 at 11:37 -0700, James Bottomley wrote:
> > On Mon, 2019-06-10 at 23:03 +0800, Ming Lei wrote:
> > > The current way isn't safe for chained sgl, so use sgl helper to
> > > operate sgl.
> > 
> > The advansys driver doesn't currently use a chained
> > scatterlist.  In
> > theory it could; the 
> > 
> > 	if (shost->sg_tablesize > SG_ALL) {
> > 		shost->sg_tablesize = SG_ALL;
> > 	}
> > 
> > At around line 11226 is what prevents it and that could be
> > eliminated provided someone actually has the hardware to test.
> > 
> > However, provided drivers make the correct SG_ALL or less
> > declaration, they're entitled to treat scatterlists as fully
> > contiguous, so there's no real justification (beyond uniformity)
> > for making it use the chain helpers.
> > 
> > James
> > 
> 
> I thought the whole issue came about because Ming's earlier changes
> to scsi_lib.c made the previously SG_CHUNK_SIZE scatterlist allocated
> with the struct request much smaller, (SCSI_INLINE_SG_CNT is 2) so
> everything needs to support it?

Um, well, I'm just going by the commit log.  If the problem is someone
broke the SG_ALL no chaining assumption in an earlier commit, finger
that as the buggy commit you're fixing rather than implying the drivers
had a longstanding bug.  In fact, preferably do this work as a
precursor to the original instead of leaving the drivers broken for a
bisect.

James




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux