Re: [PATCH] Use SCSI read/write(16) with >2TB drives

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

 



Il 14/11/2012 01:54, Jason J. Herne ha scritto:
>  	blk_queue_physical_block_size(sdp->request_queue,
>  				      sdkp->physical_block_size);
>  	sdkp->device->sector_size = sector_size;
> +
> +	/* Use read/write(16) for > 2TB disks */
> +	sdp->use_16_for_rw = (sdkp->capacity > 0xffffffff);
>  }

This needs to be done before this bit:

        /* Rescale capacity to 512-byte units */
        if (sector_size == 4096)
                sdkp->capacity <<= 3;
        else if (sector_size == 2048)
                sdkp->capacity <<= 2;
        else if (sector_size == 1024)
                sdkp->capacity <<= 1;
        else if (sector_size == 256)
                sdkp->capacity >>= 1;

For example, for a 4K-sector disk the "threshold" would be 16TB (2^12 *
2^32).

Paolo
--
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