uweseimet / scsi2pi

Advanced performant SCSI/SASI emulation and tools for the PiSCSI/RaSCSI board
https://www.scsi2pi.net
BSD 3-Clause "New" or "Revised" License
9 stars 2 forks source link

Improve implementation of READ/WRITE LONG #58

Closed uweseimet closed 7 months ago

uweseimet commented 7 months ago

The caching modes "linux" and "write-through" do not rely on transfer sizes based on sector sizes. This means that for devices where caching is based on the linux filesystem cache it should be possible now to implement READ/WRITE LONG for any transfer size smaller than the sector size.

uweseimet commented 7 months ago

@pacjunk In case you are still interested in support for READ/WRITE LONG I would appreciate your feedback. The develop branch of SCSI2Pi provides improved READ/WRITE LONG support. See https://www.scsi2pi.net for details on the project.

I have already successfully tested the new functionality, which currently supports READ/WRITE LONG transfer sizes up to the actual sector size of a drive. As far as I can tell from https://github.com/PiSCSI/piscsi/issues/479 in your case more than the actual sector size needs to be transferred. This is something I might support, but this would have to be tested with a platform that actually uses these commands. My own testing is based on sending READ/WRITE LONG commands to s2p and monitoring the results.

The excess bytes are supposed to be special data, e.g. checksums, and in order to support these data, which do not actually exist in an image file, I see these options:

READ/WRITE LONG support requires one of the caching modes "write-through", "linux" or "linux-optimized" for the respective drive.