Search code examples
chard-drivescsi

SCSI Read10 vs Read16


Which case would be considered correct?

  1. Doing reads with a Read 16 command no matter if the LBA's are 32 or 64 bit.

  2. If the max LBA is 32 bit then do a Read 10 command and if the max LBA is 64 bit then do a Read 16 command.

What are the pros and cons of each choice?

I know for a Read Capacity command it is correct to run a 10 and if it returns FFFFFFFFh then run a 16. Why is this the case? The Read Capacity 16 command works for both cases and avoids even needing the Read Capacity 10 at all.


Solution

  • Keep in mind that the reason that SCSI has multiple "sizes" of commands like this is, in many cases, because SCSI is a very old protocol. (It was first standardized in 1986, and was in development for some time before that!) At the time, a large SCSI device would range in the low hundreds of megabytes — even a 32-bit LBA was considered excessive at the time. The 64-bit LBA commands simply didn't exist until much later.

    The question here is really just whether you want to support these old devices. If you do, you will need to use Read (10) for reads on "small" devices, as they may not recognize Read (16). Similarly, the use of Read Capacity (10) before Read Capacity (16) is because older devices won't recognize the larger version.