Re: Issues with commit 34b48db6 ("block: remove artifical max_hw_sectors cap")

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

 



On Tue, Dec 23, 2014 at 11:48:40PM -0800, Kenneth R. Crudup wrote:
> > Looks like we need to quirk it.  Can you try to echo different limits
> > to the /sys/block/sdc/queue/max_hw_sectors_kb  file for the device to
> > find the limit for it?
> 
> Looks like it's 32767; making it an even 32K sectors starts the EIOs again.
> 
> To recap for the various lists:
> 
>   Vendor: Samsung  Model: D3 Station       Rev: 0202
>   Type:   Direct-Access                    ANSI  SCSI revision: 06
> 
> It's the 4TB model:
> 
> /sys/block/sdc/size:7814037160
> /sys/block/sdc/queue/max_hw_sectors_kb:61440
> 
> Works OK if I echo 32767 > /sys/block/sdc/queue/max_sectors_kb

Interesting.  Basically this is the limit for modern ATA disks:

drivers/ata/libata-core.c:             dev->max_sectors = ATA_MAX_SECTORS_LBA48;
drivers/ata/libata-core.c:             dev->max_sectors = ATA_MAX_SECTORS_LBA48;
include/linux/ata.h:    ATA_MAX_SECTORS_LBA48   = 65535,/* TODO: 65536? */

Seems like the USB bridge isn't properly communicating this limit to the SCSI
layer.  Maybe it's a good idea to generally limit USB storage to this size?

> Has anyone seen a disk out there that's got a (properly-supported)
> "max_hw_sectors_kb" >= 32K? If not, maybe we should clamp that value to
> prevent other misreporting(?) disks?

Yes, lots of SCSI disks and arrays properly support this.
--
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