Re: rounding dxfer_len to 512 bytes boundary in sg.c

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

 



On Thu, 2007-11-15 at 16:27 -0500, Douglas Gilbert wrote:

> That code was there when I inherited the sg driver in 1998
> (the original sg drivers dates from around 1993). The reason
> is/was that the DMA element of some HBA needed it. I tried
> to take it out once (probably in the last millenium) and it
> broke somewhere so back in it went :-)

I would say that if an HBA accepts only rounded values, it should either
round them up itself, or reject non-rounded requests with one or another
status value. Well, in 1993 people might think differently.

> 
> Now the SG_IO ioctl implementation in the block layer
> doesn't have that code so perhaps we might assume from
> that the HBA is no longer in use or its DMA logic
> has been fixed. So perhaps it's time to pull out that
> line again and see if anyone screams.

But the code in sg_link_reserve() which fixes the last scatterlist
element length (and which was most probably added at later times),
nullifies the effect of that rounding anyway. It only has an effect on
requests bigger than def_reserved_size, and there it breaks IO. So I
scream. 


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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