On 18/01/21 12:44, P J P wrote:
To confirm:

   * (uint64_t)INT_MAX << 2 is => 8589934588 ~= 8.5G sectors ?
     Media size would be:
       8.5G * 512B(sector) => ~4TB
       8.5G * 4096B(sector) => ~32TB

   * We are limiting IDE media size to ~4TB/~32TB ?

s->nb_sectors is in units of 512B, so the limit would be 4TB. The purpose is to limit the lba and nb_sectors arguments (which are in 2048B units) of ide_atapi_cmd_read_{dma,pio} to INT_MAX.

Paolo


Reply via email to