Thread (6 messages) 6 messages, 3 authors, 2016-08-10

Re: [PATCH v2 2/2] libata-core: do not set dev->max_sectors for LBA48 devices

From: Sergei Shtylyov <hidden>
Date: 2016-08-09 16:50:57
Also in: linux-ide, linux-scsi

Hello.

On 08/09/2016 05:45 PM, tom.ty89@gmail.com wrote:
From: Tom Yan <redacted>

Currently block layer limit max_hw_sectors is set to
ATA_MAX_SECTORS_LBA48 (65535), for devices with LBA48 support.

However, block layer limit max_sectors (which is the effective
one; also adjustable, upper-bounded by max_hw_sectors) is set to
BLK_DEF_MAX_SECTORS (currently 2560) by the scsi disk driver,
since libata's SATL does not report an Optimal Transfer Length.

This does not make much sense, especially when the current
BLK_DEF_MAX_SECTORS appears to be unsafe for some ATA devices
(see ATA_HORKAGE_MAX_SEC_1024). Truth is, the current value
appears to be arbitrary anyway. See commit d2be537c3ba3
("block: bump BLK_DEF_MAX_SECTORS to 2560").

Therefore, avoid setting dev->max_sectors when it is strictly
necessary. Leave it as 0 otherwise, so that both block layer
    Hmm, avoid it if it's strictly necessary?
limits will remain as SCSI_DEFAULT_MAX_SECTORS (currently 1024).
    You forgot to sign off on the patch.

MBR, Sergei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help