Port-amiga archive

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

Re: Possible problem with accessing DVDs larger than 4GB

On Mon, 25 Feb 2013, Mark wrote:

I've been using an emulated A3000/040/SCSI CD drive config. With that,
booting NetBSD 6.0.1 and doing
 # dd if=/dev/cd0c of=temp.bin bs=2048
fails to read the last sector of the CD; e.g. if the CD has 19057 sectors,
dd only reads 19056. (For faster testing you can add a skip= argument to
dd, to skip most of the disc.)

(Also, the NetBSD SCSI CD code seems quite sub-optimal, in that it appears
to issue separate READ 10 commands for every sector, even if you pass a
bs=32768 argument to dd.)

That would be because you are using the block device, /dev/cd0c. That will read the device data into a kernel buffer, using BLKDEV_IOSIZE sized reads, which is 2048 bytes. It also means that the data has to be copied to the user buffer after it has been read, slowing things down even more.

If you use the character (raw) device, /dev/rcd0c, then the transfer will use up to 64K byte I/O, and the data is read directly into the user buffer.


Michael L. Hitch                        mhitch%montana.edu@localhost
Operations Consulting,  Information Technology Center
Montana State University, Bozeman, MT     USA

Home | Main Index | Thread Index | Old Index